From 3fa7b9fe5e986a9abd557c68cce82b246199a189 Mon Sep 17 00:00:00 2001 From: K7ZVX Date: Wed, 13 May 2026 07:07:05 +0000 Subject: [PATCH] feat(dashboard): Add dynamic channel and node pickers - Add GET /api/channels endpoint for live radio channel data - Create ChannelPicker component (single/multi-select from live channels) - Create NodePicker component (searchable multi-select from mesh nodes) - Replace manual inputs in Config with data-driven pickers - Update Notifications to use pickers for mesh broadcast/DM - Resolve node names in Alerts subscriptions display Co-Authored-By: Claude Opus 4.5 --- .../src/components/ChannelPicker.tsx | 156 +++++++++++++ .../src/components/NodePicker.tsx | 210 ++++++++++++++++++ dashboard-frontend/src/pages/Alerts.tsx | 31 ++- dashboard-frontend/src/pages/Config.tsx | 29 ++- .../src/pages/Notifications.tsx | 22 +- meshai/dashboard/api/mesh_routes.py | 47 ++++ meshai/dashboard/server.py | 1 + .../{index-DGtsDLP7.js => index-BNjrbmGz.js} | 156 ++++++------- ...{index-D1Pqs_mG.css => index-so1NV9Au.css} | 2 +- meshai/dashboard/static/index.html | 4 +- 10 files changed, 551 insertions(+), 107 deletions(-) create mode 100644 dashboard-frontend/src/components/ChannelPicker.tsx create mode 100644 dashboard-frontend/src/components/NodePicker.tsx rename meshai/dashboard/static/assets/{index-DGtsDLP7.js => index-BNjrbmGz.js} (66%) rename meshai/dashboard/static/assets/{index-D1Pqs_mG.css => index-so1NV9Au.css} (50%) diff --git a/dashboard-frontend/src/components/ChannelPicker.tsx b/dashboard-frontend/src/components/ChannelPicker.tsx new file mode 100644 index 0000000..28b2b27 --- /dev/null +++ b/dashboard-frontend/src/components/ChannelPicker.tsx @@ -0,0 +1,156 @@ +import { useState, useEffect } from 'react' +import { Check } from 'lucide-react' + +interface Channel { + index: number + name: string + role: string + enabled: boolean +} + +interface ChannelPickerSingleProps { + label: string + value: number + onChange: (value: number) => void + helper?: string + info?: string + mode: 'single' + includeDisabled?: boolean // Include a "Disabled (-1)" option +} + +interface ChannelPickerMultiProps { + label: string + value: number[] + onChange: (value: number[]) => void + helper?: string + info?: string + mode: 'multi' +} + +type ChannelPickerProps = ChannelPickerSingleProps | ChannelPickerMultiProps + +export default function ChannelPicker(props: ChannelPickerProps) { + const [channels, setChannels] = useState([]) + const [loading, setLoading] = useState(true) + + useEffect(() => { + fetch('/api/channels') + .then(res => res.json()) + .then(data => { + setChannels(data) + setLoading(false) + }) + .catch(() => { + setChannels([]) + setLoading(false) + }) + }, []) + + const formatChannel = (ch: Channel): string => { + const roleLabel = ch.role === 'PRIMARY' ? 'Primary' : + ch.role === 'SECONDARY' ? 'Secondary' : '' + return `${ch.index}: ${ch.name}${roleLabel ? ` (${roleLabel})` : ''}` + } + + // Fallback to number input if no channels loaded + if (!loading && channels.length === 0) { + if (props.mode === 'single') { + return ( +
+ + props.onChange(Number(e.target.value))} + min={props.includeDisabled ? -1 : 0} + max={7} + className="w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent" + /> + {props.helper &&

{props.helper}

} +
+ ) + } else { + return ( +
+ + { + const nums = e.target.value.split(',').map(s => parseInt(s.trim())).filter(n => !isNaN(n)) + props.onChange(nums) + }} + placeholder="Enter channel numbers separated by commas" + className="w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent" + /> + {props.helper &&

{props.helper}

} +
+ ) + } + } + + // Single select mode - dropdown + if (props.mode === 'single') { + const { value, onChange, label, helper, includeDisabled } = props + const enabledChannels = channels.filter(ch => ch.enabled) + + return ( +
+ + + {helper &&

{helper}

} +
+ ) + } + + // Multi select mode - checkboxes + const { value, onChange, label, helper } = props + const enabledChannels = channels.filter(ch => ch.enabled) + + const toggleChannel = (index: number) => { + if (value.includes(index)) { + onChange(value.filter(v => v !== index)) + } else { + onChange([...value, index].sort((a, b) => a - b)) + } + } + + return ( +
+ +
+ {enabledChannels.map((ch) => ( + + ))} + {enabledChannels.length === 0 && ( +
No channels available
+ )} +
+ {helper &&

{helper}

} +
+ ) +} diff --git a/dashboard-frontend/src/components/NodePicker.tsx b/dashboard-frontend/src/components/NodePicker.tsx new file mode 100644 index 0000000..cf2cda8 --- /dev/null +++ b/dashboard-frontend/src/components/NodePicker.tsx @@ -0,0 +1,210 @@ +import { useState, useEffect, useMemo } from 'react' +import { Search, X, Check } from 'lucide-react' + +interface Node { + node_num: number + node_id_hex: string + short_name: string + long_name: string + role: string + is_infrastructure?: boolean +} + +interface NodePickerProps { + label: string + value: string[] + onChange: (value: string[]) => void + helper?: string + info?: string + roleFilter?: string // e.g., "ROUTER" to show only infrastructure + valueType?: 'short_name' | 'node_num' | 'node_id_hex' // What to store in value +} + +export default function NodePicker({ + label, + value, + onChange, + helper, + info: _info, + roleFilter, + valueType = 'short_name', +}: NodePickerProps) { + const [nodes, setNodes] = useState([]) + const [loading, setLoading] = useState(true) + const [search, setSearch] = useState('') + const [isOpen, setIsOpen] = useState(false) + + useEffect(() => { + fetch('/api/nodes') + .then(res => res.json()) + .then(data => { + setNodes(data) + setLoading(false) + }) + .catch(() => { + setNodes([]) + setLoading(false) + }) + }, []) + + const filteredNodes = useMemo(() => { + let result = nodes + + // Filter by role if specified + if (roleFilter) { + result = result.filter(n => { + if (roleFilter === 'ROUTER' || roleFilter === 'infrastructure') { + return n.is_infrastructure || + n.role === 'ROUTER' || + n.role === 'ROUTER_CLIENT' || + n.role === 'REPEATER' + } + return n.role === roleFilter + }) + } + + // Filter by search + if (search.trim()) { + const s = search.toLowerCase() + result = result.filter(n => + n.short_name?.toLowerCase().includes(s) || + n.long_name?.toLowerCase().includes(s) || + n.role?.toLowerCase().includes(s) || + n.node_id_hex?.toLowerCase().includes(s) + ) + } + + return result.sort((a, b) => (a.short_name || '').localeCompare(b.short_name || '')) + }, [nodes, search, roleFilter]) + + const getNodeValue = (node: Node): string => { + switch (valueType) { + case 'node_num': + return String(node.node_num) + case 'node_id_hex': + return node.node_id_hex + default: + return node.short_name || String(node.node_num) + } + } + + const isSelected = (node: Node): boolean => { + const nodeVal = getNodeValue(node) + return value.includes(nodeVal) + } + + const toggleNode = (node: Node) => { + const nodeVal = getNodeValue(node) + if (value.includes(nodeVal)) { + onChange(value.filter(v => v !== nodeVal)) + } else { + onChange([...value, nodeVal]) + } + } + + const formatNodeDisplay = (node: Node): string => { + const parts = [node.short_name] + if (node.long_name && node.long_name !== node.short_name) { + parts.push(`— ${node.long_name}`) + } + if (node.role) { + parts.push(`(${node.role})`) + } + return parts.join(' ') + } + + // Fallback to text input if no nodes loaded + if (!loading && nodes.length === 0) { + return ( +
+ + onChange(e.target.value.split(',').map(s => s.trim()).filter(Boolean))} + placeholder="Enter node IDs separated by commas" + className="w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent" + /> + {helper &&

{helper}

} +
+ ) + } + + return ( +
+ + + {/* Selected nodes display */} + {value.length > 0 && ( +
+ {value.map((v) => { + const node = nodes.find(n => getNodeValue(n) === v) + return ( + + {node ? node.short_name : v} + + + ) + })} +
+ )} + + {/* Search and dropdown */} +
+
+ + setSearch(e.target.value)} + onFocus={() => setIsOpen(true)} + placeholder={loading ? "Loading nodes..." : "Search nodes..."} + className="w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent" + /> +
+ + {isOpen && !loading && ( + <> +
setIsOpen(false)} /> +
+ {filteredNodes.length === 0 ? ( +
+ No nodes found +
+ ) : ( + filteredNodes.map((node) => ( + + )) + )} +
+ + )} +
+ + {helper &&

{helper}

} +
+ ) +} diff --git a/dashboard-frontend/src/pages/Alerts.tsx b/dashboard-frontend/src/pages/Alerts.tsx index d4305f0..f4bca9f 100644 --- a/dashboard-frontend/src/pages/Alerts.tsx +++ b/dashboard-frontend/src/pages/Alerts.tsx @@ -26,6 +26,13 @@ import { type AlertHistoryItem, type Subscription, } from '@/lib/api' + +interface Node { + node_num: number + node_id_hex: string + short_name: string + long_name: string +} import { useWebSocket } from '@/hooks/useWebSocket' // Alert type icons mapping @@ -308,7 +315,20 @@ function AlertHistoryTable({ } // Subscription Card Component -function SubscriptionCard({ subscription }: { subscription: Subscription }) { +function SubscriptionCard({ subscription, nodes }: { subscription: Subscription; nodes: Node[] }) { + const resolveNodeName = (userId: string): string => { + const node = nodes.find(n => + n.node_id_hex === userId || + String(n.node_num) === userId || + n.short_name === userId + ) + if (node) { + return node.long_name && node.long_name !== node.short_name + ? `${node.short_name} (${node.long_name})` + : node.short_name + } + return userId + } const formatSchedule = () => { if (subscription.sub_type === 'alerts') { return 'Real-time' @@ -356,7 +376,7 @@ function SubscriptionCard({ subscription }: { subscription: Subscription }) { )}
- {formatSchedule()} • Node {subscription.user_id} + {formatSchedule()} • {resolveNodeName(subscription.user_id)}
@@ -369,6 +389,7 @@ export default function Alerts() { const [activeAlerts, setActiveAlerts] = useState([]) const [history, setHistory] = useState([]) const [subscriptions, setSubscriptions] = useState([]) + const [nodes, setNodes] = useState([]) const [loading, setLoading] = useState(true) const [error, setError] = useState(null) @@ -395,8 +416,9 @@ export default function Alerts() { fetchAlerts().catch(() => []), fetchAlertHistory(pageSize, 0).catch(() => ({ items: [], total: 0 })), fetchSubscriptions().catch(() => []), + fetch('/api/nodes').then(r => r.json()).catch(() => []), ]) - .then(([alerts, historyData, subs]) => { + .then(([alerts, historyData, subs, nodeData]) => { setActiveAlerts(alerts) if (Array.isArray(historyData)) { setHistory(historyData) @@ -406,6 +428,7 @@ export default function Alerts() { setTotalPages(Math.ceil((historyData.total || 0) / pageSize)) } setSubscriptions(subs) + setNodes(nodeData) setLoading(false) }) .catch((err) => { @@ -532,7 +555,7 @@ export default function Alerts() { {subscriptions.length > 0 ? (
{subscriptions.map((sub) => ( - + ))}
) : ( diff --git a/dashboard-frontend/src/pages/Config.tsx b/dashboard-frontend/src/pages/Config.tsx index 0206aec..863868b 100644 --- a/dashboard-frontend/src/pages/Config.tsx +++ b/dashboard-frontend/src/pages/Config.tsx @@ -1,4 +1,6 @@ import { useState, useEffect, useCallback } from 'react' +import NodePicker from '@/components/NodePicker' +import ChannelPicker from '@/components/ChannelPicker' import { Settings, Bot, Wifi, MessageSquare, Database, Brain, Eye, Terminal, Cpu, Cloud, Radio, BookOpen, Layers, Activity, @@ -882,18 +884,19 @@ function ContextSection({ data, onChange }: { data: ContextConfig; onChange: (d: /> {data.enabled && ( <> - onChange({ ...data, observe_channels: v })} - helper="Channel indexes to monitor (empty = all)" - info="Meshtastic channel numbers to listen on. Channel 0 is the default primary channel. Leave empty to monitor all channels." + helper="Channels to monitor (empty = all)" + info="Meshtastic channels to listen on. Leave empty to monitor all channels." + mode="multi" /> - onChange({ ...data, ignore_nodes: v })} - helper="Node IDs to exclude from context" + helper="Nodes to exclude from context" info="Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes." />
@@ -1439,22 +1442,24 @@ function MeshIntelligenceSection({ data, onChange }: { data: MeshIntelligenceCon />
- onChange({ ...data, critical_nodes: v })} - helper="Short names of critical infrastructure" - info="Nodes that get priority alerting when they go offline. Use the node's short name (e.g., MHR, HPR)." + helper="Critical infrastructure nodes" + info="Nodes that get priority alerting when they go offline." + roleFilter="infrastructure" />
- onChange({ ...data, alert_channel: v })} - min={-1} - helper="-1 = disabled" - info="Meshtastic channel number for broadcast alerts. Set to -1 to disable channel broadcasting." + helper="Channel for broadcast alerts" + info="Meshtastic channel for broadcast alerts. Select Disabled to turn off channel broadcasting." + mode="single" + includeDisabled /> {channel.type === 'mesh_broadcast' && ( - onChange({ ...channel, channel_index: v })} - min={0} - max={7} - helper="Mesh channel number (0-7)" - info="The mesh channel to broadcast alerts on. Channel 0 is typically the default channel." + helper="Channel for broadcast alerts" + info="The mesh channel to broadcast alerts on." + mode="single" /> )} {channel.type === 'mesh_dm' && ( - onChange({ ...channel, node_ids: v })} - helper="Node IDs to receive DM alerts" - info="Node IDs that receive direct message alerts. Enter the full node ID (e.g., '!a1b2c3d4') for each recipient." + helper="Nodes to receive DM alerts" + info="Nodes that receive direct message alerts." + valueType="node_id_hex" /> )} diff --git a/meshai/dashboard/api/mesh_routes.py b/meshai/dashboard/api/mesh_routes.py index c95739e..c5eed0b 100644 --- a/meshai/dashboard/api/mesh_routes.py +++ b/meshai/dashboard/api/mesh_routes.py @@ -354,3 +354,50 @@ async def get_edges(request: Request): }) return edges + + + +@router.get("/channels") +async def get_channels(request: Request): + """Get radio channels from the connected Meshtastic interface.""" + connector = getattr(request.app.state, "connector", None) + + if not connector or not connector.connected: + return [] + + try: + interface = connector._interface + if not interface or not hasattr(interface, "localNode"): + return [] + + local_node = interface.localNode + if not local_node or not hasattr(local_node, "channels"): + return [] + + channels = [] + for ch in local_node.channels: + if ch is None: + continue + + # Get channel settings + settings = getattr(ch, "settings", None) + name = getattr(settings, "name", "") if settings else "" + role_val = getattr(ch, "role", 0) + + # Map role enum to string + role_map = {0: "DISABLED", 1: "PRIMARY", 2: "SECONDARY"} + role = role_map.get(role_val, "UNKNOWN") + + channels.append({ + "index": ch.index, + "name": name or f"Channel {ch.index}", + "role": role, + "enabled": role_val != 0, + }) + + return channels + + except Exception as e: + import logging + logging.getLogger(__name__).warning(f"Failed to get channels: {e}") + return [] diff --git a/meshai/dashboard/server.py b/meshai/dashboard/server.py index 0d2908d..4ea19ee 100644 --- a/meshai/dashboard/server.py +++ b/meshai/dashboard/server.py @@ -113,6 +113,7 @@ async def start_dashboard(meshai_instance: "MeshAI") -> DashboardBroadcaster: app.state.env_store = getattr(meshai_instance, "env_store", None) app.state.subscription_manager = meshai_instance.subscription_manager app.state.notification_router = getattr(meshai_instance, "notification_router", None) + app.state.connector = meshai_instance.connector # Create broadcaster and attach to app state broadcaster = DashboardBroadcaster() diff --git a/meshai/dashboard/static/assets/index-DGtsDLP7.js b/meshai/dashboard/static/assets/index-BNjrbmGz.js similarity index 66% rename from meshai/dashboard/static/assets/index-DGtsDLP7.js rename to meshai/dashboard/static/assets/index-BNjrbmGz.js index b75fd30..18f43aa 100644 --- a/meshai/dashboard/static/assets/index-DGtsDLP7.js +++ b/meshai/dashboard/static/assets/index-BNjrbmGz.js @@ -1,4 +1,4 @@ -function uU(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var cU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _C(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tz={exports:{}},_0={},Cz={exports:{}},at={};/** +function cU(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var hU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tz={exports:{}},b0={},Cz={exports:{}},at={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function uU(t,e){for(var r=0;r>>1,K=j[X];if(0>>1;Xi(ue,H))vei(Ge,ue)?(j[X]=Ge,j[ve]=H,X=ve):(j[X]=ue,j[ie]=H,X=ie);else if(vei(Ge,H))j[X]=Ge,j[ve]=H,X=ve;else break e}}return W}function i(j,W){var H=j.sortIndex-W.sortIndex;return H!==0?H:j.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,h=null,f=3,d=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=j)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function w(j){if(g=!1,S(j),!p)if(r(l)!==null)p=!0,F(C);else{var W=r(u);W!==null&&U(w,W.startTime-j)}}function C(j,W){p=!1,g&&(g=!1,y(k),k=-1),d=!0;var H=f;try{for(S(W),h=r(l);h!==null&&(!(h.expirationTime>W)||j&&!I());){var X=h.callback;if(typeof X=="function"){h.callback=null,f=h.priorityLevel;var K=X(h.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?h.callback=K:h===r(l)&&n(l),S(W)}else n(l);h=r(l)}if(h!==null)var ne=!0;else{var ie=r(u);ie!==null&&U(w,ie.startTime-W),ne=!1}return ne}finally{h=null,f=H,d=!1}}var M=!1,A=null,k=-1,E=5,D=-1;function I(){return!(t.unstable_now()-Dj||125X?(j.sortIndex=H,e(u,j),r(l)===null&&j===r(u)&&(g?(y(k),k=-1):g=!0,U(w,H-X))):(j.sortIndex=K,e(l,j),p||d||(p=!0,F(C))),j},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(j){var W=f;return function(){var H=f;f=W;try{return j.apply(this,arguments)}finally{f=H}}}})(zz);Oz.exports=zz;var EU=Oz.exports;/** + */(function(t){function e(j,W){var H=j.length;j.push(W);e:for(;0>>1,K=j[X];if(0>>1;Xi(ue,H))vei(Ge,ue)?(j[X]=Ge,j[ve]=H,X=ve):(j[X]=ue,j[ie]=H,X=ie);else if(vei(Ge,H))j[X]=Ge,j[ve]=H,X=ve;else break e}}return W}function i(j,W){var H=j.sortIndex-W.sortIndex;return H!==0?H:j.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,h=null,f=3,d=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=j)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function w(j){if(g=!1,b(j),!p)if(r(l)!==null)p=!0,F(C);else{var W=r(u);W!==null&&Z(w,W.startTime-j)}}function C(j,W){p=!1,g&&(g=!1,y(k),k=-1),d=!0;var H=f;try{for(b(W),h=r(l);h!==null&&(!(h.expirationTime>W)||j&&!I());){var X=h.callback;if(typeof X=="function"){h.callback=null,f=h.priorityLevel;var K=X(h.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?h.callback=K:h===r(l)&&n(l),b(W)}else n(l);h=r(l)}if(h!==null)var ne=!0;else{var ie=r(u);ie!==null&&Z(w,ie.startTime-W),ne=!1}return ne}finally{h=null,f=H,d=!1}}var M=!1,A=null,k=-1,N=5,D=-1;function I(){return!(t.unstable_now()-Dj||125X?(j.sortIndex=H,e(u,j),r(l)===null&&j===r(u)&&(g?(y(k),k=-1):g=!0,Z(w,H-X))):(j.sortIndex=K,e(l,j),p||d||(p=!0,F(C))),j},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(j){var W=f;return function(){var H=f;f=W;try{return j.apply(this,arguments)}finally{f=H}}}})(zz);Oz.exports=zz;var EU=Oz.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function uU(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=Object.prototype.hasOwnProperty,RU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,mP={},yP={};function OU(t){return sb.call(yP,t)?!0:sb.call(mP,t)?!1:RU.test(t)?yP[t]=!0:(mP[t]=!0,!1)}function zU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function BU(t,e,r,n){if(e===null||typeof e>"u"||zU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function sn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ir[t]=new sn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ir[e]=new sn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ir[t]=new sn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ir[t]=new sn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ir[t]=new sn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ir[t]=new sn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ir[t]=new sn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ir[t]=new sn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ir[t]=new sn(t,5,!1,t.toLowerCase(),null,!1,!1)});var TC=/[\-:]([a-z])/g;function CC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(TC,CC);Ir[e]=new sn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(TC,CC);Ir[e]=new sn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(TC,CC);Ir[e]=new sn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ir[t]=new sn(t,1,!1,t.toLowerCase(),null,!1,!1)});Ir.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ir[t]=new sn(t,1,!1,t.toLowerCase(),null,!0,!0)});function MC(t,e,r,n){var i=Ir.hasOwnProperty(e)?Ir[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lS=Object.prototype.hasOwnProperty,OU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,yP={},_P={};function zU(t){return lS.call(_P,t)?!0:lS.call(yP,t)?!1:OU.test(t)?_P[t]=!0:(yP[t]=!0,!1)}function BU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jU(t,e,r,n){if(e===null||typeof e>"u"||BU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function sn(t,e,r,n,i,a,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=a,this.removeEmptyString=o}var Ir={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ir[t]=new sn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ir[e]=new sn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ir[t]=new sn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ir[t]=new sn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Ir[t]=new sn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ir[t]=new sn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ir[t]=new sn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ir[t]=new sn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ir[t]=new sn(t,5,!1,t.toLowerCase(),null,!1,!1)});var wC=/[\-:]([a-z])/g;function TC(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(wC,TC);Ir[e]=new sn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(wC,TC);Ir[e]=new sn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(wC,TC);Ir[e]=new sn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ir[t]=new sn(t,1,!1,t.toLowerCase(),null,!1,!1)});Ir.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ir[t]=new sn(t,1,!1,t.toLowerCase(),null,!0,!0)});function CC(t,e,r,n){var i=Ir.hasOwnProperty(e)?Ir[e]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{ox=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Bf(t):""}function jU(t){switch(t.tag){case 5:return Bf(t.type);case 16:return Bf("Lazy");case 13:return Bf("Suspense");case 19:return Bf("SuspenseList");case 0:case 2:case 15:return t=sx(t.type,!1),t;case 11:return t=sx(t.type.render,!1),t;case 1:return t=sx(t.type,!0),t;default:return""}}function hb(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case cc:return"Fragment";case uc:return"Portal";case lb:return"Profiler";case AC:return"StrictMode";case ub:return"Suspense";case cb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Vz:return(t.displayName||"Context")+".Consumer";case jz:return(t._context.displayName||"Context")+".Provider";case LC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case PC:return e=t.displayName||null,e!==null?e:hb(t.type)||"Memo";case Oo:e=t._payload,t=t._init;try{return hb(t(e))}catch{}}return null}function VU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return hb(e);case 8:return e===AC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ms(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Gz(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function FU(t){var e=Gz(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Tp(t){t._valueTracker||(t._valueTracker=FU(t))}function Hz(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Gz(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Nm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function fb(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function xP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ms(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Wz(t,e){e=e.checked,e!=null&&MC(t,"checked",e,!1)}function db(t,e){Wz(t,e);var r=ms(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?vb(t,e.type,r):e.hasOwnProperty("defaultValue")&&vb(t,e.type,ms(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function SP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function vb(t,e,r){(e!=="number"||Nm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var jf=Array.isArray;function Lc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Cp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Pd(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var td={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},GU=["Webkit","ms","Moz","O"];Object.keys(td).forEach(function(t){GU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),td[e]=td[t]})});function Yz(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||td.hasOwnProperty(t)&&td[t]?(""+e).trim():e+"px"}function Xz(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Yz(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var HU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mb(t,e){if(e){if(HU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function yb(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _b=null;function kC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var xb=null,Pc=null,kc=null;function TP(t){if(t=kv(t)){if(typeof xb!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=T0(e),xb(t.stateNode,t.type,e))}}function qz(t){Pc?kc?kc.push(t):kc=[t]:Pc=t}function Kz(){if(Pc){var t=Pc,e=kc;if(kc=Pc=null,TP(t),e)for(t=0;t>>=0,t===0?32:31-(e7(t)/t7|0)|0}var Mp=64,Ap=4194304;function Vf(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Bm(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Vf(s):(a&=o,a!==0&&(n=Vf(a)))}else o=r&~i,o!==0?n=Vf(o):a!==0&&(n=Vf(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Lv(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Pi(e),t[e]=r}function a7(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=nd),EP=" ",NP=!1;function m3(t,e){switch(t){case"keyup":return E7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function y3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hc=!1;function R7(t,e){switch(t){case"compositionend":return y3(e);case"keypress":return e.which!==32?null:(NP=!0,EP);case"textInput":return t=e.data,t===EP&&NP?null:t;default:return null}}function O7(t,e){if(hc)return t==="compositionend"||!BC&&m3(t,e)?(t=p3(),im=RC=Go=null,hc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=BP(r)}}function b3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?b3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function w3(){for(var t=window,e=Nm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Nm(t.document)}return e}function jC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function U7(t){var e=w3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&b3(r.ownerDocument.documentElement,r)){if(n!==null&&jC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=jP(r,a);var o=jP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,fc=null,Mb=null,ad=null,Ab=!1;function VP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ab||fc==null||fc!==Nm(n)||(n=fc,"selectionStart"in n&&jC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ad&&Rd(ad,n)||(ad=n,n=Fm(Mb,"onSelect"),0pc||(t.current=Eb[pc],Eb[pc]=null,pc--)}function Mt(t,e){pc++,Eb[pc]=t.current,t.current=e}var ys={},Yr=As(ys),mn=As(!1),Ul=ys;function Gc(t,e){var r=t.type.contextTypes;if(!r)return ys;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function yn(t){return t=t.childContextTypes,t!=null}function Hm(){Lt(mn),Lt(Yr)}function $P(t,e,r){if(Yr.current!==ys)throw Error(ce(168));Mt(Yr,e),Mt(mn,r)}function I3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,VU(t)||"Unknown",i));return zt({},r,n)}function Wm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ys,Ul=Yr.current,Mt(Yr,t),Mt(mn,mn.current),!0}function YP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=I3(t,e,Ul),n.__reactInternalMemoizedMergedChildContext=t,Lt(mn),Lt(Yr),Mt(Yr,t)):Lt(mn),Mt(mn,r)}var Ha=null,C0=!1,Sx=!1;function E3(t){Ha===null?Ha=[t]:Ha.push(t)}function n9(t){C0=!0,E3(t)}function Ls(){if(!Sx&&Ha!==null){Sx=!0;var t=0,e=xt;try{var r=Ha;for(xt=1;t>=o,i-=o,Za=1<<32-Pi(e)+i|r<k?(E=A,A=null):E=A.sibling;var D=f(y,A,S[k],w);if(D===null){A===null&&(A=E);break}t&&A&&D.alternate===null&&e(y,A),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D,A=E}if(k===S.length)return r(y,A),Pt&&fl(y,k),C;if(A===null){for(;kk?(E=A,A=null):E=A.sibling;var I=f(y,A,D.value,w);if(I===null){A===null&&(A=E);break}t&&A&&I.alternate===null&&e(y,A),_=a(I,_,k),M===null?C=I:M.sibling=I,M=I,A=E}if(D.done)return r(y,A),Pt&&fl(y,k),C;if(A===null){for(;!D.done;k++,D=S.next())D=h(y,D.value,w),D!==null&&(_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return Pt&&fl(y,k),C}for(A=n(y,A);!D.done;k++,D=S.next())D=d(A,y,k,D.value,w),D!==null&&(t&&D.alternate!==null&&A.delete(D.key===null?k:D.key),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return t&&A.forEach(function(z){return e(y,z)}),Pt&&fl(y,k),C}function m(y,_,S,w){if(typeof S=="object"&&S!==null&&S.type===cc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case wp:e:{for(var C=S.key,M=_;M!==null;){if(M.key===C){if(C=S.type,C===cc){if(M.tag===7){r(y,M.sibling),_=i(M,S.props.children),_.return=y,y=_;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Oo&&KP(C)===M.type){r(y,M.sibling),_=i(M,S.props),_.ref=rf(y,M,S),_.return=y,y=_;break e}r(y,M);break}else e(y,M);M=M.sibling}S.type===cc?(_=Ol(S.props.children,y.mode,w,S.key),_.return=y,y=_):(w=fm(S.type,S.key,S.props,null,y.mode,w),w.ref=rf(y,_,S),w.return=y,y=w)}return o(y);case uc:e:{for(M=S.key;_!==null;){if(_.key===M)if(_.tag===4&&_.stateNode.containerInfo===S.containerInfo&&_.stateNode.implementation===S.implementation){r(y,_.sibling),_=i(_,S.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else e(y,_);_=_.sibling}_=kx(S,y.mode,w),_.return=y,y=_}return o(y);case Oo:return M=S._init,m(y,_,M(S._payload),w)}if(jf(S))return p(y,_,S,w);if(Kh(S))return g(y,_,S,w);Np(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,S),_.return=y,y=_):(r(y,_),_=Px(S,y.mode,w),_.return=y,y=_),o(y)):r(y,_)}return m}var Wc=z3(!0),B3=z3(!1),$m=As(null),Ym=null,yc=null,HC=null;function WC(){HC=yc=Ym=null}function UC(t){var e=$m.current;Lt($m),t._currentValue=e}function Ob(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ic(t,e){Ym=t,HC=yc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(gn=!0),t.firstContext=null)}function si(t){var e=t._currentValue;if(HC!==t)if(t={context:t,memoizedValue:e,next:null},yc===null){if(Ym===null)throw Error(ce(308));yc=t,Ym.dependencies={lanes:0,firstContext:t}}else yc=yc.next=t;return e}var Ml=null;function ZC(t){Ml===null?Ml=[t]:Ml.push(t)}function j3(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,ZC(e)):(r.next=i.next,i.next=r),e.interleaved=r,lo(t,n)}function lo(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var zo=!1;function $C(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function V3(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ja(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ns(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ct&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,lo(t,r)}return i=n.interleaved,i===null?(e.next=e,ZC(n)):(e.next=i.next,i.next=e),n.interleaved=e,lo(t,r)}function om(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,IC(t,r)}}function QP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Xm(t,e,r,n){var i=t.updateQueue;zo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var h=i.baseState;o=0,c=u=l=null,s=a;do{var f=s.lane,d=s.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(f=e,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(d,h,f);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(d,h,f):p,f==null)break e;h=zt({},h,f);break e;case 2:zo=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else d={eventTime:d,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=h):c=c.next=d,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);Yl|=o,t.lanes=o,t.memoizedState=h}}function JP(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=Tx.transition;Tx.transition={};try{t(!1),e()}finally{xt=r,Tx.transition=n}}function nB(){return li().memoizedState}function s9(t,e,r){var n=as(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},iB(t))aB(e,r);else if(r=j3(t,e,r,n),r!==null){var i=tn();ki(r,t,n,i),oB(r,e,n)}}function l9(t,e,r){var n=as(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(iB(t))aB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Ri(s,o)){var l=e.interleaved;l===null?(i.next=i,ZC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=j3(t,e,i,n),r!==null&&(i=tn(),ki(r,t,n,i),oB(r,e,n))}}function iB(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function aB(t,e){od=Km=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function oB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,IC(t,r)}}var Qm={readContext:si,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},u9={readContext:si,useCallback:function(t,e){return na().memoizedState=[t,e===void 0?null:e],t},useContext:si,useEffect:tk,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,lm(4194308,4,Q3.bind(null,e,t),r)},useLayoutEffect:function(t,e){return lm(4194308,4,t,e)},useInsertionEffect:function(t,e){return lm(4,2,t,e)},useMemo:function(t,e){var r=na();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=na();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=s9.bind(null,Nt,t),[n.memoizedState,t]},useRef:function(t){var e=na();return t={current:t},e.memoizedState=t},useState:ek,useDebugValue:t2,useDeferredValue:function(t){return na().memoizedState=t},useTransition:function(){var t=ek(!1),e=t[0];return t=o9.bind(null,t[1]),na().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Nt,i=na();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));$l&30||W3(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,tk(Z3.bind(null,n,a,t),[t]),n.flags|=2048,Hd(9,U3.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=na(),e=wr.identifierPrefix;if(Pt){var r=$a,n=Za;r=(n&~(1<<32-Pi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Fd++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{sx=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Bf(t):""}function VU(t){switch(t.tag){case 5:return Bf(t.type);case 16:return Bf("Lazy");case 13:return Bf("Suspense");case 19:return Bf("SuspenseList");case 0:case 2:case 15:return t=lx(t.type,!1),t;case 11:return t=lx(t.type.render,!1),t;case 1:return t=lx(t.type,!0),t;default:return""}}function fS(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case uc:return"Fragment";case lc:return"Portal";case uS:return"Profiler";case MC:return"StrictMode";case cS:return"Suspense";case hS:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Vz:return(t.displayName||"Context")+".Consumer";case jz:return(t._context.displayName||"Context")+".Provider";case AC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case LC:return e=t.displayName||null,e!==null?e:fS(t.type)||"Memo";case Oo:e=t._payload,t=t._init;try{return fS(t(e))}catch{}}return null}function FU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fS(e);case 8:return e===MC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function gs(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Gz(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function GU(t){var e=Gz(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Mp(t){t._valueTracker||(t._valueTracker=GU(t))}function Hz(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Gz(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Om(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function dS(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function bP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=gs(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Wz(t,e){e=e.checked,e!=null&&CC(t,"checked",e,!1)}function vS(t,e){Wz(t,e);var r=gs(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?pS(t,e.type,r):e.hasOwnProperty("defaultValue")&&pS(t,e.type,gs(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function SP(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function pS(t,e,r){(e!=="number"||Om(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var jf=Array.isArray;function Lc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Ap.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Pd(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var td={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},HU=["Webkit","ms","Moz","O"];Object.keys(td).forEach(function(t){HU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),td[e]=td[t]})});function Yz(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||td.hasOwnProperty(t)&&td[t]?(""+e).trim():e+"px"}function Xz(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Yz(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var WU=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yS(t,e){if(e){if(WU[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ce(62))}}function _S(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xS=null;function PC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var bS=null,Pc=null,kc=null;function CP(t){if(t=Dv(t)){if(typeof bS!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=M0(e),bS(t.stateNode,t.type,e))}}function qz(t){Pc?kc?kc.push(t):kc=[t]:Pc=t}function Kz(){if(Pc){var t=Pc,e=kc;if(kc=Pc=null,CP(t),e)for(t=0;t>>=0,t===0?32:31-(t7(t)/r7|0)|0}var Lp=64,Pp=4194304;function Vf(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Vm(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,a=t.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Vf(s):(a&=o,a!==0&&(n=Vf(a)))}else o=r&~i,o!==0?n=Vf(o):a!==0&&(n=Vf(a));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,a=e&-e,i>=a||i===16&&(a&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function Pv(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Pi(e),t[e]=r}function o7(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=nd),EP=" ",RP=!1;function m3(t,e){switch(t){case"keyup":return E7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function y3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var cc=!1;function O7(t,e){switch(t){case"compositionend":return y3(e);case"keypress":return e.which!==32?null:(RP=!0,EP);case"textInput":return t=e.data,t===EP&&RP?null:t;default:return null}}function z7(t,e){if(cc)return t==="compositionend"||!zC&&m3(t,e)?(t=p3(),om=EC=Go=null,cc=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=jP(r)}}function S3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?S3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function w3(){for(var t=window,e=Om();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Om(t.document)}return e}function BC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Z7(t){var e=w3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&S3(r.ownerDocument.documentElement,r)){if(n!==null&&BC(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!t.extend&&a>n&&(i=n,n=a,a=i),i=VP(r,a);var o=VP(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),a>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,hc=null,AS=null,ad=null,LS=!1;function FP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;LS||hc==null||hc!==Om(n)||(n=hc,"selectionStart"in n&&BC(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ad&&Rd(ad,n)||(ad=n,n=Hm(AS,"onSelect"),0vc||(t.current=ES[vc],ES[vc]=null,vc--)}function Mt(t,e){vc++,ES[vc]=t.current,t.current=e}var ms={},Yr=Ms(ms),mn=Ms(!1),Wl=ms;function Gc(t,e){var r=t.type.contextTypes;if(!r)return ms;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=e[a];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function yn(t){return t=t.childContextTypes,t!=null}function Um(){Lt(mn),Lt(Yr)}function YP(t,e,r){if(Yr.current!==ms)throw Error(ce(168));Mt(Yr,e),Mt(mn,r)}function I3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ce(108,FU(t)||"Unknown",i));return zt({},r,n)}function Zm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ms,Wl=Yr.current,Mt(Yr,t),Mt(mn,mn.current),!0}function XP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=I3(t,e,Wl),n.__reactInternalMemoizedMergedChildContext=t,Lt(mn),Lt(Yr),Mt(Yr,t)):Lt(mn),Mt(mn,r)}var Ha=null,A0=!1,Sx=!1;function N3(t){Ha===null?Ha=[t]:Ha.push(t)}function i9(t){A0=!0,N3(t)}function As(){if(!Sx&&Ha!==null){Sx=!0;var t=0,e=xt;try{var r=Ha;for(xt=1;t>=o,i-=o,Za=1<<32-Pi(e)+i|r<k?(N=A,A=null):N=A.sibling;var D=f(y,A,b[k],w);if(D===null){A===null&&(A=N);break}t&&A&&D.alternate===null&&e(y,A),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D,A=N}if(k===b.length)return r(y,A),Pt&&hl(y,k),C;if(A===null){for(;kk?(N=A,A=null):N=A.sibling;var I=f(y,A,D.value,w);if(I===null){A===null&&(A=N);break}t&&A&&I.alternate===null&&e(y,A),_=a(I,_,k),M===null?C=I:M.sibling=I,M=I,A=N}if(D.done)return r(y,A),Pt&&hl(y,k),C;if(A===null){for(;!D.done;k++,D=b.next())D=h(y,D.value,w),D!==null&&(_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return Pt&&hl(y,k),C}for(A=n(y,A);!D.done;k++,D=b.next())D=d(A,y,k,D.value,w),D!==null&&(t&&D.alternate!==null&&A.delete(D.key===null?k:D.key),_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return t&&A.forEach(function(z){return e(y,z)}),Pt&&hl(y,k),C}function m(y,_,b,w){if(typeof b=="object"&&b!==null&&b.type===uc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Cp:e:{for(var C=b.key,M=_;M!==null;){if(M.key===C){if(C=b.type,C===uc){if(M.tag===7){r(y,M.sibling),_=i(M,b.props.children),_.return=y,y=_;break e}}else if(M.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Oo&&QP(C)===M.type){r(y,M.sibling),_=i(M,b.props),_.ref=rf(y,M,b),_.return=y,y=_;break e}r(y,M);break}else e(y,M);M=M.sibling}b.type===uc?(_=Rl(b.props.children,y.mode,w,b.key),_.return=y,y=_):(w=vm(b.type,b.key,b.props,null,y.mode,w),w.ref=rf(y,_,b),w.return=y,y=w)}return o(y);case lc:e:{for(M=b.key;_!==null;){if(_.key===M)if(_.tag===4&&_.stateNode.containerInfo===b.containerInfo&&_.stateNode.implementation===b.implementation){r(y,_.sibling),_=i(_,b.children||[]),_.return=y,y=_;break e}else{r(y,_);break}else e(y,_);_=_.sibling}_=Dx(b,y.mode,w),_.return=y,y=_}return o(y);case Oo:return M=b._init,m(y,_,M(b._payload),w)}if(jf(b))return p(y,_,b,w);if(Kh(b))return g(y,_,b,w);Op(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,_!==null&&_.tag===6?(r(y,_.sibling),_=i(_,b),_.return=y,y=_):(r(y,_),_=kx(b,y.mode,w),_.return=y,y=_),o(y)):r(y,_)}return m}var Wc=z3(!0),B3=z3(!1),Xm=Ms(null),qm=null,mc=null,GC=null;function HC(){GC=mc=qm=null}function WC(t){var e=Xm.current;Lt(Xm),t._currentValue=e}function zS(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ic(t,e){qm=t,GC=mc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(gn=!0),t.firstContext=null)}function si(t){var e=t._currentValue;if(GC!==t)if(t={context:t,memoizedValue:e,next:null},mc===null){if(qm===null)throw Error(ce(308));mc=t,qm.dependencies={lanes:0,firstContext:t}}else mc=mc.next=t;return e}var Cl=null;function UC(t){Cl===null?Cl=[t]:Cl.push(t)}function j3(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,UC(e)):(r.next=i.next,i.next=r),e.interleaved=r,lo(t,n)}function lo(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var zo=!1;function ZC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function V3(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ja(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function rs(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ct&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,lo(t,r)}return i=n.interleaved,i===null?(e.next=e,UC(n)):(e.next=i.next,i.next=e),n.interleaved=e,lo(t,r)}function lm(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,DC(t,r)}}function JP(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=e:a=a.next=e}else i=a=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Km(t,e,r,n){var i=t.updateQueue;zo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,o===null?a=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==o&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var h=i.baseState;o=0,c=u=l=null,s=a;do{var f=s.lane,d=s.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:d,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=t,g=s;switch(f=e,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(d,h,f);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(d,h,f):p,f==null)break e;h=zt({},h,f);break e;case 2:zo=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else d={eventTime:d,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=h):c=c.next=d,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else a===null&&(i.shared.lanes=0);$l|=o,t.lanes=o,t.memoizedState=h}}function ek(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=Cx.transition;Cx.transition={};try{t(!1),e()}finally{xt=r,Cx.transition=n}}function nB(){return li().memoizedState}function l9(t,e,r){var n=is(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},iB(t))aB(e,r);else if(r=j3(t,e,r,n),r!==null){var i=tn();ki(r,t,n,i),oB(r,e,n)}}function u9(t,e,r){var n=is(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(iB(t))aB(e,i);else{var a=t.alternate;if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var o=e.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,Ri(s,o)){var l=e.interleaved;l===null?(i.next=i,UC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=j3(t,e,i,n),r!==null&&(i=tn(),ki(r,t,n,i),oB(r,e,n))}}function iB(t){var e=t.alternate;return t===Et||e!==null&&e===Et}function aB(t,e){od=Jm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function oB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,DC(t,r)}}var ey={readContext:si,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},c9={readContext:si,useCallback:function(t,e){return na().memoizedState=[t,e===void 0?null:e],t},useContext:si,useEffect:rk,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,cm(4194308,4,Q3.bind(null,e,t),r)},useLayoutEffect:function(t,e){return cm(4194308,4,t,e)},useInsertionEffect:function(t,e){return cm(4,2,t,e)},useMemo:function(t,e){var r=na();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=na();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=l9.bind(null,Et,t),[n.memoizedState,t]},useRef:function(t){var e=na();return t={current:t},e.memoizedState=t},useState:tk,useDebugValue:e2,useDeferredValue:function(t){return na().memoizedState=t},useTransition:function(){var t=tk(!1),e=t[0];return t=s9.bind(null,t[1]),na().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Et,i=na();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));Zl&30||W3(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,rk(Z3.bind(null,n,a,t),[t]),n.flags|=2048,Hd(9,U3.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=na(),e=wr.identifierPrefix;if(Pt){var r=$a,n=Za;r=(n&~(1<<32-Pi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Fd++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[aa]=e,t[Bd]=n,gB(t,e,!1,!1),e.stateNode=t;e:{switch(o=yb(r,n),r){case"dialog":At("cancel",t),At("close",t),i=n;break;case"iframe":case"object":case"embed":At("load",t),i=n;break;case"video":case"audio":for(i=0;i$c&&(e.flags|=128,n=!0,nf(a,!1),e.lanes=4194304)}else{if(!n)if(t=qm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),nf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return jr(e),null}else 2*Yt()-a.renderingStartTime>$c&&r!==1073741824&&(e.flags|=128,n=!0,nf(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Et.current,Mt(Et,n?r&1|2:r&1),e):(jr(e),null);case 22:case 23:return s2(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?wn&1073741824&&(jr(e),e.subtreeFlags&6&&(e.flags|=8192)):jr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function m9(t,e){switch(FC(e),e.tag){case 1:return yn(e.type)&&Hm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Uc(),Lt(mn),Lt(Yr),qC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return XC(e),null;case 13:if(Lt(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Hc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Et),null;case 4:return Uc(),null;case 10:return UC(e.type._context),null;case 22:case 23:return s2(),null;case 24:return null;default:return null}}var Op=!1,Wr=!1,y9=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function _c(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Vt(t,e,n)}else r.current=null}function Ub(t,e,r){try{r()}catch(n){Vt(t,e,n)}}var fk=!1;function _9(t,e){if(Lb=jm,t=w3(),jC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,h=t,f=null;t:for(;;){for(var d;h!==r||i!==0&&h.nodeType!==3||(s=o+i),h!==a||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===t)break t;if(f===r&&++u===i&&(s=o),f===a&&++c===n&&(l=o),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Pb={focusedElem:t,selectionRange:r},jm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,_=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:wi(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(w){Vt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=fk,fk=!1,p}function sd(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&Ub(e,r,a)}i=i.next}while(i!==n)}}function L0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Zb(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function _B(t){var e=t.alternate;e!==null&&(t.alternate=null,_B(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[aa],delete e[Bd],delete e[Ib],delete e[t9],delete e[r9])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xB(t){return t.tag===5||t.tag===3||t.tag===4}function dk(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xB(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function $b(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Gm));else if(n!==4&&(t=t.child,t!==null))for($b(t,e,r),t=t.sibling;t!==null;)$b(t,e,r),t=t.sibling}function Yb(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Yb(t,e,r),t=t.sibling;t!==null;)Yb(t,e,r),t=t.sibling}var Ar=null,Ci=!1;function Co(t,e,r){for(r=r.child;r!==null;)SB(t,e,r),r=r.sibling}function SB(t,e,r){if(pa&&typeof pa.onCommitFiberUnmount=="function")try{pa.onCommitFiberUnmount(x0,r)}catch{}switch(r.tag){case 5:Wr||_c(r,e);case 6:var n=Ar,i=Ci;Ar=null,Co(t,e,r),Ar=n,Ci=i,Ar!==null&&(Ci?(t=Ar,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Ar.removeChild(r.stateNode));break;case 18:Ar!==null&&(Ci?(t=Ar,r=r.stateNode,t.nodeType===8?xx(t.parentNode,r):t.nodeType===1&&xx(t,r),Ed(t)):xx(Ar,r.stateNode));break;case 4:n=Ar,i=Ci,Ar=r.stateNode.containerInfo,Ci=!0,Co(t,e,r),Ar=n,Ci=i;break;case 0:case 11:case 14:case 15:if(!Wr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Ub(r,e,o),i=i.next}while(i!==n)}Co(t,e,r);break;case 1:if(!Wr&&(_c(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Vt(r,e,s)}Co(t,e,r);break;case 21:Co(t,e,r);break;case 22:r.mode&1?(Wr=(n=Wr)||r.memoizedState!==null,Co(t,e,r),Wr=n):Co(t,e,r);break;default:Co(t,e,r)}}function vk(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new y9),e.forEach(function(n){var i=L9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function yi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*S9(n/1960))-n,10t?16:t,Ho===null)var n=!1;else{if(t=Ho,Ho=null,ty=0,ct&6)throw Error(ce(331));var i=ct;for(ct|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-a2?Rl(t,0):i2|=r),_n(t,e)}function PB(t,e){e===0&&(t.mode&1?(e=Ap,Ap<<=1,!(Ap&130023424)&&(Ap=4194304)):e=1);var r=tn();t=lo(t,e),t!==null&&(Lv(t,e,r),_n(t,r))}function A9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),PB(t,r)}function L9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),PB(t,r)}var kB;kB=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||mn.current)gn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return gn=!1,p9(t,e,r);gn=!!(t.flags&131072)}else gn=!1,Pt&&e.flags&1048576&&N3(e,Zm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;um(t,e),t=e.pendingProps;var i=Gc(e,Yr.current);Ic(e,r),i=QC(null,e,n,t,i,r);var a=JC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,yn(n)?(a=!0,Wm(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$C(e),i.updater=A0,e.stateNode=i,i._reactInternals=e,Bb(e,n,t,r),e=Fb(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&VC(e),Kr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(um(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=k9(n),t=wi(n,t),i){case 0:e=Vb(null,e,n,t,r);break e;case 1:e=uk(null,e,n,t,r);break e;case 11:e=sk(null,e,n,t,r);break e;case 14:e=lk(null,e,n,wi(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),Vb(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),uk(t,e,n,i,r);case 3:e:{if(dB(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,V3(t,e),Xm(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Zc(Error(ce(423)),e),e=ck(t,e,n,r,i);break e}else if(n!==i){i=Zc(Error(ce(424)),e),e=ck(t,e,n,r,i);break e}else for(Ln=rs(e.stateNode.containerInfo.firstChild),En=e,Pt=!0,Mi=null,r=B3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hc(),n===i){e=uo(t,e,r);break e}Kr(t,e,n,r)}e=e.child}return e;case 5:return F3(e),t===null&&Rb(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,kb(n,i)?o=null:a!==null&&kb(n,a)&&(e.flags|=32),fB(t,e),Kr(t,e,o,r),e.child;case 6:return t===null&&Rb(e),null;case 13:return vB(t,e,r);case 4:return YC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Wc(e,null,n,r):Kr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),sk(t,e,n,i,r);case 7:return Kr(t,e,e.pendingProps,r),e.child;case 8:return Kr(t,e,e.pendingProps.children,r),e.child;case 12:return Kr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt($m,n._currentValue),n._currentValue=o,a!==null)if(Ri(a.value,o)){if(a.children===i.children&&!mn.current){e=uo(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Ja(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Ob(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Ob(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Kr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ic(e,r),i=si(i),n=n(i),e.flags|=1,Kr(t,e,n,r),e.child;case 14:return n=e.type,i=wi(n,e.pendingProps),i=wi(n.type,i),lk(t,e,n,i,r);case 15:return cB(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),um(t,e),e.tag=1,yn(n)?(t=!0,Wm(e)):t=!1,Ic(e,r),sB(e,n,i),Bb(e,n,i,r),Fb(null,e,n,!0,t,r);case 19:return pB(t,e,r);case 22:return hB(t,e,r)}throw Error(ce(156,e.tag))};function DB(t,e){return i3(t,e)}function P9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ri(t,e,r,n){return new P9(t,e,r,n)}function u2(t){return t=t.prototype,!(!t||!t.isReactComponent)}function k9(t){if(typeof t=="function")return u2(t)?1:0;if(t!=null){if(t=t.$$typeof,t===LC)return 11;if(t===PC)return 14}return 2}function os(t,e){var r=t.alternate;return r===null?(r=ri(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function fm(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")u2(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case cc:return Ol(r.children,i,a,e);case AC:o=8,i|=8;break;case lb:return t=ri(12,r,e,i|2),t.elementType=lb,t.lanes=a,t;case ub:return t=ri(13,r,e,i),t.elementType=ub,t.lanes=a,t;case cb:return t=ri(19,r,e,i),t.elementType=cb,t.lanes=a,t;case Fz:return k0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jz:o=10;break e;case Vz:o=9;break e;case LC:o=11;break e;case PC:o=14;break e;case Oo:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=ri(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Ol(t,e,r,n){return t=ri(7,t,n,e),t.lanes=r,t}function k0(t,e,r,n){return t=ri(22,t,n,e),t.elementType=Fz,t.lanes=r,t.stateNode={isHidden:!1},t}function Px(t,e,r){return t=ri(6,t,null,e),t.lanes=r,t}function kx(t,e,r){return e=ri(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function D9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ux(0),this.expirationTimes=ux(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ux(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function c2(t,e,r,n,i,a,o,s,l){return t=new D9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=ri(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},$C(a),t}function I9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RB)}catch(t){console.error(t)}}RB(),Rz.exports=On;var OB=Rz.exports,bk=OB;ob.createRoot=bk.createRoot,ob.hydrateRoot=bk.hydrateRoot;/** +`+a.stack}return{value:t,source:e,stack:i,digest:null}}function Lx(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function VS(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var d9=typeof WeakMap=="function"?WeakMap:Map;function lB(t,e,r){r=Ja(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){ry||(ry=!0,qS=n),VS(t,e)},r}function uB(t,e,r){r=Ja(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){VS(t,e)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){VS(t,e),typeof n!="function"&&(ns===null?ns=new Set([this]):ns.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function ak(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new d9;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=A9.bind(null,t,e,r),e.then(t,t))}function ok(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function sk(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Ja(-1,1),e.tag=2,rs(r,e,1))),r.lanes|=1),t)}var v9=_o.ReactCurrentOwner,gn=!1;function Kr(t,e,r,n){e.child=t===null?B3(e,null,r,n):Wc(e,t.child,r,n)}function lk(t,e,r,n,i){r=r.render;var a=e.ref;return Ic(e,i),n=KC(t,e,r,n,a,i),r=QC(),t!==null&&!gn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,uo(t,e,i)):(Pt&&r&&jC(e),e.flags|=1,Kr(t,e,n,i),e.child)}function uk(t,e,r,n,i){if(t===null){var a=r.type;return typeof a=="function"&&!l2(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=a,cB(t,e,a,n,i)):(t=vm(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(a=t.child,!(t.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Rd,r(o,n)&&t.ref===e.ref)return uo(t,e,i)}return e.flags|=1,t=as(a,n),t.ref=e.ref,t.return=e,e.child=t}function cB(t,e,r,n,i){if(t!==null){var a=t.memoizedProps;if(Rd(a,n)&&t.ref===e.ref)if(gn=!1,e.pendingProps=n=a,(t.lanes&i)!==0)t.flags&131072&&(gn=!0);else return e.lanes=t.lanes,uo(t,e,i)}return FS(t,e,r,n,i)}function hB(t,e,r){var n=e.pendingProps,i=n.children,a=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(_c,wn),wn|=r;else{if(!(r&1073741824))return t=a!==null?a.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Mt(_c,wn),wn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Mt(_c,wn),wn|=n}else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,Mt(_c,wn),wn|=n;return Kr(t,e,i,r),e.child}function fB(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function FS(t,e,r,n,i){var a=yn(r)?Wl:Yr.current;return a=Gc(e,a),Ic(e,i),r=KC(t,e,r,n,a,i),n=QC(),t!==null&&!gn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,uo(t,e,i)):(Pt&&n&&jC(e),e.flags|=1,Kr(t,e,r,i),e.child)}function ck(t,e,r,n,i){if(yn(r)){var a=!0;Zm(e)}else a=!1;if(Ic(e,i),e.stateNode===null)hm(t,e),sB(e,r,n),jS(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=si(u):(u=yn(r)?Wl:Yr.current,u=Gc(e,u));var c=r.getDerivedStateFromProps,h=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==n||l!==u)&&ik(e,o,n,u),zo=!1;var f=e.memoizedState;o.state=f,Km(e,n,o,i),l=e.memoizedState,s!==n||f!==l||mn.current||zo?(typeof c=="function"&&(BS(e,r,c,n),l=e.memoizedState),(s=zo||nk(e,r,s,n,f,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=u,n=s):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,V3(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:wi(e.type,s),o.props=u,h=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=si(l):(l=yn(r)?Wl:Yr.current,l=Gc(e,l));var d=r.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==h||f!==l)&&ik(e,o,n,l),zo=!1,f=e.memoizedState,o.state=f,Km(e,n,o,i);var p=e.memoizedState;s!==h||f!==p||mn.current||zo?(typeof d=="function"&&(BS(e,r,d,n),p=e.memoizedState),(u=zo||nk(e,r,u,n,f,p,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),o.props=n,o.state=p,o.context=l,n=u):(typeof o.componentDidUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return GS(t,e,r,n,a,i)}function GS(t,e,r,n,i,a){fB(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&XP(e,r,!1),uo(t,e,a);n=e.stateNode,v9.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Wc(e,t.child,null,a),e.child=Wc(e,null,s,a)):Kr(t,e,s,a),e.memoizedState=n.state,i&&XP(e,r,!0),e.child}function dB(t){var e=t.stateNode;e.pendingContext?YP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&YP(t,e.context,!1),$C(t,e.containerInfo)}function hk(t,e,r,n,i){return Hc(),FC(i),e.flags|=256,Kr(t,e,r,n),e.child}var HS={dehydrated:null,treeContext:null,retryLane:0};function WS(t){return{baseLanes:t,cachePool:null,transitions:null}}function vB(t,e,r){var n=e.pendingProps,i=Nt.current,a=!1,o=(e.flags&128)!==0,s;if((s=o)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(a=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Mt(Nt,i&1),t===null)return OS(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,a?(n=e.mode,a=e.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=I0(o,n,0,null),t=Rl(t,n,r,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=WS(r),e.memoizedState=HS,t):t2(e,o));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return p9(t,e,o,n,s,i,r);if(a){a=n.fallback,o=e.mode,i=t.child,s=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=as(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=as(s,a):(a=Rl(a,o,r,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,n=a,a=e.child,o=t.child.memoizedState,o=o===null?WS(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=t.childLanes&~r,e.memoizedState=HS,n}return a=t.child,t=a.sibling,n=as(a,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function t2(t,e){return e=I0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function zp(t,e,r,n){return n!==null&&FC(n),Wc(e,t.child,null,r),t=t2(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function p9(t,e,r,n,i,a,o){if(r)return e.flags&256?(e.flags&=-257,n=Lx(Error(ce(422))),zp(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(a=n.fallback,i=e.mode,n=I0({mode:"visible",children:n.children},i,0,null),a=Rl(a,i,o,null),a.flags|=2,n.return=e,a.return=e,n.sibling=a,e.child=n,e.mode&1&&Wc(e,t.child,null,o),e.child.memoizedState=WS(o),e.memoizedState=HS,a);if(!(e.mode&1))return zp(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,a=Error(ce(419)),n=Lx(a,n,void 0),zp(t,e,o,n)}if(s=(o&t.childLanes)!==0,gn||s){if(n=wr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,lo(t,i),ki(n,t,i,-1))}return s2(),n=Lx(Error(ce(421))),zp(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=L9.bind(null,t),i._reactRetry=e,null):(t=a.treeContext,Ln=ts(i.nextSibling),Nn=e,Pt=!0,Mi=null,t!==null&&(Kn[Qn++]=Za,Kn[Qn++]=$a,Kn[Qn++]=Ul,Za=t.id,$a=t.overflow,Ul=e),e=t2(e,n.children),e.flags|=4096,e)}function fk(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),zS(t.return,e,r)}function Px(t,e,r,n,i){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function pB(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(Kr(t,e,n.children,r),n=Nt.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fk(t,r,e);else if(t.tag===19)fk(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Mt(Nt,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Qm(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Px(e,!1,i,r,a);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Qm(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Px(e,!0,r,null,a);break;case"together":Px(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function hm(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function uo(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),$l|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ce(153));if(e.child!==null){for(t=e.child,r=as(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=as(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function g9(t,e,r){switch(e.tag){case 3:dB(e),Hc();break;case 5:F3(e);break;case 1:yn(e.type)&&Zm(e);break;case 4:$C(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Mt(Xm,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Mt(Nt,Nt.current&1),e.flags|=128,null):r&e.child.childLanes?vB(t,e,r):(Mt(Nt,Nt.current&1),t=uo(t,e,r),t!==null?t.sibling:null);Mt(Nt,Nt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return pB(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mt(Nt,Nt.current),n)break;return null;case 22:case 23:return e.lanes=0,hB(t,e,r)}return uo(t,e,r)}var gB,US,mB,yB;gB=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};US=function(){};mB=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Ml(ga.current);var a=null;switch(r){case"input":i=dS(t,i),n=dS(t,n),a=[];break;case"select":i=zt({},i,{value:void 0}),n=zt({},n,{value:void 0}),a=[];break;case"textarea":i=gS(t,i),n=gS(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Wm)}yS(r,n);var o;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ld.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ld.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&At("scroll",t),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(e.updateQueue=u)&&(e.flags|=4)}};yB=function(t,e,r,n){r!==n&&(e.flags|=4)};function nf(t,e){if(!Pt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function jr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function m9(t,e,r){var n=e.pendingProps;switch(VC(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jr(e),null;case 1:return yn(e.type)&&Um(),jr(e),null;case 3:return n=e.stateNode,Uc(),Lt(mn),Lt(Yr),XC(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Rp(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Mi!==null&&(JS(Mi),Mi=null))),US(t,e),jr(e),null;case 5:YC(e);var i=Ml(Vd.current);if(r=e.type,t!==null&&e.stateNode!=null)mB(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(ce(166));return jr(e),null}if(t=Ml(ga.current),Rp(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[aa]=e,n[Bd]=a,t=(e.mode&1)!==0,r){case"dialog":At("cancel",n),At("close",n);break;case"iframe":case"object":case"embed":At("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[aa]=e,t[Bd]=n,gB(t,e,!1,!1),e.stateNode=t;e:{switch(o=_S(r,n),r){case"dialog":At("cancel",t),At("close",t),i=n;break;case"iframe":case"object":case"embed":At("load",t),i=n;break;case"video":case"audio":for(i=0;i$c&&(e.flags|=128,n=!0,nf(a,!1),e.lanes=4194304)}else{if(!n)if(t=Qm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),nf(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return jr(e),null}else 2*Yt()-a.renderingStartTime>$c&&r!==1073741824&&(e.flags|=128,n=!0,nf(a,!1),e.lanes=4194304);a.isBackwards?(o.sibling=e.child,e.child=o):(r=a.last,r!==null?r.sibling=o:e.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,r=Nt.current,Mt(Nt,n?r&1|2:r&1),e):(jr(e),null);case 22:case 23:return o2(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?wn&1073741824&&(jr(e),e.subtreeFlags&6&&(e.flags|=8192)):jr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function y9(t,e){switch(VC(e),e.tag){case 1:return yn(e.type)&&Um(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Uc(),Lt(mn),Lt(Yr),XC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return YC(e),null;case 13:if(Lt(Nt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Hc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Nt),null;case 4:return Uc(),null;case 10:return WC(e.type._context),null;case 22:case 23:return o2(),null;case 24:return null;default:return null}}var Bp=!1,Wr=!1,_9=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function yc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Vt(t,e,n)}else r.current=null}function ZS(t,e,r){try{r()}catch(n){Vt(t,e,n)}}var dk=!1;function x9(t,e){if(PS=Fm,t=w3(),BC(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,h=t,f=null;t:for(;;){for(var d;h!==r||i!==0&&h.nodeType!==3||(s=o+i),h!==a||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(d=h.firstChild)!==null;)f=h,h=d;for(;;){if(h===t)break t;if(f===r&&++u===i&&(s=o),f===a&&++c===n&&(l=o),(d=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(kS={focusedElem:t,selectionRange:r},Fm=!1,Pe=e;Pe!==null;)if(e=Pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Pe=t;else for(;Pe!==null;){e=Pe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,y=e.stateNode,_=y.getSnapshotBeforeUpdate(e.elementType===e.type?g:wi(e.type,g),m);y.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(w){Vt(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=dk,dk=!1,p}function sd(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,a!==void 0&&ZS(e,r,a)}i=i.next}while(i!==n)}}function k0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function $S(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function _B(t){var e=t.alternate;e!==null&&(t.alternate=null,_B(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[aa],delete e[Bd],delete e[NS],delete e[r9],delete e[n9])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function xB(t){return t.tag===5||t.tag===3||t.tag===4}function vk(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||xB(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function YS(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Wm));else if(n!==4&&(t=t.child,t!==null))for(YS(t,e,r),t=t.sibling;t!==null;)YS(t,e,r),t=t.sibling}function XS(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(XS(t,e,r),t=t.sibling;t!==null;)XS(t,e,r),t=t.sibling}var Ar=null,Ci=!1;function Co(t,e,r){for(r=r.child;r!==null;)bB(t,e,r),r=r.sibling}function bB(t,e,r){if(pa&&typeof pa.onCommitFiberUnmount=="function")try{pa.onCommitFiberUnmount(S0,r)}catch{}switch(r.tag){case 5:Wr||yc(r,e);case 6:var n=Ar,i=Ci;Ar=null,Co(t,e,r),Ar=n,Ci=i,Ar!==null&&(Ci?(t=Ar,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Ar.removeChild(r.stateNode));break;case 18:Ar!==null&&(Ci?(t=Ar,r=r.stateNode,t.nodeType===8?bx(t.parentNode,r):t.nodeType===1&&bx(t,r),Nd(t)):bx(Ar,r.stateNode));break;case 4:n=Ar,i=Ci,Ar=r.stateNode.containerInfo,Ci=!0,Co(t,e,r),Ar=n,Ci=i;break;case 0:case 11:case 14:case 15:if(!Wr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&ZS(r,e,o),i=i.next}while(i!==n)}Co(t,e,r);break;case 1:if(!Wr&&(yc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Vt(r,e,s)}Co(t,e,r);break;case 21:Co(t,e,r);break;case 22:r.mode&1?(Wr=(n=Wr)||r.memoizedState!==null,Co(t,e,r),Wr=n):Co(t,e,r);break;default:Co(t,e,r)}}function pk(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new _9),e.forEach(function(n){var i=P9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function yi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=Yt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*S9(n/1960))-n,10t?16:t,Ho===null)var n=!1;else{if(t=Ho,Ho=null,ny=0,ct&6)throw Error(ce(331));var i=ct;for(ct|=4,Pe=t.current;Pe!==null;){var a=Pe,o=a.child;if(Pe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lYt()-i2?El(t,0):n2|=r),_n(t,e)}function PB(t,e){e===0&&(t.mode&1?(e=Pp,Pp<<=1,!(Pp&130023424)&&(Pp=4194304)):e=1);var r=tn();t=lo(t,e),t!==null&&(Pv(t,e,r),_n(t,r))}function L9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),PB(t,r)}function P9(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ce(314))}n!==null&&n.delete(e),PB(t,r)}var kB;kB=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||mn.current)gn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return gn=!1,g9(t,e,r);gn=!!(t.flags&131072)}else gn=!1,Pt&&e.flags&1048576&&E3(e,Ym,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;hm(t,e),t=e.pendingProps;var i=Gc(e,Yr.current);Ic(e,r),i=KC(null,e,n,t,i,r);var a=QC();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,yn(n)?(a=!0,Zm(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ZC(e),i.updater=P0,e.stateNode=i,i._reactInternals=e,jS(e,n,t,r),e=GS(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&jC(e),Kr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(hm(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=D9(n),t=wi(n,t),i){case 0:e=FS(null,e,n,t,r);break e;case 1:e=ck(null,e,n,t,r);break e;case 11:e=lk(null,e,n,t,r);break e;case 14:e=uk(null,e,n,wi(n.type,t),r);break e}throw Error(ce(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),FS(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),ck(t,e,n,i,r);case 3:e:{if(dB(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,V3(t,e),Km(e,n,null,r);var o=e.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,e.flags&256){i=Zc(Error(ce(423)),e),e=hk(t,e,n,r,i);break e}else if(n!==i){i=Zc(Error(ce(424)),e),e=hk(t,e,n,r,i);break e}else for(Ln=ts(e.stateNode.containerInfo.firstChild),Nn=e,Pt=!0,Mi=null,r=B3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Hc(),n===i){e=uo(t,e,r);break e}Kr(t,e,n,r)}e=e.child}return e;case 5:return F3(e),t===null&&OS(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,DS(n,i)?o=null:a!==null&&DS(n,a)&&(e.flags|=32),fB(t,e),Kr(t,e,o,r),e.child;case 6:return t===null&&OS(e),null;case 13:return vB(t,e,r);case 4:return $C(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Wc(e,null,n,r):Kr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),lk(t,e,n,i,r);case 7:return Kr(t,e,e.pendingProps,r),e.child;case 8:return Kr(t,e,e.pendingProps.children,r),e.child;case 12:return Kr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value,Mt(Xm,n._currentValue),n._currentValue=o,a!==null)if(Ri(a.value,o)){if(a.children===i.children&&!mn.current){e=uo(t,e,r);break e}}else for(a=e.child,a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(a.tag===1){l=Ja(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),zS(a.return,r,e),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===e.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(ce(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),zS(o,r,e),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Kr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ic(e,r),i=si(i),n=n(i),e.flags|=1,Kr(t,e,n,r),e.child;case 14:return n=e.type,i=wi(n,e.pendingProps),i=wi(n.type,i),uk(t,e,n,i,r);case 15:return cB(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),hm(t,e),e.tag=1,yn(n)?(t=!0,Zm(e)):t=!1,Ic(e,r),sB(e,n,i),jS(e,n,i,r),GS(null,e,n,!0,t,r);case 19:return pB(t,e,r);case 22:return hB(t,e,r)}throw Error(ce(156,e.tag))};function DB(t,e){return i3(t,e)}function k9(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ri(t,e,r,n){return new k9(t,e,r,n)}function l2(t){return t=t.prototype,!(!t||!t.isReactComponent)}function D9(t){if(typeof t=="function")return l2(t)?1:0;if(t!=null){if(t=t.$$typeof,t===AC)return 11;if(t===LC)return 14}return 2}function as(t,e){var r=t.alternate;return r===null?(r=ri(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function vm(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")l2(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case uc:return Rl(r.children,i,a,e);case MC:o=8,i|=8;break;case uS:return t=ri(12,r,e,i|2),t.elementType=uS,t.lanes=a,t;case cS:return t=ri(13,r,e,i),t.elementType=cS,t.lanes=a,t;case hS:return t=ri(19,r,e,i),t.elementType=hS,t.lanes=a,t;case Fz:return I0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jz:o=10;break e;case Vz:o=9;break e;case AC:o=11;break e;case LC:o=14;break e;case Oo:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=ri(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function Rl(t,e,r,n){return t=ri(7,t,n,e),t.lanes=r,t}function I0(t,e,r,n){return t=ri(22,t,n,e),t.elementType=Fz,t.lanes=r,t.stateNode={isHidden:!1},t}function kx(t,e,r){return t=ri(6,t,null,e),t.lanes=r,t}function Dx(t,e,r){return e=ri(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function I9(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cx(0),this.expirationTimes=cx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function u2(t,e,r,n,i,a,o,s,l){return t=new I9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=ri(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ZC(a),t}function N9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RB)}catch(t){console.error(t)}}RB(),Rz.exports=On;var OB=Rz.exports,wk=OB;sS.createRoot=wk.createRoot,sS.hydrateRoot=wk.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ud(){return Ud=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function v2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function B9(){return Math.random().toString(36).substr(2,8)}function Tk(t,e){return{usr:t.state,key:t.key,idx:e}}function Jb(t,e,r,n){return r===void 0&&(r=null),Ud({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?gh(e):e,{state:r,key:e&&e.key||n||B9()})}function iy(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function gh(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function j9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Wo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Ud({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){s=Wo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function f(m,y){s=Wo.Push;let _=Jb(g.location,m,y);u=c()+1;let S=Tk(_,u),w=g.createHref(_);try{o.pushState(S,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(w)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=Wo.Replace;let _=Jb(g.location,m,y);u=c();let S=Tk(_,u),w=g.createHref(_);o.replaceState(S,"",w),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:iy(m);return _=_.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(wk,h),l=m,()=>{i.removeEventListener(wk,h),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:d,go(m){return o.go(m)}};return g}var Ck;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Ck||(Ck={}));function V9(t,e,r){return r===void 0&&(r="/"),F9(t,e,r)}function F9(t,e,r,n){let i=typeof e=="string"?gh(e):e,a=p2(i.pathname||"/",r);if(a==null)return null;let o=zB(t);G9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=ss([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),zB(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:X9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of BB(a.path))i(a,o,l)}),e}function BB(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=BB(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function G9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:q9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const H9=/^:[\w-]+$/,W9=3,U9=2,Z9=1,$9=10,Y9=-2,Mk=t=>t==="*";function X9(t,e){let r=t.split("/"),n=r.length;return r.some(Mk)&&(n+=Y9),e&&(n+=U9),r.filter(i=>!Mk(i)).reduce((i,a)=>i+(H9.test(a)?W9:a===""?Z9:$9),n)}function q9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function K9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:f,isOptional:d}=c;if(f==="*"){let g=s[h]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[h];return d&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function J9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),v2(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function eZ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return v2(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function p2(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const tZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rZ=t=>tZ.test(t);function nZ(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?gh(t):t,a;if(r)if(rZ(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),v2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=Ak(r.substring(1),"/"):a=Ak(r,e)}else a=e;return{pathname:a,search:oZ(n),hash:sZ(i)}}function Ak(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Dx(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function iZ(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function jB(t,e){let r=iZ(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function VB(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=gh(t):(i=Ud({},t),nr(!i.pathname||!i.pathname.includes("?"),Dx("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),Dx("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),Dx("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let h=e.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}s=h>=0?e[h]:"/"}let l=nZ(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const ss=t=>t.join("/").replace(/\/\/+/g,"/"),aZ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),oZ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,sZ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function lZ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const FB=["post","put","patch","delete"];new Set(FB);const uZ=["get",...FB];new Set(uZ);/** + */function Ud(){return Ud=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function d2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function j9(){return Math.random().toString(36).substr(2,8)}function Ck(t,e){return{usr:t.state,key:t.key,idx:e}}function ew(t,e,r,n){return r===void 0&&(r=null),Ud({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?gh(e):e,{state:r,key:e&&e.key||n||j9()})}function oy(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function gh(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function V9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Wo.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Ud({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){s=Wo.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function f(m,y){s=Wo.Push;let _=ew(g.location,m,y);u=c()+1;let b=Ck(_,u),w=g.createHref(_);try{o.pushState(b,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(w)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=Wo.Replace;let _=ew(g.location,m,y);u=c();let b=Ck(_,u),w=g.createHref(_);o.replaceState(b,"",w),a&&l&&l({action:s,location:g.location,delta:0})}function p(m){let y=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof m=="string"?m:oy(m);return _=_.replace(/ $/,"%20"),nr(y,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,y)}let g={get action(){return s},get location(){return t(i,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Tk,h),l=m,()=>{i.removeEventListener(Tk,h),l=null}},createHref(m){return e(i,m)},createURL:p,encodeLocation(m){let y=p(m);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:d,go(m){return o.go(m)}};return g}var Mk;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Mk||(Mk={}));function F9(t,e,r){return r===void 0&&(r="/"),G9(t,e,r)}function G9(t,e,r,n){let i=typeof e=="string"?gh(e):e,a=v2(i.pathname||"/",r);if(a==null)return null;let o=zB(t);H9(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(nr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=os([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(nr(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),zB(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:q9(u,a.index),routesMeta:c})};return t.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of BB(a.path))i(a,o,l)}),e}function BB(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=BB(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function H9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:K9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const W9=/^:[\w-]+$/,U9=3,Z9=2,$9=1,Y9=10,X9=-2,Ak=t=>t==="*";function q9(t,e){let r=t.split("/"),n=r.length;return r.some(Ak)&&(n+=X9),e&&(n+=Z9),r.filter(i=>!Ak(i)).reduce((i,a)=>i+(W9.test(a)?U9:a===""?$9:Y9),n)}function K9(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function Q9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:f,isOptional:d}=c;if(f==="*"){let g=s[h]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[h];return d&&!p?u[f]=void 0:u[f]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function eZ(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),d2(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function tZ(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return d2(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function v2(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}const rZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nZ=t=>rZ.test(t);function iZ(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?gh(t):t,a;if(r)if(nZ(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),d2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=Lk(r.substring(1),"/"):a=Lk(r,e)}else a=e;return{pathname:a,search:sZ(n),hash:lZ(i)}}function Lk(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Ix(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function aZ(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function jB(t,e){let r=aZ(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function VB(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=gh(t):(i=Ud({},t),nr(!i.pathname||!i.pathname.includes("?"),Ix("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),Ix("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),Ix("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let h=e.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}s=h>=0?e[h]:"/"}let l=iZ(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const os=t=>t.join("/").replace(/\/\/+/g,"/"),oZ=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),sZ=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,lZ=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function uZ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const FB=["post","put","patch","delete"];new Set(FB);const cZ=["get",...FB];new Set(cZ);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Zd(){return Zd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),Z.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let h=VB(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:ss([e,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[e,n,o,a,t])}function UB(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=Z.useContext(uu),{matches:i}=Z.useContext(cu),{pathname:a}=Ev(),o=JSON.stringify(jB(i,n.v7_relativeSplatPath));return Z.useMemo(()=>VB(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function dZ(t,e){return vZ(t,e)}function vZ(t,e,r,n){Iv()||nr(!1);let{navigator:i}=Z.useContext(uu),{matches:a}=Z.useContext(cu),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ev(),c;if(e){var h;let m=typeof e=="string"?gh(e):e;l==="/"||(h=m.pathname)!=null&&h.startsWith(l)||nr(!1),c=m}else c=u;let f=c.pathname||"/",d=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=V9(t,{pathname:d}),g=_Z(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:ss([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:ss([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?Z.createElement(R0.Provider,{value:{location:Zd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Wo.Pop}},g):g}function pZ(){let t=wZ(),e=lZ(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return Z.createElement(Z.Fragment,null,Z.createElement("h2",null,"Unexpected Application Error!"),Z.createElement("h3",{style:{fontStyle:"italic"}},e),r?Z.createElement("pre",{style:i},r):null,null)}const gZ=Z.createElement(pZ,null);class mZ extends Z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?Z.createElement(cu.Provider,{value:this.props.routeContext},Z.createElement(GB.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function yZ(t){let{routeContext:e,match:r,children:n}=t,i=Z.useContext(g2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Z.createElement(cu.Provider,{value:e},n)}function _Z(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,f)=>{let d,p=!1,g=null,m=null;r&&(d=s&&h.route.id?s[h.route.id]:void 0,g=h.route.errorElement||gZ,l&&(u<0&&f===0?(CZ("route-fallback"),p=!0,m=null):u===f&&(p=!0,m=h.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,f+1)),_=()=>{let S;return d?S=g:p?S=m:h.route.Component?S=Z.createElement(h.route.Component,null):h.route.element?S=h.route.element:S=c,Z.createElement(yZ,{match:h,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?Z.createElement(mZ,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var ZB=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ZB||{}),$B=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}($B||{});function xZ(t){let e=Z.useContext(g2);return e||nr(!1),e}function SZ(t){let e=Z.useContext(cZ);return e||nr(!1),e}function bZ(t){let e=Z.useContext(cu);return e||nr(!1),e}function YB(t){let e=bZ(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function wZ(){var t;let e=Z.useContext(GB),r=SZ(),n=YB();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function TZ(){let{router:t}=xZ(ZB.UseNavigateStable),e=YB($B.UseNavigateStable),r=Z.useRef(!1);return HB(()=>{r.current=!0}),Z.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Zd({fromRouteId:e},a)))},[t,e])}const Lk={};function CZ(t,e,r){Lk[t]||(Lk[t]=!0)}function MZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function vl(t){nr(!1)}function AZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Wo.Pop,navigator:a,static:o=!1,future:s}=t;Iv()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=Z.useMemo(()=>({basename:l,navigator:a,static:o,future:Zd({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=gh(n));let{pathname:c="/",search:h="",hash:f="",state:d=null,key:p="default"}=n,g=Z.useMemo(()=>{let m=p2(c,l);return m==null?null:{location:{pathname:m,search:h,hash:f,state:d,key:p},navigationType:i}},[l,c,h,f,d,p,i]);return g==null?null:Z.createElement(uu.Provider,{value:u},Z.createElement(R0.Provider,{children:r,value:g}))}function LZ(t){let{children:e,location:r}=t;return dZ(ew(e),r)}new Promise(()=>{});function ew(t,e){e===void 0&&(e=[]);let r=[];return Z.Children.forEach(t,(n,i)=>{if(!Z.isValidElement(n))return;let a=[...e,i];if(n.type===Z.Fragment){r.push.apply(r,ew(n.props.children,a));return}n.type!==vl&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=ew(n.props.children,a)),r.push(o)}),r}/** + */function Zd(){return Zd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),U.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let h=VB(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:os([e,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[e,n,o,a,t])}function UB(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=U.useContext(lu),{matches:i}=U.useContext(uu),{pathname:a}=Ev(),o=JSON.stringify(jB(i,n.v7_relativeSplatPath));return U.useMemo(()=>VB(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function vZ(t,e){return pZ(t,e)}function pZ(t,e,r,n){Nv()||nr(!1);let{navigator:i}=U.useContext(lu),{matches:a}=U.useContext(uu),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Ev(),c;if(e){var h;let m=typeof e=="string"?gh(e):e;l==="/"||(h=m.pathname)!=null&&h.startsWith(l)||nr(!1),c=m}else c=u;let f=c.pathname||"/",d=f;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=F9(t,{pathname:d}),g=xZ(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:os([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:os([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?U.createElement(z0.Provider,{value:{location:Zd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Wo.Pop}},g):g}function gZ(){let t=TZ(),e=uZ(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},e),r?U.createElement("pre",{style:i},r):null,null)}const mZ=U.createElement(gZ,null);class yZ extends U.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?U.createElement(uu.Provider,{value:this.props.routeContext},U.createElement(GB.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _Z(t){let{routeContext:e,match:r,children:n}=t,i=U.useContext(p2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(uu.Provider,{value:e},n)}function xZ(t,e,r,n){var i;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var a;if(!r)return null;if(r.errors)t=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,s=(i=r)==null?void 0:i.errors;if(s!=null){let c=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);c>=0||nr(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,f)=>{let d,p=!1,g=null,m=null;r&&(d=s&&h.route.id?s[h.route.id]:void 0,g=h.route.errorElement||mZ,l&&(u<0&&f===0?(MZ("route-fallback"),p=!0,m=null):u===f&&(p=!0,m=h.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,f+1)),_=()=>{let b;return d?b=g:p?b=m:h.route.Component?b=U.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=c,U.createElement(_Z,{match:h,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:b})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?U.createElement(yZ,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var ZB=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(ZB||{}),$B=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}($B||{});function bZ(t){let e=U.useContext(p2);return e||nr(!1),e}function SZ(t){let e=U.useContext(hZ);return e||nr(!1),e}function wZ(t){let e=U.useContext(uu);return e||nr(!1),e}function YB(t){let e=wZ(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function TZ(){var t;let e=U.useContext(GB),r=SZ(),n=YB();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function CZ(){let{router:t}=bZ(ZB.UseNavigateStable),e=YB($B.UseNavigateStable),r=U.useRef(!1);return HB(()=>{r.current=!0}),U.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Zd({fromRouteId:e},a)))},[t,e])}const Pk={};function MZ(t,e,r){Pk[t]||(Pk[t]=!0)}function AZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function dl(t){nr(!1)}function LZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Wo.Pop,navigator:a,static:o=!1,future:s}=t;Nv()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=U.useMemo(()=>({basename:l,navigator:a,static:o,future:Zd({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=gh(n));let{pathname:c="/",search:h="",hash:f="",state:d=null,key:p="default"}=n,g=U.useMemo(()=>{let m=v2(c,l);return m==null?null:{location:{pathname:m,search:h,hash:f,state:d,key:p},navigationType:i}},[l,c,h,f,d,p,i]);return g==null?null:U.createElement(lu.Provider,{value:u},U.createElement(z0.Provider,{children:r,value:g}))}function PZ(t){let{children:e,location:r}=t;return vZ(tw(e),r)}new Promise(()=>{});function tw(t,e){e===void 0&&(e=[]);let r=[];return U.Children.forEach(t,(n,i)=>{if(!U.isValidElement(n))return;let a=[...e,i];if(n.type===U.Fragment){r.push.apply(r,tw(n.props.children,a));return}n.type!==dl&&nr(!1),!n.props.index||!n.props.children||nr(!1);let o={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=tw(n.props.children,a)),r.push(o)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -64,97 +64,97 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function tw(){return tw=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function kZ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function DZ(t,e){return t.button===0&&(!e||e==="_self")&&!kZ(t)}const IZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],EZ="6";try{window.__reactRouterVersion=EZ}catch{}const NZ="startTransition",Pk=MU[NZ];function RZ(t){let{basename:e,children:r,future:n,window:i}=t,a=Z.useRef();a.current==null&&(a.current=z9({window:i,v5Compat:!0}));let o=a.current,[s,l]=Z.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=Z.useCallback(h=>{u&&Pk?Pk(()=>l(h)):l(h)},[l,u]);return Z.useLayoutEffect(()=>o.listen(c),[o,c]),Z.useEffect(()=>MZ(n),[n]),Z.createElement(AZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const OZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",zZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,BZ=Z.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:h}=e,f=PZ(e,IZ),{basename:d}=Z.useContext(uu),p,g=!1;if(typeof u=="string"&&zZ.test(u)&&(p=u,OZ))try{let S=new URL(window.location.href),w=u.startsWith("//")?new URL(S.protocol+u):new URL(u),C=p2(w.pathname,d);w.origin===S.origin&&C!=null?u=C+w.search+w.hash:g=!0}catch{}let m=hZ(u,{relative:i}),y=jZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:h});function _(S){n&&n(S),S.defaultPrevented||y(S)}return Z.createElement("a",tw({},f,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var kk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(kk||(kk={}));var Dk;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Dk||(Dk={}));function jZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=WB(),u=Ev(),c=UB(t,{relative:o});return Z.useCallback(h=>{if(DZ(h,r)){h.preventDefault();let f=n!==void 0?n:iy(u)===iy(c);l(t,{replace:f,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,t,a,o,s])}/** + */function rw(){return rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function DZ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function IZ(t,e){return t.button===0&&(!e||e==="_self")&&!DZ(t)}const NZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],EZ="6";try{window.__reactRouterVersion=EZ}catch{}const RZ="startTransition",kk=AU[RZ];function OZ(t){let{basename:e,children:r,future:n,window:i}=t,a=U.useRef();a.current==null&&(a.current=B9({window:i,v5Compat:!0}));let o=a.current,[s,l]=U.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=U.useCallback(h=>{u&&kk?kk(()=>l(h)):l(h)},[l,u]);return U.useLayoutEffect(()=>o.listen(c),[o,c]),U.useEffect(()=>AZ(n),[n]),U.createElement(LZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const zZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",BZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jZ=U.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:h}=e,f=kZ(e,NZ),{basename:d}=U.useContext(lu),p,g=!1;if(typeof u=="string"&&BZ.test(u)&&(p=u,zZ))try{let b=new URL(window.location.href),w=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=v2(w.pathname,d);w.origin===b.origin&&C!=null?u=C+w.search+w.hash:g=!0}catch{}let m=fZ(u,{relative:i}),y=VZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:h});function _(b){n&&n(b),b.defaultPrevented||y(b)}return U.createElement("a",rw({},f,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var Dk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Dk||(Dk={}));var Ik;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ik||(Ik={}));function VZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=WB(),u=Ev(),c=UB(t,{relative:o});return U.useCallback(h=>{if(IZ(h,r)){h.preventDefault();let f=n!==void 0?n:oy(u)===oy(c);l(t,{replace:f,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,t,a,o,s])}/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XB=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/** + */const FZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XB=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var FZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + */var GZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GZ=Z.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>Z.createElement("svg",{ref:l,...FZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:XB("lucide",i),...s},[...o.map(([u,c])=>Z.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + */const HZ=U.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>U.createElement("svg",{ref:l,...GZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:XB("lucide",i),...s},[...o.map(([u,c])=>U.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ze=(t,e)=>{const r=Z.forwardRef(({className:n,...i},a)=>Z.createElement(GZ,{ref:a,iconNode:e,className:XB(`lucide-${VZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/** + */const ze=(t,e)=>{const r=U.forwardRef(({className:n,...i},a)=>U.createElement(HZ,{ref:a,iconNode:e,className:XB(`lucide-${FZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const m2=ze("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + */const g2=ze("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ix=ze("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/** + */const Nx=ze("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HZ=ze("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/** + */const WZ=ze("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ay=ze("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + */const sy=ze("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WZ=ze("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** + */const UZ=ze("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UZ=ze("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + */const ZZ=ze("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZZ=ze("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + */const $Z=ze("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $Z=ze("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** + */const YZ=ze("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rw=ze("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const $d=ze("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Nv=ze("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const Rv=ze("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YZ=ze("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const XZ=ze("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Rv=ze("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const Ov=ze("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XZ=ze("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const qZ=ze("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const O0=ze("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + */const B0=ze("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -164,12 +164,12 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oy=ze("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + */const ly=ze("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $d=ze("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** + */const Yd=ze("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -179,12 +179,12 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qZ=ze("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + */const KZ=ze("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KZ=ze("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** + */const QZ=ze("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -199,27 +199,27 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const y2=ze("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const m2=ze("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _2=ze("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** + */const y2=ze("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QZ=ze("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** + */const JZ=ze("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sy=ze("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + */const uy=ze("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JZ=ze("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + */const e$=ze("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -234,27 +234,27 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e$=ze("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** + */const t$=ze("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t$=ze("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + */const r$=ze("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r$=ze("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** + */const n$=ze("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const n$=ze("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const i$=ze("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Yd=ze("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const Xd=ze("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -274,7 +274,7 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i$=ze("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** + */const a$=ze("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -284,7 +284,7 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const a$=ze("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const n4=ze("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -294,12 +294,12 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const n4=ze("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const i4=ze("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ik=ze("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + */const Nk=ze("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -314,12 +314,12 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const z0=ze("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const j0=ze("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _s=ze("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const ys=ze("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -334,7 +334,7 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i4=ze("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** + */const a4=ze("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. @@ -344,12 +344,12 @@ Error generating stack: `+a.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const B0=ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + */const zv=ze("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** * @license lucide-react v0.383.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x2=ze("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function or(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function Nk(){return or("/api/status")}async function h$(){return or("/api/health")}async function f$(){return or("/api/nodes")}async function d$(){return or("/api/edges")}async function v$(){return or("/api/sources")}async function a4(){return or("/api/alerts/active")}async function Rk(t=50,e=0,r,n){const i=new URLSearchParams;return i.set("limit",t.toString()),i.set("offset",e.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),or(`/api/alerts/history?${i.toString()}`)}async function p$(){return or("/api/subscriptions")}async function o4(){return or("/api/env/status")}async function g$(){return or("/api/env/active")}async function m$(){return or("/api/env/propagation")}async function y$(){return or("/api/env/swpc")}async function _$(){return or("/api/env/ducting")}async function x$(){return or("/api/env/fires")}async function S$(){return or("/api/env/avalanche")}async function b$(){return or("/api/env/streams")}async function w$(){return or("/api/env/traffic")}async function T$(){return or("/api/env/roads")}async function C$(){return or("/api/env/hotspots")}async function M$(){return or("/api/regions")}function S2(){const[t,e]=Z.useState(!1),[r,n]=Z.useState(null),[i,a]=Z.useState(null),o=Z.useRef(null),s=Z.useRef(null),l=Z.useRef(1e3),u=Z.useCallback(()=>{var f;if(((f=o.current)==null?void 0:f.readyState)===WebSocket.OPEN)return;const h=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const d=new WebSocket(h);o.current=d,d.onopen=()=>{e(!0),l.current=1e3},d.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},d.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},d.onerror=()=>{d.close()};const p=setInterval(()=>{d.readyState===WebSocket.OPEN&&d.send("ping")},3e4);d.addEventListener("close",()=>{clearInterval(p)})}catch(d){console.error("Failed to create WebSocket:",d)}},[]);return Z.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const s4=Z.createContext(null);function A$(){const t=Z.useContext(s4);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}function L$(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:O0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:_s,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:sy,iconColor:"text-blue-500"}}}function P$({toast:t,onDismiss:e,onNavigate:r}){const n=L$(t.alert.severity),i=n.icon;return Z.useEffect(()=>{const a=setTimeout(e,8e3);return()=>clearTimeout(a)},[e]),b.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:b.jsxs("div",{className:"flex items-start gap-3 p-4",children:[b.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),b.jsx(i,{size:18,className:n.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[b.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:t.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),b.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:t.alert.message})]}),b.jsx("button",{onClick:a=>{a.stopPropagation(),e()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:b.jsx(B0,{size:16})})]})})}function k$({children:t}){const[e,r]=Z.useState([]),n=WB(),i=Z.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=Z.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=Z.useCallback(()=>{n("/alerts")},[n]);return b.jsxs(s4.Provider,{value:{addToast:i},children:[t,b.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:e.map(s=>b.jsx("div",{className:"pointer-events-auto",children:b.jsx(P$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const l4=[{path:"/",label:"Dashboard",icon:QB},{path:"/mesh",label:"Mesh",icon:Xc},{path:"/environment",label:"Environment",icon:$d},{path:"/config",label:"Config",icon:n4},{path:"/alerts",label:"Alerts",icon:ay},{path:"/notifications",label:"Notifications",icon:HZ}];function D$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function I$(t){const e=l4.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function E$({children:t}){var f;const e=Ev(),{connected:r,lastAlert:n}=S2(),{addToast:i}=A$(),[a,o]=Z.useState(null),[s,l]=Z.useState(null);Z.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=Z.useState(new Date);Z.useEffect(()=>{Nk().then(o).catch(console.error);const d=setInterval(()=>{Nk().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),Z.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const h=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return b.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[b.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[b.jsx("div",{className:"p-5 border-b border-border",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),b.jsxs("div",{children:[b.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),b.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),b.jsx("nav",{className:"flex-1 py-4",children:l4.map(d=>{const p=e.pathname===d.path,g=d.icon;return b.jsxs(BZ,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${p?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[p&&b.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),b.jsx(g,{size:18}),d.label]},d.path)})}),b.jsxs("div",{className:"p-5 border-t border-border",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),b.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),b.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(f=a==null?void 0:a.connection_type)==null?void 0:f.toUpperCase(),": ",a==null?void 0:a.connection_target]}),b.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?D$(a.uptime_seconds):"..."]})]})]}),b.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[b.jsx("h1",{className:"text-lg font-semibold",children:I$(e.pathname)}),b.jsxs("div",{className:"flex items-center gap-6",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),b.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),b.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[h," MT"]})]})]}),b.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function N$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return b.jsx("div",{className:"flex flex-col items-center",children:b.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[b.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),b.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),b.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),b.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function jp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),b.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:b.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),b.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function R$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:O0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:_s,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:sy,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return b.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[b.jsx(n,{size:16,className:r.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200",children:t.message}),b.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function O$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return b.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),b.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Vp({icon:t,label:e,value:r,subvalue:n}){return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[b.jsx(t,{size:14}),b.jsx("span",{className:"text-xs",children:e})]}),b.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&b.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function z$({propagation:t}){var o,s,l;if(!t)return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),b.jsx("div",{className:"text-slate-500",children:b.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(x2,{size:14}),"RF Propagation"]}),b.jsxs("div",{className:"mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?b.jsxs("div",{className:"space-y-1",children:[b.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),b.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&b.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):b.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?b.jsxs("div",{className:"space-y-1",children:[b.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),b.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&b.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):b.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function B$(){var g,m,y,_,S;const[t,e]=Z.useState(null),[r,n]=Z.useState([]),[i,a]=Z.useState([]),[o,s]=Z.useState(null),[l,u]=Z.useState(null),[c,h]=Z.useState(!0),[f,d]=Z.useState(null),{lastHealth:p}=S2();return Z.useEffect(()=>{Promise.all([h$(),v$(),a4(),o4(),m$().catch(()=>null)]).then(([w,C,M,A,k])=>{e(w),n(C),a(M),s(A),u(k),h(!1),document.title="Dashboard — MeshAI"}).catch(w=>{d(w.message),h(!1),document.title="Dashboard — MeshAI"})},[]),Z.useEffect(()=>{p&&e(p)},[p]),c?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading..."})}):f?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&b.jsxs(b.Fragment,{children:[b.jsx(N$,{health:t}),b.jsxs("div",{className:"mt-6 space-y-3",children:[b.jsx(jp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),b.jsx(jp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),b.jsx(jp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),b.jsx(jp,{label:"Power",value:((_=t.pillars)==null?void 0:_.power)??0})]})]})]}),b.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?b.jsx("div",{className:"space-y-3",children:i.map((w,C)=>b.jsx(R$,{alert:w},C))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(cd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No active alerts"})]})]}),b.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[b.jsx(Vp,{icon:Xc,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),b.jsx(Vp,{icon:qB,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),b.jsx(Vp,{icon:m2,label:"Utilization",value:`${((S=t==null?void 0:t.util_percent)==null?void 0:S.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),b.jsx(Vp,{icon:JB,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?b.jsx("div",{className:"space-y-2",children:r.map((w,C)=>b.jsx(O$,{source:w},C))}):b.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?b.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):b.jsxs("div",{className:"text-slate-500",children:[b.jsx("p",{children:"Environmental feeds not enabled."}),b.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),b.jsx(z$,{propagation:l})]})}/*! ***************************************************************************** + */const _2=ze("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function or(t){const e=await fetch(t);if(!e.ok)throw new Error(`API error: ${e.status} ${e.statusText}`);return e.json()}async function Rk(){return or("/api/status")}async function h$(){return or("/api/health")}async function f$(){return or("/api/nodes")}async function d$(){return or("/api/edges")}async function v$(){return or("/api/sources")}async function o4(){return or("/api/alerts/active")}async function Ok(t=50,e=0,r,n){const i=new URLSearchParams;return i.set("limit",t.toString()),i.set("offset",e.toString()),r&&r!=="all"&&i.set("type",r),n&&n!=="all"&&i.set("severity",n),or(`/api/alerts/history?${i.toString()}`)}async function p$(){return or("/api/subscriptions")}async function s4(){return or("/api/env/status")}async function g$(){return or("/api/env/active")}async function m$(){return or("/api/env/propagation")}async function y$(){return or("/api/env/swpc")}async function _$(){return or("/api/env/ducting")}async function x$(){return or("/api/env/fires")}async function b$(){return or("/api/env/avalanche")}async function S$(){return or("/api/env/streams")}async function w$(){return or("/api/env/traffic")}async function T$(){return or("/api/env/roads")}async function C$(){return or("/api/env/hotspots")}async function M$(){return or("/api/regions")}function x2(){const[t,e]=U.useState(!1),[r,n]=U.useState(null),[i,a]=U.useState(null),o=U.useRef(null),s=U.useRef(null),l=U.useRef(1e3),u=U.useCallback(()=>{var f;if(((f=o.current)==null?void 0:f.readyState)===WebSocket.OPEN)return;const h=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const d=new WebSocket(h);o.current=d,d.onopen=()=>{e(!0),l.current=1e3},d.onmessage=g=>{try{const m=JSON.parse(g.data);switch(m.type){case"health_update":n(m.data);break;case"alert_fired":a(m.data);break}}catch(m){console.error("Failed to parse WebSocket message:",m)}},d.onclose=()=>{e(!1),o.current=null;const g=Math.min(l.current,3e4);s.current=window.setTimeout(()=>{l.current=Math.min(g*2,3e4),u()},g)},d.onerror=()=>{d.close()};const p=setInterval(()=>{d.readyState===WebSocket.OPEN&&d.send("ping")},3e4);d.addEventListener("close",()=>{clearInterval(p)})}catch(d){console.error("Failed to create WebSocket:",d)}},[]);return U.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const l4=U.createContext(null);function A$(){const t=U.useContext(l4);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}function L$(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:B0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ys,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:uy,iconColor:"text-blue-500"}}}function P$({toast:t,onDismiss:e,onNavigate:r}){const n=L$(t.alert.severity),i=n.icon;return U.useEffect(()=>{const a=setTimeout(e,8e3);return()=>clearTimeout(a)},[e]),S.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:S.jsxs("div",{className:"flex items-start gap-3 p-4",children:[S.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),S.jsx(i,{size:18,className:n.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[S.jsx("div",{className:"text-sm font-medium text-slate-200 mb-0.5",children:t.alert.type.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}),S.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:t.alert.message})]}),S.jsx("button",{onClick:a=>{a.stopPropagation(),e()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:S.jsx(zv,{size:16})})]})})}function k$({children:t}){const[e,r]=U.useState([]),n=WB(),i=U.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=U.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=U.useCallback(()=>{n("/alerts")},[n]);return S.jsxs(l4.Provider,{value:{addToast:i},children:[t,S.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none",children:e.map(s=>S.jsx("div",{className:"pointer-events-auto",children:S.jsx(P$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const u4=[{path:"/",label:"Dashboard",icon:QB},{path:"/mesh",label:"Mesh",icon:Xc},{path:"/environment",label:"Environment",icon:Yd},{path:"/config",label:"Config",icon:i4},{path:"/alerts",label:"Alerts",icon:sy},{path:"/notifications",label:"Notifications",icon:WZ}];function D$(t){const e=Math.floor(t/86400),r=Math.floor(t%86400/3600),n=Math.floor(t%3600/60);return e>0?`${e}d ${r}h`:r>0?`${r}h ${n}m`:`${n}m`}function I$(t){const e=u4.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function N$({children:t}){var f;const e=Ev(),{connected:r,lastAlert:n}=x2(),{addToast:i}=A$(),[a,o]=U.useState(null),[s,l]=U.useState(null);U.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=U.useState(new Date);U.useEffect(()=>{Rk().then(o).catch(console.error);const d=setInterval(()=>{Rk().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),U.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const h=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return S.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[S.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[S.jsx("div",{className:"p-5 border-b border-border",children:S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-10 h-10 rounded-lg bg-gradient-to-br from-blue-500 to-blue-700 flex items-center justify-center text-white font-bold text-xl",children:"M"}),S.jsxs("div",{children:[S.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),S.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),S.jsx("nav",{className:"flex-1 py-4",children:u4.map(d=>{const p=e.pathname===d.path,g=d.icon;return S.jsxs(jZ,{to:d.path,className:`flex items-center gap-3 px-5 py-3 text-sm transition-colors relative ${p?"text-blue-400 bg-blue-500/10":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[p&&S.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),S.jsx(g,{size:18}),d.label]},d.path)})}),S.jsxs("div",{className:"p-5 border-t border-border",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),S.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),S.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(f=a==null?void 0:a.connection_type)==null?void 0:f.toUpperCase(),": ",a==null?void 0:a.connection_target]}),S.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?D$(a.uptime_seconds):"..."]})]})]}),S.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[S.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[S.jsx("h1",{className:"text-lg font-semibold",children:I$(e.pathname)}),S.jsxs("div",{className:"flex items-center gap-6",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),S.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),S.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[h," MT"]})]})]}),S.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function E$({health:t}){const e=t.score,r=t.tier,i=(s=>s>=80?"#22c55e":s>=60?"#f59e0b":"#ef4444")(e),a=2*Math.PI*45,o=e/100*a;return S.jsx("div",{className:"flex flex-col items-center",children:S.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[S.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),S.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:i,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:a,strokeDashoffset:a-o,transform:"rotate(-90 50 50)",className:"transition-all duration-500"}),S.jsx("text",{x:"50",y:"46",textAnchor:"middle",className:"fill-slate-100 font-mono text-2xl font-bold",style:{fontSize:"24px"},children:e.toFixed(1)}),S.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Fp({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),S.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:S.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),S.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function R$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:B0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ys,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:uy,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return S.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[S.jsx(n,{size:16,className:r.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200",children:t.message}),S.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function O$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return S.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),S.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Gp({icon:t,label:e,value:r,subvalue:n}){return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[S.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[S.jsx(t,{size:14}),S.jsx("span",{className:"text-xs",children:e})]}),S.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&S.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function z$({propagation:t}){var o,s,l;if(!t)return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),S.jsx("div",{className:"text-slate-500",children:S.jsx("p",{children:"Loading propagation data..."})})]});const e=t.hf,r=t.uhf_ducting,n=u=>{if(!u)return"text-slate-400";switch(u){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},i=e&&(e.sfi||e.kp_current!==void 0),a=r&&r.condition;return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(_2,{size:14}),"RF Propagation"]}),S.jsxs("div",{className:"mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?S.jsxs("div",{className:"space-y-1",children:[S.jsxs("div",{className:"text-sm font-mono text-slate-200",children:["SFI ",((o=e.sfi)==null?void 0:o.toFixed(0))||"?"," / Kp ",((s=e.kp_current)==null?void 0:s.toFixed(1))||"?"]}),S.jsxs("div",{className:"text-xs text-slate-400",children:["R",e.r_scale??0," / S",e.s_scale??0," / G",e.g_scale??0]}),e.r_scale!==void 0&&e.r_scale>0&&S.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):S.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?S.jsxs("div",{className:"space-y-1",children:[S.jsx("div",{className:`text-sm font-medium ${n(r.condition)}`,children:r.condition==="normal"?"Normal":(l=r.condition)==null?void 0:l.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())}),S.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&S.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):S.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function B$(){var g,m,y,_,b;const[t,e]=U.useState(null),[r,n]=U.useState([]),[i,a]=U.useState([]),[o,s]=U.useState(null),[l,u]=U.useState(null),[c,h]=U.useState(!0),[f,d]=U.useState(null),{lastHealth:p}=x2();return U.useEffect(()=>{Promise.all([h$(),v$(),o4(),s4(),m$().catch(()=>null)]).then(([w,C,M,A,k])=>{e(w),n(C),a(M),s(A),u(k),h(!1),document.title="Dashboard — MeshAI"}).catch(w=>{d(w.message),h(!1),document.title="Dashboard — MeshAI"})},[]),U.useEffect(()=>{p&&e(p)},[p]),c?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading..."})}):f?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&S.jsxs(S.Fragment,{children:[S.jsx(E$,{health:t}),S.jsxs("div",{className:"mt-6 space-y-3",children:[S.jsx(Fp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),S.jsx(Fp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),S.jsx(Fp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),S.jsx(Fp,{label:"Power",value:((_=t.pillars)==null?void 0:_.power)??0})]})]})]}),S.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?S.jsx("div",{className:"space-y-3",children:i.map((w,C)=>S.jsx(R$,{alert:w},C))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(cd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No active alerts"})]})]}),S.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[S.jsx(Gp,{icon:Xc,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),S.jsx(Gp,{icon:qB,label:"Infrastructure",value:`${(t==null?void 0:t.infra_online)||0}/${(t==null?void 0:t.infra_total)||0}`,subvalue:(t==null?void 0:t.infra_online)===(t==null?void 0:t.infra_total)?"All online":"Some offline"}),S.jsx(Gp,{icon:g2,label:"Utilization",value:`${((b=t==null?void 0:t.util_percent)==null?void 0:b.toFixed(1))||0}%`,subvalue:`${(t==null?void 0:t.flagged_nodes)||0} flagged`}),S.jsx(Gp,{icon:JB,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?S.jsx("div",{className:"space-y-2",children:r.map((w,C)=>S.jsx(O$,{source:w},C))}):S.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?S.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):S.jsxs("div",{className:"text-slate-500",children:[S.jsx("p",{children:"Environmental feeds not enabled."}),S.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),S.jsx(z$,{propagation:l})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -362,8 +362,8 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var nw=function(t,e){return nw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},nw(t,e)};function Y(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nw(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var hd=function(){return hd=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?Ze.worker=!0:!Ze.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ze.node=!0,Ze.svgSupported=!0):G$(navigator.userAgent,Ze);function G$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var b2=12,u4="sans-serif",co=b2+"px "+u4,H$=20,W$=100,U$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Z$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){R(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function gY(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,f=c.left,d=c.top;o.push(f,d),l=l&&a&&f===a[h]&&d===a[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?jk(s,o):jk(o,s))}function _4(t){return t.nodeName.toUpperCase()==="CANVAS"}var mY=/([&<>"'])/g,yY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ur(t){return t==null?"":(t+"").replace(mY,function(e,r){return yY[r]})}var _Y=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Nx=[],xY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function lw(t,e,r,n){return r=r||{},n?Vk(t,e,r):xY&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Vk(t,e,r),r}function Vk(t,e,r){if(Ze.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(_4(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(sw(Nx,t,n,i)){r.zrX=Nx[0],r.zrY=Nx[1];return}}r.zrX=r.zrY=0}function P2(t){return t||window.event}function $n(t,e,r){if(e=P2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&lw(t,o,e,r)}else{lw(t,e,e,r);var a=SY(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&_Y.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function SY(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function uw(t,e,r,n){t.addEventListener(e,r,n)}function bY(t,e,r,n){t.removeEventListener(e,r,n)}var ho=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Fk(t){return t.which===2||t.which===3}var wY=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=Gk(n)/Gk(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=TY(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function jv(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Vv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Di(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Oi(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function xo(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),h=Math.cos(r);return t[0]=i*h+s*c,t[1]=-i*c+s*h,t[2]=a*h+l*c,t[3]=-a*c+h*l,t[4]=h*(o-n[0])+c*(u-n[1])+n[0],t[5]=h*(u-n[1])-c*(o-n[0])+n[1],t}function W0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function ci(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function x4(t){var e=fr();return Vv(e,t),e}const CY=Object.freeze(Object.defineProperty({__proto__:null,clone:x4,copy:Vv,create:fr,identity:jv,invert:ci,mul:Di,rotate:xo,scale:W0,translate:Oi},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),Ll=Math.min,Sc=Math.max,cw=Math.abs,Hk=["x","y"],MY=["width","height"],Vs=new Te,Fs=new Te,Gs=new Te,Hs=new Te,Cn=S4(),Gf=Cn.minTv,hw=Cn.maxTv,pd=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Ll(e.x,this.x),n=Ll(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Sc(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Sc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=fr();return Oi(a,a,[-r.x,-r.y]),W0(a,a,[n,i]),Oi(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(AY,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(LY,r.x,r.y,r.width,r.height));var s=!!n;Cn.reset(i,s);var l=Cn.touchThreshold,u=e.x+l,c=e.x+e.width-l,h=e.y+l,f=e.y+e.height-l,d=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||h>f||d>p||g>m)return!1;var y=!(c=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Vs.x=Gs.x=r.x,Vs.y=Hs.y=r.y,Fs.x=Hs.x=r.x+r.width,Fs.y=Gs.y=r.y+r.height,Vs.transform(n),Hs.transform(n),Fs.transform(n),Gs.transform(n),e.x=Ll(Vs.x,Fs.x,Gs.x,Hs.x),e.y=Ll(Vs.y,Fs.y,Gs.y,Hs.y);var l=Sc(Vs.x,Fs.x,Gs.x,Hs.x),u=Sc(Vs.y,Fs.y,Gs.y,Hs.y);e.width=l-e.x,e.height=u-e.y},t}(),AY=new Ce(0,0,0,0),LY=new Ce(0,0,0,0);function Wk(t,e,r,n,i,a,o,s){var l=cw(e-r),u=cw(n-t),c=Ll(l,u),h=Hk[i],f=Hk[1-i],d=MY[i];e=u||!Cn.bidirectional)&&(Gf[h]=-u,Gf[f]=0,Cn.useDir&&Cn.calcDirMTV())))}function S4(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=Sc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()=0;h--){var f=a[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(Ox.copy(f.getBoundingRect()),f.transform&&Ox.applyTransform(f.transform),Ox.intersect(c)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function EY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?b4:!0}return!1}function Uk(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=EY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==b4)){e.target=o;break}}}function T4(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var C4=32,sf=7;function NY(t){for(var e=0;t>=C4;)e|=t&1,t>>=1;return t+e}function Zk(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function RY(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function zx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function Bx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function OY(t,e){var r=sf,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=sf||A>=sf);if(k)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),p===1){for(y=0;y=0;y--)t[M+y]=t[C+y];t[w]=o[S];return}for(var A=r;;){var k=0,E=0,D=!1;do if(e(o[S],t[_])<0){if(t[w--]=t[_--],k++,E=0,--p===0){D=!0;break}}else if(t[w--]=o[S--],E++,k=0,--m===1){D=!0;break}while((k|E)=0;y--)t[M+y]=t[C+y];if(p===0){D=!0;break}}if(t[w--]=o[S--],--m===1){D=!0;break}if(E=m-zx(t[_],o,0,m,m-1,e),E!==0){for(w-=E,S-=E,m-=E,M=w+1,C=S+1,y=0;y=sf||E>=sf);if(D)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(w-=p,_-=p,M=w+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[w]=o[S]}else{if(m===0)throw new Error;for(C=w-(m-1),y=0;ys&&(l=s),$k(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Mn=1,Hf=2,ac=4,Yk=!1;function jx(){Yk||(Yk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Xk(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var zY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Xk}return t.prototype.traverse=function(e,r){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),fy;fy=Ze.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var gd={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-gd.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?gd.bounceIn(t*2)*.5:gd.bounceOut(t*2-1)*.5+.5}},Gp=Math.pow,us=Math.sqrt,dy=1e-8,M4=1e-4,qk=us(3),Hp=1/3,oa=ks(),Jn=ks(),Rc=ks();function Zo(t){return t>-dy&&tdy||t<-dy}function ur(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function Kk(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function vy(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Zo(c)&&Zo(h))if(Zo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=h*h-4*c*f;if(Zo(g)){var m=h/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var _=us(g),S=c*s+1.5*o*(-h+_),w=c*s+1.5*o*(-h-_);S<0?S=-Gp(-S,Hp):S=Gp(S,Hp),w<0?w=-Gp(-w,Hp):w=Gp(w,Hp);var p=(-s-(S+w))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*c*s-3*o*h)/(2*us(c*c*c)),M=Math.acos(C)/3,A=us(c),k=Math.cos(M),p=(-s-2*A*k)/(3*o),y=(-s+A*(k+qk*Math.sin(M)))/(3*o),E=(-s+A*(k-qk*Math.sin(M)))/(3*o);p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y),E>=0&&E<=1&&(a[d++]=E)}}return d}function L4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Zo(o)){if(A4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Zo(c))i[0]=-a/(2*o);else if(c>0){var h=us(c),u=(-a+h)/(2*o),f=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function xs(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n}function P4(t,e,r,n,i,a,o,s,l,u,c){var h,f=.005,d=1/0,p,g,m,y;oa[0]=l,oa[1]=u;for(var _=0;_<1;_+=.05)Jn[0]=ur(t,r,i,o,_),Jn[1]=ur(e,n,a,s,_),m=ls(oa,Jn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Zo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=us(c),u=(-o+h)/(2*a),f=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function k4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Kd(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function D4(t,e,r,n,i,a,o,s,l){var u,c=.005,h=1/0;oa[0]=o,oa[1]=s;for(var f=0;f<1;f+=.05){Jn[0]=Sr(t,r,i,f),Jn[1]=Sr(e,n,a,f);var d=ls(oa,Jn);d=0&&d=1?1:vy(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var GY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Rt,this.ondestroy=e.ondestroy||Rt,this.onrestart=e.onrestart||Rt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:gd[e]||k2(e)},t}(),I4=function(){function t(e){this.value=e}return t}(),HY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new I4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Kc=function(){function t(e){this._list=new HY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new I4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Qk={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ii(t){return t=Math.round(t),t<0?0:t>255?255:t}function WY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Qd(t){return t<0?0:t>1?1:t}function vm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ii(parseFloat(e)/100*255):Ii(parseInt(e,10))}function eo(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Qd(parseFloat(e)/100):Qd(parseFloat(e))}function Vx(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function $o(t,e,r){return t+(e-t)*r}function Zn(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function dw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var E4=new Kc(20),Wp=null;function Eu(t,e){Wp&&dw(Wp,e),Wp=E4.put(t,Wp||e.slice())}function Zr(t,e){if(t){e=e||[];var r=E4.get(t);if(r)return dw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in Qk)return dw(e,Qk[n]),Eu(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Zn(e,0,0,0,1);return}return Zn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Eu(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Zn(e,0,0,0,1);return}return Zn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Eu(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Zn(e,+u[0],+u[1],+u[2],1):Zn(e,0,0,0,1);c=eo(u.pop());case"rgb":if(u.length>=3)return Zn(e,vm(u[0]),vm(u[1]),vm(u[2]),u.length===3?c:eo(u[3])),Eu(t,e),e;Zn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Zn(e,0,0,0,1);return}return u[3]=eo(u[3]),vw(u,e),Eu(t,e),e;case"hsl":if(u.length!==3){Zn(e,0,0,0,1);return}return vw(u,e),Eu(t,e),e;default:return}}Zn(e,0,0,0,1)}}function vw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=eo(t[1]),i=eo(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Zn(e,Ii(Vx(o,a,r+1/3)*255),Ii(Vx(o,a,r)*255),Ii(Vx(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function UY(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,h=((a-r)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-h:r===a?l=1/3+c-f:n===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return t[3]!=null&&d.push(t[3]),d}}function py(t,e){var r=Zr(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ai(r,r.length===4?"rgba":"rgb")}}function ZY(t){var e=Zr(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function md(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ii($o(o[0],s[0],l)),r[1]=Ii($o(o[1],s[1],l)),r[2]=Ii($o(o[2],s[2],l)),r[3]=Qd($o(o[3],s[3],l)),r}}var $Y=md;function D2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Zr(e[i]),s=Zr(e[a]),l=n-i,u=ai([Ii($o(o[0],s[0],l)),Ii($o(o[1],s[1],l)),Ii($o(o[2],s[2],l)),Qd($o(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var YY=D2;function to(t,e,r,n){var i=Zr(t);if(t)return i=UY(i),e!=null&&(i[0]=WY(me(e)?e(i[0]):e)),r!=null&&(i[1]=eo(me(r)?r(i[1]):r)),n!=null&&(i[2]=eo(me(n)?n(i[2]):n)),ai(vw(i),"rgba")}function Jd(t,e){var r=Zr(t);if(r&&e!=null)return r[3]=Qd(e),ai(r,"rgba")}function ai(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function ev(t,e){var r=Zr(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function XY(){return ai([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var Jk=new Kc(100);function gy(t){if(se(t)){var e=Jk.get(t);return e||(e=py(t,-.1),Jk.put(t,e)),e}else if(Ov(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:py(n.color,-.1)}}),r}return t}const qY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:md,fastMapToColor:$Y,lerp:D2,lift:py,liftColor:gy,lum:ev,mapToColor:YY,modifyAlpha:Jd,modifyHSL:to,parse:Zr,parseCssFloat:eo,parseCssInt:vm,random:XY,stringify:ai,toHex:ZY},Symbol.toStringTag,{value:"Module"}));var my=Math.round;function tv(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Zr(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var eD=1e-4;function Yo(t){return t-eD}function Up(t){return my(t*1e3)/1e3}function pw(t){return my(t*1e4)/1e4}function KY(t){return"matrix("+Up(t[0])+","+Up(t[1])+","+Up(t[2])+","+Up(t[3])+","+pw(t[4])+","+pw(t[5])+")"}var QY={left:"start",right:"end",center:"middle",middle:"middle"};function JY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function eX(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function tX(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function N4(t){return t&&!!t.image}function rX(t){return t&&!!t.svgElement}function I2(t){return N4(t)||rX(t)}function R4(t){return t.type==="linear"}function O4(t){return t.type==="radial"}function z4(t){return t&&(t.type==="linear"||t.type==="radial")}function U0(t){return"url(#"+t+")"}function B4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function j4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*fd,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+my(o*fd)+"deg, "+my(s*fd)+"deg)"),l.join(" ")}var nX=function(){return Ze.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),gw=Array.prototype.slice;function Fa(t,e,r){return(e-t)*r+t}function Fx(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=rD,l=r;if(Er(r)){var u=sX(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!Dr(r))s=$p;else if(se(r))if(!isNaN(+r))s=$p;else{var c=Zr(r);c&&(l=c,s=Wf)}else if(Ov(r)){var h=J({},l);h.colorStops=re(r.colorStops,function(d){return{offset:d.offset,color:Zr(d.color)}}),R4(r)?s=mw:O4(r)&&(s=yw),l=h}a===0?this.valType=s:(s!==this.valType||s===rD)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:r,percent:0};return n&&(f.easing=n,f.easingFunc=me(n)?n:gd[n]||k2(n)),i.push(f),f},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Yp(i),u=nD(i),c=0;c=0&&!(o[c].percent<=r);c--);c=f(c,s-2)}else{for(c=h;cr);c++);c=f(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-d.percent,y=m===0?1:f((r-d.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?lf:e[l];if((Yp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:p.rawValue;else if(Yp(a))a===gm?Fx(_,d[i],p[i],y):iX(_,d[i],p[i],y);else if(nD(a)){var S=d[i],w=p[i],C=a===mw;e[l]={type:C?"linear":"radial",x:Fa(S.x,w.x,y),y:Fa(S.y,w.y,y),colorStops:re(S.colorStops,function(A,k){var E=w.colorStops[k];return{offset:Fa(A.offset,E.offset,y),color:pm(Fx([],A.color,E.color,y))}}),global:w.global},C?(e[l].x2=Fa(S.x2,w.x2,y),e[l].y2=Fa(S.y2,w.y2,y)):e[l].r=Fa(S.r,w.r,y)}else if(u)Fx(_,d[i],p[i],y),n||(e[l]=pm(_));else{var M=Fa(d[i],p[i],y);n?this._additiveValue=M:e[l]=M}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===$p?e[n]=e[n]+i:r===Wf?(Zr(e[n],lf),Zp(lf,lf,i,1),e[n]=pm(lf)):r===gm?Zp(e[n],e[n],i,1):r===V4&&tD(e[n],e[n],i,1)},t}(),E2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){V0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,$e(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,yd(u),i),this._trackKeys.push(s)}l.addKeyframe(e,yd(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function bc(){return new Date().getTime()}var uX=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=bc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(fy(n),!r._paused&&r.update())}fy(n)},e.prototype.start=function(){this._running||(this._time=bc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=bc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=bc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new E2(r,n.loop);return this.addAnimator(i),i},e}(di),cX=300,Gx=Ze.domSupported,Hx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),iD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},aD=!1;function _w(t){var e=t.pointerType;return e==="pen"||e==="touch"}function hX(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Wx(t){t&&(t.zrByTouch=!0)}function fX(t,e){return $n(t.dom,new dX(t,e),!0)}function F4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var dX=function(){function t(e,r){this.stopPropagation=Rt,this.stopImmediatePropagation=Rt,this.preventDefault=Rt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),Si={mousedown:function(t){t=$n(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=$n(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=$n(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=$n(this.dom,t);var e=t.toElement||t.relatedTarget;F4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){aD=!0,t=$n(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){aD||(t=$n(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=$n(this.dom,t),Wx(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Si.mousemove.call(this,t),Si.mousedown.call(this,t)},touchmove:function(t){t=$n(this.dom,t),Wx(t),this.handler.processGesture(t,"change"),Si.mousemove.call(this,t)},touchend:function(t){t=$n(this.dom,t),Wx(t),this.handler.processGesture(t,"end"),Si.mouseup.call(this,t),+new Date-+this.__lastTouchMomentlD||t<-lD}var Us=[],Nu=[],Zx=fr(),$x=Math.abs,Ka=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Ws(this.rotation)||Ws(this.x)||Ws(this.y)||Ws(this.scaleX-1)||Ws(this.scaleY-1)||Ws(this.skewX)||Ws(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(sD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):sD(n),e&&(r?Di(n,e,n):Vv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Us);var n=Us[0]<0?-1:1,i=Us[1]<0?-1:1,a=((Us[0]-n)*r+n)/Us[0]||0,o=((Us[1]-i)*r+i)/Us[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),ci(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fr(),Di(Nu,e.invTransform,r),r=Nu);var n=this.originX,i=this.originY;(n||i)&&(Zx[4]=n,Zx[5]=i,Di(Nu,r,Zx),Nu[4]-=n,Nu[5]-=i,r=Nu),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&$x(e[0]-1)>1e-10&&$x(e[3]-1)>1e-10?Math.sqrt($x(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){_y(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,f=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-f*g*o,r[5]=-g*o-d*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=f*o,u&&xo(r,r,u),r[4]+=n+c,r[5]+=i+h,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Sa=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function _y(t,e){for(var r=0;r=uD)){t=t||co;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=Sn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Yx=uD:i>2&&Yx++,e}}var Yx=0,uD=5;function H4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=yX(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function _a(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=Sn.measureText(e,t.font).width,r.put(e,n)),n}function cD(t,e,r,n){var i=_a(ya(e),t),a=Fv(e),o=Qc(0,i,r),s=zl(0,a,n),l=new Ce(o,s,i,a);return l}function Z0(t,e,r,n){var i=((t||"")+"").split(` -`),a=i.length;if(a===1)return cD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function xy(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",h="top";if(n instanceof Array)l+=zi(n[0],r.width),u+=zi(n[1],r.height),c=null,h=null;else switch(n){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",h="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var Xx="__zr_normal__",qx=Sa.concat(["ignore"]),_X=ui(Sa,function(t,e){return t[e]=!0,t},{ignore:!1}),Ru={},xX=new Ce(0,0,0,0),qp=[],$0=function(){function t(e){this.id=C2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,h=n.autoOverflowArea,f=void 0;if((h||c)&&(f=xX,n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Ru,n,f):xy(Ru,n,f),a.x=Ru.x,a.y=Ru.y,o=Ru.align,s=Ru.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var p=void 0,g=void 0;d==="center"?(p=f.width*.5,g=f.height*.5):(p=zi(d[0],f.width),g=zi(d[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+g+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(qp),ci(qp,qp),Ce.copy(_,f),_.applyTransform(qp)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,w=void 0,C=void 0,M=void 0;S&&this.canBeInsideText()?(w=n.insideFill,C=n.insideStroke,(w==null||w==="auto")&&(w=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(w),M=!0)):(w=n.outsideFill,C=n.outsideStroke,(w==null||w==="auto")&&(w=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(w),M=!0)),w=w||"#000",(w!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=w,y.stroke=C,y.autoStroke=M,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=Mn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ww:bw},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Zr(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ai(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(be(e))for(var n=e,i=$e(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(Xx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===Xx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ee(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){V0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(e,r,n,c),f&&f.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Mn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,f),m&&m.useStates(e,r,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Mn)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ee(i,e),o=Ee(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var f=0;f0||i.force&&!o.length){var k=void 0,E=void 0,D=void 0;if(s){E={},f&&(k={});for(var w=0;w=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ee(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ee(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"u"&&typeof self<"u"?Ze.worker=!0:!Ze.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ze.node=!0,Ze.svgSupported=!0):G$(navigator.userAgent,Ze);function G$(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in l||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}}var b2=12,c4="sans-serif",co=b2+"px "+c4,H$=20,W$=100,U$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Z$(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return e.clearMarkers=function(){R(r,function(c){c.parentNode&&c.parentNode.removeChild(c)})},r}function gY(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,f=c.left,d=c.top;o.push(f,d),l=l&&a&&f===a[h]&&d===a[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?Vk(s,o):Vk(o,s))}function x4(t){return t.nodeName.toUpperCase()==="CANVAS"}var mY=/([&<>"'])/g,yY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ur(t){return t==null?"":(t+"").replace(mY,function(e,r){return yY[r]})}var _Y=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Rx=[],xY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function lw(t,e,r,n){return r=r||{},n?Fk(t,e,r):xY&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Fk(t,e,r),r}function Fk(t,e,r){if(Ze.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(x4(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(sw(Rx,t,n,i)){r.zrX=Rx[0],r.zrY=Rx[1];return}}r.zrX=r.zrY=0}function L2(t){return t||window.event}function $n(t,e,r){if(e=L2(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&lw(t,o,e,r)}else{lw(t,e,e,r);var a=bY(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&_Y.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function bY(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function uw(t,e,r,n){t.addEventListener(e,r,n)}function SY(t,e,r,n){t.removeEventListener(e,r,n)}var ho=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Gk(t){return t.which===2||t.which===3}var wY=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=Hk(n)/Hk(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=TY(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function fr(){return[1,0,0,1,0,0]}function Fv(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Gv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Di(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function Oi(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function xo(t,e,r,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(r),h=Math.cos(r);return t[0]=i*h+s*c,t[1]=-i*c+s*h,t[2]=a*h+l*c,t[3]=-a*c+h*l,t[4]=h*(o-n[0])+c*(u-n[1])+n[0],t[5]=h*(u-n[1])-c*(o-n[0])+n[1],t}function U0(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function ci(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function b4(t){var e=fr();return Gv(e,t),e}const CY=Object.freeze(Object.defineProperty({__proto__:null,clone:b4,copy:Gv,create:fr,identity:Fv,invert:ci,mul:Di,rotate:xo,scale:U0,translate:Oi},Symbol.toStringTag,{value:"Module"}));var Te=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}(),Al=Math.min,xc=Math.max,cw=Math.abs,Wk=["x","y"],MY=["width","height"],js=new Te,Vs=new Te,Fs=new Te,Gs=new Te,Cn=S4(),Gf=Cn.minTv,hw=Cn.maxTv,pd=[0,0],Ce=function(){function t(e,r,n,i){t.set(this,e,r,n,i)}return t.set=function(e,r,n,i,a){return i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),e.x=r,e.y=n,e.width=i,e.height=a,e},t.prototype.union=function(e){var r=Al(e.x,this.x),n=Al(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=xc(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=xc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=fr();return Oi(a,a,[-r.x,-r.y]),U0(a,a,[n,i]),Oi(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r,n){return t.intersect(this,e,r,n)},t.intersect=function(e,r,n,i){n&&Te.set(n,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!r)return!1;e instanceof t||(e=t.set(AY,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(LY,r.x,r.y,r.width,r.height));var s=!!n;Cn.reset(i,s);var l=Cn.touchThreshold,u=e.x+l,c=e.x+e.width-l,h=e.y+l,f=e.y+e.height-l,d=r.x+l,p=r.x+r.width-l,g=r.y+l,m=r.y+r.height-l;if(u>c||h>f||d>p||g>m)return!1;var y=!(c=e.x&&r<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},t.prototype.contain=function(e,r){return t.contain(this,e,r)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){return e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height,e},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}js.x=Fs.x=r.x,js.y=Gs.y=r.y,Vs.x=Gs.x=r.x+r.width,Vs.y=Fs.y=r.y+r.height,js.transform(n),Gs.transform(n),Vs.transform(n),Fs.transform(n),e.x=Al(js.x,Vs.x,Fs.x,Gs.x),e.y=Al(js.y,Vs.y,Fs.y,Gs.y);var l=xc(js.x,Vs.x,Fs.x,Gs.x),u=xc(js.y,Vs.y,Fs.y,Gs.y);e.width=l-e.x,e.height=u-e.y},t}(),AY=new Ce(0,0,0,0),LY=new Ce(0,0,0,0);function Uk(t,e,r,n,i,a,o,s){var l=cw(e-r),u=cw(n-t),c=Al(l,u),h=Wk[i],f=Wk[1-i],d=MY[i];e=u||!Cn.bidirectional)&&(Gf[h]=-u,Gf[f]=0,Cn.useDir&&Cn.calcDirMTV())))}function S4(){var t=0,e=new Te,r=new Te,n={minTv:new Te,maxTv:new Te,useDir:!1,dirMinTv:new Te,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){n.touchThreshold=0,a&&a.touchThreshold!=null&&(n.touchThreshold=xc(0,a.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,a&&a.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),r.copy(n.minTv),t=a.direction,n.bidirectional=a.bidirectional==null||!!a.bidirectional,n.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var a=n.minTv,o=n.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(t),u=Math.cos(t),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(r.x=s*u/c,r.y=s*l/c,i(r.x)&&i(r.y)){o.set(0,0);return}(n.bidirectional||e.dot(r)>0)&&r.len()=0;h--){var f=a[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(zx.copy(f.getBoundingRect()),f.transform&&zx.applyTransform(f.transform),zx.intersect(c)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function NY(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return i?w4:!0}return!1}function Zk(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=NY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==w4)){e.target=o;break}}}function C4(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var M4=32,sf=7;function EY(t){for(var e=0;t>=M4;)e|=t&1,t>>=1;return t+e}function $k(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function RY(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function Bx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+c])>0?o=c+1:l=c}return l}function jx(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+c])<0?l=c:o=c+1}return l}function OY(t,e){var r=sf,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=sf||A>=sf);if(k)break;C<0&&(C=0),C+=2}if(r=C,r<1&&(r=1),p===1){for(y=0;y=0;y--)t[M+y]=t[C+y];t[w]=o[b];return}for(var A=r;;){var k=0,N=0,D=!1;do if(e(o[b],t[_])<0){if(t[w--]=t[_--],k++,N=0,--p===0){D=!0;break}}else if(t[w--]=o[b--],N++,k=0,--m===1){D=!0;break}while((k|N)=0;y--)t[M+y]=t[C+y];if(p===0){D=!0;break}}if(t[w--]=o[b--],--m===1){D=!0;break}if(N=m-Bx(t[_],o,0,m,m-1,e),N!==0){for(w-=N,b-=N,m-=N,M=w+1,C=b+1,y=0;y=sf||N>=sf);if(D)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(w-=p,_-=p,M=w+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[w]=o[b]}else{if(m===0)throw new Error;for(C=w-(m-1),y=0;ys&&(l=s),Yk(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var Mn=1,Hf=2,ic=4,Xk=!1;function Vx(){Xk||(Xk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function qk(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var zY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=qk}return t.prototype.traverse=function(e,r){for(var n=0;n=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),vy;vy=Ze.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var gd={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-gd.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?gd.bounceIn(t*2)*.5:gd.bounceOut(t*2-1)*.5+.5}},Wp=Math.pow,ls=Math.sqrt,py=1e-8,A4=1e-4,Kk=ls(3),Up=1/3,oa=Ps(),Jn=Ps(),Rc=Ps();function Zo(t){return t>-py&&tpy||t<-py}function ur(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function Qk(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function gy(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Zo(c)&&Zo(h))if(Zo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=h*h-4*c*f;if(Zo(g)){var m=h/c,p=-s/o+m,y=-m/2;p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var _=ls(g),b=c*s+1.5*o*(-h+_),w=c*s+1.5*o*(-h-_);b<0?b=-Wp(-b,Up):b=Wp(b,Up),w<0?w=-Wp(-w,Up):w=Wp(w,Up);var p=(-s-(b+w))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*c*s-3*o*h)/(2*ls(c*c*c)),M=Math.acos(C)/3,A=ls(c),k=Math.cos(M),p=(-s-2*A*k)/(3*o),y=(-s+A*(k+Kk*Math.sin(M)))/(3*o),N=(-s+A*(k-Kk*Math.sin(M)))/(3*o);p>=0&&p<=1&&(a[d++]=p),y>=0&&y<=1&&(a[d++]=y),N>=0&&N<=1&&(a[d++]=N)}}return d}function P4(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Zo(o)){if(L4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Zo(c))i[0]=-a/(2*o);else if(c>0){var h=ls(c),u=(-a+h)/(2*o),f=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function _s(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n}function k4(t,e,r,n,i,a,o,s,l,u,c){var h,f=.005,d=1/0,p,g,m,y;oa[0]=l,oa[1]=u;for(var _=0;_<1;_+=.05)Jn[0]=ur(t,r,i,o,_),Jn[1]=ur(e,n,a,s,_),m=ss(oa,Jn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Zo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=ls(c),u=(-o+h)/(2*a),f=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function D4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Qd(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function I4(t,e,r,n,i,a,o,s,l){var u,c=.005,h=1/0;oa[0]=o,oa[1]=s;for(var f=0;f<1;f+=.05){Jn[0]=br(t,r,i,f),Jn[1]=br(e,n,a,f);var d=ss(oa,Jn);d=0&&d=1?1:gy(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var GY=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Rt,this.ondestroy=e.ondestroy||Rt,this.onrestart=e.onrestart||Rt,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:gd[e]||P2(e)},t}(),N4=function(){function t(e){this.value=e}return t}(),HY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new N4(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Kc=function(){function t(e){this._list=new HY,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new N4(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Jk={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ii(t){return t=Math.round(t),t<0?0:t>255?255:t}function WY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Jd(t){return t<0?0:t>1?1:t}function gm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ii(parseFloat(e)/100*255):Ii(parseInt(e,10))}function eo(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Jd(parseFloat(e)/100):Jd(parseFloat(e))}function Fx(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function $o(t,e,r){return t+(e-t)*r}function Zn(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function dw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var E4=new Kc(20),Zp=null;function Iu(t,e){Zp&&dw(Zp,e),Zp=E4.put(t,Zp||e.slice())}function Zr(t,e){if(t){e=e||[];var r=E4.get(t);if(r)return dw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in Jk)return dw(e,Jk[n]),Iu(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Zn(e,0,0,0,1);return}return Zn(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Iu(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Zn(e,0,0,0,1);return}return Zn(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Iu(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Zn(e,+u[0],+u[1],+u[2],1):Zn(e,0,0,0,1);c=eo(u.pop());case"rgb":if(u.length>=3)return Zn(e,gm(u[0]),gm(u[1]),gm(u[2]),u.length===3?c:eo(u[3])),Iu(t,e),e;Zn(e,0,0,0,1);return;case"hsla":if(u.length!==4){Zn(e,0,0,0,1);return}return u[3]=eo(u[3]),vw(u,e),Iu(t,e),e;case"hsl":if(u.length!==3){Zn(e,0,0,0,1);return}return vw(u,e),Iu(t,e),e;default:return}}Zn(e,0,0,0,1)}}function vw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=eo(t[1]),i=eo(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Zn(e,Ii(Fx(o,a,r+1/3)*255),Ii(Fx(o,a,r)*255),Ii(Fx(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function UY(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,h=((a-r)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-h:r===a?l=1/3+c-f:n===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return t[3]!=null&&d.push(t[3]),d}}function my(t,e){var r=Zr(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return ai(r,r.length===4?"rgba":"rgb")}}function ZY(t){var e=Zr(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function md(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=Ii($o(o[0],s[0],l)),r[1]=Ii($o(o[1],s[1],l)),r[2]=Ii($o(o[2],s[2],l)),r[3]=Jd($o(o[3],s[3],l)),r}}var $Y=md;function k2(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Zr(e[i]),s=Zr(e[a]),l=n-i,u=ai([Ii($o(o[0],s[0],l)),Ii($o(o[1],s[1],l)),Ii($o(o[2],s[2],l)),Jd($o(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var YY=k2;function to(t,e,r,n){var i=Zr(t);if(t)return i=UY(i),e!=null&&(i[0]=WY(me(e)?e(i[0]):e)),r!=null&&(i[1]=eo(me(r)?r(i[1]):r)),n!=null&&(i[2]=eo(me(n)?n(i[2]):n)),ai(vw(i),"rgba")}function ev(t,e){var r=Zr(t);if(r&&e!=null)return r[3]=Jd(e),ai(r,"rgba")}function ai(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function tv(t,e){var r=Zr(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function XY(){return ai([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var eD=new Kc(100);function yy(t){if(se(t)){var e=eD.get(t);return e||(e=my(t,-.1),eD.put(t,e)),e}else if(Bv(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:my(n.color,-.1)}}),r}return t}const qY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:md,fastMapToColor:$Y,lerp:k2,lift:my,liftColor:yy,lum:tv,mapToColor:YY,modifyAlpha:ev,modifyHSL:to,parse:Zr,parseCssFloat:eo,parseCssInt:gm,random:XY,stringify:ai,toHex:ZY},Symbol.toStringTag,{value:"Module"}));var _y=Math.round;function rv(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=Zr(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var tD=1e-4;function Yo(t){return t-tD}function $p(t){return _y(t*1e3)/1e3}function pw(t){return _y(t*1e4)/1e4}function KY(t){return"matrix("+$p(t[0])+","+$p(t[1])+","+$p(t[2])+","+$p(t[3])+","+pw(t[4])+","+pw(t[5])+")"}var QY={left:"start",right:"end",center:"middle",middle:"middle"};function JY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function eX(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function tX(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function R4(t){return t&&!!t.image}function rX(t){return t&&!!t.svgElement}function D2(t){return R4(t)||rX(t)}function O4(t){return t.type==="linear"}function z4(t){return t.type==="radial"}function B4(t){return t&&(t.type==="linear"||t.type==="radial")}function Z0(t){return"url(#"+t+")"}function j4(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function V4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*fd,i=pe(t.scaleX,1),a=pe(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+_y(o*fd)+"deg, "+_y(s*fd)+"deg)"),l.join(" ")}var nX=function(){return Ze.hasGlobalWindow&&me(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),gw=Array.prototype.slice;function Fa(t,e,r){return(e-t)*r+t}function Gx(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=nD,l=r;if(Nr(r)){var u=sX(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!Dr(r))s=Xp;else if(se(r))if(!isNaN(+r))s=Xp;else{var c=Zr(r);c&&(l=c,s=Wf)}else if(Bv(r)){var h=J({},l);h.colorStops=re(r.colorStops,function(d){return{offset:d.offset,color:Zr(d.color)}}),O4(r)?s=mw:z4(r)&&(s=yw),l=h}a===0?this.valType=s:(s!==this.valType||s===nD)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:r,percent:0};return n&&(f.easing=n,f.easingFunc=me(n)?n:gd[n]||P2(n)),i.push(f),f},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=qp(i),u=iD(i),c=0;c=0&&!(o[c].percent<=r);c--);c=f(c,s-2)}else{for(c=h;cr);c++);c=f(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=r;var m=p.percent-d.percent,y=m===0?1:f((r-d.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?lf:e[l];if((qp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:p.rawValue;else if(qp(a))a===ym?Gx(_,d[i],p[i],y):iX(_,d[i],p[i],y);else if(iD(a)){var b=d[i],w=p[i],C=a===mw;e[l]={type:C?"linear":"radial",x:Fa(b.x,w.x,y),y:Fa(b.y,w.y,y),colorStops:re(b.colorStops,function(A,k){var N=w.colorStops[k];return{offset:Fa(A.offset,N.offset,y),color:mm(Gx([],A.color,N.color,y))}}),global:w.global},C?(e[l].x2=Fa(b.x2,w.x2,y),e[l].y2=Fa(b.y2,w.y2,y)):e[l].r=Fa(b.r,w.r,y)}else if(u)Gx(_,d[i],p[i],y),n||(e[l]=mm(_));else{var M=Fa(d[i],p[i],y);n?this._additiveValue=M:e[l]=M}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===Xp?e[n]=e[n]+i:r===Wf?(Zr(e[n],lf),Yp(lf,lf,i,1),e[n]=mm(lf)):r===ym?Yp(e[n],e[n],i,1):r===F4&&rD(e[n],e[n],i,1)},t}(),I2=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){F0("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,$e(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,yd(u),i),this._trackKeys.push(s)}l.addKeyframe(e,yd(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function bc(){return new Date().getTime()}var uX=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=bc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(vy(n),!r._paused&&r.update())}vy(n)},e.prototype.start=function(){this._running||(this._time=bc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=bc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=bc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new I2(r,n.loop);return this.addAnimator(i),i},e}(di),cX=300,Hx=Ze.domSupported,Wx=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=re(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),aD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},oD=!1;function _w(t){var e=t.pointerType;return e==="pen"||e==="touch"}function hX(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Ux(t){t&&(t.zrByTouch=!0)}function fX(t,e){return $n(t.dom,new dX(t,e),!0)}function G4(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var dX=function(){function t(e,r){this.stopPropagation=Rt,this.stopImmediatePropagation=Rt,this.preventDefault=Rt,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),bi={mousedown:function(t){t=$n(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=$n(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=$n(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=$n(this.dom,t);var e=t.toElement||t.relatedTarget;G4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){oD=!0,t=$n(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){oD||(t=$n(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=$n(this.dom,t),Ux(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),bi.mousemove.call(this,t),bi.mousedown.call(this,t)},touchmove:function(t){t=$n(this.dom,t),Ux(t),this.handler.processGesture(t,"change"),bi.mousemove.call(this,t)},touchend:function(t){t=$n(this.dom,t),Ux(t),this.handler.processGesture(t,"end"),bi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentuD||t<-uD}var Ws=[],Nu=[],$x=fr(),Yx=Math.abs,Ka=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Hs(this.rotation)||Hs(this.x)||Hs(this.y)||Hs(this.scaleX-1)||Hs(this.scaleY-1)||Hs(this.skewX)||Hs(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(lD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):lD(n),e&&(r?Di(n,e,n):Gv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Ws);var n=Ws[0]<0?-1:1,i=Ws[1]<0?-1:1,a=((Ws[0]-n)*r+n)/Ws[0]||0,o=((Ws[1]-i)*r+i)/Ws[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),ci(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||fr(),Di(Nu,e.invTransform,r),r=Nu);var n=this.originX,i=this.originY;(n||i)&&($x[4]=n,$x[5]=i,Di(Nu,r,$x),Nu[4]-=n,Nu[5]-=i,r=Nu),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&Ot(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&Ot(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&Yx(e[0]-1)>1e-10&&Yx(e[3]-1)>1e-10?Math.sqrt(Yx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){by(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,f=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;r[4]=-p*a-f*g*o,r[5]=-g*o-d*p*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=f*o,u&&xo(r,r,u),r[4]+=n+c,r[5]+=i+h,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),ba=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function by(t,e){for(var r=0;r=cD)){t=t||co;for(var e=[],r=+new Date,n=0;n<=127;n++)e[n]=bn.measureText(String.fromCharCode(n),t).width;var i=+new Date-r;return i>16?Xx=cD:i>2&&Xx++,e}}var Xx=0,cD=5;function W4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=yX(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function _a(t,e){var r=t.strWidthCache,n=r.get(e);return n==null&&(n=bn.measureText(e,t.font).width,r.put(e,n)),n}function hD(t,e,r,n){var i=_a(ya(e),t),a=Hv(e),o=Qc(0,i,r),s=Ol(0,a,n),l=new Ce(o,s,i,a);return l}function $0(t,e,r,n){var i=((t||"")+"").split(` +`),a=i.length;if(a===1)return hD(i[0],e,r,n);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(t)/100*e:parseFloat(t):t}function Sy(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,c="left",h="top";if(n instanceof Array)l+=zi(n[0],r.width),u+=zi(n[1],r.height),c=null,h=null;else switch(n){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",h="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var qx="__zr_normal__",Kx=ba.concat(["ignore"]),_X=ui(ba,function(t,e){return t[e]=!0,t},{ignore:!1}),Eu={},xX=new Ce(0,0,0,0),Qp=[],Y0=function(){function t(e){this.id=T2(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(r);var c=n.position!=null,h=n.autoOverflowArea,f=void 0;if((h||c)&&(f=xX,n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Eu,n,f):Sy(Eu,n,f),a.x=Eu.x,a.y=Eu.y,o=Eu.align,s=Eu.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var p=void 0,g=void 0;d==="center"?(p=f.width*.5,g=f.height*.5):(p=zi(d[0],f.width),g=zi(d[1],f.height)),u=!0,a.originX=-a.x+p+(i?0:f.x),a.originY=-a.y+g+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var m=n.offset;m&&(a.x+=m[0],a.y+=m[1],u||(a.originX=-m[0],a.originY=-m[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Qp),ci(Qp,Qp),Ce.copy(_,f),_.applyTransform(Qp)}else y.overflowRect=null;var b=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,w=void 0,C=void 0,M=void 0;b&&this.canBeInsideText()?(w=n.insideFill,C=n.insideStroke,(w==null||w==="auto")&&(w=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(w),M=!0)):(w=n.outsideFill,C=n.outsideStroke,(w==null||w==="auto")&&(w=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(w),M=!0)),w=w||"#000",(w!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=w,y.stroke=C,y.autoStroke=M,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=Mn,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ww:Sw},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Zr(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ai(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},J(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(Se(e))for(var n=e,i=$e(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(qx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===qx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ne(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){F0("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(e,r,n,c),f&&f.useState(e,r,n,c),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Mn),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,f),m&&m.useStates(e,r,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Mn)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var r=e.__hostTarget;e=r?e.ignoreHostSilent?null:r:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ne(i,e),o=Ne(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(p,g){r.during(g)});for(var f=0;f0||i.force&&!o.length){var k=void 0,N=void 0,D=void 0;if(s){N={},f&&(k={});for(var w=0;w=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ne(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ne(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=NX;function NX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return Sy(t,e,r)}function Sy(t,e,r){return se(t)?EX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),Y4),t=(+t).toFixed(e),r?t:+t}function kn(t){return t.sort(function(e,r){return e-r}),t}function Ai(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return X4(t)}function X4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function N2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(ua(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function RX(t,e,r){if(!t[e])return 0;var n=q4(t,r);return n[e]||0}function q4(t,e){var r=ui(t,function(d,p){return d+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=re(i,function(d){return Math.floor(d)}),s=ui(o,function(d,p){return d+p},0),l=re(i,function(d,p){return d-o[p]});su&&(u=l[h],c=h);++o[c],l[c]=0,++s}return re(o,function(d){return d/n})}function OX(t,e){var r=Math.max(Ai(t),Ai(e)),n=t+e;return r>Y4?n:Ht(n,r)}var Mw=9007199254740991;function R2(t){var e=Math.PI*2;return(t%e+e)%e}function Jc(t){return t>-hD&&t=10&&e++,e}function O2(t,e){var r=Y0(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function _m(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function Aw(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function Jx(t){t.option=t.parentModel=t.ecModel=null}var rq=".",Zs="___EC__COMPONENT__CONTAINER___",sj="___EC__EXTENDED_CLASS___";function ca(t){var e={main:"",sub:""};if(t){var r=t.split(rq);e.main=r[0]||"",e.sub=r[1]||""}return e}function nq(t){Nr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function iq(t){return!!(t&&t[sj])}function V2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return aq(n)?i=function(a){Y(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},M2(i,this)),J(i.prototype,r),i[sj]=!0,i.extend=this.extend,i.superCall=lq,i.superApply=uq,i.superClass=n,i}}function aq(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function lj(t,e){t.extend=e.extend}var oq=Math.round(Math.random()*10);function sq(t){var e=["__\0is_clz",oq++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function lq(t,e){for(var r=[],n=2;n=0||a&&Ee(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var cq=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],hq=Jl(cq),fq=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return hq(this,e,r)},t}(),Pw=new Kc(50);function dq(t){if(typeof t=="string"){var e=Pw.get(t);return e&&e.image}else return t}function F2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=Pw.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!q0(e)&&a.pending.push(o)):(e=Sn.loadImage(t,pD,pD),e.__zrImageSrc=t,Pw.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function pD(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=_a(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function hj(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=_a(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?pq(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=_a(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function pq(t,e,r){for(var n=0,i=0,a=t.length;im&&d){var S=Math.floor(m/f);p=p||y.length>S,y=y.slice(0,S),_=y.length*f}if(i&&c&&g!=null)for(var w=cj(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},M=0;Mp&&t1(a,o.substring(p,m),e,d),t1(a,g[2],e,d,g[1]),p=e1.lastIndex}ph){var W=a.lines.length;z>0?(E.tokens=E.tokens.slice(0,z),A(E,I,D),a.lines=a.lines.slice(0,k+1)):a.lines=a.lines.slice(0,k),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` -`),u=!0),n.accumWidth=p}else{var g=fj(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,h=g.linesWidths,c=g.lines}}c||(c=e.split(` -`));for(var m=ya(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Sq=ui(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function bq(t){return xq(t)?!!Sq[t]:!0}function fj(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=ya(e),f=0;fr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=p)):g?(a.push(l),o.push(u),l=d,u=p):(a.push(d),o.push(p));continue}c+=p,g?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function mD(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(yD,Qc(r,o,i),zl(n,s,a),o,s),Ce.intersect(e,yD,null,_D);var l=_D.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Qc(l.x,l.width,i,!0),t.baseY=zl(l.y,l.height,a,!0)}}var yD=new Ce(0,0,0,0),_D={outIntersectRect:{},clamp:!0};function G2(t){return t!=null?t+="":t=""}function wq(t){var e=G2(t.text),r=t.font,n=_a(ya(r),e),i=Fv(r);return kw(t,n,i,null)}function kw(t,e,r,n){var i=new Ce(Qc(t.x||0,e,t.textAlign),zl(t.y||0,r,t.textBaseline),e,r),a=n??(dj(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function dj(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var Dw="__zr_style_"+Math.round(Math.random()*10),Bl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},K0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Bl[Dw]=!0;var xD=["z","z2","invisible"],Tq=["invisible"],hi=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=$e(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(Kp[0]=a1(i)*r+t,Kp[1]=i1(i)*n+e,Qp[0]=a1(a)*r+t,Qp[1]=i1(a)*n+e,u(s,Kp,Qp),c(l,Kp,Qp),i=i%$s,i<0&&(i=i+$s),a=a%$s,a<0&&(a=a+$s),i>a&&!o?a+=$s:ii&&(Jp[0]=a1(d)*r+t,Jp[1]=i1(d)*n+e,u(s,Jp,s),c(l,Jp,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ys=[],Xs=[],Yi=[],Mo=[],Xi=[],qi=[],o1=Math.min,s1=Math.max,qs=Math.cos,Ks=Math.sin,Ra=Math.abs,Iw=Math.PI,No=Iw*2,l1=typeof Float32Array<"u",uf=[];function u1(t){var e=Math.round(t/Iw*1e8)/1e8;return e%2*Iw}function J0(t,e){var r=u1(t[0]);r<0&&(r+=No);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=No?i=r+No:e&&r-i>=No?i=r-No:!e&&r>i?i=r+(No-u1(r-i)):e&&r0&&(this._ux=Ra(n/yy/e)||0,this._uy=Ra(n/yy/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(mt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Ra(e-this._xi),i=Ra(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(mt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(mt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(mt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),uf[0]=i,uf[1]=a,J0(uf,o),i=uf[0],a=uf[1];var s=a-i;return this.addData(mt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=qs(a)*n+e,this._yi=Ks(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(mt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(mt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&l1&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Yi[0]=Yi[1]=Xi[0]=Xi[1]=Number.MAX_VALUE,Mo[0]=Mo[1]=qi[0]=qi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Ra(S)>i||f===r-1)&&(g=Math.sqrt(_*_+S*S),a=m,o=y);break}case mt.C:{var w=e[f++],C=e[f++],m=e[f++],y=e[f++],M=e[f++],A=e[f++];g=BY(a,o,w,C,m,y,M,A,10),a=M,o=A;break}case mt.Q:{var w=e[f++],C=e[f++],m=e[f++],y=e[f++];g=VY(a,o,w,C,m,y,10),a=m,o=y;break}case mt.A:var k=e[f++],E=e[f++],D=e[f++],I=e[f++],z=e[f++],O=e[f++],V=O+z;f+=1,p&&(s=qs(z)*D+k,l=Ks(z)*I+E),g=s1(D,I)*o1(No,Math.abs(O)),a=qs(V)*D+k,o=Ks(V)*I+E;break;case mt.R:{s=a=e[f++],l=o=e[f++];var G=e[f++],F=e[f++];g=G*2+F*2;break}case mt.Z:{var _=s-a,S=l-o;g=Math.sqrt(_*_+S*S),a=s,o=l;break}}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,h,f,d=r<1,p,g,m=0,y=0,_,S=0,w,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M0&&(e.lineTo(w,C),S=0),A){case mt.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case mt.L:{h=n[M++],f=n[M++];var E=Ra(h-u),D=Ra(f-c);if(E>i||D>a){if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+h*z,c*(1-z)+f*z);break e}m+=I}e.lineTo(h,f),u=h,c=f,S=0}else{var O=E*E+D*D;O>S&&(w=h,C=f,S=O)}break}case mt.C:{var V=n[M++],G=n[M++],F=n[M++],U=n[M++],j=n[M++],W=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;xs(u,V,F,j,z,Ys),xs(c,G,U,W,z,Xs),e.bezierCurveTo(Ys[1],Xs[1],Ys[2],Xs[2],Ys[3],Xs[3]);break e}m+=I}e.bezierCurveTo(V,G,F,U,j,W),u=j,c=W;break}case mt.Q:{var V=n[M++],G=n[M++],F=n[M++],U=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;Kd(u,V,F,z,Ys),Kd(c,G,U,z,Xs),e.quadraticCurveTo(Ys[1],Xs[1],Ys[2],Xs[2]);break e}m+=I}e.quadraticCurveTo(V,G,F,U),u=F,c=U;break}case mt.A:var H=n[M++],X=n[M++],K=n[M++],ne=n[M++],ie=n[M++],ue=n[M++],ve=n[M++],Ge=!n[M++],xe=K>ne?K:ne,ge=Ra(K-ne)>.001,ke=ie+ue,fe=!1;if(d){var I=p[y++];m+I>_&&(ke=ie+ue*(_-m)/I,fe=!0),m+=I}if(ge&&e.ellipse?e.ellipse(H,X,K,ne,ve,ie,ke,Ge):e.arc(H,X,xe,ie,ke,Ge),fe)break e;k&&(s=qs(ie)*K+H,l=Ks(ie)*ne+X),u=qs(ke)*K+H,c=Ks(ke)*ne+X;break;case mt.R:s=u=n[M],l=c=n[M+1],h=n[M++],f=n[M++];var Me=n[M++],ot=n[M++];if(d){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(h,f),e.lineTo(h+o1(Ye,Me),f),Ye-=Me,Ye>0&&e.lineTo(h+Me,f+o1(Ye,ot)),Ye-=ot,Ye>0&&e.lineTo(h+s1(Me-Ye,0),f+ot),Ye-=Me,Ye>0&&e.lineTo(h,f+s1(ot-Ye,0));break e}m+=I}e.rect(h,f,Me,ot);break;case mt.Z:if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=I}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=mt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Bo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+h&&c>n+h&&c>a+h&&c>s+h||ct+h&&u>r+h&&u>i+h&&u>o+h||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=cf);var f=Math.atan2(l,s);return f<0&&(f+=cf),f>=n&&f<=i||f+cf>=n&&f+cf<=i}function Ga(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var Ao=wa.CMD,Qs=Math.PI*2,Dq=1e-4;function Iq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&Eq(),d=ur(e,n,a,s,Xn[0]),f>1&&(p=ur(e,n,a,s,Xn[1]))),f===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,h=Sr(e,n,a,u),f=0;fr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Qr[0]=-l,Qr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Qs-1e-4){n=0,i=Qs;var c=a?1:-1;return o>=Qr[0]+t&&o<=Qr[1]+t?c:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=Qs,i+=Qs);for(var f=0,d=0;d<2;d++){var p=Qr[d];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Qs+g),(g>=n&&g<=i||g+Qs>=n&&g+Qs<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Ga(l,u,c,h,n,i))),m&&(l=a[p],u=a[p+1],c=l,h=u),g){case Ao.M:c=a[p++],h=a[p++],l=c,u=h;break;case Ao.L:if(r){if(Bo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Ga(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.C:if(r){if(Pq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Nq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.Q:if(r){if(vj(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Rq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.A:var y=a[p++],_=a[p++],S=a[p++],w=a[p++],C=a[p++],M=a[p++];p+=1;var A=!!(1-a[p++]);f=Math.cos(C)*S+y,d=Math.sin(C)*w+_,m?(c=f,h=d):s+=Ga(l,u,f,d,n,i);var k=(n-y)*w/S+y;if(r){if(kq(y,_,w,C,C+M,A,e,k,i))return!0}else s+=Oq(y,_,w,C,C+M,A,k,i);l=Math.cos(C+M)*S+y,u=Math.sin(C+M)*w+_;break;case Ao.R:c=l=a[p++],h=u=a[p++];var E=a[p++],D=a[p++];if(f=c+E,d=h+D,r){if(Bo(c,h,f,h,e,n,i)||Bo(f,h,f,d,e,n,i)||Bo(f,d,c,d,e,n,i)||Bo(c,d,c,h,e,n,i))return!0}else s+=Ga(f,h,f,d,n,i),s+=Ga(c,d,c,h,n,i);break;case Ao.Z:if(r){if(Bo(l,u,c,h,e,n,i))return!0}else s+=Ga(l,u,c,h,n,i);l=c,u=h;break}}return!r&&!Iq(u,h)&&(s+=Ga(l,u,c,h,n,i)||0),s!==0}function zq(t,e,r){return pj(t,0,!1,e,r)}function Bq(t,e,r,n){return pj(t,e,!0,r,n)}var by=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Bl),jq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},K0.style)},c1=Sa.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?bw:n>.2?mX:ww}else if(r)return ww}return bw},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=ev(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ac)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Bq(s,l/u,r,n)))return!0}if(this.hasFill())return zq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=ac,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&ac)},e.prototype.createStyle=function(r){return Bv(by,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},h=$e(u),f=0;fi&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+c>a&&(h=s+c,s*=a/h,c*=a/h),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var wc=Math.round;function e_(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(wc(n*2)===wc(i*2)&&(t.x1=t.x2=In(n,s,!0)),wc(a*2)===wc(o*2)&&(t.y1=t.y2=In(a,s,!0))),t}}function gj(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=In(n,s,!0),t.y=In(i,s,!0),t.width=Math.max(In(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(In(i+o,s,!1)-t.y,o===0?0:1)),t}}function In(t,e,r){if(!e)return t;var n=wc(t*2);return(n+wc(e))%2===0?n/2:(n+(r?1:-1))/2}var Uq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Zq={},je=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Uq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=gj(Zq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Wq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ue);je.prototype.type="rect";var CD={fill:"#000"},MD=2,Ki={},$q={style:Se({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},K0.style)},Xe=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=CD,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(V=M[O],V.align==="right");)this._placeToken(V,r,k,y,z,"right",S),E-=V.width,z-=V.width,O--;for(I+=(c-(I-m)-(_-z)-E)/2;D<=O;)V=M[D],this._placeToken(V,r,k,y,I+V.width/2,"center",S),I+=V.width,D++;y+=k}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,h=a+i/2;c==="top"?h=a+r.height/2:c==="bottom"&&(h=a+i-r.height/2);var f=!r.isLineHolder&&h1(u);f&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var d=!!u.backgroundColor,p=r.textPadding;p&&(o=ID(o,s,p),h-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(eh),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,S=0,w=!1,C=DD("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=kD("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(S=MD,w=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=h,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||co,m.opacity=xn(u.opacity,n.opacity,1),LD(m,u),M&&(m.lineWidth=xn(u.lineWidth,n.lineWidth,S),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),C&&(m.fill=C),g.setBoundingRect(kw(m,r.contentWidth,r.contentHeight,w?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,h=l&&l.image,f=l&&!h,d=r.borderRadius,p=this,g,m;if(f||r.lineHeight||u&&c){g=this._getOrCreateChild(je),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(f){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(h){m=this._getOrCreateChild(pr),m.onload=function(){p.dirtyStyle()};var S=m.style;S.image=l.image,S.x=i,S.y=a,S.width=o,S.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=pe(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var w=(g||m).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=xn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return yj(r)&&(n=[r.fontStyle,r.fontWeight,mj(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Pn(n)||r.textFont||r.font},e}(hi),Yq={left:!0,right:1,center:1},Xq={top:1,bottom:1,middle:1},AD=["fontStyle","fontWeight","fontSize","fontFamily"];function mj(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?b2+"px":t+"px"}function LD(t,e){for(var r=0;r=0,a=!1;if(t instanceof Ue){var o=_j(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Ou(s)||Ou(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Ou(u.fill)&&Ou(s)?(a=!0,n=J({},n),u=J({},u),u.fill=gy(s)):!Ou(u.stroke)&&Ou(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=gy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??xh)}return n}function rK(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Kq)}return r}function nK(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:eK(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function f1(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return tK(this,t,e,r);if(t==="blur")return nK(this,t,r);if(t==="select")return rK(this,t,r)}return r}function eu(t){t.stateProxy=f1;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=f1),r&&(r.stateProxy=f1)}function zD(t,e){!Mj(t,e)&&!t.__highByOuter&&So(t,xj)}function BD(t,e){!Mj(t,e)&&!t.__highByOuter&&So(t,Sj)}function fo(t,e){t.__highByOuter|=1<<(e||0),So(t,xj)}function vo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&So(t,Sj)}function wj(t){So(t,Z2)}function $2(t){So(t,bj)}function Tj(t){So(t,Qq)}function Cj(t){So(t,Jq)}function Mj(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Aj(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=H2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){bj(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function Rw(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var h=0;h0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function hs(t,e,r){kl(t,!0),So(t,eu),zw(t,e,r)}function uK(t){kl(t,!1)}function wt(t,e,r,n){n?uK(t):hs(t,e,r)}function zw(t,e,r){var n=Le(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var VD=["emphasis","blur","select"],cK={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=d1(p),s*=d1(p));var g=(i===a?-1:1)*d1((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,m=g*o*d/s,y=g*-s*f/o,_=(t+r)/2+tg(h)*m-eg(h)*y,S=(e+n)/2+eg(h)*m+tg(h)*y,w=WD([1,0],[(f-m)/o,(d-y)/s]),C=[(f-m)/o,(d-y)/s],M=[(-1*f-m)/o,(-1*d-y)/s],A=WD(C,M);if(jw(C,M)<=-1&&(A=hf),jw(C,M)>=1&&(A=0),A<0){var k=Math.round(A/hf*1e6)/1e6;A=hf*2+k%2*hf}c.addData(u,_,S,o,s,w,A,h,a)}var gK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,mK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yK(t){var e=new wa;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=wa.CMD,l=t.match(gK);if(!l)return e;for(var u=0;uV*V+G*G&&(k=D,E=I),{cx:k,cy:E,x0:-c,y0:-h,x1:k*(i/C-1),y1:E*(i/C-1)}}function CK(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function MK(t,e){var r,n=Uf(e.r,0),i=Uf(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,f=!!e.clockwise,d=ZD(u-l),p=d>v1&&d%v1;if(p>xi&&(d=p),!(n>xi))t.moveTo(c,h);else if(d>v1-xi)t.moveTo(c+n*Bu(l),h+n*Js(l)),t.arc(c,h,n,l,u,!f),i>xi&&(t.moveTo(c+i*Bu(u),h+i*Js(u)),t.arc(c,h,i,u,l,f));else{var g=void 0,m=void 0,y=void 0,_=void 0,S=void 0,w=void 0,C=void 0,M=void 0,A=void 0,k=void 0,E=void 0,D=void 0,I=void 0,z=void 0,O=void 0,V=void 0,G=n*Bu(l),F=n*Js(l),U=i*Bu(u),j=i*Js(u),W=d>xi;if(W){var H=e.cornerRadius;H&&(r=CK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=ZD(n-i)/2;if(S=Qi(X,y),w=Qi(X,_),C=Qi(X,g),M=Qi(X,m),E=A=Uf(S,w),D=k=Uf(C,M),(A>xi||k>xi)&&(I=n*Bu(u),z=n*Js(u),O=i*Bu(l),V=i*Js(l),dxi){var ge=Qi(y,E),ke=Qi(_,E),fe=rg(O,V,G,F,n,ge,f),Me=rg(I,z,U,j,n,ke,f);t.moveTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),E0&&t.arc(c+fe.cx,h+fe.cy,ge,Vr(fe.y0,fe.x0),Vr(fe.y1,fe.x1),!f),t.arc(c,h,n,Vr(fe.cy+fe.y1,fe.cx+fe.x1),Vr(Me.cy+Me.y1,Me.cx+Me.x1),!f),ke>0&&t.arc(c+Me.cx,h+Me.cy,ke,Vr(Me.y1,Me.x1),Vr(Me.y0,Me.x0),!f))}else t.moveTo(c+G,h+F),t.arc(c,h,n,l,u,!f);if(!(i>xi)||!W)t.lineTo(c+U,h+j);else if(D>xi){var ge=Qi(g,D),ke=Qi(m,D),fe=rg(U,j,I,z,i,-ke,f),Me=rg(G,F,O,V,i,-ge,f);t.lineTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),D0&&t.arc(c+fe.cx,h+fe.cy,ke,Vr(fe.y0,fe.x0),Vr(fe.y1,fe.x1),!f),t.arc(c,h,i,Vr(fe.cy+fe.y1,fe.cx+fe.x1),Vr(Me.cy+Me.y1,Me.cx+Me.x1),f),ge>0&&t.arc(c+Me.cx,h+Me.cy,ge,Vr(Me.y1,Me.x1),Vr(Me.y0,Me.x0),!f))}else t.lineTo(c+U,h+j),t.arc(c,h,i,u,l,f)}t.closePath()}}}var AK=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Rr=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new AK},e.prototype.buildPath=function(r,n){MK(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ue);Rr.prototype.type="sector";var LK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Sh=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new LK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Ue);Sh.prototype.type="ring";function PK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,h;if(n){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,d=t.length;f=2){if(n){var a=PK(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;stl[1]){if(a=!1,_r.negativeSize||n)return a;var l=ng(tl[0]-el[1]),u=ng(el[0]-tl[1]);p1(l,u)>ag.len()&&(l=u||!_r.bidirectional)&&(Te.scale(ig,s,-u*i),_r.useDir&&_r.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u0){var h=c.duration,f=c.delay,d=c.easing,p={duration:h,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Qe(t,e,r,n,i,a){K2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){K2("enter",t,e,r,n,i,a)}function zc(t){if(!t.__zr)return!0;for(var e=0;eua(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function XD(t){return!t.isGroup}function FK(t){return t.shape!=null}function Zv(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){XD(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return FK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(XD(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Le(o).dataIndex)}}})}function eM(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=Nn(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=Nn(i,e.y+e.height),[n,i]})}function Gj(t,e){var r=Gt(t.x,e.x),n=Nn(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=Nn(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Th(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),Se(i,r),new pr(n)):th(t.replace("path://",""),n,r,"center")}function Zf(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=g1(d,p,c,h)/f;return!(m<0||m>1)}function g1(t,e,r,n){return t*n-r*e}function GK(t){return t<=1e-6&&t>=-1e-6}function tu(t,e,r,n,i){return e==null||(qe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),qD(t,Ct,"x","width",3,1,i&&i[0]||0),qD(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function qD(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,Nn(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:ua(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function bo(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&R($e(l),function(c){he(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Le(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Fw(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Ds(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function i_(t,e,r){Uj(t,e,r,-1/0)}function Uj(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Is(t,e){return Ne(Ne({},t,!0),e,!0)}const eQ={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},tQ={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Ay="ZH",iM="EN",Bc=iM,bm={},aM={},Kj=Ze.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Bc).toUpperCase();return t.indexOf(Ay)>-1?Ay:Bc}():Bc;function oM(t,e){t=t.toUpperCase(),aM[t]=new We(e),bm[t]=e}function rQ(t){if(se(t)){var e=bm[t.toUpperCase()]||{};return t===Ay||t===iM?ye(e):Ne(ye(e),ye(bm[Bc]),!1)}else return Ne(ye(t),ye(bm[Bc]),!1)}function Hw(t){return aM[t]}function nQ(){return aM[Bc]}oM(iM,eQ);oM(Ay,tQ);var Ww=null;function iQ(t){Ww||(Ww=t)}function Xt(){return Ww}var sM=1e3,lM=sM*60,Sd=lM*60,ti=Sd*24,tI=ti*365,aQ={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},wm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},oQ="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",sg="{yyyy}-{MM}-{dd}",rI={year:"{yyyy}",month:"{yyyy}-{MM}",day:sg,hour:sg+" "+wm.hour,minute:sg+" "+wm.minute,second:sg+" "+wm.second,millisecond:oQ},Tn=["year","month","day","hour","minute","second","millisecond"],sQ=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function lQ(t){return!se(t)&&!me(t)?uQ(t):t}function uQ(t){t=t||{};var e={},r=!0;return R(Tn,function(n){r&&(r=t[n]==null)}),R(Tn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Tn[s],u=be(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=wm[n]:aQ[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Jr(t,e){return t+="","0000".substr(0,e-t.length)+t}function bd(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function cQ(t){return t===bd(t)}function hQ(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function $v(t,e,r,n){var i=La(t),a=i[Qj(r)](),o=i[uM(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[cM(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[hM(r)](),h=(c-1)%12+1,f=i[fM(r)](),d=i[dM(r)](),p=i[vM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Hw(n||Kj)||nQ(),_=y.getModel("time"),S=_.get("month"),w=_.get("monthAbbr"),C=_.get("dayOfWeek"),M=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Jr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,Jr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Jr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Jr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Jr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Jr(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Jr(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Jr(p,3)).replace(/{S}/g,p+"")}function fQ(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Cc(t.value,i);a=r[c][c][0]}}return $v(new Date(t.value),a,i,n)}function Cc(t,e){var r=La(t),n=r[uM(e)]()+1,i=r[cM(e)](),a=r[hM(e)](),o=r[fM(e)](),s=r[dM(e)](),l=r[vM(e)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&a===0,d=f&&i===1,p=d&&n===1;return p?"year":d?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function Ly(t,e,r){switch(e){case"year":t[Jj(r)](0);case"month":t[eV(r)](1);case"day":t[tV(r)](0);case"hour":t[rV(r)](0);case"minute":t[nV(r)](0);case"second":t[iV(r)](0)}return t}function Qj(t){return t?"getUTCFullYear":"getFullYear"}function uM(t){return t?"getUTCMonth":"getMonth"}function cM(t){return t?"getUTCDate":"getDate"}function hM(t){return t?"getUTCHours":"getHours"}function fM(t){return t?"getUTCMinutes":"getMinutes"}function dM(t){return t?"getUTCSeconds":"getSeconds"}function vM(t){return t?"getUTCMilliseconds":"getMilliseconds"}function dQ(t){return t?"setUTCFullYear":"setFullYear"}function Jj(t){return t?"setUTCMonth":"setMonth"}function eV(t){return t?"setUTCDate":"setDate"}function tV(t){return t?"setUTCHours":"setHours"}function rV(t){return t?"setUTCMinutes":"setMinutes"}function nV(t){return t?"setUTCSeconds":"setSeconds"}function iV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function vQ(t,e,r,n,i,a,o,s){var l=new Xe({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function pM(t){if(!z2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function gM(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Ah=zv;function Uw(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Pn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?La(t):t;if(isNaN(+l)){if(s)return"-"}else return $v(l,n,r)}if(e==="ordinal")return ly(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=ba(t);return a(u)?pM(u):ly(t)?i(t):typeof t=="boolean"?t+"":"-"}var nI=["a","b","c","d","e","f","g"],_1=function(t,e){return"{"+t+(e??"")+"}"};function mM(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function gQ(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd -yyyy`);var n=La(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),h=n[i+"Milliseconds"]();return t=t.replace("MM",Jr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Jr(a%100+"",2)).replace("dd",Jr(s,2)).replace("d",s).replace("hh",Jr(l,2)).replace("h",l).replace("mm",Jr(u,2)).replace("m",u).replace("ss",Jr(c,2)).replace("s",c).replace("SSS",Jr(h,3)),t}function mQ(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function nu(t,e){return e=e||"transparent",se(t)?t:be(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Py(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var Tm={},x1={},Lh=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(Tm),this._normalMasterList=n(x1);function n(i,a){var o=[];return R(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){R(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){Tm[e]=r;return}x1[e]=r},t.get=function(e){return x1[e]||Tm[e]},t}();function yQ(t){return!!Tm[t]}var Zw={coord:1,coord2:2};function _Q(t){oV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var oV=de();function xQ(t){var e=t.getShallow("coord",!0),r=Zw.coord;if(e==null){var n=oV.get(t.type);n&&n.getCoord2&&(r=Zw.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var sa={none:0,dataCoordSys:1,boxCoordSys:2};function sV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=sa.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=sa.dataCoordSys,a||(i=sa.none)):n==="box"&&(i=sa.boxCoordSys,!a&&!yQ(r)&&(i=sa.none))}return{coordSysType:r,kind:i}}function Yv(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=sV(e),o=a.kind,s=a.coordSysType;if(i&&o!==sa.dataCoordSys&&(o=sa.dataCoordSys,s=r),o===sa.none||s!==r)return!1;var l=n(r,e);return l?(o===sa.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var lV=function(t,e){var r=e.getReferringComponents(t,kt).models[0];return r&&r.coordinateSystem},Cm=R,uV=["left","right","top","bottom","width","height"],Dl=[["width","left","right"],["height","top","bottom"]];function yM(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),f=h&&h.getBoundingRect(),d,p;if(t==="horizontal"){var g=c.width+(f?-f.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(f?-f.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=d+r:o=p+r)})}var Vl=yM;Ie(yM,"vertical");Ie(yM,"horizontal");function cV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function SQ(t,e){var r=sr(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===$f.point)a=r.refPoint,i=bt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=bt(n,r.refContainer),a=r.boxCoordFrom===Zw.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function hV(t,e){var r=SQ(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function bt(t,e,r){r=Ah(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),h=r[2]+r[0],f=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(c)&&(c=i-l-h-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-c-h),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-f;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function fV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i=g)return h;for(var m=0;m=0;l--)s=Ne(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return _h(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return cV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(We);lj(Ve,We);X0(Ve);QK(Ve);JK(Ve,TQ);function TQ(t){var e=[];return R(Ve.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return ca(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var q={color:{},darkColor:{},size:{}},jt=q.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(jt,{primary:jt.neutral80,secondary:jt.neutral70,tertiary:jt.neutral60,quaternary:jt.neutral50,disabled:jt.neutral20,border:jt.neutral30,borderTint:jt.neutral20,borderShade:jt.neutral40,background:jt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:jt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:jt.neutral70,axisLineTint:jt.neutral40,axisTick:jt.neutral70,axisTickMinor:jt.neutral60,axisLabel:jt.neutral70,axisSplitLine:jt.neutral15,axisMinorSplitLine:jt.neutral05});for(var rl in jt)if(jt.hasOwnProperty(rl)){var iI=jt[rl];rl==="theme"?q.darkColor.theme=jt.theme.slice():rl==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":rl.indexOf("accent")===0?q.darkColor[rl]=to(iI,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):q.darkColor[rl]=to(iI,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var vV="";typeof navigator<"u"&&(vV=navigator.platform||"");var ju="rgba(0, 0, 0, 0.2)",pV=q.color.theme[0],CQ=to(pV,null,null,.9);const MQ={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[CQ,pV],aria:{decal:{decals:[{color:ju,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ju,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ju,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ju,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ju,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ju,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:vV.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var gV=de(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Bn="original",Cr="arrayRows",jn="objectRows",ji="keyedColumns",ds="typedArray",mV="unknown",Ni="column",pu="row",Lr={Must:1,Might:2,Not:3},yV=Fe();function AQ(t){yV(t).datasetMap=de()}function _V(t,e,r){var n={},i=xM(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=yV(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,h;t=t.slice(),R(t,function(g,m){var y=be(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,h=p(y)),n[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});R(t,function(g,m){var y=g.name,_=p(g);if(c==null){var S=f.valueWayDim;d(n[y],S,_),d(o,S,_),f.valueWayDim+=_}else if(c===m)d(n[y],0,_),d(a,0,_);else{var S=f.categoryWayDim;d(n[y],S,_),d(o,S,_),f.categoryWayDim+=_}});function d(g,m,y){for(var _=0;_e)return t[n];return t[r-1]}function bV(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:IQ(n,o);if(c=c||r,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function EQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var lg,ff,oI,sI="\0_ec_inner",NQ=1,bM=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new We(a),this._locale=new We(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=cI(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,cI(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?oI(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=de(),u=n&&n.replaceMergeMainTypeMap;AQ(this),R(r,function(h,f){h!=null&&(Ve.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ye(h):Ne(i[f],h,!0))}),u&&u.each(function(h,f){Ve.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Ve.topologicalTravel(s,Ve.getAllClassMainTypes(),c,this);function c(h){var f=kQ(this,h,pt(r[h])),d=a.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=nj(d,f,p);XX(g,h,Ve),i[h]=null,a.set(h,null),o.set(h,0);var m=[],y=[],_=0,S;R(g,function(w,C){var M=w.existing,A=w.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var k=h==="series",E=Ve.getClass(h,w.keyInfo.subType,!k);if(!E)return;if(h==="tooltip"){if(S)return;S=!0}if(M&&M.constructor===E)M.name=w.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var D=J({componentIndex:C},w.keyInfo);M=new E(A,this,this,D),J(M,D),w.brandNew&&(M.__requireNewView=!0),M.init(A,this,this),M.optionUpdated(null,!0)}}M?(m.push(M.option),y.push(M),_++):(m.push(void 0),y.push(void 0))},this),i[h]=m,a.set(h,y),o.set(h,_),h==="series"&&lg(this)}this._seriesIndices||lg(this)},e.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(Ve.hasClass(i)){for(var a=pt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!rv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[sI],r},e.prototype.setTheme=function(r){this._theme=new We(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function HQ(t,e){return t.join(",")===e.join(",")}var _i=R,lv=be,hI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function S1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=hI.length;r0?r[o-1].seriesModel:null)}),QQ(r)}})}function QQ(t){R(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,h){var f=o.get(e.stackedDimension,h);if(isNaN(f))return i;var d,p;s?p=o.getRawIndex(h):d=o.get(e.stackedByDimension,h);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,d)),p>=0){var _=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&f>=0&&_>0||l==="samesign"&&f<=0&&_<0){f=OX(f,_),g=_;break}}}return n[0]=f,n[1]=g,n})})}var s_=function(){function t(e){this.data=e.data||(e.sourceFormat===ji?{}:[]),this.sourceFormat=e.sourceFormat||mV,this.seriesLayoutBy=e.seriesLayoutBy||Ni,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=S)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};yI=(e={},e[Cr+"_"+Ni]={pure:!0,appendData:a},e[Cr+"_"+pu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[jn]={pure:!0,appendData:a},e[ji]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[Bn]={appendData:a},e[ds]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return nh(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function bI(t){var e,r;return be(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function wd(t){return new oJ(t)}var oJ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(h||d1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},lJ=function(){function t(e,r){if(!qe(r)){var n="";it(n)}this._opFn=EV[e],this._rvalFloat=ba(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(ba(e),this._rvalFloat)},t}(),NV=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=qe(e)?e:ba(e),i=qe(r)?r:ba(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),uJ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=ba(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=ba(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function cJ(t,e){return t==="eq"||t==="ne"?new uJ(t==="eq",e):he(EV,t)?new lJ(t,e):null}var hJ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return vs(e,r)},t}();function fJ(t,e){var r=new hJ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Ni&&it(o);var s=[],l={},u=t.dimensionsDefine;if(u)R(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var S="";he(l,y)&&it(S),l[y]=_}});else for(var c=0;c65535?xJ:SJ}function Fu(){return[1/0,-1/0]}function bJ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function CI(t,e,r,n,i){var a=zV[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(_){return _.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=h&&_<=f||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=d[i[0]],S=d[i[1]],w=e[i[1]][0],C=e[i[1]][1],y=0;y=h&&_<=f||isNaN(_))&&(M>=w&&M<=C||isNaN(M))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=h&&_<=f||isNaN(_))&&(l[u++]=A)}else for(var y=0;ye[D][1])&&(k=!1)}k&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,h,f,d=new(Vu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=h,f=w)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,d=c+m)}var S=this.getRawIndex(h),w=this.getRawIndex(d);hc-p&&(l=c-p,s.length=l);for(var g=0;gh[1]&&(h[1]=y),f[d++]=_}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return vs(r[a],this._dimensions[a])}T1={arrayRows:e,objectRows:function(r,n,i,a){return vs(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return vs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),BV=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(cg(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=nn(s)?ds:Bn,a=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=pe(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=pe(h.sourceHeader,f.sourceHeader),g=pe(h.dimensions,f.dimensions),m=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||g;i=m?[Xw(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var S=y.get("source",!0);i=[Xw(S,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&AI(a)}var o,s=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&AI(h),s.push(c),l.push(u._getVersionSign())}),n?o=yJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[JQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){if(!this._disposed)return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this._disposed||this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this._disposed||this.handler.off(e,r)},t.prototype.trigger=function(e,r){this._disposed||this.handler.trigger(e,r)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}var oe=EX;function EX(t,e,r){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return wy(t,e,r)}function wy(t,e,r){return se(t)?NX(t).match(/%$/)?parseFloat(t)/100*e+(r||0):parseFloat(t):t==null?NaN:+t}function Ht(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),X4),t=(+t).toFixed(e),r?t:+t}function kn(t){return t.sort(function(e,r){return e-r}),t}function Ai(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return q4(t)}function q4(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function N2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(ua(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function RX(t,e,r){if(!t[e])return 0;var n=K4(t,r);return n[e]||0}function K4(t,e){var r=ui(t,function(d,p){return d+(isNaN(p)?0:p)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=re(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=re(i,function(d){return Math.floor(d)}),s=ui(o,function(d,p){return d+p},0),l=re(i,function(d,p){return d-o[p]});su&&(u=l[h],c=h);++o[c],l[c]=0,++s}return re(o,function(d){return d/n})}function OX(t,e){var r=Math.max(Ai(t),Ai(e)),n=t+e;return r>X4?n:Ht(n,r)}var Mw=9007199254740991;function E2(t){var e=Math.PI*2;return(t%e+e)%e}function Jc(t){return t>-fD&&t=10&&e++,e}function R2(t,e){var r=X0(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function bm(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function Aw(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n0?e.length:0),this.item=null,this.key=NaN,this},t.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},t}();function e1(t){t.option=t.parentModel=t.ecModel=null}var rq=".",Us="___EC__COMPONENT__CONTAINER___",lj="___EC__EXTENDED_CLASS___";function ca(t){var e={main:"",sub:""};if(t){var r=t.split(rq);e.main=r[0]||"",e.sub=r[1]||""}return e}function nq(t){Er(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function iq(t){return!!(t&&t[lj])}function j2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return aq(n)?i=function(a){Y(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(r.$constructor||n).apply(this,arguments)},C2(i,this)),J(i.prototype,r),i[lj]=!0,i.extend=this.extend,i.superCall=lq,i.superApply=uq,i.superClass=n,i}}function aq(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function uj(t,e){t.extend=e.extend}var oq=Math.round(Math.random()*10);function sq(t){var e=["__\0is_clz",oq++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function lq(t,e){for(var r=[],n=2;n=0||a&&Ne(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var cq=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],hq=Ql(cq),fq=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return hq(this,e,r)},t}(),Pw=new Kc(50);function dq(t){if(typeof t=="string"){var e=Pw.get(t);return e&&e.image}else return t}function V2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=Pw.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!K0(e)&&a.pending.push(o)):(e=bn.loadImage(t,gD,gD),e.__zrImageSrc=t,Pw.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function gD(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=_a(o,r);return c>l&&(r="",c=0),l=t-c,i.ellipsis=r,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function fj(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=_a(a,e);if(o<=n){t.textLine=e,t.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=r.maxIterations){e+=r.ellipsis;break}var l=s===0?pq(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=_a(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function pq(t,e,r){for(var n=0,i=0,a=t.length;im&&d){var b=Math.floor(m/f);p=p||y.length>b,y=y.slice(0,b),_=y.length*f}if(i&&c&&g!=null)for(var w=hj(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},M=0;Mp&&r1(a,o.substring(p,m),e,d),r1(a,g[2],e,d,g[1]),p=t1.lastIndex}ph){var W=a.lines.length;z>0?(N.tokens=N.tokens.slice(0,z),A(N,I,D),a.lines=a.lines.slice(0,k+1)):a.lines=a.lines.slice(0,k),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` +`),u=!0),n.accumWidth=p}else{var g=dj(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,h=g.linesWidths,c=g.lines}}c||(c=e.split(` +`));for(var m=ya(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var bq=ui(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Sq(t){return xq(t)?!!bq[t]:!0}function dj(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=ya(e),f=0;fr:i+c+p>r){c?(s||l)&&(g?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=d,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=d,c=p)):g?(a.push(l),o.push(u),l=d,u=p):(a.push(d),o.push(p));continue}c+=p,g?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d)}return l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}function yD(t,e,r,n,i,a){if(t.baseX=r,t.baseY=n,t.outerWidth=t.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;Ce.set(_D,Qc(r,o,i),Ol(n,s,a),o,s),Ce.intersect(e,_D,null,xD);var l=xD.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Qc(l.x,l.width,i,!0),t.baseY=Ol(l.y,l.height,a,!0)}}var _D=new Ce(0,0,0,0),xD={outIntersectRect:{},clamp:!0};function F2(t){return t!=null?t+="":t=""}function wq(t){var e=F2(t.text),r=t.font,n=_a(ya(r),e),i=Hv(r);return kw(t,n,i,null)}function kw(t,e,r,n){var i=new Ce(Qc(t.x||0,e,t.textAlign),Ol(t.y||0,r,t.textBaseline),e,r),a=n??(vj(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function vj(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var Dw="__zr_style_"+Math.round(Math.random()*10),zl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Q0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};zl[Dw]=!0;var bD=["z","z2","invisible"],Tq=["invisible"],hi=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=$e(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(Jp[0]=o1(i)*r+t,Jp[1]=a1(i)*n+e,eg[0]=o1(a)*r+t,eg[1]=a1(a)*n+e,u(s,Jp,eg),c(l,Jp,eg),i=i%Zs,i<0&&(i=i+Zs),a=a%Zs,a<0&&(a=a+Zs),i>a&&!o?a+=Zs:ii&&(tg[0]=o1(d)*r+t,tg[1]=a1(d)*n+e,u(s,tg,s),c(l,tg,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},$s=[],Ys=[],Yi=[],Mo=[],Xi=[],qi=[],s1=Math.min,l1=Math.max,Xs=Math.cos,qs=Math.sin,Ra=Math.abs,Iw=Math.PI,Eo=Iw*2,u1=typeof Float32Array<"u",uf=[];function c1(t){var e=Math.round(t/Iw*1e8)/1e8;return e%2*Iw}function e_(t,e){var r=c1(t[0]);r<0&&(r+=Eo);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Eo?i=r+Eo:e&&r-i>=Eo?i=r-Eo:!e&&r>i?i=r+(Eo-c1(r-i)):e&&r0&&(this._ux=Ra(n/xy/e)||0,this._uy=Ra(n/xy/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(mt.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Ra(e-this._xi),i=Ra(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(mt.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(mt.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(mt.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),uf[0]=i,uf[1]=a,e_(uf,o),i=uf[0],a=uf[1];var s=a-i;return this.addData(mt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Xs(a)*n+e,this._yi=qs(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(mt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(mt.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var r=e.length;!(this.data&&this.data.length===r)&&u1&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Yi[0]=Yi[1]=Xi[0]=Xi[1]=Number.MAX_VALUE,Mo[0]=Mo[1]=qi[0]=qi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Ra(b)>i||f===r-1)&&(g=Math.sqrt(_*_+b*b),a=m,o=y);break}case mt.C:{var w=e[f++],C=e[f++],m=e[f++],y=e[f++],M=e[f++],A=e[f++];g=BY(a,o,w,C,m,y,M,A,10),a=M,o=A;break}case mt.Q:{var w=e[f++],C=e[f++],m=e[f++],y=e[f++];g=VY(a,o,w,C,m,y,10),a=m,o=y;break}case mt.A:var k=e[f++],N=e[f++],D=e[f++],I=e[f++],z=e[f++],O=e[f++],V=O+z;f+=1,p&&(s=Xs(z)*D+k,l=qs(z)*I+N),g=l1(D,I)*s1(Eo,Math.abs(O)),a=Xs(V)*D+k,o=qs(V)*I+N;break;case mt.R:{s=a=e[f++],l=o=e[f++];var G=e[f++],F=e[f++];g=G*2+F*2;break}case mt.Z:{var _=s-a,b=l-o;g=Math.sqrt(_*_+b*b),a=s,o=l;break}}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,h,f,d=r<1,p,g,m=0,y=0,_,b=0,w,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M0&&(e.lineTo(w,C),b=0),A){case mt.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case mt.L:{h=n[M++],f=n[M++];var N=Ra(h-u),D=Ra(f-c);if(N>i||D>a){if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+h*z,c*(1-z)+f*z);break e}m+=I}e.lineTo(h,f),u=h,c=f,b=0}else{var O=N*N+D*D;O>b&&(w=h,C=f,b=O)}break}case mt.C:{var V=n[M++],G=n[M++],F=n[M++],Z=n[M++],j=n[M++],W=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;_s(u,V,F,j,z,$s),_s(c,G,Z,W,z,Ys),e.bezierCurveTo($s[1],Ys[1],$s[2],Ys[2],$s[3],Ys[3]);break e}m+=I}e.bezierCurveTo(V,G,F,Z,j,W),u=j,c=W;break}case mt.Q:{var V=n[M++],G=n[M++],F=n[M++],Z=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;Qd(u,V,F,z,$s),Qd(c,G,Z,z,Ys),e.quadraticCurveTo($s[1],Ys[1],$s[2],Ys[2]);break e}m+=I}e.quadraticCurveTo(V,G,F,Z),u=F,c=Z;break}case mt.A:var H=n[M++],X=n[M++],K=n[M++],ne=n[M++],ie=n[M++],ue=n[M++],ve=n[M++],Ge=!n[M++],xe=K>ne?K:ne,ge=Ra(K-ne)>.001,ke=ie+ue,fe=!1;if(d){var I=p[y++];m+I>_&&(ke=ie+ue*(_-m)/I,fe=!0),m+=I}if(ge&&e.ellipse?e.ellipse(H,X,K,ne,ve,ie,ke,Ge):e.arc(H,X,xe,ie,ke,Ge),fe)break e;k&&(s=Xs(ie)*K+H,l=qs(ie)*ne+X),u=Xs(ke)*K+H,c=qs(ke)*ne+X;break;case mt.R:s=u=n[M],l=c=n[M+1],h=n[M++],f=n[M++];var Me=n[M++],ot=n[M++];if(d){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(h,f),e.lineTo(h+s1(Ye,Me),f),Ye-=Me,Ye>0&&e.lineTo(h+Me,f+s1(Ye,ot)),Ye-=ot,Ye>0&&e.lineTo(h+l1(Me-Ye,0),f+ot),Ye-=Me,Ye>0&&e.lineTo(h,f+l1(ot-Ye,0));break e}m+=I}e.rect(h,f,Me,ot);break;case mt.Z:if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+s*z,c*(1-z)+l*z);break e}m+=I}e.closePath(),u=s,c=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=mt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Bo(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+h&&c>n+h&&c>a+h&&c>s+h||ct+h&&u>r+h&&u>i+h&&u>o+h||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=cf);var f=Math.atan2(l,s);return f<0&&(f+=cf),f>=n&&f<=i||f+cf>=n&&f+cf<=i}function Ga(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var Ao=wa.CMD,Ks=Math.PI*2,Dq=1e-4;function Iq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&Nq(),d=ur(e,n,a,s,Xn[0]),f>1&&(p=ur(e,n,a,s,Xn[1]))),f===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,h=br(e,n,a,u),f=0;fr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Qr[0]=-l,Qr[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Ks-1e-4){n=0,i=Ks;var c=a?1:-1;return o>=Qr[0]+t&&o<=Qr[1]+t?c:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=Ks,i+=Ks);for(var f=0,d=0;d<2;d++){var p=Qr[d];if(p+t>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Ks+g),(g>=n&&g<=i||g+Ks>=n&&g+Ks<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Ga(l,u,c,h,n,i))),m&&(l=a[p],u=a[p+1],c=l,h=u),g){case Ao.M:c=a[p++],h=a[p++],l=c,u=h;break;case Ao.L:if(r){if(Bo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Ga(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.C:if(r){if(Pq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Eq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.Q:if(r){if(pj(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Rq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ao.A:var y=a[p++],_=a[p++],b=a[p++],w=a[p++],C=a[p++],M=a[p++];p+=1;var A=!!(1-a[p++]);f=Math.cos(C)*b+y,d=Math.sin(C)*w+_,m?(c=f,h=d):s+=Ga(l,u,f,d,n,i);var k=(n-y)*w/b+y;if(r){if(kq(y,_,w,C,C+M,A,e,k,i))return!0}else s+=Oq(y,_,w,C,C+M,A,k,i);l=Math.cos(C+M)*b+y,u=Math.sin(C+M)*w+_;break;case Ao.R:c=l=a[p++],h=u=a[p++];var N=a[p++],D=a[p++];if(f=c+N,d=h+D,r){if(Bo(c,h,f,h,e,n,i)||Bo(f,h,f,d,e,n,i)||Bo(f,d,c,d,e,n,i)||Bo(c,d,c,h,e,n,i))return!0}else s+=Ga(f,h,f,d,n,i),s+=Ga(c,d,c,h,n,i);break;case Ao.Z:if(r){if(Bo(l,u,c,h,e,n,i))return!0}else s+=Ga(l,u,c,h,n,i);l=c,u=h;break}}return!r&&!Iq(u,h)&&(s+=Ga(l,u,c,h,n,i)||0),s!==0}function zq(t,e,r){return gj(t,0,!1,e,r)}function Bq(t,e,r,n){return gj(t,e,!0,r,n)}var Ty=be({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},zl),jq={style:be({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Q0.style)},h1=ba.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Sw:n>.2?mX:ww}else if(r)return ww}return Sw},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=tv(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ic)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Bq(s,l/u,r,n)))return!0}if(this.hasFill())return zq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=ic,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:J(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&ic)},e.prototype.createStyle=function(r){return Vv(Ty,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=J({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=J({},i.shape),J(u,n.shape)):(u=J({},a?this.shape:i.shape),J(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=J({},this.shape);for(var c={},h=$e(u),f=0;fi&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+c>a&&(h=s+c,s*=a/h,c*=a/h),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+c,n+a),c!==0&&t.arc(r+c,n+a-c,c,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Sc=Math.round;function t_(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Sc(n*2)===Sc(i*2)&&(t.x1=t.x2=In(n,s,!0)),Sc(a*2)===Sc(o*2)&&(t.y1=t.y2=In(a,s,!0))),t}}function mj(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=In(n,s,!0),t.y=In(i,s,!0),t.width=Math.max(In(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(In(i+o,s,!1)-t.y,o===0?0:1)),t}}function In(t,e,r){if(!e)return t;var n=Sc(t*2);return(n+Sc(e))%2===0?n/2:(n+(r?1:-1))/2}var Uq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Zq={},Be=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Uq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=mj(Zq,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Wq(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Ue);Be.prototype.type="rect";var MD={fill:"#000"},AD=2,Ki={},$q={style:be({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Q0.style)},Xe=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=MD,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,z=0;z=0&&(V=M[O],V.align==="right");)this._placeToken(V,r,k,y,z,"right",b),N-=V.width,z-=V.width,O--;for(I+=(c-(I-m)-(_-z)-N)/2;D<=O;)V=M[D],this._placeToken(V,r,k,y,I+V.width/2,"center",b),I+=V.width,D++;y+=k}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var c=r.verticalAlign,h=a+i/2;c==="top"?h=a+r.height/2:c==="bottom"&&(h=a+i-r.height/2);var f=!r.isLineHolder&&f1(u);f&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var d=!!u.backgroundColor,p=r.textPadding;p&&(o=ND(o,s,p),h-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(eh),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,b=0,w=!1,C=ID("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=DD("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(b=AD,w=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=h,A&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||co,m.opacity=xn(u.opacity,n.opacity,1),PD(m,u),M&&(m.lineWidth=xn(u.lineWidth,n.lineWidth,b),m.lineDash=pe(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),C&&(m.fill=C),g.setBoundingRect(kw(m,r.contentWidth,r.contentHeight,w?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,h=l&&l.image,f=l&&!h,d=r.borderRadius,p=this,g,m;if(f||r.lineHeight||u&&c){g=this._getOrCreateChild(Be),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(f){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(h){m=this._getOrCreateChild(pr),m.onload=function(){p.dirtyStyle()};var b=m.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var _=g.style;_.lineWidth=u,_.stroke=c,_.strokeOpacity=pe(r.strokeOpacity,1),_.lineDash=r.borderDash,_.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(_.strokeFirst=!0,_.lineWidth*=2)}var w=(g||m).style;w.shadowBlur=r.shadowBlur||0,w.shadowColor=r.shadowColor||"transparent",w.shadowOffsetX=r.shadowOffsetX||0,w.shadowOffsetY=r.shadowOffsetY||0,w.opacity=xn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return _j(r)&&(n=[r.fontStyle,r.fontWeight,yj(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Pn(n)||r.textFont||r.font},e}(hi),Yq={left:!0,right:1,center:1},Xq={top:1,bottom:1,middle:1},LD=["fontStyle","fontWeight","fontSize","fontFamily"];function yj(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?b2+"px":t+"px"}function PD(t,e){for(var r=0;r=0,a=!1;if(t instanceof Ue){var o=xj(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Ru(s)||Ru(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Ru(u.fill)&&Ru(s)?(a=!0,n=J({},n),u=J({},u),u.fill=yy(s)):!Ru(u.stroke)&&Ru(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=yy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??xh)}return n}function rK(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Kq)}return r}function nK(t,e,r){var n=Ne(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:eK(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=J({},r),o=J({opacity:n?i:a.opacity*.1},o),r.style=o),r}function d1(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return tK(this,t,e,r);if(t==="blur")return nK(this,t,r);if(t==="select")return rK(this,t,r)}return r}function Jl(t){t.stateProxy=d1;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=d1),r&&(r.stateProxy=d1)}function BD(t,e){!Aj(t,e)&&!t.__highByOuter&&bo(t,bj)}function jD(t,e){!Aj(t,e)&&!t.__highByOuter&&bo(t,Sj)}function fo(t,e){t.__highByOuter|=1<<(e||0),bo(t,bj)}function vo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&bo(t,Sj)}function Tj(t){bo(t,U2)}function Z2(t){bo(t,wj)}function Cj(t){bo(t,Qq)}function Mj(t){bo(t,Jq)}function Aj(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Lj(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=G2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){wj(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function Rw(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var h=0;h0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function cs(t,e,r){Pl(t,!0),bo(t,Jl),zw(t,e,r)}function uK(t){Pl(t,!1)}function wt(t,e,r,n){n?uK(t):cs(t,e,r)}function zw(t,e,r){var n=Le(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var FD=["emphasis","blur","select"],cK={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=v1(p),s*=v1(p));var g=(i===a?-1:1)*v1((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,m=g*o*d/s,y=g*-s*f/o,_=(t+r)/2+ng(h)*m-rg(h)*y,b=(e+n)/2+rg(h)*m+ng(h)*y,w=UD([1,0],[(f-m)/o,(d-y)/s]),C=[(f-m)/o,(d-y)/s],M=[(-1*f-m)/o,(-1*d-y)/s],A=UD(C,M);if(jw(C,M)<=-1&&(A=hf),jw(C,M)>=1&&(A=0),A<0){var k=Math.round(A/hf*1e6)/1e6;A=hf*2+k%2*hf}c.addData(u,_,b,o,s,w,A,h,a)}var gK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,mK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function yK(t){var e=new wa;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=wa.CMD,l=t.match(gK);if(!l)return e;for(var u=0;uV*V+G*G&&(k=D,N=I),{cx:k,cy:N,x0:-c,y0:-h,x1:k*(i/C-1),y1:N*(i/C-1)}}function CK(t){var e;if(ee(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function MK(t,e){var r,n=Uf(e.r,0),i=Uf(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,f=!!e.clockwise,d=$D(u-l),p=d>p1&&d%p1;if(p>xi&&(d=p),!(n>xi))t.moveTo(c,h);else if(d>p1-xi)t.moveTo(c+n*zu(l),h+n*Qs(l)),t.arc(c,h,n,l,u,!f),i>xi&&(t.moveTo(c+i*zu(u),h+i*Qs(u)),t.arc(c,h,i,u,l,f));else{var g=void 0,m=void 0,y=void 0,_=void 0,b=void 0,w=void 0,C=void 0,M=void 0,A=void 0,k=void 0,N=void 0,D=void 0,I=void 0,z=void 0,O=void 0,V=void 0,G=n*zu(l),F=n*Qs(l),Z=i*zu(u),j=i*Qs(u),W=d>xi;if(W){var H=e.cornerRadius;H&&(r=CK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=$D(n-i)/2;if(b=Qi(X,y),w=Qi(X,_),C=Qi(X,g),M=Qi(X,m),N=A=Uf(b,w),D=k=Uf(C,M),(A>xi||k>xi)&&(I=n*zu(u),z=n*Qs(u),O=i*zu(l),V=i*Qs(l),dxi){var ge=Qi(y,N),ke=Qi(_,N),fe=ig(O,V,G,F,n,ge,f),Me=ig(I,z,Z,j,n,ke,f);t.moveTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),N0&&t.arc(c+fe.cx,h+fe.cy,ge,Vr(fe.y0,fe.x0),Vr(fe.y1,fe.x1),!f),t.arc(c,h,n,Vr(fe.cy+fe.y1,fe.cx+fe.x1),Vr(Me.cy+Me.y1,Me.cx+Me.x1),!f),ke>0&&t.arc(c+Me.cx,h+Me.cy,ke,Vr(Me.y1,Me.x1),Vr(Me.y0,Me.x0),!f))}else t.moveTo(c+G,h+F),t.arc(c,h,n,l,u,!f);if(!(i>xi)||!W)t.lineTo(c+Z,h+j);else if(D>xi){var ge=Qi(g,D),ke=Qi(m,D),fe=ig(Z,j,I,z,i,-ke,f),Me=ig(G,F,O,V,i,-ge,f);t.lineTo(c+fe.cx+fe.x0,h+fe.cy+fe.y0),D0&&t.arc(c+fe.cx,h+fe.cy,ke,Vr(fe.y0,fe.x0),Vr(fe.y1,fe.x1),!f),t.arc(c,h,i,Vr(fe.cy+fe.y1,fe.cx+fe.x1),Vr(Me.cy+Me.y1,Me.cx+Me.x1),f),ge>0&&t.arc(c+Me.cx,h+Me.cy,ge,Vr(Me.y1,Me.x1),Vr(Me.y0,Me.x0),!f))}else t.lineTo(c+Z,h+j),t.arc(c,h,i,u,l,f)}t.closePath()}}}var AK=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),Rr=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new AK},e.prototype.buildPath=function(r,n){MK(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ue);Rr.prototype.type="sector";var LK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),bh=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new LK},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Ue);bh.prototype.type="ring";function PK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,h;if(n){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,d=t.length;f=2){if(n){var a=PK(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;sel[1]){if(a=!1,_r.negativeSize||n)return a;var l=ag(el[0]-Js[1]),u=ag(Js[0]-el[1]);g1(l,u)>sg.len()&&(l=u||!_r.bidirectional)&&(Te.scale(og,s,-u*i),_r.useDir&&_r.calcDirMTV()))}}return a},t.prototype._getProjMinMaxOnAxis=function(e,r,n){for(var i=this._axes[e],a=this._origin,o=r[0].dot(i)+a[e],s=o,l=o,u=1;u0){var h=c.duration,f=c.delay,d=c.easing,p={duration:h,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,p):e.animateTo(r,p)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Qe(t,e,r,n,i,a){q2("update",t,e,r,n,i,a)}function bt(t,e,r,n,i,a){q2("enter",t,e,r,n,i,a)}function zc(t){if(!t.__zr)return!0;for(var e=0;eua(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function qD(t){return!t.isGroup}function FK(t){return t.shape!=null}function Yv(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){qD(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return FK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(qD(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Qe(o,l,r,Le(o).dataIndex)}}})}function J2(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=En(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=En(i,e.y+e.height),[n,i]})}function Hj(t,e){var r=Gt(t.x,e.x),n=En(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=En(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function Th(t,e,r){var n=J({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),be(i,r),new pr(n)):th(t.replace("path://",""),n,r,"center")}function Zf(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=m1(d,p,c,h)/f;return!(m<0||m>1)}function m1(t,e,r,n){return t*n-r*e}function GK(t){return t<=1e-6&&t>=-1e-6}function eu(t,e,r,n,i){return e==null||(qe(e)?Ct[0]=Ct[1]=Ct[2]=Ct[3]=e:(Ct[0]=e[0],Ct[1]=e[1],Ct[2]=e[2],Ct[3]=e[3]),n&&(Ct[0]=Gt(0,Ct[0]),Ct[1]=Gt(0,Ct[1]),Ct[2]=Gt(0,Ct[2]),Ct[3]=Gt(0,Ct[3])),r&&(Ct[0]=-Ct[0],Ct[1]=-Ct[1],Ct[2]=-Ct[2],Ct[3]=-Ct[3]),KD(t,Ct,"x","width",3,1,i&&i[0]||0),KD(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function KD(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,En(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:ua(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function So(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=se(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&R($e(l),function(c){he(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Le(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:be({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Fw(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function ks(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function a_(t,e,r){Zj(t,e,r,-1/0)}function Zj(t,e,r,n){if(t.ignoreModelZ)return n;var i=t.getTextContent(),a=t.getTextGuideLine(),o=t.isGroup;if(o)for(var s=t.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Ds(t,e){return Ee(Ee({},t,!0),e,!0)}const eQ={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},tQ={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Py="ZH",nM="EN",Bc=nM,Tm={},iM={},Qj=Ze.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Bc).toUpperCase();return t.indexOf(Py)>-1?Py:Bc}():Bc;function aM(t,e){t=t.toUpperCase(),iM[t]=new We(e),Tm[t]=e}function rQ(t){if(se(t)){var e=Tm[t.toUpperCase()]||{};return t===Py||t===nM?ye(e):Ee(ye(e),ye(Tm[Bc]),!1)}else return Ee(ye(t),ye(Tm[Bc]),!1)}function Hw(t){return iM[t]}function nQ(){return iM[Bc]}aM(nM,eQ);aM(Py,tQ);var Ww=null;function iQ(t){Ww||(Ww=t)}function Xt(){return Ww}var oM=1e3,sM=oM*60,bd=sM*60,ti=bd*24,rI=ti*365,aQ={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Cm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},oQ="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",ug="{yyyy}-{MM}-{dd}",nI={year:"{yyyy}",month:"{yyyy}-{MM}",day:ug,hour:ug+" "+Cm.hour,minute:ug+" "+Cm.minute,second:ug+" "+Cm.second,millisecond:oQ},Tn=["year","month","day","hour","minute","second","millisecond"],sQ=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function lQ(t){return!se(t)&&!me(t)?uQ(t):t}function uQ(t){t=t||{};var e={},r=!0;return R(Tn,function(n){r&&(r=t[n]==null)}),R(Tn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Tn[s],u=Se(a)&&!ee(a)?a[l]:a,c=void 0;ee(u)?(c=u.slice(),o=c[0]||""):se(u)?(o=u,c=[o]):(o==null?o=Cm[n]:aQ[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function Jr(t,e){return t+="","0000".substr(0,e-t.length)+t}function Sd(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function cQ(t){return t===Sd(t)}function hQ(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Xv(t,e,r,n){var i=La(t),a=i[Jj(r)](),o=i[lM(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[uM(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[cM(r)](),h=(c-1)%12+1,f=i[hM(r)](),d=i[fM(r)](),p=i[dM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Hw(n||Qj)||nQ(),_=y.getModel("time"),b=_.get("month"),w=_.get("monthAbbr"),C=_.get("dayOfWeek"),M=_.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Jr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,Jr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Jr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Jr(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Jr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Jr(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Jr(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Jr(p,3)).replace(/{S}/g,p+"")}function fQ(t,e,r,n,i){var a=null;if(se(r))a=r;else if(me(r)){var o={time:t.time,level:t.time.level},s=Xt();s&&s.makeAxisLabelFormatterParamBreak(o,t.break),a=r(t.value,e,o)}else{var l=t.time;if(l){var u=r[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var c=Tc(t.value,i);a=r[c][c][0]}}return Xv(new Date(t.value),a,i,n)}function Tc(t,e){var r=La(t),n=r[lM(e)]()+1,i=r[uM(e)](),a=r[cM(e)](),o=r[hM(e)](),s=r[fM(e)](),l=r[dM(e)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&a===0,d=f&&i===1,p=d&&n===1;return p?"year":d?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function ky(t,e,r){switch(e){case"year":t[eV(r)](0);case"month":t[tV(r)](1);case"day":t[rV(r)](0);case"hour":t[nV(r)](0);case"minute":t[iV(r)](0);case"second":t[aV(r)](0)}return t}function Jj(t){return t?"getUTCFullYear":"getFullYear"}function lM(t){return t?"getUTCMonth":"getMonth"}function uM(t){return t?"getUTCDate":"getDate"}function cM(t){return t?"getUTCHours":"getHours"}function hM(t){return t?"getUTCMinutes":"getMinutes"}function fM(t){return t?"getUTCSeconds":"getSeconds"}function dM(t){return t?"getUTCMilliseconds":"getMilliseconds"}function dQ(t){return t?"setUTCFullYear":"setFullYear"}function eV(t){return t?"setUTCMonth":"setMonth"}function tV(t){return t?"setUTCDate":"setDate"}function rV(t){return t?"setUTCHours":"setHours"}function nV(t){return t?"setUTCMinutes":"setMinutes"}function iV(t){return t?"setUTCSeconds":"setSeconds"}function aV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function vQ(t,e,r,n,i,a,o,s){var l=new Xe({style:{text:t,font:e,align:r,verticalAlign:n,padding:i,rich:a,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function vM(t){if(!O2(t))return se(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function pM(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Ah=jv;function Uw(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Pn(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?La(t):t;if(isNaN(+l)){if(s)return"-"}else return Xv(l,n,r)}if(e==="ordinal")return cy(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=Sa(t);return a(u)?vM(u):cy(t)?i(t):typeof t=="boolean"?t+"":"-"}var iI=["a","b","c","d","e","f","g"],x1=function(t,e){return"{"+t+(e??"")+"}"};function gM(t,e,r){ee(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function gQ(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd +yyyy`);var n=La(e),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),l=n[i+"Hours"](),u=n[i+"Minutes"](),c=n[i+"Seconds"](),h=n[i+"Milliseconds"]();return t=t.replace("MM",Jr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",Jr(a%100+"",2)).replace("dd",Jr(s,2)).replace("d",s).replace("hh",Jr(l,2)).replace("h",l).replace("mm",Jr(u,2)).replace("m",u).replace("ss",Jr(c,2)).replace("s",c).replace("SSS",Jr(h,3)),t}function mQ(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function ru(t,e){return e=e||"transparent",se(t)?t:Se(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Dy(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var Mm={},b1={},Lh=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(Mm),this._normalMasterList=n(b1);function n(i,a){var o=[];return R(i,function(s,l){var u=s.create(e,r);o=o.concat(u||[])}),o}},t.prototype.update=function(e,r){R(this._normalMasterList,function(n){n.update&&n.update(e,r)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,r){if(e==="matrix"||e==="calendar"){Mm[e]=r;return}b1[e]=r},t.get=function(e){return b1[e]||Mm[e]},t}();function yQ(t){return!!Mm[t]}var Zw={coord:1,coord2:2};function _Q(t){sV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var sV=de();function xQ(t){var e=t.getShallow("coord",!0),r=Zw.coord;if(e==null){var n=sV.get(t.type);n&&n.getCoord2&&(r=Zw.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var sa={none:0,dataCoordSys:1,boxCoordSys:2};function lV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=sa.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=sa.dataCoordSys,a||(i=sa.none)):n==="box"&&(i=sa.boxCoordSys,!a&&!yQ(r)&&(i=sa.none))}return{coordSysType:r,kind:i}}function qv(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=lV(e),o=a.kind,s=a.coordSysType;if(i&&o!==sa.dataCoordSys&&(o=sa.dataCoordSys,s=r),o===sa.none||s!==r)return!1;var l=n(r,e);return l?(o===sa.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var uV=function(t,e){var r=e.getReferringComponents(t,kt).models[0];return r&&r.coordinateSystem},Am=R,cV=["left","right","top","bottom","width","height"],kl=[["width","left","right"],["height","top","bottom"]];function mM(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),f=h&&h.getBoundingRect(),d,p;if(t==="horizontal"){var g=c.width+(f?-f.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=c.height):s=Math.max(s,c.height)}else{var m=c.height+(f?-f.y+c.y:0);p=o+m,p>i||l.newline?(a+=s+r,o=0,p=m,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=d+r:o=p+r)})}var jl=mM;Ie(mM,"vertical");Ie(mM,"horizontal");function hV(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function bQ(t,e){var r=sr(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===$f.point)a=r.refPoint,i=St(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=St(n,r.refContainer),a=r.boxCoordFrom===Zw.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function fV(t,e){var r=bQ(t,e),n=r.viewRect,i=r.center,a=t.get("radius");ee(a)||(a=[0,a]);var o=oe(n.width,e.getWidth()),s=oe(n.height,e.getHeight()),l=Math.min(o,s),u=oe(a[0],l/2),c=oe(a[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:n}}function St(t,e,r){r=Ah(r||0);var n=e.width,i=e.height,a=oe(t.left,n),o=oe(t.top,i),s=oe(t.right,n),l=oe(t.bottom,i),u=oe(t.width,n),c=oe(t.height,i),h=r[2]+r[0],f=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(c)&&(c=i-l-h-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-c-h),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-f;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new Ce((e.x||0)+a+r[3],(e.y||0)+o+r[0],u,c);return p.margin=r,p}function dV(t,e,r){var n=t.getShallow("preserveAspect",!0);if(!n)return e;var i=e.width/e.height;if(Math.abs(Math.atan(r)-Math.atan(i))<1e-9)return e;var a=t.getShallow("preserveAspectAlign",!0),o=t.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return i>r&&!l||i=g)return h;for(var m=0;m=0;l--)s=Ee(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return _h(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return hV(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(We);uj(Ve,We);q0(Ve);QK(Ve);JK(Ve,TQ);function TQ(t){var e=[];return R(Ve.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return ca(r).main}),t!=="dataset"&&Ne(e,"dataset")<=0&&e.unshift("dataset"),e}var q={color:{},darkColor:{},size:{}},jt=q.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};J(jt,{primary:jt.neutral80,secondary:jt.neutral70,tertiary:jt.neutral60,quaternary:jt.neutral50,disabled:jt.neutral20,border:jt.neutral30,borderTint:jt.neutral20,borderShade:jt.neutral40,background:jt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:jt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:jt.neutral70,axisLineTint:jt.neutral40,axisTick:jt.neutral70,axisTickMinor:jt.neutral60,axisLabel:jt.neutral70,axisSplitLine:jt.neutral15,axisMinorSplitLine:jt.neutral05});for(var tl in jt)if(jt.hasOwnProperty(tl)){var aI=jt[tl];tl==="theme"?q.darkColor.theme=jt.theme.slice():tl==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":tl.indexOf("accent")===0?q.darkColor[tl]=to(aI,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):q.darkColor[tl]=to(aI,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var pV="";typeof navigator<"u"&&(pV=navigator.platform||"");var Bu="rgba(0, 0, 0, 0.2)",gV=q.color.theme[0],CQ=to(gV,null,null,.9);const MQ={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[CQ,gV],aria:{decal:{decals:[{color:Bu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Bu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Bu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Bu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Bu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Bu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:pV.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var mV=de(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Bn="original",Cr="arrayRows",jn="objectRows",ji="keyedColumns",fs="typedArray",yV="unknown",Ei="column",vu="row",Lr={Must:1,Might:2,Not:3},_V=Fe();function AQ(t){_V(t).datasetMap=de()}function xV(t,e,r){var n={},i=_M(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=_V(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,h;t=t.slice(),R(t,function(g,m){var y=Se(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,h=p(y)),n[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});R(t,function(g,m){var y=g.name,_=p(g);if(c==null){var b=f.valueWayDim;d(n[y],b,_),d(o,b,_),f.valueWayDim+=_}else if(c===m)d(n[y],0,_),d(a,0,_);else{var b=f.categoryWayDim;d(n[y],b,_),d(o,b,_),f.categoryWayDim+=_}});function d(g,m,y){for(var _=0;_e)return t[n];return t[r-1]}function wV(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?r:IQ(n,o);if(c=c||r,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function NQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var cg,ff,sI,lI="\0_ec_inner",EQ=1,bM=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new We(a),this._locale=new We(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=hI(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,hI(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?sI(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&R(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=de(),u=n&&n.replaceMergeMainTypeMap;AQ(this),R(r,function(h,f){h!=null&&(Ve.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ye(h):Ee(i[f],h,!0))}),u&&u.each(function(h,f){Ve.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Ve.topologicalTravel(s,Ve.getAllClassMainTypes(),c,this);function c(h){var f=kQ(this,h,pt(r[h])),d=a.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=ij(d,f,p);XX(g,h,Ve),i[h]=null,a.set(h,null),o.set(h,0);var m=[],y=[],_=0,b;R(g,function(w,C){var M=w.existing,A=w.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var k=h==="series",N=Ve.getClass(h,w.keyInfo.subType,!k);if(!N)return;if(h==="tooltip"){if(b)return;b=!0}if(M&&M.constructor===N)M.name=w.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var D=J({componentIndex:C},w.keyInfo);M=new N(A,this,this,D),J(M,D),w.brandNew&&(M.__requireNewView=!0),M.init(A,this,this),M.optionUpdated(null,!0)}}M?(m.push(M.option),y.push(M),_++):(m.push(void 0),y.push(void 0))},this),i[h]=m,a.set(h,y),o.set(h,_),h==="series"&&cg(this)}this._seriesIndices||cg(this)},e.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(Ve.hasClass(i)){for(var a=pt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!nv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[lI],r},e.prototype.setTheme=function(r){this._theme=new We(r),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function HQ(t,e){return t.join(",")===e.join(",")}var _i=R,uv=Se,fI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function S1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=fI.length;r0?r[o-1].seriesModel:null)}),QQ(r)}})}function QQ(t){R(t,function(e,r){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,h){var f=o.get(e.stackedDimension,h);if(isNaN(f))return i;var d,p;s?p=o.getRawIndex(h):d=o.get(e.stackedByDimension,h);for(var g=NaN,m=r-1;m>=0;m--){var y=t[m];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,d)),p>=0){var _=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&_>0||l==="negative"&&_<0||l==="samesign"&&f>=0&&_>0||l==="samesign"&&f<=0&&_<0){f=OX(f,_),g=_;break}}}return n[0]=f,n[1]=g,n})})}var l_=function(){function t(e){this.data=e.data||(e.sourceFormat===ji?{}:[]),this.sourceFormat=e.sourceFormat||yV,this.seriesLayoutBy=e.seriesLayoutBy||Ei,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=b)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};_I=(e={},e[Cr+"_"+Ei]={pure:!0,appendData:a},e[Cr+"_"+vu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[jn]={pure:!0,appendData:a},e[ji]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[Bn]={appendData:a},e[fs]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return nh(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function wI(t){var e,r;return Se(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function wd(t){return new oJ(t)}var oJ=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(_){return!(_>=1)&&(_=1),_}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(h||d1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},lJ=function(){function t(e,r){if(!qe(r)){var n="";it(n)}this._opFn=EV[e],this._rvalFloat=Sa(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(Sa(e),this._rvalFloat)},t}(),RV=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=qe(e)?e:Sa(e),i=qe(r)?r:Sa(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=se(e),l=se(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),uJ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=Sa(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Sa(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function cJ(t,e){return t==="eq"||t==="ne"?new uJ(t==="eq",e):he(EV,t)?new lJ(t,e):null}var hJ=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return ds(e,r)},t}();function fJ(t,e){var r=new hJ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Ei&&it(o);var s=[],l={},u=t.dimensionsDefine;if(u)R(u,function(g,m){var y=g.name,_={index:m,name:y,displayName:g.displayName};if(s.push(_),y!=null){var b="";he(l,y)&&it(b),l[y]=_}});else for(var c=0;c65535?xJ:bJ}function Vu(){return[1/0,-1/0]}function SJ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function MI(t,e,r,n,i){var a=BV[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=re(o,function(_){return _.property}),c=0;cy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=h&&_<=f||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=d[i[0]],b=d[i[1]],w=e[i[1]][0],C=e[i[1]][1],y=0;y=h&&_<=f||isNaN(_))&&(M>=w&&M<=C||isNaN(M))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=h&&_<=f||isNaN(_))&&(l[u++]=A)}else for(var y=0;ye[D][1])&&(k=!1)}k&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),c,h,f,d=new(ju(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=h,f=w)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,d=c+m)}var b=this.getRawIndex(h),w=this.getRawIndex(d);hc-p&&(l=c-p,s.length=l);for(var g=0;gh[1]&&(h[1]=y),f[d++]=_}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return ds(r[a],this._dimensions[a])}C1={arrayRows:e,objectRows:function(r,n,i,a){return ds(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return ds(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),jV=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(fg(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=r[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=nn(s)?fs:Bn,a=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=pe(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=pe(h.sourceHeader,f.sourceHeader),g=pe(h.dimensions,f.dimensions),m=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||g;i=m?[Xw(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var y=e;if(n){var _=this._applyTransform(r);i=_.sourceList,a=_.upstreamSignList}else{var b=y.get("source",!0);i=[Xw(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&LI(a)}var o,s=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&LI(h),s.push(c),l.push(u._getVersionSign())}),n?o=yJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[JQ(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!t.noHeader;return R(t.blocks,function(i){var a=GV(i);a>=e&&(e=a+ +(n&&(!a||Kw(i)&&!i.noHeader)))}),e}return 0}function MJ(t,e,r,n){var i=e.noHeader,a=LJ(GV(e)),o=[],s=e.blocks||[];Nr(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(he(u,l)){var c=new NV(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(g,m){var y=e.valueFormatter,_=FV(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);_!=null&&o.push(_)});var h=t.renderMode==="richText"?o.join(a.richText):Qw(n,o.join(""),i?r:a.html);if(i)return h;var f=Uw(e.header,"ordinal",t.useUTC),d=VV(n,t.renderMode).nameStyle,p=jV(n);return t.renderMode==="richText"?HV(t,f,d)+a.richText+h:Qw(n,'
'+Ur(f)+"
"+h,r)}function AJ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(w){return w=ee(w)?w:[w],re(w,function(C,M){return Uw(C,ee(d)?d[M]:d,u)})};if(!(a&&o)){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||q.color.secondary,i),f=a?"":Uw(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=VV(n,i),_=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":HV(t,f,_))+(o?"":DJ(t,p,g,m,S)):Qw(n,(s?"":h)+(a?"":PJ(f,!s,_))+(o?"":kJ(p,g,m,S)),r)}}function LI(t,e,r,n,i,a){if(t){var o=FV(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function LJ(t){return{html:TJ[t],richText:CJ[t]}}function Qw(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=jV(t);return'
'+e+n+"
"}function PJ(t,e,r){var n=e?"margin-left:2px":"";return''+Ur(t)+""}function kJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],''+re(t,function(o){return Ur(o)}).join("  ")+""}function HV(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function DJ(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function WV(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return nu(n)}function UV(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var C1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Q4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=aV({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?R(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function ZV(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=WV(e,r),c,h,f,d;if(o>1||l&&!o){var p=IJ(s,e,r,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=nh(i,r,a[0]),h=g.type}else d=c=l?s[0]:s;var m=B2(e),y=m&&e.name||"",_=i.getName(r),S=n?y:_;return Kt("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:S,noName:!Pn(S),value:c,valueType:h,dataIndex:r})].concat(f||[])})}function IJ(t,e,r,n,i){var a=e.getData(),o=ui(t,function(h,f,d){var p=a.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(h){c(nh(a,r,h),h)}):R(t,c);function c(h,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Lo=Fe();function hg(t,e){return t.getName(e)||t.getId(e)}var Mm="__universalTransitionEnabled",ht=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=wd({count:NJ,reset:RJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Lo(this).sourceManager=new BV(this);a.prepareSource();var o=this.getInitialData(r,i);kI(o,this),this.dataTask.context.data=o,Lo(this).dataBeforeProcessed=o,PI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=sv(this),a=i?vu(r):{},o=this.subType;Ve.hasClass(o)&&(o+="Series"),Ne(r,n.getTheme().get(this.subType)),Ne(r,this.getDefaultOption()),Kl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ta(r,a,i)},e.prototype.mergeOption=function(r,n){r=Ne(this.option,r,!0),this.fillDataTextStyle(r.data);var i=sv(this);i&&Ta(this.option,r,i);var a=Lo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);kI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Lo(this).dataBeforeProcessed=o,PI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!nn(r))for(var n=["show"],i=0;i=0&&f<0)&&(h=_,f=y,d=0),y===f&&(c[d++]=g))}),c.length=d,c},e.prototype.formatTooltip=function(r,n,i){return ZV({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ze.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=SM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[hg(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Mm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){be(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ve.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ve);Bt(ht,l_);Bt(ht,SM);lj(ht,Ve);function PI(t){var e=t.name;B2(t)||(t.name=EJ(t)||e)}function EJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function NJ(t){return t.model.getRawData().count()}function RJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),OJ}function OJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function kI(t,e){R(qc(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(zJ,e))})}function zJ(t,e){var r=Jw(t);return r&&r.setOutputEnd((e||this).count()),e}function Jw(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var gt=function(){function t(){this.group=new _e,this.uid=Mh("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();V2(gt);X0(gt);function Ph(){var t=Fe();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var $V=Fe(),BJ=Ph(),st=function(){function t(){this.group=new _e,this.uid=Mh("viewChart"),this.renderTask=wd({plan:jJ,reset:VJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&II(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&II(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){Ds(this.group,e)},t.markUpdateMethod=function(e,r){$V(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function DI(t,e,r){t&&iv(t)&&(e==="emphasis"?fo:vo)(t,r)}function II(t,e,r){var n=Ql(t,e),i=e&&e.highlightKey!=null?fK(e.highlightKey):null;n!=null?R(pt(n),function(a){DI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){DI(a,r,i)})}V2(st);X0(st);function jJ(t){return BJ(t.model)}function VJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&$V(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),FJ[l]}var FJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},ky="\0__throttleOriginMethod",EI="\0__throttleRate",NI="\0__throttleType";function c_(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function h(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var f=function(){for(var d=[],p=0;p=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function kh(t,e,r,n){var i=t[e];if(i){var a=i[ky]||i,o=i[NI],s=i[EI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=c_(a,r,n==="debounce"),i[ky]=a,i[NI]=n,i[EI]=r}return i}}function uv(t,e){var r=t[e];r&&r[ky]&&(r.clear&&r.clear(),t[e]=r[ky])}var RI=Fe(),OI={itemStyle:Jl(qj,!0),lineStyle:Jl(Xj,!0)},GJ={lineStyle:"stroke",itemStyle:"fill"};function YV(t,e){var r=t.visualStyleMapper||OI[e];return r||(console.warn("Unknown style type '"+e+"'."),OI.itemStyle)}function XV(t,e){var r=t.visualDrawType||GJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var HJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=YV(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=XV(t,n),u=o[l],c=me(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),d.setItemVisual(p,"style",m)}}}},vf=new We,WJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=YV(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){vf.option=l[n];var u=i(vf),c=o.ensureUniqueItemVisual(s,"style");J(c,u),vf.option.decal&&(o.setItemVisual(s,"decal",vf.option.decal),vf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},UJ={performRawSeries:!0,overallReset:function(t){var e=de();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),RI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=RI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=XV(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();f[l]=r.getColorFromPalette(d,o,p)}})}})}},fg=Math.PI;function ZJ(t,e){e=e||{},Se(e,{text:"loading",textColor:q.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new je({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new je({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Wv({shape:{startAngle:-fg/2,endAngle:-fg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:fg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:fg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var qV=function(){function t(e,r,n,i){this._stageTaskMap=de(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=de();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Nr(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;R(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);p.each(function(m){m.perform(g)}),f.perform(g)&&(a=!0)}else h&&h.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=de(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||wd({plan:KJ,reset:QJ,count:eee}));d.context={model:h,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||wd({reset:$J});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=de(),u=e.seriesType,c=e.getTargetSeries,h=!0,f=!1,d="";Nr(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,R(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(f=!0,wd({reset:YJ,onDirty:qJ})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,a._pipe(g,y)}f&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:tee(e)}),e.uid=Mh("stageHandler"),r&&(e.visualType=r),e},t}();function $J(t){t.overallReset(t.ecModel,t.api,t.payload)}function YJ(t){return t.overallProgress&&XJ}function XJ(){this.agent.dirty(),this.getDownstream().dirty()}function qJ(){this.agent&&this.agent.dirty()}function KJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function QJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=pt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return KV(n)}):JJ}var JJ=KV(0);function KV(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(r.mainType=p,r[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),eT=["symbol","symbolSize","symbolRotate","symbolOffset"],BI=eT.concat(["symbolKeepAspect"]),iee={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&El(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function tT(t,e,r){for(var n=e.type==="radial"?_ee(t,e,r):yee(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qe(t)?[t]:ee(t)?t:null}function LM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&See(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var bee=new wa(!0);function Ey(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function jI(t){return typeof t=="string"&&t!=="none"}function Ny(t){var e=t.fill;return e!=null&&e!=="none"}function VI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function FI(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function rT(t,e,r){var n=F2(e.image,e.__image,r);if(q0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*fd),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function wee(t,e,r,n){var i,a=Ey(r),o=Ny(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||bee,h=e.__dirty;if(!n){var f=r.fill,d=r.stroke,p=o&&!!f.colorStops,g=a&&!!d.colorStops,m=o&&!!f.image,y=a&&!!d.image,_=void 0,S=void 0,w=void 0,C=void 0,M=void 0;(p||g)&&(M=e.getBoundingRect()),p&&(_=h?tT(t,f,M):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(S=h?tT(t,d,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(w=h||!e.__canvasFillPattern?rT(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=w),y&&(C=h||!e.__canvasStrokePattern?rT(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),p?t.fillStyle=_:m&&(w?t.fillStyle=w:o=!1),g?t.strokeStyle=S:y&&(C?t.strokeStyle=C:a=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var k,E;t.setLineDash&&r.lineDash&&(i=LM(e),k=i[0],E=i[1]);var D=!0;(u||h&ac)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(t,l?s:1),k&&(t.setLineDash(k),t.lineDashOffset=E),n||(r.strokeFirst?(a&&FI(t,r),o&&VI(t,r)):(o&&VI(t,r),a&&FI(t,r))),k&&t.setLineDash([])}function Tee(t,e,r){var n=e.__image=F2(r.image,e.__image,e,e.onload);if(!(!n||!q0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,h=o-u,f=s-c;t.drawImage(n,u,c,h,f,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function Cee(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||co,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=LM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Ey(r)&&t.strokeText(i,r.x,r.y),Ny(r)&&t.fillText(i,r.x,r.y)):(Ny(r)&&t.fillText(i,r.x,r.y),Ey(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var GI=["shadowBlur","shadowOffsetX","shadowOffsetY"],HI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function nF(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){pn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Bl.opacity:o}(n||e.blend!==r.blend)&&(a||(pn(t,i),a=!0),t.globalCompositeOperation=e.blend||Bl.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(be(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,Uu(this),!this._model||n){var l=new jQ(this._api),u=this._theme,c=this._model=new bM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},oT);var h={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:h},this[er]=!1,this.getZr().wakeUp();else{try{sl(this),za.update.call(this,null,h)}catch(f){throw this[yr]=null,this[er]=!1,f}this._ssr||this._zr.flush(),this[yr]=null,this[er]=!1,Hu.call(this,a),Wu.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[yr]&&(a==null&&(a=this[yr].silent),o=this[yr].updateParams,this[yr]=null),this[er]=!0,Uu(this);try{this._updateTheme(r),i.setTheme(this._theme),sl(this),za.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Hu.call(this,a),Wu.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=bF[r]),r&&(r=ye(r),r&&CV(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ze.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(By[i]){var l=s,u=s,c=-s,h=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Fl,function(S,w){if(S.group===i){var C=n?S.getZr().painter.getSvgDom().innerHTML:S.renderToCanvas(ye(r)),M=S.getDom().getBoundingClientRect();l=a(M.left,l),u=a(M.top,u),c=o(M.right,c),h=o(M.bottom,h),f.push({dom:C,left:M.left,top:M.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,g=h-u,m=Sn.createCanvas(),y=Tw(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(f,function(S){var w=S.left-l,C=S.top-u;_+=''+S.dom+""}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new je({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(f,function(S){var w=new pr({style:{x:S.left*d-l,y:S.top*d-u,image:S.dom}});y.add(w)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return gg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return gg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return gg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Oc(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Oc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?AM(s,l,n):Xv(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;R(Kee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Il(l,function(g){var m=Le(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var h=u.componentType,f=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=u.seriesIndex);var d=h&&f!=null&&s.getComponent(h,f),p=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(iT,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),oee(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&aj(this.getDom(),IM,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Fl[n.id]},e.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[yr]&&(a==null&&(a=this[yr].silent),i=!0,this[yr]=null),this[er]=!0,Uu(this);try{i&&sl(this),za.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Hu.call(this,a),Wu.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(be(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!sT[r]){var i=sT[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=nT[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(be(n)||(n={silent:!!n}),!!Oy[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;D1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),Hu.call(this,i),Wu.call(this,i)}},e.prototype.updateLabelLayout=function(){bi.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){sl=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),P1(h,!0),P1(h,!1),f.plan()},P1=function(h,f){for(var d=h._model,p=h._scheduler,g=f?h._componentsViews:h._chartsViews,m=f?h._componentsMap:h._chartsMap,y=h._zr,_=h._api,S=0;Sf.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&f.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=h._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function l(h,f){if(!h.preventAutoZ){var d=ru(h);f.eachRendered(function(p){return i_(p,d.z,d.zlevel),!0})}}function u(h,f){f.eachRendered(function(d){if(!zc(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(zc(y))return;if(y instanceof Ue&&dK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var S=y.getTextContent(),w=y.getTextGuideLine();S&&(S.stateTransition=m),w&&(w.stateTransition=m)}y.__dirty&&a(y)}})}rE=function(h){return new(function(f){Y(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){fo(p,g),Hn(h)},d.prototype.leaveEmphasis=function(p,g){vo(p,g),Hn(h)},d.prototype.enterBlur=function(p){wj(p),Hn(h)},d.prototype.leaveBlur=function(p){$2(p),Hn(h)},d.prototype.enterSelect=function(p){Tj(p),Hn(h)},d.prototype.leaveSelect=function(p){Cj(p),Hn(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d.prototype.getMainProcessVersion=function(){return h[vg]},d}(wV))(h)},SF=function(h){function f(d,p){for(var g=0;g=0)){iE.push(r);var a=qV.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function BM(t,e){sT[t]=e}function ste(t){c4({createCanvas:t})}function LF(t,e,r){var n=uF("registerMap");n&&n(t,e,r)}function lte(t){var e=uF("getMap");return e&&e(t)}var PF=mJ;Es(kM,HJ);Es(h_,WJ);Es(h_,UJ);Es(kM,iee);Es(h_,aee);Es(vF,Eee);RM(CV);OM(Vee,KQ);BM("default",ZJ);Vi({type:jl,event:jl,update:jl},Rt);Vi({type:xm,event:xm,update:xm},Rt);Vi({type:wy,event:U2,update:wy,action:Rt,refineEvent:jM,publishNonRefinedEvent:!0});Vi({type:Nw,event:U2,update:Nw,action:Rt,refineEvent:jM,publishNonRefinedEvent:!0});Vi({type:Ty,event:U2,update:Ty,action:Rt,refineEvent:jM,publishNonRefinedEvent:!0});function jM(t,e,r,n){return{eventContent:{selected:lK(r),isFromClick:e.isFromClick||!1}}}NM("default",{});NM("dark",eF);var ute={},aE=[],cte={registerPreprocessor:RM,registerProcessor:OM,registerPostInit:TF,registerPostUpdate:CF,registerUpdateLifecycle:f_,registerAction:Vi,registerCoordinateSystem:MF,registerLayout:AF,registerVisual:Es,registerTransform:PF,registerLoading:BM,registerMap:LF,registerImpl:Nee,PRIORITY:pF,ComponentModel:Ve,ComponentView:gt,SeriesModel:ht,ChartView:st,registerComponentModel:function(t){Ve.registerClass(t)},registerComponentView:function(t){gt.registerClass(t)},registerSeriesModel:function(t){ht.registerClass(t)},registerChartView:function(t){st.registerClass(t)},registerCustomSeries:function(t,e){hF(t,e)},registerSubTypeDefaulter:function(t,e){Ve.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){U4(t,e)}};function Oe(t){if(ee(t)){R(t,function(e){Oe(e)});return}Ee(aE,t)>=0||(aE.push(t),me(t)&&(t={install:t}),t.install(cte))}function gf(t){return t==null?0:t.length||1}function oE(t){return t}var po=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||oE,this._newKeyGetter=i||oE,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d1)for(var s=0;s30}var mf=be,Po=re,gte=typeof Int32Array>"u"?Array:Int32Array,mte="e\0\0",sE=-1,yte=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],_te=["_approximateExtent"],lE,yg,yf,_f,N1,xf,R1,$r=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;DF(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Bn;if(l&&!i.pure)for(var u=[],c=e;c0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():mf(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,mf(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){mf(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;Ew(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){R(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Po(this.dimensions,this._getDimInfo,this),this.hostModel)),N1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(G0(arguments)))})},t.internalField=function(){lE=function(e){var r=e._invertedIndicesMap;R(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new gte(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function xte(t,e){return Ih(t,e).dimensions}function Ih(t,e){wM(t)||(t=TM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=de(),a=[],o=bte(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&NF(o),l=n===t.dimensionsDefine,u=l?EF(t):IF(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var h=de(c),f=new OV(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function bte(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return R(e,function(a){var o;be(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function wte(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Tte=function(){function t(e){this.coordSysDims=[],this.axisMap=de(),this.categoryAxisMap=de(),this.coordSysName=e}return t}();function Cte(t){var e=t.get("coordinateSystem"),r=new Tte(e),n=Mte[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Mte={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",kt).models[0],a=t.getReferringComponents("yAxis",kt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Zu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Zu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",kt).models[0];e.coordSysDims=["single"],r.set("single",i),Zu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",kt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Zu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Zu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Zu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",kt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Zu(t){return t.get("type")==="category"}function RF(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;Ate(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,h,f;if(R(a,function(_,S){se(_)&&(a[S]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;R(a,function(_){_.coordDim===d&&g++});var m={name:h,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(f,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function Ate(t){return!DF(t.schema)}function go(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function VM(t,e){return go(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Lte(t,e){var r=t.get("coordinateSystem"),n=Lh.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=jy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function Pte(t,e,r){var n,i;return r&&R(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function ka(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=TM(t)):(i=n.getSource(),a=i.sourceFormat===Bn);var o=Cte(e),s=Lte(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(_V,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Ih(i,c),f=Pte(h.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=RF(e,{schema:h,store:d}),g=new $r(h,e);g.setCalculationInfo(p);var m=f!=null&&kte(i)?function(y,_,S,w){return w===f?S:this.defaultDimValueGetter(y,_,S,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function kte(t){if(t.sourceFormat===Bn){var e=Dte(t.data||[]);return!ee(yh(e))}}function Dte(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=fv(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return Ete(l,t),a}function O1(t){var e=Math.pow(10,Y0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function fv(t){return Ai(t)+2}function uE(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Ete(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),uE(t,0,e),uE(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function FM(t,e){return t>=e[0]&&t<=e[1]}var Nte=function(){function t(){this.normalize=cE,this.scale=hE}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=cE,this.scale=hE)},t}();function cE(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function hE(t,e){return t*(e[1]-e[0])+e[0]}function uT(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Ns=function(){function t(e){this._calculator=new Nte,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();X0(Ns);var Rte=0,dv=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Rte,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,Ote);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=de(this.categories))},t}();function Ote(t){return be(t)&&t.value!=null?t.value:t+""}var ah=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new dv({})),ee(i)&&(i=new dv({categories:re(i,function(a){return be(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return FM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ns);Ns.registerClass(ah);var ko=Ht,mo=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return FM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=fv(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(h=ko(h+f*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:ko(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function jF(t){var e=jte(t),r=[];return R(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(WF(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),S=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:S,axisKey:GM(a),stackId:zF(n)})}),VF(r)}function VF(t){var e={};R(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=$e(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),R(a,function(y){var _=y.maxWidth,S=y.minWidth;if(y.width){var w=y.width;_&&(w=Math.min(w,_)),S&&(w=Math.max(w,S)),y.width=w,h-=w+c*w,f--}else{var w=d;_&&_w&&(w=S),w!==d&&(y.width=w,h-=w+c*w,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,g;R(a,function(y,_){y.width||(y.width=d),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;R(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function Vte(t,e,r){if(t&&e){var n=t[GM(e)];return n}}function FF(t,e){var r=BF(t,e),n=jF(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=zF(i),u=n[GM(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function GF(t){return{seriesType:t,plan:Ph(),reset:function(e){if(HF(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),h=go(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Fte(i,a),p=WF(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,w){for(var C=S.count,M=p&&ha(C*3),A=p&&l&&ha(C*3),k=p&&ha(C),E=n.master.getRect(),D=f?E.width:E.height,I,z=w.getStore(),O=0;(I=S.next())!=null;){var V=z.get(h?m:o,I),G=z.get(s,I),F=d,U=void 0;h&&(U=+V-z.get(o,I));var j=void 0,W=void 0,H=void 0,X=void 0;if(f){var K=n.dataToPoint([V,G]);if(h){var ne=n.dataToPoint([U,G]);F=ne[0]}j=F,W=K[1]+_,H=K[0]-F,X=y,Math.abs(H)0?r:1:r))}var Gte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=_g.length,s=Math.min(Gte(_g,this._approxInterval,0,o),o-1);this._interval=_g[s][1],this._intervalPrecision=fv(this._interval),this._minLevelUnit=_g[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+La(r)},e.prototype.contain=function(r){return FM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(mo),_g=[["second",sM],["minute",lM],["hour",Sd],["quarter-day",Sd*6],["half-day",Sd*12],["day",ti*1.2],["half-week",ti*3.5],["week",ti*7],["month",ti*31],["quarter",ti*95],["half-year",tI/2],["year",tI]];function UF(t,e,r,n){return Ly(new Date(e),t,n).getTime()===Ly(new Date(r),t,n).getTime()}function Hte(t,e){return t/=ti,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Wte(t){var e=30*ti;return t/=e,t>6?6:t>3?3:t>2?2:1}function Ute(t){return t/=Sd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function fE(t,e){return t/=e?lM:sM,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Zte(t){return O2(t,!0)}function $te(t,e,r){var n=Math.max(0,Ee(Tn,e)-1);return Ly(new Date(t),Tn[n],r).getTime()}function Yte(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Xte(t,e,r,n,i,a){var o=1e4,s=sQ,l=0;function u(O,V,G,F,U,j,W){for(var H=Yte(U,O),X=V,K=new Date(X);Xo));)if(K[U](K[F]()+O),X=K.getTime(),a){var ne=a.calcNiceTickMultiple(X,H);ne>0&&(K[U](K[F]()+ne*O),X=K.getTime())}W.push({value:X,notAdd:!0})}function c(O,V,G){var F=[],U=!V.length;if(!UF(bd(O),n[0],n[1],r)){U&&(V=[{value:$te(n[0],O,r)},{value:n[1]}]);for(var j=0;j=n[0]&&W<=n[1]&&u(X,W,H,K,ne,ie,F),O==="year"&&G.length>1&&j===0&&G.unshift({value:G[0].value-X})}}for(var j=0;j=n[0]&&w<=n[1]&&d++)}var C=i/e;if(d>C*1.5&&p>C/1.5||(h.push(_),d>C||t===s[g]))break}f=[]}}}for(var M=et(re(h,function(O){return et(O,function(V){return V.value>=n[0]&&V.value<=n[1]&&!V.notAdd})}),function(O){return O.length>0}),A=[],k=M.length-1,g=0;g0;)a*=10;var s=[hT(Kte(n[0]/a)*a),hT(qte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=fv(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=Sg(r)/Sg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=Sg(r)/Sg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),xg(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(mo);function bg(t,e){return hT(t,Ai(e))}Ns.registerClass(ZF);var Qte=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},t.prototype.modifyDataMinMax=function(e,r){this[ere[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Jte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Jte={min:"_determinedMin",max:"_determinedMax"},ere={min:"_dataMin",max:"_dataMax"};function $F(t,e,r){var n=t.rawExtentInfo;return n||(n=new Qte(t,e,r),t.rawExtentInfo=n,n)}function wg(t,e){return e==null?null:Dr(e)?NaN:t.parse(e)}function YF(t,e){var r=t.type,n=$F(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=BF("bar",o),l=!1;if(R(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=jF(s),c=tre(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function tre(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Vte(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;R(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;R(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=1-(s+l)/a,f=c/h-c;return e+=f*(l/u),t-=f*(s/u),{min:t,max:e}}function iu(t,e){var r=e,n=YF(t,r),i=n.extent,a=r.get("splitNumber");t instanceof ZF&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(qF(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function qv(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new ah({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new HM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Ns.getClass(e)||mo)}}function rre(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Eh(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=lQ(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(Vy(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(Vy(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Vy(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function WM(t){var e=t.get("interval");return e??"auto"}function XF(t){return t.type==="category"&&WM(t.getLabelModel())===0}function Fy(t,e){var r={};return R(t.mapDimensionsAll(e),function(n){r[VM(t,n)]=!0}),$e(r)}function nre(t,e,r){e&&R(Fy(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function oh(t){return t==="middle"||t==="center"}function vv(t){return t.getShallow("show")}function qF(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!ire(t.axis)?void 0:e}function ire(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Nh=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function are(t){return ka(null,t)}var ore={isDimensionStacked:go,enableDataStack:RF,getStackedDimension:VM};function sre(t,e){var r=e;e instanceof We||(r=new We(e));var n=qv(r);return n.setExtent(t[0],t[1]),iu(n,r),n}function lre(t){Bt(t,Nh)}function ure(t,e){return e=e||{},vt(t,null,null,e.state!=="normal")}const cre=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:xte,createList:are,createScale:sre,createSymbol:Ut,createTextStyle:ure,dataStack:ore,enableHoverEmphasis:hs,getECData:Le,getLayoutRect:bt,mixinAxisModelCommonMethods:lre},Symbol.toStringTag,{value:"Module"}));var hre=1e-8;function dE(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return dre(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return R(o,function(s){s.type==="polygon"?vE(s.exterior,i,a,r):R(s.points,function(l){vE(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function fT(t,e){return t=pre(t),re(et(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new pE(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new pE(l[0],l.slice(1)))});break;case"LineString":a.push(new gE([i.coordinates]));break;case"MultiLineString":a.push(new gE(i.coordinates))}var s=new QF(n[e||"name"],a,n.cp);return s.properties=n,s})}const gre=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Mw,asc:kn,getPercentWithPrecision:RX,getPixelPrecision:N2,getPrecision:Ai,getPrecisionSafe:X4,isNumeric:z2,isRadianAroundZero:Jc,linearMap:nt,nice:O2,numericToNumber:ba,parseDate:La,parsePercent:oe,quantile:_m,quantity:K4,quantityExponent:Y0,reformIntervals:Aw,remRadian:R2,round:Ht},Symbol.toStringTag,{value:"Module"})),mre=Object.freeze(Object.defineProperty({__proto__:null,format:$v,parse:La,roundTime:Ly},Symbol.toStringTag,{value:"Module"})),yre=Object.freeze(Object.defineProperty({__proto__:null,Arc:Wv,BezierCurve:bh,BoundingRect:Ce,Circle:Pa,CompoundPath:Uv,Ellipse:Hv,Group:_e,Image:pr,IncrementalDisplayable:zj,Line:Wt,LinearGradient:fu,Polygon:Or,Polyline:Tr,RadialGradient:q2,Rect:je,Ring:Sh,Sector:Rr,Text:Xe,clipPointsByRect:eM,clipRectByRect:Gj,createIcon:Th,extendPath:Vj,extendShape:jj,getShapeClass:av,getTransform:fs,initProps:St,makeImage:Q2,makePath:th,mergePath:An,registerShape:vi,resizePath:J2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),_re=Object.freeze(Object.defineProperty({__proto__:null,addCommas:pM,capitalFirst:mQ,encodeHTML:Ur,formatTime:gQ,formatTpl:mM,getTextRect:vQ,getTooltipMarker:aV,normalizeCssArray:Ah,toCamelCase:gM,truncateText:vq},Symbol.toStringTag,{value:"Module"})),xre=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:R,extend:J,filter:et,indexOf:Ee,inherits:M2,isArray:ee,isFunction:me,isObject:be,isString:se,map:re,merge:Ne,reduce:ui},Symbol.toStringTag,{value:"Module"}));var Sre=Fe(),Td=Fe(),Bi={estimate:1,determine:2};function Gy(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function eG(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function bre(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Eh(t),i=t.scale.getExtent(),a=eG(t,r),o=et(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?Tre(t,e):Mre(t)}function wre(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=eG(t,n);return{ticks:et(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?Cre(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function Tre(t,e){var r=t.getLabelModel(),n=tG(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function tG(t,e,r){var n=Lre(t),i=WM(e),a=r.kind===Bi.estimate;if(!a){var o=nG(n,i);if(o)return o}var s,l;me(i)?s=oG(t,i):(l=i==="auto"?Pre(t,r):i,s=aG(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return dT(n,i,u),!0}):dT(n,i,u),u}function Cre(t,e){var r=Are(t),n=WM(e),i=nG(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=oG(t,n,!0);else if(n==="auto"){var s=tG(t,t.getLabelModel(),Gy(Bi.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=aG(t,o,!0);return dT(r,n,{ticks:a,tickCategoryInterval:o})}function Mre(t){var e=t.scale.getTicks(),r=Eh(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Are=rG("axisTick"),Lre=rG("axisLabel");function rG(t){return function(r){return Td(r)[t]||(Td(r)[t]={list:[]})}}function nG(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var h=s[0],f=t.dataToCoord(h+1)-t.dataToCoord(h),d=Math.abs(f*Math.cos(a)),p=Math.abs(f*Math.sin(a)),g=0,m=0;h<=s[1];h+=u){var y=0,_=0,S=Z0(i({value:h}),n.font,"center","top");y=S.width*1.3,_=S.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var w=g/d,C=m/p;isNaN(w)&&(w=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(w,C)));if(r===Bi.estimate)return e.out.noPxChangeTryDetermine.push(le(Dre,null,t,M,l)),M;var A=iG(t,M,l);return A??M}function Dre(t,e,r){return iG(t,e,r)==null}function iG(t,e,r){var n=Sre(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function Ire(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function aG(t,e,r){var n=Eh(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=XF(t),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function oG(t,e,r){var n=t.scale,i=Eh(t),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var mE=[0,1],pi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return N2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),yE(n,i.count())),nt(e,mE,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),yE(n,i.count()));var a=nt(e,n,mE,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=wre(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Ere(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Gy(Bi.determine),bre(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Gy(Bi.determine),kre(this,e)},t}();function yE(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Ere(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;R(e,function(d){d.coord-=u/2,d.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var h=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function f(d,p){return d=Ht(d),p=Ht(p),h?d>p:di&&(i+=Sf);var d=Math.atan2(s,o);if(d<0&&(d+=Sf),d>=n&&d<=i||d+Sf>=n&&d+Sf<=i)return l[0]=c,l[1]=h,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,_=(p-o)*(p-o)+(g-s)*(g-s),S=(m-o)*(m-o)+(y-s)*(y-s);return _0){e=e/180*Math.PI,Li.fromArray(t[0]),yt.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(fa,Li,yt),Te.sub(la,Ft,yt);var r=fa.len(),n=la.len();if(!(r<.001||n<.001)){fa.scale(1/r),la.scale(1/n);var i=fa.dot(la),a=Math.cos(e);if(a1&&Te.copy(en,Ft),en.toArray(t[1])}}}}function Hre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Li.fromArray(t[0]),yt.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(fa,yt,Li),Te.sub(la,Ft,yt);var n=fa.len(),i=la.len();if(!(n<.001||i<.001)){fa.scale(1/n),la.scale(1/i);var a=fa.dot(e),o=Math.cos(r);if(a=l)Te.copy(en,Ft);else{en.scaleAndAdd(la,s/Math.tan(Math.PI/2-c));var h=Ft.x!==yt.x?(en.x-yt.x)/(Ft.x-yt.x):(en.y-yt.y)/(Ft.y-yt.y);if(isNaN(h))return;h<0?Te.copy(en,yt):h>1&&Te.copy(en,Ft)}en.toArray(t[1])}}}}function j1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function Wre(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Ya(n[0],n[1]),a=Ya(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=vd([],n[1],n[0],o/i),l=vd([],n[1],n[2],o/a),u=vd([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){w(D*E,0,a);var I=D+A;I<0&&C(-I*E,1)}else C(-A*E,1)}}function w(A,k,E){A!==0&&(c=!0);for(var D=k;D0)for(var I=0;I0;I--){var G=E[I-1]*V;w(-G,I,a)}}}function M(A){var k=A<0?-1:1;A=Math.abs(A);for(var E=Math.ceil(A/(a-1)),D=0;D0?w(E,0,D+1):w(-E,a-D-1,a),A-=E,A<=0)return}return c}function $re(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ee(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!Ch(n).valueAnimation){var h=pe(n.style.opacity,1);n.style.opacity=0,St(n,{style:{opacity:h}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};Tg(d,u,Cg),Tg(d,n.states.select,Cg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};Tg(p,u,Cg),Tg(p,n.states.emphasis,Cg)}Yj(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=qre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,St(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),G1=Fe();function Qre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=G1(r).labelManager;i||(i=G1(r).labelManager=new Kre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=G1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var H1=Math.sin,W1=Math.cos,dG=Math.PI,ul=Math.PI*2,Jre=180/dG,vG=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=Yo(h-ul)||(c?u>=ul:-u>=ul),d=u>0?u%ul:u%ul+ul,p=!1;f?p=!0:Yo(h)?p=!1:p=d>=dG==!!c;var g=e+n*W1(o),m=r+i*H1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Jre);if(f){var _=1/this._p,S=(c?1:-1)*(ul-_);this._add("A",n,i,y,1,+c,e+n*W1(o+S),r+i*H1(o+S)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var w=e+n*W1(s),C=r+i*H1(s);this._add("A",n,i,y,+p,+c,w,C)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],h=this._p,f=1;f"}function lne(t){return""}function YM(t,e){e=e||{};var r=e.newline?` +`];function Kt(t,e){return e.type=t,e}function Kw(t){return t.type==="section"}function GV(t){return Kw(t)?MJ:AJ}function HV(t){if(Kw(t)){var e=0,r=t.blocks.length,n=r>1||r>0&&!t.noHeader;return R(t.blocks,function(i){var a=HV(i);a>=e&&(e=a+ +(n&&(!a||Kw(i)&&!i.noHeader)))}),e}return 0}function MJ(t,e,r,n){var i=e.noHeader,a=LJ(HV(e)),o=[],s=e.blocks||[];Er(!s||ee(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(he(u,l)){var c=new RV(u[l],null);s.sort(function(g,m){return c.evaluate(g.sortParam,m.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(g,m){var y=e.valueFormatter,_=GV(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);_!=null&&o.push(_)});var h=t.renderMode==="richText"?o.join(a.richText):Qw(n,o.join(""),i?r:a.html);if(i)return h;var f=Uw(e.header,"ordinal",t.useUTC),d=FV(n,t.renderMode).nameStyle,p=VV(n);return t.renderMode==="richText"?WV(t,f,d)+a.richText+h:Qw(n,'
'+Ur(f)+"
"+h,r)}function AJ(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(w){return w=ee(w)?w:[w],re(w,function(C,M){return Uw(C,ee(d)?d[M]:d,u)})};if(!(a&&o)){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||q.color.secondary,i),f=a?"":Uw(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=FV(n,i),_=y.nameStyle,b=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":WV(t,f,_))+(o?"":DJ(t,p,g,m,b)):Qw(n,(s?"":h)+(a?"":PJ(f,!s,_))+(o?"":kJ(p,g,m,b)),r)}}function PI(t,e,r,n,i,a){if(t){var o=GV(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function LJ(t){return{html:TJ[t],richText:CJ[t]}}function Qw(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=VV(t);return'
'+e+n+"
"}function PJ(t,e,r){var n=e?"margin-left:2px":"";return''+Ur(t)+""}function kJ(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=ee(t)?t:[t],''+re(t,function(o){return Ur(o)}).join("  ")+""}function WV(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function DJ(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(ee(e)?e.join(" "):e,a)}function UV(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return ru(n)}function ZV(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var M1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=J4()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=oV({color:r,type:e,renderMode:n,markerId:i});return se(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};ee(r)?R(r,function(a){return J(n,a)}):J(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function $V(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=ee(s),u=UV(e,r),c,h,f,d;if(o>1||l&&!o){var p=IJ(s,e,r,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=nh(i,r,a[0]),h=g.type}else d=c=l?s[0]:s;var m=z2(e),y=m&&e.name||"",_=i.getName(r),b=n?y:_;return Kt("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[Kt("nameValue",{markerType:"item",markerColor:u,name:b,noName:!Pn(b),value:c,valueType:h,dataIndex:r})].concat(f||[])})}function IJ(t,e,r,n,i){var a=e.getData(),o=ui(t,function(h,f,d){var p=a.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(h){c(nh(a,r,h),h)}):R(t,c);function c(h,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Lo=Fe();function dg(t,e){return t.getName(e)||t.getId(e)}var Lm="__universalTransitionEnabled",ht=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=wd({count:EJ,reset:RJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Lo(this).sourceManager=new jV(this);a.prepareSource();var o=this.getInitialData(r,i);DI(o,this),this.dataTask.context.data=o,Lo(this).dataBeforeProcessed=o,kI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=lv(this),a=i?du(r):{},o=this.subType;Ve.hasClass(o)&&(o+="Series"),Ee(r,n.getTheme().get(this.subType)),Ee(r,this.getDefaultOption()),ql(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ta(r,a,i)},e.prototype.mergeOption=function(r,n){r=Ee(this.option,r,!0),this.fillDataTextStyle(r.data);var i=lv(this);i&&Ta(this.option,r,i);var a=Lo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);DI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Lo(this).dataBeforeProcessed=o,kI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!nn(r))for(var n=["show"],i=0;i=0&&f<0)&&(h=_,f=y,d=0),y===f&&(c[d++]=g))}),c.length=d,c},e.prototype.formatTooltip=function(r,n,i){return $V({series:this,dataIndex:r,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var r=this.ecModel;if(Ze.node&&!(r&&r.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=xM.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[dg(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Lm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Se(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Ve.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Ve);Bt(ht,u_);Bt(ht,xM);uj(ht,Ve);function kI(t){var e=t.name;z2(t)||(t.name=NJ(t)||e)}function NJ(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return R(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function EJ(t){return t.model.getRawData().count()}function RJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),OJ}function OJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function DI(t,e){R(qc(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(zJ,e))})}function zJ(t,e){var r=Jw(t);return r&&r.setOutputEnd((e||this).count()),e}function Jw(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}var gt=function(){function t(){this.group=new _e,this.uid=Mh("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();j2(gt);q0(gt);function Ph(){var t=Fe();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var YV=Fe(),BJ=Ph(),st=function(){function t(){this.group=new _e,this.uid=Mh("viewChart"),this.renderTask=wd({plan:jJ,reset:VJ}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&NI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&NI(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){ks(this.group,e)},t.markUpdateMethod=function(e,r){YV(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function II(t,e,r){t&&av(t)&&(e==="emphasis"?fo:vo)(t,r)}function NI(t,e,r){var n=Kl(t,e),i=e&&e.highlightKey!=null?fK(e.highlightKey):null;n!=null?R(pt(n),function(a){II(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){II(a,r,i)})}j2(st);q0(st);function jJ(t){return BJ(t.model)}function VJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&YV(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),FJ[l]}var FJ={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Iy="\0__throttleOriginMethod",EI="\0__throttleRate",RI="\0__throttleType";function h_(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function h(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var f=function(){for(var d=[],p=0;p=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function kh(t,e,r,n){var i=t[e];if(i){var a=i[Iy]||i,o=i[RI],s=i[EI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=h_(a,r,n==="debounce"),i[Iy]=a,i[RI]=n,i[EI]=r}return i}}function cv(t,e){var r=t[e];r&&r[Iy]&&(r.clear&&r.clear(),t[e]=r[Iy])}var OI=Fe(),zI={itemStyle:Ql(Kj,!0),lineStyle:Ql(qj,!0)},GJ={lineStyle:"stroke",itemStyle:"fill"};function XV(t,e){var r=t.visualStyleMapper||zI[e];return r||(console.warn("Unknown style type '"+e+"'."),zI.itemStyle)}function qV(t,e){var r=t.visualDrawType||GJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var HJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=XV(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=qV(t,n),u=o[l],c=me(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=t.getDataParams(p),m=J({},o);m[l]=c(g),d.setItemVisual(p,"style",m)}}}},vf=new We,WJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=XV(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){vf.option=l[n];var u=i(vf),c=o.ensureUniqueItemVisual(s,"style");J(c,u),vf.option.decal&&(o.setItemVisual(s,"decal",vf.option.decal),vf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},UJ={performRawSeries:!0,overallReset:function(t){var e=de();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),OI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=OI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=qV(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();f[l]=r.getColorFromPalette(d,o,p)}})}})}},vg=Math.PI;function ZJ(t,e){e=e||{},be(e,{text:"loading",textColor:q.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var r=new _e,n=new Be({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Xe({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Be({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new Zv({shape:{startAngle:-vg/2,endAngle:-vg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:vg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:vg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var KV=function(){function t(e,r,n,i){this._stageTaskMap=de(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=de();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;R(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Er(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;R(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);p.each(function(m){m.perform(g)}),f.perform(g)&&(a=!0)}else h&&h.each(function(m,y){s(i,m)&&m.dirty();var _=o.getPerformArgs(m,i.block);_.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(_)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=de(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||wd({plan:KJ,reset:QJ,count:eee}));d.context={model:h,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||wd({reset:$J});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=de(),u=e.seriesType,c=e.getTargetSeries,h=!0,f=!1,d="";Er(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,R(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(f=!0,wd({reset:YJ,onDirty:qJ})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,a._pipe(g,y)}f&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return me(e)&&(e={overallReset:e,seriesType:tee(e)}),e.uid=Mh("stageHandler"),r&&(e.visualType=r),e},t}();function $J(t){t.overallReset(t.ecModel,t.api,t.payload)}function YJ(t){return t.overallProgress&&XJ}function XJ(){this.agent.dirty(),this.getDownstream().dirty()}function qJ(){this.agent&&this.agent.dirty()}function KJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function QJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=pt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return QV(n)}):JJ}var JJ=QV(0);function QV(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(r.mainType=p,r[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),eT=["symbol","symbolSize","symbolRotate","symbolOffset"],jI=eT.concat(["symbolKeepAspect"]),iee={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Il(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function tT(t,e,r){for(var n=e.type==="radial"?_ee(t,e,r):yee(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:qe(t)?[t]:ee(t)?t:null}function AM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&bee(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=re(r,function(a){return a/i}),n/=i)}return[r,n]}var See=new wa(!0);function Ry(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function VI(t){return typeof t=="string"&&t!=="none"}function Oy(t){var e=t.fill;return e!=null&&e!=="none"}function FI(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function GI(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function rT(t,e,r){var n=V2(e.image,e.__image,r);if(K0(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*fd),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function wee(t,e,r,n){var i,a=Ry(r),o=Oy(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||See,h=e.__dirty;if(!n){var f=r.fill,d=r.stroke,p=o&&!!f.colorStops,g=a&&!!d.colorStops,m=o&&!!f.image,y=a&&!!d.image,_=void 0,b=void 0,w=void 0,C=void 0,M=void 0;(p||g)&&(M=e.getBoundingRect()),p&&(_=h?tT(t,f,M):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(b=h?tT(t,d,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),m&&(w=h||!e.__canvasFillPattern?rT(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=w),y&&(C=h||!e.__canvasStrokePattern?rT(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),p?t.fillStyle=_:m&&(w?t.fillStyle=w:o=!1),g?t.strokeStyle=b:y&&(C?t.strokeStyle=C:a=!1)}var A=e.getGlobalScale();c.setScale(A[0],A[1],e.segmentIgnoreThreshold);var k,N;t.setLineDash&&r.lineDash&&(i=AM(e),k=i[0],N=i[1]);var D=!0;(u||h&ic)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(t,l?s:1),k&&(t.setLineDash(k),t.lineDashOffset=N),n||(r.strokeFirst?(a&&GI(t,r),o&&FI(t,r)):(o&&FI(t,r),a&&GI(t,r))),k&&t.setLineDash([])}function Tee(t,e,r){var n=e.__image=V2(r.image,e.__image,e,e.onload);if(!(!n||!K0(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,c=r.sy||0;t.drawImage(n,u,c,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,c=r.sy,h=o-u,f=s-c;t.drawImage(n,u,c,h,f,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function Cee(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||co,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=AM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Ry(r)&&t.strokeText(i,r.x,r.y),Oy(r)&&t.fillText(i,r.x,r.y)):(Oy(r)&&t.fillText(i,r.x,r.y),Ry(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var HI=["shadowBlur","shadowOffsetX","shadowOffsetY"],WI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function iF(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){pn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?zl.opacity:o}(n||e.blend!==r.blend)&&(a||(pn(t,i),a=!0),t.globalCompositeOperation=e.blend||zl.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[er]){if(this._disposed){this.id;return}var a,o,s;if(Se(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,Wu(this),!this._model||n){var l=new jQ(this._api),u=this._theme,c=this._model=new bM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},oT);var h={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:h},this[er]=!1,this.getZr().wakeUp();else{try{ol(this),za.update.call(this,null,h)}catch(f){throw this[yr]=null,this[er]=!1,f}this._ssr||this._zr.flush(),this[yr]=null,this[er]=!1,Gu.call(this,a),Hu.call(this,a)}}},e.prototype.setTheme=function(r,n){if(!this[er]){if(this._disposed){this.id;return}var i=this._model;if(i){var a=n&&n.silent,o=null;this[yr]&&(a==null&&(a=this[yr].silent),o=this[yr].updateParams,this[yr]=null),this[er]=!0,Wu(this);try{this._updateTheme(r),i.setTheme(this._theme),ol(this),za.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Gu.call(this,a),Hu.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=wF[r]),r&&(r=ye(r),r&&MV(r,!0),this._theme=r)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ze.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){var r=this._zr,n=r.storage.getDisplayList();return R(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;R(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return R(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Vy[i]){var l=s,u=s,c=-s,h=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Vl,function(b,w){if(b.group===i){var C=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(ye(r)),M=b.getDom().getBoundingClientRect();l=a(M.left,l),u=a(M.top,u),c=o(M.right,c),h=o(M.bottom,h),f.push({dom:C,left:M.left,top:M.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,g=h-u,m=bn.createCanvas(),y=Tw(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(f,function(b){var w=b.left-l,C=b.top-u;_+=''+b.dom+""}),y.painter.getSvgRoot().innerHTML=_,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Be({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(f,function(b){var w=new pr({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});y.add(w)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return yg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return yg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return yg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Oc(i,r);return R(o,function(s,l){l.indexOf("Models")>=0&&R(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Oc(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?MM(s,l,n):Kv(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;R(Kee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Dl(l,function(g){var m=Le(g);if(m&&m.dataIndex!=null){var y=m.dataModel||s.getSeriesByIndex(m.seriesIndex);return u=y&&y.getDataParams(m.dataIndex,m.dataType,l)||{},!0}else if(m.eventData)return u=J({},m.eventData),!0},!0),u){var h=u.componentType,f=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",f=u.seriesIndex);var d=h&&f!=null&&s.getComponent(h,f),p=d&&r[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];u.event=o,u.type=i,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:d,view:p},r.trigger(i,u)}};a.zrEventfulCallAtLast=!0,r._zr.on(i,a,r)});var n=this._messageCenter;R(iT,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),oee(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&oj(this.getDom(),DM,"");var n=this,i=n._api,a=n._model;R(n._componentsViews,function(o){o.dispose(a,i)}),R(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Vl[n.id]},e.prototype.resize=function(r){if(!this[er]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[yr]&&(a==null&&(a=this[yr].silent),i=!0,this[yr]=null),this[er]=!0,Wu(this);try{i&&ol(this),za.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Gu.call(this,a),Hu.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(Se(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!sT[r]){var i=sT[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=J({},r);return n.type=nT[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(Se(n)||(n={silent:!!n}),!!By[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;I1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),Gu.call(this,i),Hu.call(this,i)}},e.prototype.updateLabelLayout=function(){Si.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ol=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),k1(h,!0),k1(h,!1),f.plan()},k1=function(h,f){for(var d=h._model,p=h._scheduler,g=f?h._componentsViews:h._chartsViews,m=f?h._componentsMap:h._chartsMap,y=h._zr,_=h._api,b=0;bf.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&f.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=h._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function l(h,f){if(!h.preventAutoZ){var d=tu(h);f.eachRendered(function(p){return a_(p,d.z,d.zlevel),!0})}}function u(h,f){f.eachRendered(function(d){if(!zc(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(zc(y))return;if(y instanceof Ue&&dK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var b=y.getTextContent(),w=y.getTextGuideLine();b&&(b.stateTransition=m),w&&(w.stateTransition=m)}y.__dirty&&a(y)}})}nN=function(h){return new(function(f){Y(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){fo(p,g),Hn(h)},d.prototype.leaveEmphasis=function(p,g){vo(p,g),Hn(h)},d.prototype.enterBlur=function(p){Tj(p),Hn(h)},d.prototype.leaveBlur=function(p){Z2(p),Hn(h)},d.prototype.enterSelect=function(p){Cj(p),Hn(h)},d.prototype.leaveSelect=function(p){Mj(p),Hn(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d.prototype.getMainProcessVersion=function(){return h[gg]},d}(TV))(h)},SF=function(h){function f(d,p){for(var g=0;g=0)){aN.push(r);var a=KV.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function zM(t,e){sT[t]=e}function ste(t){h4({createCanvas:t})}function PF(t,e,r){var n=cF("registerMap");n&&n(t,e,r)}function lte(t){var e=cF("getMap");return e&&e(t)}var kF=mJ;Is(PM,HJ);Is(f_,WJ);Is(f_,UJ);Is(PM,iee);Is(f_,aee);Is(pF,Nee);EM(MV);RM(Vee,KQ);zM("default",ZJ);Vi({type:Bl,event:Bl,update:Bl},Rt);Vi({type:Sm,event:Sm,update:Sm},Rt);Vi({type:Cy,event:W2,update:Cy,action:Rt,refineEvent:BM,publishNonRefinedEvent:!0});Vi({type:Ew,event:W2,update:Ew,action:Rt,refineEvent:BM,publishNonRefinedEvent:!0});Vi({type:My,event:W2,update:My,action:Rt,refineEvent:BM,publishNonRefinedEvent:!0});function BM(t,e,r,n){return{eventContent:{selected:lK(r),isFromClick:e.isFromClick||!1}}}NM("default",{});NM("dark",tF);var ute={},oN=[],cte={registerPreprocessor:EM,registerProcessor:RM,registerPostInit:CF,registerPostUpdate:MF,registerUpdateLifecycle:d_,registerAction:Vi,registerCoordinateSystem:AF,registerLayout:LF,registerVisual:Is,registerTransform:kF,registerLoading:zM,registerMap:PF,registerImpl:Eee,PRIORITY:gF,ComponentModel:Ve,ComponentView:gt,SeriesModel:ht,ChartView:st,registerComponentModel:function(t){Ve.registerClass(t)},registerComponentView:function(t){gt.registerClass(t)},registerSeriesModel:function(t){ht.registerClass(t)},registerChartView:function(t){st.registerClass(t)},registerCustomSeries:function(t,e){fF(t,e)},registerSubTypeDefaulter:function(t,e){Ve.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Z4(t,e)}};function Oe(t){if(ee(t)){R(t,function(e){Oe(e)});return}Ne(oN,t)>=0||(oN.push(t),me(t)&&(t={install:t}),t.install(cte))}function gf(t){return t==null?0:t.length||1}function sN(t){return t}var po=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||sN,this._newKeyGetter=i||sN,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d1)for(var s=0;s30}var mf=Se,Po=re,gte=typeof Int32Array>"u"?Array:Int32Array,mte="e\0\0",lN=-1,yte=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],_te=["_approximateExtent"],uN,xg,yf,_f,R1,xf,O1,$r=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,i=!1;IF(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Bn;if(l&&!i.pure)for(var u=[],c=e;c0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),ee(a)?a=a.slice():mf(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,mf(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){mf(e)?J(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?J(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;Nw(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){R(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Po(this.dimensions,this._getDimInfo,this),this.hostModel)),R1(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(H0(arguments)))})},t.internalField=function(){uN=function(e){var r=e._invertedIndicesMap;R(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new gte(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function xte(t,e){return Ih(t,e).dimensions}function Ih(t,e){SM(t)||(t=wM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=de(),a=[],o=Ste(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&RF(o),l=n===t.dimensionsDefine,u=l?EF(t):NF(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var h=de(c),f=new zV(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function Ste(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return R(e,function(a){var o;Se(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function wte(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Tte=function(){function t(e){this.coordSysDims=[],this.axisMap=de(),this.categoryAxisMap=de(),this.coordSysName=e}return t}();function Cte(t){var e=t.get("coordinateSystem"),r=new Tte(e),n=Mte[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Mte={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",kt).models[0],a=t.getReferringComponents("yAxis",kt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Uu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Uu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",kt).models[0];e.coordSysDims=["single"],r.set("single",i),Uu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",kt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Uu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Uu(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];r.set(c,u),Uu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",kt).models[0];e.coordSysDims=["x","y"];var a=i.getDimensionModel("x"),o=i.getDimensionModel("y");r.set("x",a),r.set("y",o),n.set("x",a),n.set("y",o)}};function Uu(t){return t.get("type")==="category"}function OF(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;Ate(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,h,f;if(R(a,function(_,b){se(_)&&(a[b]=_={name:_}),l&&!_.isExtraCoord&&(!n&&!u&&_.ordinalMeta&&(u=_),!c&&_.type!=="ordinal"&&_.type!=="time"&&(!i||i===_.coordDim)&&(c=_))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;R(a,function(_){_.coordDim===d&&g++});var m={name:h,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(f,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function Ate(t){return!IF(t.schema)}function go(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function jM(t,e){return go(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Lte(t,e){var r=t.get("coordinateSystem"),n=Lh.get(r),i;return e&&e.coordSysDims&&(i=re(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=Fy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function Pte(t,e,r){var n,i;return r&&R(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function ka(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=wM(t)):(i=n.getSource(),a=i.sourceFormat===Bn);var o=Cte(e),s=Lte(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(xV,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Ih(i,c),f=Pte(h.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=OF(e,{schema:h,store:d}),g=new $r(h,e);g.setCalculationInfo(p);var m=f!=null&&kte(i)?function(y,_,b,w){return w===f?b:this.defaultDimValueGetter(y,_,b,w)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function kte(t){if(t.sourceFormat===Bn){var e=Dte(t.data||[]);return!ee(yh(e))}}function Dte(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=dv(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return Nte(l,t),a}function z1(t){var e=Math.pow(10,X0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function dv(t){return Ai(t)+2}function cN(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Nte(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),cN(t,0,e),cN(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function VM(t,e){return t>=e[0]&&t<=e[1]}var Ete=function(){function t(){this.normalize=hN,this.scale=fN}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=hN,this.scale=fN)},t}();function hN(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function fN(t,e){return t*(e[1]-e[0])+e[0]}function uT(t,e,r){var n=Math.log(t);return[Math.log(r?e[0]:Math.max(0,e[0]))/n,Math.log(r?e[1]:Math.max(0,e[1]))/n]}var Ns=function(){function t(e){this._calculator=new Ete,this._setting=e||{},this._extent=[1/0,-1/0];var r=Xt();r&&(this._brkCtx=r.createScaleBreakContext(),this._brkCtx.update(this._extent))}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var r=this._extent;this._innerSetExtent(e[0]r[1]?e[1]:r[1])},t.prototype.unionExtentFromData=function(e,r){this._innerUnionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){this._innerSetExtent(e,r)},t.prototype._innerSetExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r),this._brkCtx&&this._brkCtx.update(n)},t.prototype.setBreaksFromOption=function(e){var r=Xt();r&&this._innerSetBreak(r.parseAxisBreakOption(e,le(this.parse,this)))},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();q0(Ns);var Rte=0,vv=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Rte,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,Ote);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!se(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,this._onCollect&&this._onCollect(e,r),r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r),this._onCollect&&this._onCollect(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=de(this.categories))},t}();function Ote(t){return Se(t)&&t.value!=null?t.value:t+""}var ah=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new vv({})),ee(i)&&(i=new vv({categories:re(i,function(a){return Se(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:se(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return VM(r,this._extent)&&r>=0&&r=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Ns);Ns.registerClass(ah);var ko=Ht,mo=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r==null||r===""?NaN:Number(r)},e.prototype.contain=function(r){return VM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=dv(r)},e.prototype.getTicks=function(r){r=r||{};var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=Xt(),l=[];if(!n)return l;if(r.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;i[0]=0&&(h=ko(h+f*n,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var d=l.length?l[l.length-1].value:a[1];return i[1]>d&&(r.expandToNicedExtent?l.push({value:ko(d+n,o)}):l.push({value:i[1]})),s&&s.pruneTicksByBreak(r.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),r.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks({expandToNicedExtent:!0}),i=[],a=this.getExtent(),o=1;oa[0]&&p0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function VF(t){var e=jte(t),r=[];return R(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=oe(n.get("barWidth"),s),g=oe(n.get("barMaxWidth"),s),m=oe(n.get("barMinWidth")||(UF(n)?.5:1),s),y=n.get("barGap"),_=n.get("barCategoryGap"),b=n.get("defaultBarGap");r.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:_,defaultBarGap:b,axisKey:FM(a),stackId:BF(n)})}),FF(r)}function FF(t){var e={};R(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=$e(a).length;s=Math.max(35-l*4,15)+"%"}var u=oe(s,o),c=oe(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),R(a,function(y){var _=y.maxWidth,b=y.minWidth;if(y.width){var w=y.width;_&&(w=Math.min(w,_)),b&&(w=Math.max(w,b)),y.width=w,h-=w+c*w,f--}else{var w=d;_&&_w&&(w=b),w!==d&&(y.width=w,h-=w+c*w,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,g;R(a,function(y,_){y.width||(y.width=d),g=y,p+=y.width*(1+c)}),g&&(p-=g.width*c);var m=-p/2;R(a,function(y,_){r[i][_]=r[i][_]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+c)})}),r}function Vte(t,e,r){if(t&&e){var n=t[FM(e)];return n}}function GF(t,e){var r=jF(t,e),n=VF(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=BF(i),u=n[FM(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function HF(t){return{seriesType:t,plan:Ph(),reset:function(e){if(WF(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),c=r.getCalculationInfo("stackResultDimension"),h=go(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Fte(i,a),p=UF(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(b,w){for(var C=b.count,M=p&&ha(C*3),A=p&&l&&ha(C*3),k=p&&ha(C),N=n.master.getRect(),D=f?N.width:N.height,I,z=w.getStore(),O=0;(I=b.next())!=null;){var V=z.get(h?m:o,I),G=z.get(s,I),F=d,Z=void 0;h&&(Z=+V-z.get(o,I));var j=void 0,W=void 0,H=void 0,X=void 0;if(f){var K=n.dataToPoint([V,G]);if(h){var ne=n.dataToPoint([Z,G]);F=ne[0]}j=F,W=K[1]+_,H=K[0]-F,X=y,Math.abs(H)0?r:1:r))}var Gte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=bg.length,s=Math.min(Gte(bg,this._approxInterval,0,o),o-1);this._interval=bg[s][1],this._intervalPrecision=dv(this._interval),this._minLevelUnit=bg[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+La(r)},e.prototype.contain=function(r){return VM(r,this._extent)},e.prototype.normalize=function(r){return this._calculator.normalize(r,this._extent)},e.prototype.scale=function(r){return this._calculator.scale(r,this._extent)},e.type="time",e}(mo),bg=[["second",oM],["minute",sM],["hour",bd],["quarter-day",bd*6],["half-day",bd*12],["day",ti*1.2],["half-week",ti*3.5],["week",ti*7],["month",ti*31],["quarter",ti*95],["half-year",rI/2],["year",rI]];function ZF(t,e,r,n){return ky(new Date(e),t,n).getTime()===ky(new Date(r),t,n).getTime()}function Hte(t,e){return t/=ti,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Wte(t){var e=30*ti;return t/=e,t>6?6:t>3?3:t>2?2:1}function Ute(t){return t/=bd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function dN(t,e){return t/=e?sM:oM,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Zte(t){return R2(t,!0)}function $te(t,e,r){var n=Math.max(0,Ne(Tn,e)-1);return ky(new Date(t),Tn[n],r).getTime()}function Yte(t,e){var r=new Date(0);r[t](1);var n=r.getTime();r[t](1+e);var i=r.getTime()-n;return function(a,o){return Math.max(0,Math.round((o-a)/i))}}function Xte(t,e,r,n,i,a){var o=1e4,s=sQ,l=0;function u(O,V,G,F,Z,j,W){for(var H=Yte(Z,O),X=V,K=new Date(X);Xo));)if(K[Z](K[F]()+O),X=K.getTime(),a){var ne=a.calcNiceTickMultiple(X,H);ne>0&&(K[Z](K[F]()+ne*O),X=K.getTime())}W.push({value:X,notAdd:!0})}function c(O,V,G){var F=[],Z=!V.length;if(!ZF(Sd(O),n[0],n[1],r)){Z&&(V=[{value:$te(n[0],O,r)},{value:n[1]}]);for(var j=0;j=n[0]&&W<=n[1]&&u(X,W,H,K,ne,ie,F),O==="year"&&G.length>1&&j===0&&G.unshift({value:G[0].value-X})}}for(var j=0;j=n[0]&&w<=n[1]&&d++)}var C=i/e;if(d>C*1.5&&p>C/1.5||(h.push(_),d>C||t===s[g]))break}f=[]}}}for(var M=et(re(h,function(O){return et(O,function(V){return V.value>=n[0]&&V.value<=n[1]&&!V.notAdd})}),function(O){return O.length>0}),A=[],k=M.length-1,g=0;g0;)a*=10;var s=[hT(Kte(n[0]/a)*a),hT(qte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=dv(a),this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){t.prototype.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.contain=function(r){return r=wg(r)/wg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=wg(r)/wg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),Sg(this.base,r)},e.prototype.setBreaksFromOption=function(r){var n=Xt();if(n){var i=n.logarithmicParseBreaksFromOption(r,this.base,le(this.parse,this)),a=i.parsedOriginal,o=i.parsedLogged;this._originalScale._innerSetBreak(a),this._innerSetBreak(o)}},e.type="log",e}(mo);function Tg(t,e){return hT(t,Ai(e))}Ns.registerClass($F);var Qte=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},t.prototype.modifyDataMinMax=function(e,r){this[ere[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Jte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Jte={min:"_determinedMin",max:"_determinedMax"},ere={min:"_dataMin",max:"_dataMax"};function YF(t,e,r){var n=t.rawExtentInfo;return n||(n=new Qte(t,e,r),t.rawExtentInfo=n,n)}function Cg(t,e){return e==null?null:Dr(e)?NaN:t.parse(e)}function XF(t,e){var r=t.type,n=YF(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=jF("bar",o),l=!1;if(R(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=VF(s),c=tre(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function tre(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Vte(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;R(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;R(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=1-(s+l)/a,f=c/h-c;return e+=f*(l/u),t-=f*(s/u),{min:t,max:e}}function nu(t,e){var r=e,n=XF(t,r),i=n.extent,a=r.get("splitNumber");t instanceof $F&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(KF(r)),t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function Qv(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new ah({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new GM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Ns.getClass(e)||mo)}}function rre(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Nh(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=lQ(e);return function(i,a){return t.scale.getFormattedLabel(i,a,r)}}else{if(se(e))return function(i){var a=t.scale.getLabel(i),o=e.replace("{value}",a??"");return o};if(me(e)){if(t.type==="category")return function(i,a){return e(Gy(t,i),i.value-t.scale.getExtent()[0],null)};var n=Xt();return function(i,a){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,i.break)),e(Gy(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Gy(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function HM(t){var e=t.get("interval");return e??"auto"}function qF(t){return t.type==="category"&&HM(t.getLabelModel())===0}function Hy(t,e){var r={};return R(t.mapDimensionsAll(e),function(n){r[jM(t,n)]=!0}),$e(r)}function nre(t,e,r){e&&R(Hy(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function oh(t){return t==="middle"||t==="center"}function pv(t){return t.getShallow("show")}function KF(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!ire(t.axis)?void 0:e}function ire(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Eh=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function are(t){return ka(null,t)}var ore={isDimensionStacked:go,enableDataStack:OF,getStackedDimension:jM};function sre(t,e){var r=e;e instanceof We||(r=new We(e));var n=Qv(r);return n.setExtent(t[0],t[1]),nu(n,r),n}function lre(t){Bt(t,Eh)}function ure(t,e){return e=e||{},vt(t,null,null,e.state!=="normal")}const cre=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:xte,createList:are,createScale:sre,createSymbol:Ut,createTextStyle:ure,dataStack:ore,enableHoverEmphasis:cs,getECData:Le,getLayoutRect:St,mixinAxisModelCommonMethods:lre},Symbol.toStringTag,{value:"Module"}));var hre=1e-8;function vN(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return dre(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return R(o,function(s){s.type==="polygon"?pN(s.exterior,i,a,r):R(s.points,function(l){pN(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function fT(t,e){return t=pre(t),re(et(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new gN(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new gN(l[0],l.slice(1)))});break;case"LineString":a.push(new mN([i.coordinates]));break;case"MultiLineString":a.push(new mN(i.coordinates))}var s=new JF(n[e||"name"],a,n.cp);return s.properties=n,s})}const gre=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Mw,asc:kn,getPercentWithPrecision:RX,getPixelPrecision:N2,getPrecision:Ai,getPrecisionSafe:q4,isNumeric:O2,isRadianAroundZero:Jc,linearMap:nt,nice:R2,numericToNumber:Sa,parseDate:La,parsePercent:oe,quantile:bm,quantity:Q4,quantityExponent:X0,reformIntervals:Aw,remRadian:E2,round:Ht},Symbol.toStringTag,{value:"Module"})),mre=Object.freeze(Object.defineProperty({__proto__:null,format:Xv,parse:La,roundTime:ky},Symbol.toStringTag,{value:"Module"})),yre=Object.freeze(Object.defineProperty({__proto__:null,Arc:Zv,BezierCurve:Sh,BoundingRect:Ce,Circle:Pa,CompoundPath:$v,Ellipse:Uv,Group:_e,Image:pr,IncrementalDisplayable:Bj,Line:Wt,LinearGradient:hu,Polygon:Or,Polyline:Tr,RadialGradient:X2,Rect:Be,Ring:bh,Sector:Rr,Text:Xe,clipPointsByRect:J2,clipRectByRect:Hj,createIcon:Th,extendPath:Fj,extendShape:Vj,getShapeClass:ov,getTransform:hs,initProps:bt,makeImage:K2,makePath:th,mergePath:An,registerShape:vi,resizePath:Q2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),_re=Object.freeze(Object.defineProperty({__proto__:null,addCommas:vM,capitalFirst:mQ,encodeHTML:Ur,formatTime:gQ,formatTpl:gM,getTextRect:vQ,getTooltipMarker:oV,normalizeCssArray:Ah,toCamelCase:pM,truncateText:vq},Symbol.toStringTag,{value:"Module"})),xre=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:be,each:R,extend:J,filter:et,indexOf:Ne,inherits:C2,isArray:ee,isFunction:me,isObject:Se,isString:se,map:re,merge:Ee,reduce:ui},Symbol.toStringTag,{value:"Module"}));var bre=Fe(),Td=Fe(),Bi={estimate:1,determine:2};function Wy(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function t6(t,e){var r=re(e,function(n){return t.scale.parse(n)});return t.type==="time"&&r.length>0&&(r.sort(),r.unshift(r[0]),r.push(r[r.length-1])),r}function Sre(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=Nh(t),i=t.scale.getExtent(),a=t6(t,r),o=et(a,function(s){return s>=i[0]&&s<=i[1]});return{labels:re(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:t.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return t.type==="category"?Tre(t,e):Mre(t)}function wre(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=t6(t,n);return{ticks:et(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?Cre(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function Tre(t,e){var r=t.getLabelModel(),n=r6(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function r6(t,e,r){var n=Lre(t),i=HM(e),a=r.kind===Bi.estimate;if(!a){var o=i6(n,i);if(o)return o}var s,l;me(i)?s=s6(t,i):(l=i==="auto"?Pre(t,r):i,s=o6(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return dT(n,i,u),!0}):dT(n,i,u),u}function Cre(t,e){var r=Are(t),n=HM(e),i=i6(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=s6(t,n,!0);else if(n==="auto"){var s=r6(t,t.getLabelModel(),Wy(Bi.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=o6(t,o,!0);return dT(r,n,{ticks:a,tickCategoryInterval:o})}function Mre(t){var e=t.scale.getTicks(),r=Nh(t);return{labels:re(e,function(n,i){return{formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var Are=n6("axisTick"),Lre=n6("axisLabel");function n6(t){return function(r){return Td(r)[t]||(Td(r)[t]={list:[]})}}function i6(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var h=s[0],f=t.dataToCoord(h+1)-t.dataToCoord(h),d=Math.abs(f*Math.cos(a)),p=Math.abs(f*Math.sin(a)),g=0,m=0;h<=s[1];h+=u){var y=0,_=0,b=$0(i({value:h}),n.font,"center","top");y=b.width*1.3,_=b.height*1.3,g=Math.max(g,y,7),m=Math.max(m,_,7)}var w=g/d,C=m/p;isNaN(w)&&(w=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(w,C)));if(r===Bi.estimate)return e.out.noPxChangeTryDetermine.push(le(Dre,null,t,M,l)),M;var A=a6(t,M,l);return A??M}function Dre(t,e,r){return a6(t,e,r)==null}function a6(t,e,r){var n=bre(t.model),i=t.getExtent(),a=n.lastAutoInterval,o=n.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-e)<=1&&Math.abs(o-r)<=1&&a>e&&n.axisExtent0===i[0]&&n.axisExtent1===i[1])return a;n.lastTickCount=r,n.lastAutoInterval=e,n.axisExtent0=i[0],n.axisExtent1=i[1]}function Ire(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function o6(t,e,r){var n=Nh(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=qF(t),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m,time:void 0,break:void 0})}return s}function s6(t,e,r){var n=t.scale,i=Nh(t),a=[];return R(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var yN=[0,1],pi=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return N2(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(i.parse(e)),this.onBand&&i.type==="ordinal"&&(n=n.slice(),_N(n,i.count())),nt(e,yN,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),_N(n,i.count()));var a=nt(e,n,yN,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=wre(this,r,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),i=n.ticks,a=re(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Nre(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=re(n,function(a){return re(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(e){return e=e||Wy(Bi.determine),Sre(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(e){return e=e||Wy(Bi.determine),kre(this,e)},t}();function _N(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Nre(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],e[0].onBand=!0,o=e[1]={coord:a[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;R(e,function(d){d.coord-=u/2,d.onBand=!0});var c=t.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1,onBand:!0},e.push(o)}var h=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function f(d,p){return d=Ht(d),p=Ht(p),h?d>p:di&&(i+=bf);var d=Math.atan2(s,o);if(d<0&&(d+=bf),d>=n&&d<=i||d+bf>=n&&d+bf<=i)return l[0]=c,l[1]=h,u-r;var p=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,_=(p-o)*(p-o)+(g-s)*(g-s),b=(m-o)*(m-o)+(y-s)*(y-s);return _0){e=e/180*Math.PI,Li.fromArray(t[0]),yt.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(fa,Li,yt),Te.sub(la,Ft,yt);var r=fa.len(),n=la.len();if(!(r<.001||n<.001)){fa.scale(1/r),la.scale(1/n);var i=fa.dot(la),a=Math.cos(e);if(a1&&Te.copy(en,Ft),en.toArray(t[1])}}}}function Hre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Li.fromArray(t[0]),yt.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(fa,yt,Li),Te.sub(la,Ft,yt);var n=fa.len(),i=la.len();if(!(n<.001||i<.001)){fa.scale(1/n),la.scale(1/i);var a=fa.dot(e),o=Math.cos(r);if(a=l)Te.copy(en,Ft);else{en.scaleAndAdd(la,s/Math.tan(Math.PI/2-c));var h=Ft.x!==yt.x?(en.x-yt.x)/(Ft.x-yt.x):(en.y-yt.y)/(Ft.y-yt.y);if(isNaN(h))return;h<0?Te.copy(en,yt):h>1&&Te.copy(en,Ft)}en.toArray(t[1])}}}}function V1(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function Wre(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Ya(n[0],n[1]),a=Ya(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=vd([],n[1],n[0],o/i),l=vd([],n[1],n[2],o/a),u=vd([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0){w(D*N,0,a);var I=D+A;I<0&&C(-I*N,1)}else C(-A*N,1)}}function w(A,k,N){A!==0&&(c=!0);for(var D=k;D0)for(var I=0;I0;I--){var G=N[I-1]*V;w(-G,I,a)}}}function M(A){var k=A<0?-1:1;A=Math.abs(A);for(var N=Math.ceil(A/(a-1)),D=0;D0?w(N,0,D+1):w(-N,a-D-1,a),A-=N,A<=0)return}return c}function $re(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ne(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!Ch(n).valueAnimation){var h=pe(n.style.opacity,1);n.style.opacity=0,bt(n,{style:{opacity:h}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};Mg(d,u,Ag),Mg(d,n.states.select,Ag)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};Mg(p,u,Ag),Mg(p,n.states.emphasis,Ag)}Xj(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=qre(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Qe(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,bt(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}(),H1=Fe();function Qre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=H1(r).labelManager;i||(i=H1(r).labelManager=new Kre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=H1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var W1=Math.sin,U1=Math.cos,v6=Math.PI,ll=Math.PI*2,Jre=180/v6,p6=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=Yo(h-ll)||(c?u>=ll:-u>=ll),d=u>0?u%ll:u%ll+ll,p=!1;f?p=!0:Yo(h)?p=!1:p=d>=v6==!!c;var g=e+n*U1(o),m=r+i*W1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Jre);if(f){var _=1/this._p,b=(c?1:-1)*(ll-_);this._add("A",n,i,y,1,+c,e+n*U1(o+b),r+i*W1(o+b)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var w=e+n*U1(s),C=r+i*W1(s);this._add("A",n,i,y,+p,+c,w,C)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var c=[],h=this._p,f=1;f"}function lne(t){return""}function $M(t,e){e=e||{};var r=e.newline?` `:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return sne(o,s)+(o!=="style"?Ur(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+lne(o)}return n(t)}function une(t,e,r){r=r||{};var n=r.newline?` -`:"",i=" {"+n,a=n+"}",o=re($e(t),function(l){return l+i+re($e(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=re($e(e),function(l){return"@keyframes "+l+i+re($e(e[l]),function(u){return u+i+re($e(e[l][u]),function(c){var h=e[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function yT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function TE(t,e,r,n){return hr("svg","root",{width:t,height:e,xmlns:pG,"xmlns:xlink":gG,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var cne=0;function yG(){return cne++}var CE={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},pl="transform-origin";function hne(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new vG;return i.reset(B4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function fne(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[pl]=r+"px "+n+"px")}var dne={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function _G(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function vne(t,e,r){var n=t.shape.paths,i={},a,o;if(R(n,function(l){var u=yT(r.zrId);u.animation=!0,v_(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=$e(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in h){var _=h[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=_G(i,r);return a.replace(o,s)}}function ME(t){return se(t)?CE[t]?"cubic-bezier("+CE[t]+")":k2(t)?t:"":""}function v_(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof Uv){var s=vne(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Ge=_G(A,r);return Ge+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+yG();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function pne(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};AE(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=gy(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),AE(n,e,r)}}function AE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+yG(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var pv=Math.round;function xG(t){return t&&se(t.src)}function SG(t){return t&&me(t.toDataURL)}function XM(t,e,r,n){ine(function(i,a){var o=i==="fill"||i==="stroke";o&&z4(a)?wG(e,t,i,n):o&&I2(a)?TG(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),bne(r,t,n)}function qM(t,e){var r=Z4(e);r&&(r.each(function(n,i){n!=null&&(t[(wE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[wE+"silent"]="true"))}function LE(t){return Yo(t[0]-1)&&Yo(t[1])&&Yo(t[2])&&Yo(t[3]-1)}function gne(t){return Yo(t[4])&&Yo(t[5])}function KM(t,e,r){if(e&&!(gne(e)&&LE(e))){var n=1e4;t.transform=LE(e)?"translate("+pv(e[4]*n)/n+" "+pv(e[5]*n)/n+")":KY(e)}}function PE(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Nr(f,m),Nr(d,m)}else if(f==null||d==null){var y=function(D,I){if(D){var z=D.elm,O=f||I.width,V=d||I.height;D.tag==="pattern"&&(u?(V=1,O/=a.width):c&&(O=1,V/=a.height)),D.attrs.width=O,D.attrs.height=V,z&&(z.setAttribute("width",O),z.setAttribute("height",V))}},_=F2(p,null,t,function(D){l||y(M,D),y(h,D)});_&&_.width&&_.height&&(f=f||_.width,d=d||_.height)}h=hr("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var S,w;l?S=w=1:u?(w=1,S=o.width/a.width):c?(S=1,w=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),w!=null&&!isNaN(w)&&(o.height=w);var C=j4(i);C&&(o.patternTransform=C);var M=hr("pattern","",o,[h]),A=YM(M),k=n.patternCache,E=k[A];E||(E=n.zrId+"-p"+n.patternIdx++,k[A]=E,o.id=E,M=n.defs[E]=hr("pattern",E,o,[h])),e[r]=U0(E)}}function wne(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=hr("clipPath",a,o,[bG(t,r)])}e["clip-path"]=U0(a)}function IE(t){return document.createTextNode(t)}function bl(t,e,r){t.insertBefore(e,r)}function EE(t,e){t.removeChild(e)}function NE(t,e){t.appendChild(e)}function CG(t){return t.parentNode}function MG(t){return t.nextSibling}function U1(t,e){t.textContent=e}var RE=58,Tne=120,Cne=hr("","");function _T(t){return t===void 0}function ia(t){return t!==void 0}function Mne(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Xf(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function gv(t){var e,r=t.children,n=t.tag;if(ia(n)){var i=t.elm=mG(n);if(QM(Cne,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,AG(t,p,r,i,l)):$y(t,e,n,a))}function oc(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(QM(t,e),_T(e.text)?ia(n)&&ia(i)?n!==i&&Ane(r,n,i):ia(i)?(ia(t.text)&&U1(r,""),AG(r,null,i,0,i.length-1)):ia(n)?$y(r,n,0,n.length-1):ia(t.text)&&U1(r,""):t.text!==e.text&&(ia(n)&&$y(r,n,0,n.length-1),U1(r,e.text)))}function Lne(t,e){if(Xf(t,e))oc(t,e);else{var r=t.elm,n=CG(r);gv(e),n!==null&&(bl(n,e.elm,MG(r)),$y(n,[t],0,0))}return e}var Pne=0,kne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=OE(),this.configLayer=OE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+Pne++,this._oldVNode=TE(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=mG("svg");QM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Lne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return DE(e,yT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=yT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Dne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=hr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re($e(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(hr("defs","defs",{},u)),e.animation){var c=une(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=hr("style","stl",{},[],c);o.push(h)}}return TE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},YM(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(f&&l&&f[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var h=this.__startIndex;h15)break}}V.prevElClipPaths&&y.restore()};if(_)if(_.length===0)k=m.__endIndex;else for(var D=d.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*D,z.y*D,z.width*D,z.height*D),y.clip(),E(z),y.restore()}else y.save(),E(),y.restore();m.__drawIndex=k,m.__drawIndex0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?Mg:0),this._needsManuallyCompositing),c.__builtin__||V0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Mn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Ne(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=q.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ht);function sh(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=nh(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var Kv=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=jne,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){fo(this.childAt(0))},e.prototype.downplay=function(){vo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,f)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?d.attr(p):Qe(d,p,s,n),fi(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,St(d,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,h,f,d,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),S=_.getModel("emphasis");u=S.getModel("itemStyle").getItemStyle(),h=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),f=S.get("focus"),d=S.get("blurScope"),p=S.get("disabled"),g=ar(_),m=S.getShallow("scale"),y=_.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=gu(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),y&&s.attr("cursor",y);var M=r.getItemVisual(n,"style"),A=M.fill;if(s instanceof pr){var k=s.style;s.useStyle(J({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},M))}else s.__isEmptyBrush?s.useStyle(J({},M)):s.useStyle(M),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=r.getItemVisual(n,"liftZ"),D=this._z2;E!=null?D==null&&(this._z2=s.z2,s.z2+=E):D!=null&&(s.z2=D,this._z2=null);var I=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:A,defaultOpacity:M.opacity});function z(G){return I?r.getName(G):sh(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var V=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*V,O.scaleY=this._sizeY*V,this.setSymbolScale(1),wt(this,f,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Le(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Ss(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ss(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Dh(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function jne(t,e){this.parent.drift(t,e)}function $1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function jE(t){return t!=null&&!be(t)&&(t={isIgnore:t}),t||{}}function VE(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var Qv=function(){function t(e){this.group=new _e,this._SymbolCtor=e||Kv}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=jE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=VE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(h){return e.getItemLayout(h)};a||n.removeAll(),e.diff(a).add(function(h){var f=c(h);if($1(e,f,h,r)){var d=new o(e,h,l,u);d.setPosition(f),e.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!$1(e,p,h,r)){n.remove(d);return}var g=e.getItemVisual(h,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(e,h,l,u),d.setPosition(p);else{d.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?d.attr(y):Qe(d,y,i)}n.add(d),e.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=VE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=jE(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function kG(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function Fne(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function Gne(t,e,r,n,i,a,o,s){for(var l=Fne(t,e),u=[],c=[],h=[],f=[],d=[],p=[],g=[],m=PG(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S=i||g<0)break;if(Gl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),h=y,f=_;else{var S=y-u,w=_-c;if(S*S+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,M=e[C*2],A=e[C*2+1];M===y&&A===_&&m=n||Gl(M,A))d=y,p=_;else{D=M-u,I=A-c;var V=y-u,G=M-y,F=_-c,U=A-_,j=void 0,W=void 0;if(s==="x"){j=Math.abs(V),W=Math.abs(G);var H=D>0?1:-1;d=y-H*j*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){j=Math.abs(F),W=Math.abs(U);var X=I>0?1:-1;d=y,p=_-X*j*o,z=y,O=_+X*W*o}else j=Math.sqrt(V*V+F*F),W=Math.sqrt(G*G+U*U),E=W/(W+j),d=y-D*o*(1-E),p=_-I*o*(1-E),z=y+D*o*E,O=_+I*o*E,z=Do(z,Io(M,y)),O=Do(O,Io(A,_)),z=Io(z,Do(M,y)),O=Io(O,Do(A,_)),D=z-y,I=O-_,d=y-D*j/W,p=_-I*j/W,d=Do(d,Io(u,y)),p=Do(p,Io(c,_)),d=Io(d,Do(u,y)),p=Io(p,Do(c,_)),D=y-d,I=_-p,z=y+D*W/j,O=_+I*W/j}t.bezierCurveTo(h,f,d,p,y,_),h=z,f=O}else t.lineTo(y,_)}u=y,c=_,g+=a}return m}var DG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),Hne=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new DG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Gl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var w=u?(p-l)*S+l:(d-s)*S+s;return u?[r,w]:[w,r]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++],_=a[h++];var C=u?vy(s,d,g,y,r,c):vy(l,p,m,_,r,c);if(C>0)for(var M=0;M=0){var w=u?ur(l,p,m,_,A):ur(s,d,g,y,A);return u?[r,w]:[w,r]}}s=y,l=_;break}}},e}(Ue),Wne=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(DG),IG=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new Wne},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Gl(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function $ne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(S){return{coord:l.toGlobalCoord(l.dataToCoord(S.value)),color:S.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=Zne(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,g=f[0].coord-p,m=f[d-1].coord+p,y=m-g;if(y<.001)return"transparent";R(f,function(S){S.offset=(S.coord-g)/y}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var _=new fu(0,0,0,0,f,!0);return _[i]=g,_[i+"2"]=m,_}}}function Yne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Xne(a,e))){var o=e.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Xne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function qne(t,e){return isNaN(t)||isNaN(e)}function Kne(t){for(var e=t.length/2;e>0&&qne(t[e*2-2],t[e*2-1]);e--);return e-1}function UE(t,e){return[t[e*2],t[e*2+1]]}function Qne(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function RG(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Le(p).seriesIndex=r.seriesIndex,wt(p,F,U,j);var H=WE(r.get("smooth")),X=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:X,connectNulls:A}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(Se(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=WE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:X,connectNulls:A}),ir(g,r,"areaStyle"),Le(g).seriesIndex=r.seriesIndex,wt(g,F,U,j)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=C,this._points=c,this._step=D,this._valueOrigin=S,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Le(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Ql(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new Kv(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else st.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Ql(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else st.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;Cy(this._polyline,r),n&&Cy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new Hne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new IG({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=me(h)?h(null):h;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var m=[d.x,d.y],y=void 0,_=void 0,S=void 0;if(i)if(o){var w=i,C=n.pointToCoord(m);a?(y=w.startAngle,_=w.endAngle,S=-C[1]/180*Math.PI):(y=w.r0,_=w.r,S=C[0])}else{var M=i;a?(y=M.x,_=M.x+M.width,S=d.x):(y=M.y+M.height,_=M.y,S=d.y)}var A=_===y?0:(S-y)/(_-y);l&&(A=1-A);var k=me(h)?h(p):c*A+f,E=g.getSymbolPath(),D=E.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:k}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:k}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(RG(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Kne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?LG(o,d):sh(o,h)},enableTextSetter:!0},Jne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,S=n.shape,w=_?y?S.x:S.y+S.height:y?S.x+S.width:S.y,C=(y?g:0)*(_?-1:1),M=(y?0:-g)*(_?-1:1),A=y?"x":"y",k=Qne(h,w,A),E=k.range,D=E[1]-E[0],I=void 0;if(D>=1){if(D>1&&!d){var z=UE(h,E[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=f.getRawValue(E[0]))}else{var z=c.getPointOn(w,A);z&&u.attr({x:z[0]+C,y:z[1]+M});var O=f.getRawValue(E[0]),V=f.getRawValue(E[1]);o&&(I=oj(i,p,O,V,k.t))}a.lastFrameIndex=E[0]}else{var G=r===1||a.lastFrameIndex>0?E[0]:0,z=UE(h,G);o&&(I=f.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var F=Ch(u);typeof F.setLabelText=="function"&&F.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=r.hostModel,f=Gne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,g=f.next,m=f.stackedOnNext;if(o&&(p=Eo(f.stackedOnCurrent,f.current,i,o,l),d=Eo(f.current,null,i,o,l),m=Eo(f.stackedOnNext,f.next,i,o,l),g=Eo(f.next,null,i,o,l)),HE(d,g)>3e3||c&&HE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=f.current,u.shape.points=d;var y={shape:{points:g}};f.current!==d&&(y.shape.__points=f.next),u.stopAnimation(),Qe(u,y,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=f.status,w=0;we&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;se(a)?p=tie[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,rie))}}}}}function nie(t){t.registerChartView(eie),t.registerSeriesModel(Bne),t.registerLayout(ep("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,OG("line"))}var mv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),g=f.getTickModel().get("alignWithLabel"),m=o[d],y=n[d]==="x1"||n[d]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[y?1:0]);return}for(var _=void 0,S=void 0,w=1,C=0;Cm){S=(M+_)/2;break}C===1&&(w=A-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[d]=f.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(ht);ht.registerClass(mv);var iie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return ka(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Is(mv.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:q.color.primary,borderWidth:2}},realtimeSort:!1}),e}(mv),aie=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),Yy=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new aie},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-cMath.PI/2&&cs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){ro(a,r,Le(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(st),ZE={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=X1(e.x,t.x),s=q1(e.x+e.width,i),l=X1(e.y,t.y),u=q1(e.y+e.height,a),c=si?s:o,e.y=h&&l>a?u:l,e.width=c?0:s-o,e.height=h?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=q1(e.r,t.r),a=X1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},$E={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new je({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Yy:Rr,c=new u({shape:n,z2:1});c.name="item";var h=zG(i);if(c.calculateTextPosition=oie(h,{isRoundCap:u===Yy}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Qe:St)(c,{shape:p},a)}return c}};function cie(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function YE(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Qe:St)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Qe:St)(r,{shape:u},c,i)}function XE(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function die(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function zG(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function KE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,h=da(n.getModel("itemStyle"),c,!0);J(c,h),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var f=n.getShallow("cursor");f&&t.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);vr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:sh(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,sie(t,m==="outside"?d:m,zG(o),n.get(["label","rotate"]))}$j(g,p,a.getRawValue(r),function(_){return LG(e,_)});var y=n.getModel(["emphasis"]);wt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),die(i)&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function vie(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var pie=function(){function t(){}return t}(),QE=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new pie},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function gie(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,h=a.length/3;c=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function BG(t,e,r){if(bs(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function mie(t,e,r){var n=t.type==="polar"?Rr:je;return new n({shape:BG(e,r,t),silent:!0,z2:0})}function yie(t){t.registerChartView(uie),t.registerSeriesModel(iie),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(FF,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GF("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,OG("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var tN=Math.PI*2,kg=Math.PI/180;function _ie(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=hV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*kg,d=n.get("endAngle"),p=n.get("padAngle")*kg;d=d==="auto"?f-tN:-d*kg;var g=n.get("minAngle")*kg,m=g+p,y=0;i.each(a,function(U){!isNaN(U)&&y++});var _=i.getSum(a),S=Math.PI/(_||y)*2,w=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var k=w?1:-1,E=[f,d],D=k*p/2;J0(E,!w),f=E[0],d=E[1];var I=jG(n);I.startAngle=f,I.endAngle=d,I.clockwise=w,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(d-f),O=z,V=0,G=f;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(U,j){var W;if(isNaN(U)){i.setItemLayout(j,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:s,cy:l,r0:c,r:C?NaN:u});return}C!=="area"?W=_===0&&M?S:U*S:W=z/y,WW?(X=G+k*W/2,K=X):(X=G+D,K=H-D),i.setItemLayout(j,{angle:W,startAngle:X,endAngle:K,clockwise:w,cx:s,cy:l,r0:c,r:C?nt(U,A,[c,u]):u}),G=H}),Or?y:m,C=Math.abs(S.label.y-r);if(C>=w.maxY){var M=S.label.x-e-S.len2*i,A=n+S.len,k=Math.abs(M)t.unconstrainedWidth?null:f:null;n.setStyle("width",d)}FG(a,n)}}}function FG(t,e){nN.rect=t,hG(nN,e,bie)}var bie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},nN={};function K1(t){return t.position==="center"}function wie(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*xie,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(M){M.ignore=!0}function p(M){if(!M.ignore)return!0;for(var A in M.states)if(M.states[A].ignore===!1)return!0;return!1}e.each(function(M){var A=e.getItemGraphicEl(M),k=A.shape,E=A.getTextContent(),D=A.getTextGuideLine(),I=e.getItemModel(M),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),V=z.get("distanceToLabelLine"),G=z.get("alignTo"),F=oe(z.get("edgeDistance"),u),U=z.get("bleedMargin");U==null&&(U=Math.min(u,f)>200?10:2);var j=I.getModel("labelLine"),W=j.get("length");W=oe(W,u);var H=j.get("length2");if(H=oe(H,u),Math.abs(k.endAngle-k.startAngle)0?"right":"left":K>0?"left":"right"}var tt=Math.PI,lt=0,Dt=z.get("rotate");if(qe(Dt))lt=Dt*(tt/180);else if(O==="center")lt=0;else if(Dt==="radial"||Dt===!0){var gr=K<0?-X+tt:-X;lt=gr}else if(Dt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=tt*2+zr);var Fi=ne>0;Fi&&(zr=tt+zr),lt=zr-tt}if(a=!!lt,E.x=ie,E.y=ue,E.rotation=lt,E.setStyle({verticalAlign:"middle"}),xe){E.setStyle({align:Ge});var Su=E.states.select;Su&&(Su.x+=E.x,Su.y+=E.y)}else{var Gi=new Ce(0,0,0,0);FG(Gi,E),r.push({label:E,labelLine:D,position:O,len:W,len2:H,minTurnAngle:j.get("minTurnAngle"),maxSurfaceAngle:j.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:ve,textAlign:Ge,labelDistance:V,labelAlignTo:G,edgeDistance:F,bleedMargin:U,rect:Gi,unconstrainedWidth:Gi.width,labelStyleWidth:E.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&Sie(r,n,i,l,u,f,c,h);for(var g=0;g0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h=a.r0}},e.type="pie",e}(st);function Oh(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Ih(n,e).dimensions,a=new $r(i,t);return a.initData(n,r),a}var zh=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),Mie=Fe(),GG=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Oh(this,{coordDimensions:["value"],encodeDefaulter:Ie(_M,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=Mie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=q4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Kl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ht);_Q({fullType:GG.type,getCoord2:function(t){return t.getShallow("center")}});function Aie(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function Lie(t){t.registerChartView(Cie),t.registerSeriesModel(GG),rF("pie",t.registerAction),t.registerLayout(Ie(_ie,"pie")),t.registerProcessor(Rh("pie")),t.registerProcessor(Aie("pie"))}var Pie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:q.color.primary}},universalTransition:{divideShape:"clone"}},e}(ht),HG=4,kie=function(){function t(){}return t}(),Die=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new kie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(r>=h&&n>=f&&r<=h+s&&n<=f+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f=0&&(u.dataIndex=h+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Eie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=ep("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Iie:new Qv,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(st),WG={left:0,right:0,top:0,bottom:0},Xy=["25%","25%"],Nie=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=vu(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Ta(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Ta(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:WG,outerBoundsContain:"all",outerBoundsClampWidth:Xy[0],outerBoundsClampHeight:Xy[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},e}(Ve),ST=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",kt).models[0]},e.type="cartesian2dAxis",e}(Ve);Bt(ST,Nh);var UG={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:q.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:q.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[q.color.backgroundTint,q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:q.color.neutral00,borderColor:q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},Rie=Ne({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},UG),JM=Ne({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:q.color.axisMinorSplitLine,width:1}}},UG),Oie=Ne({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},JM),zie=Se({logBase:10},JM);const ZG={category:Rie,value:JM,time:Oie,log:zie};var Bie={value:1,category:1,time:1,log:1},bT=null;function jie(t){bT||(bT=t)}function tp(){return bT}function lh(t,e,r,n){R(Bie,function(i,a){var o=Ne(Ne({},ZG[a],!0),n,!0),s=function(l){Y(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=sv(this),d=f?vu(c):{},p=h.getTheme();Ne(c,p.get(a+"Axis")),Ne(c,this.getDefaultOption()),c.type=iN(c),f&&Ta(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=dv.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var h=tp();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",iN)}function iN(t){return t.type||(t.data?"category":"value")}var Vie=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),et(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),wT=["x","y"];function aN(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Fie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=wT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!aN(r)||!aN(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=ci([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(Vie),$G=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(pi),p_="expandAxisBreak",YG="collapseAxisBreak",XG="toggleAxisBreak",eA="axisbreakchanged",Gie={type:p_,event:eA,update:"update",refineEvent:tA},Hie={type:YG,event:eA,update:"update",refineEvent:tA},Wie={type:XG,event:eA,update:"update",refineEvent:tA};function tA(t,e,r,n){var i=[];return R(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function Uie(t){t.registerAction(Gie,e),t.registerAction(Hie,e),t.registerAction(Wie,e);function e(r,n){var i=[],a=Oc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(h){var f;i.push(Se((f={},f[l]=u.componentIndex,f),h))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Xo=Math.PI,Zie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],$ie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],uh=Fe(),qG=Fe(),KG=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function Yie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=rA(t.axisName)&&oh(t.nameLocation);R(n,function(p){var g=Ca(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?ci(bf,m.transform):jv(bf),g.transform&&Di(bf,bf,g.transform),Ce.copy(Dg,g.localRect),Dg.applyTransform(bf),s?s.union(Dg):Ce.copy(s=new Ce(0,0,0,0),Dg))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1])-f;s.union(new Ce(f,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var bf=fr(),Dg=new Ce(0,0,0,0),QG=function(t,e,r,n,i,a){if(oh(t.nameLocation)){var o=a.stOccupiedRect;o&&JG(Zre({},o,a.transGroup.transform),n,i)}else e6(a.labelInfoList,a.dirVec,n,i)};function JG(t,e,r){var n=new Te;d_(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&vT(e,n)}function e6(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):Jc(i-Xo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),Xie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],qie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],h=[l[1],0],f=c[0]>h[0];u&&(Ot(c,c,u),Ot(h,h,u));var d=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())tp().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},p));rh(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var _=gu(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],w=y[1];R([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(C,M){if(m[M]!=="none"&&m[M]!=null){var A=Ut(m[M],-S/2,-w/2,S,w,d.stroke,!0),k=C.r+C.offset,E=f?h:c;A.attr({rotation:C.rotate,x:E[0]+k*Math.cos(t.rotation),y:E[1]-k*Math.sin(t.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=sN(e,i,s);l&&oN(t,e,r,n,i,a,o,Bi.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=sN(e,i,s);l&&oN(t,e,r,n,i,a,o,Bi.determine);var u=eae(t,i,a,n);Jie(t,e.labelLayoutList,u),tae(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(rA(u)){var c=t.nameLocation,h=t.nameDirection,f=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*d,y.x=-g):c==="end"?(m.x=p[1]+g*d,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+h*d,y.y=h);var _=fr();y.transform(xo(_,_,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Xo/180);var w,C;oh(c)?w=rn.innerTextLayout(t.rotation,S??t.rotation,h):(w=Kie(t.rotation,c,S||0,p),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(w.rotation)),!isFinite(C)&&(C=null)));var M=f.getFont(),A=n.get("nameTruncate",!0)||{},k=A.ellipsis,E=br(t.raw.nameTruncateMaxWidth,A.maxWidth,C),D=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:w.rotation,silent:rn.isLabelSilent(n),style:vt(f,{text:u,font:M,overflow:"truncate",width:E,ellipsis:k,fill:f.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:f.get("align")||w.textAlign,verticalAlign:f.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(bo({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=rn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Le(I).eventData=z}a.add(I),I.updateTransform(),e.nameEl=I;var O=l.nameLayout=Ca({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:oh(c)?Zie[D]:$ie[D]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),t.shouldNameMoveOverlap&&O){var V=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,V)}}}};function oN(t,e,r,n,i,a,o,s){r6(e)||rae(t,e,i,s,n,o);var l=e.labelLayoutList;nae(t,n,l,a),oae(n,t.rotation,l);var u=t.optionHideOverlap;Qie(n,l,u),u&&fG(et(l,function(c){return c&&!c.label.ignore})),Yie(t,r,n,l)}function Kie(t,e,r,n){var i=R2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Jc(i-Xo/2)?(o=l?"bottom":"top",a="center"):Jc(i-Xo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iXo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Qie(t,e,r){if(XF(t.axis))return;function n(s,l,u){var c=Ca(e[l]),h=Ca(e[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){qf(c.label);return}if(h.suggestIgnore){qf(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=pT({marginForce:d},c),h=pT({marginForce:d},h)}d_(c,h,null,{touchThreshold:f})&&qf(s?h.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function Jie(t,e,r){t.showMinorTicks||R(e,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)d=O1(d),p=u[1]-d*o;else{var m=t.getTicks().length-1;m>o&&(d=O1(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var _=(i[0].value-a[0].value)/s,S=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+d*_,g+d*S),n.setInterval.call(t,d),(_||S)&&n.setNiceExtent.call(t,p+d,g-d)}var uN=[[3,1],[0,2]],cae=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=wT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=$e(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,g=d.scale;lT(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(iu(g,p),lT(g)&&(s=d))}c.length&&(s||(s=c.pop(),iu(s.scale,s.model)),R(c,function(m){n6(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){cN(n,"y",o,a)}),R(n.y,function(o){cN(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=sr(e,r),a=this._rect=bt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(CT(o,a),!n){var u=dae(a,s,o,l,r),c=void 0;if(l)MT?(MT(this._axesList,a),CT(o,a)):c=dN(a.clone(),"axisLabel",null,a,o,u,i);else{var h=vae(e,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=dN(f,d,p,a,o,u,i))}i6(a,o,Bi.determine,null,c,i)}R(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}be(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return tu(n,s,!0,!0,r),CT(i,n),l;function u(f){R(i[De[f]],function(d){if(vv(d.model)){var p=a.ensureRecord(d.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!Dr(d)&&d>1e-4&&(f/=d),f}}function dae(t,e,r,n,i){var a=new KG(pae);return R(r,function(o){return R(o,function(s){if(vv(s.model)){var l=!n;s.axisBuilder=lae(t,e,s.model,i,a,l)}})}),a}function i6(t,e,r,n,i,a){var o=r===Bi.determine;R(e,function(u){return R(u,function(c){vv(c.model)&&(uae(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[De[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}R(e,function(u,c){return R(u,function(h){vv(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function vae(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=bt(t.get("outerBounds",!0)||WG,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[Sy(pe(t.get("outerBoundsClampWidth",!0),Xy[0]),e.width),Sy(pe(t.get("outerBoundsClampHeight",!0),Xy[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var pae=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";QG(t,e,r,n,i,a),oh(t.nameLocation)||R(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&e6(s.labelInfoList,s.dirVec,n,i)})};function gae(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return mae(r,t,e),r.seriesInvolved&&_ae(r,t),r}function mae(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=yv(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(R(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&R(p.baseAxes,Ie(g,d?"cross":!0,f)),d&&R(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var S=_.model.getModel("axisPointer",i),w=S.get("show");if(!(!w||w==="auto"&&!m&&!AT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?yae(_,h,i,e,m,y):S;var C=S.get("snap"),M=S.get("triggerEmphasis"),A=yv(_.model),k=y||C||_.type==="category",E=t.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:M,involveSeries:k,snap:C,useHandle:AT(S),seriesModels:[],linkGroup:null};u[A]=E,t.seriesInvolved=t.seriesInvolved||k;var D=xae(a,_);if(D!=null){var I=o[D]||(o[D]={axesInfo:{}});I.axesInfo[A]=E,I.mapper=a[D].mapper,E.linkGroup=I}}}})}function yae(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(f){l[f]=ye(o.get(f))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&Se(u,h.textStyle)}}return t.model.getModel("axisPointer",new We(l,r,n))}function _ae(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(t.coordSysAxesInfo[yv(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function xae(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function Sae(t){var e=nA(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=AT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var Lae=Fe();function gN(t,e,r,n){if(t instanceof $G){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?c6(r,o,u,n):Pae(t,e,r,n,o,l):r}function c6(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function Pae(t,e,r,n,i,a){var o=Lae(t);o.items||(o.items=[]);var s=o.items,l=mN(s,e,r,n,i,a,1),u=mN(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||h&&f>h/2-n?c6(r,i,h,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function mN(t,e,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Se({color:p.color},l));var m=Ne(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:f},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var _=new We(m,null,this.ecModel);return Bt(_,Nh.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:q.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ne({lineStyle:{color:q.color.neutral20}},wf.axisLine),axisLabel:Ig(wf.axisLabel,!1),axisTick:Ig(wf.axisTick,!1),splitLine:Ig(wf.splitLine,!0),splitArea:Ig(wf.splitArea,!0),indicator:[]},e}(Ve),Bae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new rn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=ee(f)?f:[f],g=ee(d)?d:[d],m=[],y=[];function _(G,F,U){var j=U%F.length;return G[j]=G[j]||[],j}if(a==="circle")for(var S=i[0].getTicksCoords(),w=n.cx,C=n.cy,M=0;M3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(xN(this._zr,"globalPan")||Tf(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(ho(a.event),a.__ecRoamConsumed=!0,SN(r,n,i,a,o))},e}(di);function Tf(t){return t.__ecRoamConsumed}var Zae=Fe();function g_(t){var e=Zae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Cf(t,e,r,n){for(var i=g_(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=g6(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new _e,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new je({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=eS[s];if(c&&he(eS,s)){l=c.call(this,e,r);var h=e.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=CN[s];if(d&&he(CN,s)){var p=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new eh({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),qae(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){eS={g:function(e,r){var n=new _e;return Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new je;return Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new Pa;return Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Hv;return Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=LN(n));var a=new Or({shape:{points:i||[]},silent:!0});return Wn(r,a),bn(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=LN(n));var a=new Tr({shape:{points:i||[]},silent:!0});return Wn(r,a),bn(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new pr;return Wn(r,n),bn(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return Wn(r,s),bn(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return Wn(r,s),bn(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=Ij(n);return Wn(r,i),bn(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),CN={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new fu(e,r,n,i);return MN(t,a),AN(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new q2(e,r,n);return MN(t,i),AN(t,i),i}};function MN(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function AN(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};p6(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Zr(o),u=l&&l[3];u&&(l[3]*=eo(s),o=ai(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Wn(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function LN(t){for(var e=y_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=y_(o);switch(i=i||fr(),s){case"translate":Oi(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":W0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":xo(i,i,-parseFloat(l[0])*tS,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*tS);Di(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*tS);Di(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var kN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function p6(t,e,r){var n=t.getAttribute("style");if(n){kN.lastIndex=0;for(var i;(i=kN.exec(n))!=null;){var a=i[1],o=he(Ky,a)?Ky[a]:null;o&&(e[o]=i[2]);var s=he(Qy,a)?Qy[a]:null;s&&(r[s]=i[2])}}}function roe(t,e,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=de(),n=de(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:f,labelDataIndex:h,defaultText:r},d);var p=e.getTextContent();if(p&&(m6(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function RN(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Le(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function ON(t,e,r,n,i){t.data||bo({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function zN(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return wt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&hK(e,i,r),o}function BN(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=q.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:q.color.border,areaColor:q.color.background},emphasis:{label:{show:!0,color:q.color.primary},itemStyle:{areaColor:q.color.highlight}},select:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},nameProperty:"name"},e}(ht);function boe(t,e){var r={};return R(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=y[1]-S.height/2,S.x=y[0]-S.width/2;else{var w=t.getBoxLayoutParams();w.aspect=g,S=bt(w,p),S=fV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Moe(t,e){R(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var Aoe=function(){function t(){this.dimensions=_6}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new kT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=GN,u.resize(o,r)}),e.eachSeries(function(o){Yv({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",kt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new kT(s,s,J({nameMap:F0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=br.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=GN,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,Moe(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=de(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Eoe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){Roe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=Ooe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Noe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function HN(t){return arguments.length?t:joe}function Kf(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Roe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Ooe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=rS(s),a=nS(a),s&&a;){i=rS(i),o=nS(o),i.hierNode.ancestor=t;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(Boe(zoe(s,t,r),t,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!rS(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!nS(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function rS(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function nS(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function zoe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Boe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function joe(t,e){return t.parentNode===e.parentNode?1:2}var Voe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Foe=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Voe},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=oe(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var p=1;p_.x,C||(w=w-Math.PI));var A=C?"left":"right",k=s.getModel("label"),E=k.get("rotate"),D=E*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:k.get("position")||A,rotation:E==null?-w:D,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?qc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Le(r).focus=O),Hoe(i,o,c,r,p,d,g,n),r.__edge&&(r.onHoverStateChange=function(V){if(V!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Gv||Cy(r.__edge,V)}})}function Hoe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),f=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new bh({shape:DT(c,h,f,i,i)})),Qe(g,{shape:DT(c,h,f,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],_=0;_r&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function C6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function hA(t,e){var r=C6(t);return Ee(r,e)>=0}function __(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Qoe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new We(i,this,this.ecModel),o=cA.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=__(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:q.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ht);function Joe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function ese(t,e){t.eachSeriesByType("tree",function(r){tse(r,e)})}function tse(t,e){var r=sr(t,e).refContainer,n=bt(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=HN(function(w,C){return(w.parentNode===C.parentNode?1:2)/w.depth})):(a=n.width,o=n.height,s=HN());var l=t.getData().tree.root,u=l.children[0];if(u){Ioe(l),Joe(u,Eoe,s),l.hierNode.modifier=-u.hierNode.prelim,Lf(u,Noe);var c=u,h=u,f=u;Lf(u,function(w){var C=w.getLayout().x;Ch.getLayout().x&&(h=w),w.depth>f.depth&&(f=w)});var d=c===h?1:s(c,h)/2,p=d-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Lf(u,function(w){y=(w.getLayout().x+p)*g,_=(w.depth-1)*m;var C=Kf(y,_);w.setLayout({x:C.x,y:C.y,rawX:y,rawY:_},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(h.getLayout().x+d+p),g=a/(f.depth-1||1),Lf(u,function(w){_=(w.getLayout().x+p)*m,y=S==="LR"?(w.depth-1)*g:a-(w.depth-1)*g,w.setLayout({x:y,y:_},!0)})):(S==="TB"||S==="BT")&&(g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Lf(u,function(w){y=(w.getLayout().x+p)*g,_=S==="TB"?(w.depth-1)*m:o-(w.depth-1)*m,w.setLayout({x:y,y:_},!0)}))}}}function rse(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function nse(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=m_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function ise(t){t.registerChartView(Goe),t.registerSeriesModel(Qoe),t.registerLayout(ese),t.registerVisual(rse),nse(t)}var YN=["treemapZoomToNode","treemapRender","treemapMove"];function ase(t){for(var e=0;e1;)a=a.parentNode;var o=Yw(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var ose=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};A6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=sse(a,n);var l=re(a||[],function(h){return new We(h,s,n)},this),u=cA.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return f.parentModel=g||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=__(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=de(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){M6(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:q.size.l,top:q.size.xxxl,right:q.size.l,bottom:q.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:q.size.m,emptyItemWidth:25,itemStyle:{color:q.color.backgroundShade,textStyle:{color:q.color.secondary}},emphasis:{itemStyle:{color:q.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:q.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ht);function A6(t){var e=0;R(t.children,function(n){A6(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function sse(t,e){var r=pt(e.get("color")),n=pt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;R(t,function(s){var l=new We(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var lse=8,XN=8,iS=5,use=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h=sr(e,r).refContainer,f={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=bt(f,h);this._prepare(n,d,u),this._renderContent(e,d,p,s,l,u,c,i),o_(o,f,h)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+lse*2,r.emptyItemWidth);r.totalWidth+=s+XN,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,h=e.get(["breadcrumb","height"]),f=r.totalWidth,d=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,_=m.width,S=m.text;f>n.width&&(f-=_-c,_=c,S=null);var w=new Or({shape:{points:cse(u,0,_,h,g===d.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:vt(o,{text:S})}),textConfig:{position:"inside"},z2:xh*1e4,onclick:Ie(l,y)});w.disableLabelAnimation=!0,w.getTextContent().ensureState("emphasis").style=vt(s,{text:S}),w.ensureState("emphasis").style=p,wt(w,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(w),hse(w,e,y),u+=_+XN}},t.prototype.remove=function(){this.group.removeAll()},t}();function cse(t,e,r,n,i,a){var o=[[i?t:t-iS,e],[t+r,e],[t+r,e+n],[i?t:t-iS,e+n]];return!a&&o.splice(2,0,[t+r+iS,e+n/2]),!i&&o.push([t,e+n/2]),o}function hse(t,e,r){Le(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&__(r,e)}}var fse=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;iKN||Math.abs(r.dy)>KN)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();Oi(m,m,[-n,-i]),W0(m,m,[p,p]),Oi(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Py(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new use(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(hA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Pf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(st);function Pf(){return{nodeGroup:[],background:[],content:[]}}function yse(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=t.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),S=o.viewChildren,w=c.upperHeight,C=S&&S.length,M=f.getModel("itemStyle"),A=f.getModel(["emphasis","itemStyle"]),k=f.getModel(["blur","itemStyle"]),E=f.getModel(["select","itemStyle"]),D=M.get("borderRadius")||0,I=ue("nodeGroup",IT);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),Jy(I).nodeWidth=d,Jy(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",qN,u,pse);z&&H(I,z,C&&c.upperLabelHeight);var O=f.getModel("emphasis"),V=O.get("focus"),G=O.get("blurScope"),F=O.get("disabled"),U=V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():V;if(C)iv(I)&&kl(I,!1),z&&(kl(z,!F),h.setItemGraphicEl(o.dataIndex,z),zw(z,U,G));else{var j=ue("content",qN,u,gse);j&&X(I,j),z.disableMorphing=!0,z&&iv(z)&&kl(z,!1),kl(I,!F),h.setItemGraphicEl(o.dataIndex,I);var W=f.getShallow("cursor");W&&j.attr("cursor",W),zw(I,U,G)}return I;function H(xe,ge,ke){var fe=Le(ge);if(fe.dataIndex=o.dataIndex,fe.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:d,height:p,r:D}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),ot=Me.stroke,Ye=eR(M);Ye.fill=ot;var tt=ml(A);tt.fill=A.get("borderColor");var lt=ml(k);lt.fill=k.get("borderColor");var Dt=ml(E);if(Dt.fill=E.get("borderColor"),ke){var gr=d-2*g;ne(ge,ot,Me.opacity,{x:g,y:0,width:gr,height:w})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=tt,ge.ensureState("blur").style=lt,ge.ensureState("select").style=Dt,eu(ge)}xe.add(ge)}function X(xe,ge){var ke=Le(ge);ke.dataIndex=o.dataIndex,ke.seriesIndex=t.seriesIndex;var fe=Math.max(d-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:fe,height:Me,r:D}),m)K(ge);else{ge.invisible=!1;var ot=o.getVisual("style"),Ye=ot.fill,tt=eR(M);tt.fill=Ye,tt.decal=ot.decal;var lt=ml(A),Dt=ml(k),gr=ml(E);ne(ge,Ye,ot.opacity,null),ge.setStyle(tt),ge.ensureState("emphasis").style=lt,ge.ensureState("blur").style=Dt,ge.ensureState("select").style=gr,eu(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,ke,fe){var Me=f.getModel(fe?JN:QN),ot=rr(f.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(f,fe?JN:QN),{defaultText:Ye?ot:null,inheritColor:ge,defaultOpacity:ke,labelFetcher:t,labelDataIndex:o.dataIndex});var tt=xe.getTextContent();if(tt){var lt=tt.style,Dt=zv(lt.padding||0);fe&&(xe.setTextConfig({layoutRect:fe}),tt.disableLabelLayout=!0),tt.beforeUpdate=function(){var zr=Math.max((fe?fe.width:xe.shape.width)-Dt[1]-Dt[3],0),Fi=Math.max((fe?fe.height:xe.shape.height)-Dt[0]-Dt[2],0);(lt.width!==zr||lt.height!==Fi)&&tt.setStyle({width:zr,height:Fi})},lt.truncateMinChar=2,lt.lineOverflow="truncate",ie(lt,fe,c);var gr=tt.getState("emphasis");ie(gr?gr.style:null,fe,c)}}function ie(xe,ge,ke){var fe=xe?xe.text:null;if(!ge&&ke.isLeafRoot&&fe!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+fe:fe}}function ue(xe,ge,ke,fe){var Me=_!=null&&r[xe][_],ot=i[xe];return Me?(r[xe][_]=null,ve(ot,Me)):m||(Me=new ge,Me instanceof hi&&(Me.z2=_se(ke,fe)),Ge(ot,Me)),e[xe][y]=Me}function ve(xe,ge){var ke=xe[y]={};ge instanceof IT?(ke.oldX=ge.x,ke.oldY=ge.y):ke.oldShape=J({},ge.shape)}function Ge(xe,ge){var ke=xe[y]={},fe=o.parentNode,Me=ge instanceof _e;if(fe&&(!n||n.direction==="drillDown")){var ot=0,Ye=0,tt=i.background[fe.getRawIndex()];!n&&tt&&tt.oldShape&&(ot=tt.oldShape.width,Ye=tt.oldShape.height),Me?(ke.oldX=0,ke.oldY=Ye):ke.oldShape={x:ot,y:Ye,width:0,height:0}}ke.fadein=!Me}}function _se(t,e){return t*vse+e}var xv=R,xse=be,e0=-1,dr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=wse[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(aS(i),Sse(i)):r==="category"?i.categories?bse(i):aS(i,!0):(Nr(r!=="linear"||i.dataExtent),aS(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return $e(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){be(e)?R(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:be(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&xv(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(xse(e)){var r=[];xv(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function aS(t,e){var r=t.visual,n=[];be(r)?xv(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),L6(t,n)}function Ng(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:ET([0,1])}}function tR(t){var e=this.option.visual;return e[Math.round(nt(t,[0,1],[0,e.length-1],!0))]||{}}function kf(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Qf(t){var e=this.option.visual;return e[this.option.loop&&t!==e0?t%e.length:t]}function yl(){return this.option.visual[0]}function ET(t){return{linear:function(e){return nt(e,t,this.option.visual,!0)},category:Qf,piecewise:function(e,r){var n=NT.call(this,r);return n==null&&(n=nt(e,t,this.option.visual,!0)),n},fixed:yl}}function NT(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=dr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function L6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=Zr(r);return n||[0,0,0,1]})),e}var wse={linear:function(t){return nt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=dr.findPieceIndex(t,e,!0);if(r!=null)return nt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??e0},fixed:Rt};function Rg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=Pse(i,l,g,m,p,n);k6(g,y,r,n)}})}}}function Mse(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function rR(t){var e=oS(t,"color");if(e){var r=oS(t,"colorAlpha"),n=oS(t,"colorSaturation");return n&&(e=to(e,null,null,n)),r&&(e=Jd(e,r)),e}}function Ase(t,e){return e!=null?to(e,null,null,t):null}function oS(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function Lse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=sS(e,"color")||i.color!=null&&i.color!=="none"&&(sS(e,"colorAlpha")||sS(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new dr(h);return P6(f).drColorMappingBy=c,f}}}function sS(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function Pse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&P6(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Sv=Math.max,t0=Math.min,nR=br,fA=R,D6=["itemStyle","borderWidth"],kse=["itemStyle","gapWidth"],Dse=["upperLabel","show"],Ise=["upperLabel","height"];const Ese={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=sr(t,r).refContainer,o=bt(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(nR(o.width,s[0]),a.width),u=oe(nR(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=_v(n,h,t),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=C6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?jse(t,f,p,l,u):d?[d.width,d.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var S={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(S),I6(p,_,!1,0),S=p.getLayout(),fA(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var w=t.getData().tree.root;w.setLayout(Vse(o,d,f),!0),t.setLayoutInfo(o),E6(w,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function I6(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(D6),u=s.get(kse)/2,c=N6(s),h=Math.max(l,c),f=l-u,d=h-u;t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=Sv(i-2*f,0),a=Sv(a-f-d,0);var p=i*a,g=Nse(t,s,p,e,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=t0(i,a),_=1/0,S=[];S.area=0;for(var w=0,C=g.length;w=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Bse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?Sv(u*n/l,l/(u*i)):1/0}function iR(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var h=0,f=t.length;hMw&&(u=Mw),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(C[0]=-C[0],C[1]=-C[1]);var A=w[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var k=-Math.atan2(w[1],w[0]);h[0].8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+c[0],a.y=-f[1]*_+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+E,p=w[0]<0?"right":"left",a.originX=-y*A,a.originY=-E;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=M[0],a.y=M[1]+E,p="center",a.originY=-E;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*A+h[0],a.y=h[1]+E,p=w[0]>=0?"right":"left",a.originX=y*A,a.originY=-E;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),mA=function(){function t(e){this.group=new _e,this._LineCtor=e||gA}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=cR(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=cR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!nle(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function cR(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function hR(t){return isNaN(t[0])||isNaN(t[1])}function fS(t){return t&&!hR(t[0])&&!hR(t[1])}var dS=[],vS=[],pS=[],Xu=Sr,gS=ls,fR=Math.abs;function dR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){dS[0]=Xu(n[0],i[0],a[0],c),dS[1]=Xu(n[1],i[1],a[1],c);var h=fR(gS(dS,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function mS(t,e){var r=[],n=Kd,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ma(u[0]),ma(u[1])],u[2]&&u.__original.push(ma(u[2])));var f=u.__original;if(u[2]!=null){if(Gr(i[0],f[0]),Gr(i[1],f[2]),Gr(i[2],f[1]),c&&c!=="none"){var d=ed(s.node1),p=dR(i,f[0],d*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(h&&h!=="none"){var d=ed(s.node2),p=dR(i,f[1],d*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}Gr(u[0],i[0]),Gr(u[1],i[2]),Gr(u[2],i[1])}else{if(Gr(a[0],f[0]),Gr(a[1],f[1]),Uo(o,a[1],a[0]),hu(o,o),c&&c!=="none"){var d=ed(s.node1);uy(a[0],a[0],o,d*e)}if(h&&h!=="none"){var d=ed(s.node2);uy(a[1],a[1],o,-d*e)}Gr(u[0],a[0]),Gr(u[1],a[1])}})}var F6=Fe();function ile(t){if(t)return F6(t).bridge}function vR(t,e){t&&(F6(t).bridge=e)}function pR(t){return t.type==="view"}var ale=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new Qv,a=new mA,o=this.group,s=new _e;this._controller=new yu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(pR(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(h):Qe(this._mainGroup,h,r)}mS(r.getGraph(),Jf(r));var f=r.getData();u.updateData(f);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");f.graph.eachNode(function(w){var C=w.dataIndex,M=w.getGraphicEl(),A=w.getModel();if(M){M.off("drag").off("dragend");var k=A.get("draggable");k&&M.on("drag",function(D){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(C),f.setItemLayout(C,[M.x,M.y]);break;case"circular":f.setItemLayout(C,[M.x,M.y]),w.setLayout({fixed:!0},!0),pA(r,"symbolSize",w,[D.offsetX,D.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(C,[M.x,M.y]),vA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(C)}),M.setDraggable(k,!!A.get("cursor"));var E=A.get(["emphasis","focus"]);E==="adjacency"&&(Le(M).focus=w.getAdjacentDataIndices())}}),f.graph.eachEdge(function(w){var C=w.getGraphicEl(),M=w.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Le(C).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=f.getLayout("cx"),S=f.getLayout("cy");f.graph.eachNode(function(w){B6(w,y,_,S)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!pR(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(aA(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(oA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),mS(r.getGraph(),Jf(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Jf(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(mS(r.getGraph(),Jf(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=ile(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,h=new _e;s.add(h),s.add(c);for(var f=0;f=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof _l||(r=this._nodesMap[qu(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(d.node1))}for(l=0;l=0&&!e.hasKey(S)&&(e.set(S,!0),s.push(_.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),G6=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=de(),r=de();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!e.hasKey(h)&&(e.set(h,!0),n.push(c.node1))}for(a=0;a=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function H6(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(_l,H6("hostGraph","data"));Bt(G6,H6("hostGraph","edgeData"));function yA(t,e,r,n,i){for(var a=new ole(n),o=0;o "+f)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=ka(t,r);else{var g=Lh.get(d),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Ih(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new $r(y,r),p.initData(t)}var _=new $r(["value"],r);return _.initData(l,s),i&&i(p,_),w6({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var sle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new zh(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Kl(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){$se(this);var s=yA(a,i,this,!0,l);return R(s.edges,function(u){Yse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=We.prototype.getModel;function f(p,g){var m=h.call(this,p,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=ZV({series:this,dataIndex:r,multipleSeries:n});return h},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new $r(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function lle(t){t.registerChartView(ale),t.registerSeriesModel(sle),t.registerProcessor(Gse),t.registerVisual(Hse),t.registerVisual(Wse),t.registerLayout(Xse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Kse),t.registerLayout(Jse),t.registerCoordinateSystem("graphView",{dimensions:_u.dimensions,create:tle}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Rt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Rt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=m_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var gR=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;Le(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),h=r.getItemLayout(n),f=J(da(u.getModel("itemStyle"),h,!0),h),d=this;if(isNaN(f.startAngle)){d.setShape(f);return}a?d.setShape(f):Qe(d,{shape:f},l,n);var p=J(da(u.getModel("itemStyle"),h,!0),h);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),ir(d,u,"itemStyle");var g=c.get("focus");wt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var h=ar(n),f=i.getVisual("style");vr(a,h,{labelFetcher:{getFormattedLabel:function(_,S,w,C,M,A){return r.getFormattedLabel(_,S,"node",C,xn(M,h.normal&&h.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:f.fill,defaultOpacity:f.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",p=c.get("distance")||0,g;d==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var m=d!=="outside"?c.get("align")||"center":l>0?"left":"right",y=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Rr),ule=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Le(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),h=n.getItemModel(l.dataIndex),f=h.getModel("lineStyle"),d=h.getModel("emphasis"),p=d.get("focus"),g=J(da(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),mR(m,l,r,f)):(fi(m),mR(m,l,r,f),Qe(m,{shape:g},s,i)),wt(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),ir(m,h,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(Ue);function mR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,h=(c.s1[0]+c.s2[0])/2,f=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new fu(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var cle=Math.PI/180,hle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*cle;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new gR(a,c,l);Le(f).dataIndex=c,s.add(f)}}).update(function(c,h){var f=o.getItemGraphicEl(h),d=a.getItemLayout(c);if(!d){f&&ro(f,r,h);return}f?f.updateData(a,c,l):f=new gR(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&ro(h,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),St(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new ule(i,a,l,n);Le(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&ro(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(st),fle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new zh(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=yA(a,i,this,!0,s);return o.data}function s(l,u){var c=We.prototype.getModel;function h(d,p){var g=c.call(this,d,p);return g.resolveParentPath=f,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=h,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(ht),yS=Math.PI/180;function dle(t,e){t.eachSeriesByType("chord",function(r){vle(r,e)})}function vle(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=hV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((t.get("padAngle")||0)*yS,0),f=Math.max((t.get("minAngle")||0)*yS,0),d=-t.get("startAngle")*yS,p=d+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[d,p];J0(y,!g);var _=y[0],S=y[1],w=S-_,C=r.getSum("value")===0&&i.getSum("value")===0,M=[],A=0;n.eachEdge(function(j){var W=C?1:j.getValue("value");C&&(W>0||f)&&(A+=2);var H=j.node1.dataIndex,X=j.node2.dataIndex;M[H]=(M[H]||0)+W,M[X]=(M[X]||0)+W});var k=0;if(n.eachNode(function(j){var W=j.getValue("value");isNaN(W)||(M[j.dataIndex]=Math.max(W,M[j.dataIndex]||0)),!C&&(M[j.dataIndex]>0||f)&&A++,k+=M[j.dataIndex]||0}),!(A===0||k===0)){h*A>=Math.abs(w)&&(h=Math.max(0,(Math.abs(w)-f*A)/A)),(h+f)*A>=Math.abs(w)&&(f=(Math.abs(w)-h*A)/A);var E=(w-h*A*m)/k,D=0,I=0,z=0;n.eachNode(function(j){var W=M[j.dataIndex]||0,H=E*(k?W:1)*m;Math.abs(H)I){var V=D/I;n.eachNode(function(j){var W=j.getLayout().angle;Math.abs(W)>=f?j.setLayout({angle:W*V,ratio:V},!0):j.setLayout({angle:f,ratio:f===0?1:W/f},!0)})}else n.eachNode(function(j){if(!O){var W=j.getLayout().angle,H=Math.min(W/z,1),X=H*D;W-Xf&&f>0){var H=O?1:Math.min(W/z,1),X=W-f,K=Math.min(X,Math.min(G,D*H));G-=K,j.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else f>0&&j.setLayout({angle:f,ratio:W===0?1:f/W},!0)}});var F=_,U=[];n.eachNode(function(j){var W=Math.max(j.getLayout().angle,f);j.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:F,endAngle:F+W*m,clockwise:g},!0),U[j.dataIndex]=F,F+=(W+h)*m}),n.eachEdge(function(j){var W=C?1:j.getValue("value"),H=E*(k?W:1)*m,X=j.node1.dataIndex,K=U[X]||0,ne=Math.abs((j.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],ve=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Ge=j.node2.dataIndex,xe=U[Ge]||0,ge=Math.abs((j.node2.getLayout().ratio||1)*H),ke=xe+ge*m,fe=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(ke),l+c*Math.sin(ke)];j.setLayout({s1:ue,s2:ve,sStartAngle:K,sEndAngle:ie,t1:fe,t2:Me,tStartAngle:xe,tEndAngle:ke,cx:s,cy:l,r:c,value:W,clockwise:g}),U[X]=ie,U[Ge]=ke})}}}function ple(t){t.registerChartView(hle),t.registerSeriesModel(fle),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,dle),t.registerProcessor(Rh("chord"))}var gle=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),mle=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new gle},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},e}(Ue);function yle(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function zg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var _le=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=yle(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),f=h.get("roundCap"),d=f?Yy:Rr,p=h.get("show"),g=h.getModel("lineStyle"),m=g.get("width"),y=[u,c];J0(y,!l),u=y[0],c=y[1];for(var _=c-u,S=u,w=[],C=0;p&&C=E&&(D===0?0:a[D-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-k-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?h.add(new Xe({style:vt(S,{text:W,x:X,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:H}),silent:!0})):h.add(new Xe({style:vt(S,{text:W,x:X,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:X,originY:K,rotation:ie}))}if(_.get("show")&&F!==w){var U=_.get("distance");U=U?U+c:c;for(var ue=0;ue<=C;ue++){V=Math.cos(k),G=Math.sin(k);var ve=new Wt({shape:{x1:V*(p-U)+f,y1:G*(p-U)+d,x2:V*(p-A-U)+f,y2:G*(p-A-U)+d},silent:!0,style:z});z.stroke==="auto"&&ve.setStyle({stroke:a((F+ue/C)/w)}),h.add(ve),k+=D}k-=D}else k+=E}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),S=_.mapDimension("value"),w=+r.get("min"),C=+r.get("max"),M=[w,C],A=[s,l];function k(D,I){var z=_.getItemModel(D),O=z.getModel("pointer"),V=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),F=r.get(["pointer","icon"]),U=O.get("offsetCenter"),j=oe(U[0],o.r),W=oe(U[1],o.r),H=O.get("keepAspect"),X;return F?X=Ut(F,j-V/2,W-G,V,G,null,H):X=new mle({shape:{angle:-Math.PI/2,width:V,r:G,x:j,y:W}}),X.rotation=-(I+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function E(D,I){var z=m.get("roundCap"),O=z?Yy:Rr,V=m.get("overlap"),G=V?m.get("width"):c/_.count(),F=V?o.r-G:o.r-(D+1)*G,U=V?o.r:o.r-D*G,j=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:U}});return V&&(j.z2=nt(_.get(S,D),[w,C],[100,0],!0)),j}(y||g)&&(_.diff(f).add(function(D){var I=_.get(S,D);if(g){var z=k(D,s);St(z,{rotation:-((isNaN(+I)?A[0]:nt(I,M,A,!0))+Math.PI/2)},r),h.add(z),_.setItemGraphicEl(D,z)}if(y){var O=E(D,s),V=m.get("clip");St(O,{shape:{endAngle:nt(I,M,A,V)}},r),h.add(O),Ew(r.seriesIndex,_.dataType,D,O),p[D]=O}}).update(function(D,I){var z=_.get(S,D);if(g){var O=f.getItemGraphicEl(I),V=O?O.rotation:s,G=k(D,V);G.rotation=V,Qe(G,{rotation:-((isNaN(+z)?A[0]:nt(z,M,A,!0))+Math.PI/2)},r),h.add(G),_.setItemGraphicEl(D,G)}if(y){var F=d[I],U=F?F.shape.endAngle:s,j=E(D,U),W=m.get("clip");Qe(j,{shape:{endAngle:nt(z,M,A,W)}},r),h.add(j),Ew(r.seriesIndex,_.dataType,D,j),p[D]=j}}).execute(),_.each(function(D){var I=_.getItemModel(D),z=I.getModel("emphasis"),O=z.get("focus"),V=z.get("blurScope"),G=z.get("disabled");if(g){var F=_.getItemGraphicEl(D),U=_.getItemVisual(D,"style"),j=U.fill;if(F instanceof pr){var W=F.style;F.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},U))}else F.useStyle(U),F.type!=="pointer"&&F.setColor(j);F.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(nt(_.get(S,D),M,[0,1],!0))),F.z2EmphasisLift=0,ir(F,I),wt(F,O,V,G)}if(y){var H=p[D];H.useStyle(_.getItemVisual(D,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),wt(H,O,V,G)}}),this._progressEls=p)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),h=+r.get("max"),f=new _e,d=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,_){d[y]=s._titleEls[_],p[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),S=l.get(u,y),w=new _e,C=a(nt(S,[c,h],[0,1],!0)),M=_.getModel("title");if(M.get("show")){var A=M.get("offsetCenter"),k=o.cx+oe(A[0],o.r),E=o.cy+oe(A[1],o.r),D=d[y];D.attr({z2:m?0:2,style:vt(M,{x:k,y:E,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),w.add(D)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),V=o.cy+oe(z[1],o.r),G=oe(I.get("width"),o.r),F=oe(I.get("height"),o.r),U=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:C,D=p[y],j=I.get("formatter");D.attr({z2:m?0:2,style:vt(I,{x:O,y:V,text:zg(S,j),width:isNaN(G)?null:G,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:U})}),$j(D,{normal:I},S,function(H){return zg(H,j)}),g&&Yj(D,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return zg(ue?ue.interpolatedValue:S,j)}}),w.add(D)}f.add(w)}),this.group.add(f),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(st),xle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Oh(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,q.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:q.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:q.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:q.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:q.color.neutral00,borderWidth:0,borderColor:q.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:q.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:q.color.transparent,borderWidth:0,borderColor:q.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:q.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ht);function Sle(t){t.registerChartView(_le),t.registerSeriesModel(xle)}var ble=["itemStyle","opacity"],wle=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new Tr,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(ble);c=c??1,i||fi(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,St(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,h=r.getItemVisual(n,"style"),f=h.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),g=p==="inherit"?f:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),UM(i,ZM(l),{stroke:f})},e}(Or),Tle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new wle(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);ro(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(st),Cle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Oh(this,{coordDimensions:["value"],encodeDefaulter:Ie(_M,this)})},e.prototype._defaultLabelLine=function(r){Kl(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:q.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function Mle(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();oGle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!xS(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function xS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var Ule=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Ne(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=et(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Ve),Zle=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(pi);function ws(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Ku(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Ku(s,[0,o]),i=a=Ku(s,[i,a]),n=0}e[0]=Ku(e[0],r),e[1]=Ku(e[1],r);var l=SS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Ku(e[n],c);var h;return h=SS(e,n),i!=null&&(h.sign!==l.sign||h.spana&&(e[1-n]=e[n]+h.sign*a),e}function SS(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Ku(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var bS=R,U6=Math.min,Z6=Math.max,xR=Math.floor,$le=Math.ceil,SR=Ht,Yle=Math.PI,Xle=function(){function t(e,r,n){this.type="parallel",this._axesMap=de(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;bS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Zle(o,qv(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();bS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),iu(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer;this._rect=bt(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Bg(e.get("axisExpandWidth"),l),h=Bg(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=Bg(d[1]-d[0],l),d[1]=d[0]+p;else{p=Bg(c*(h-1),l);var g=e.get("axisExpandCenter")||xR(u/2);d=[c*g-p/2],d[1]=d[0]+p}var m=(s-p)/(u-h);m<3&&(m=0);var y=[xR(SR(d[0]/c,1))+1,$le(SR(d[1]/c,1))-1],_=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),bS(n,function(o,s){var l=(i.axisExpandable?Kle:qle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Yle/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],f=c[a],d=fr();xo(d,d,f),Oi(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?ws(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[Z6(0,p-d/2)],i[1]=U6(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Bg(t,e){return U6(Z6(t,e[0]),e[1])}function qle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Kle(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t=0;i--)kn(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;arue}function Q6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function J6(t,e,r,n){var i=new _e;return i.add(new je({name:"main",style:wA(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(TR,t,e,i,["n","s","w","e"]),ondragend:Ie(ou,e,{isEnd:!0})})),R(n,function(a){i.add(new je({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(TR,t,e,i,a),ondragend:Ie(ou,e,{isEnd:!0})}))}),i}function eH(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=ch(i,nue),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],h=r[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,g=h-s,m=p+i,y=g+i;ja(t,e,"main",o,s,p,g),n.transformable&&(ja(t,e,"w",l,u,a,y),ja(t,e,"e",f,u,a,y),ja(t,e,"n",l,u,m,a),ja(t,e,"s",l,d,m,a),ja(t,e,"nw",l,u,a,a),ja(t,e,"ne",f,u,a,a),ja(t,e,"sw",l,d,a,a),ja(t,e,"se",f,d,a,a))}function VT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(wA(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?FT(t,a[0]):uue(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?aue[s]+"-resize":null})})}function ja(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(hue(TA(t,e,[[n,i],[n+a,i+o]])))}function wA(t){return Se({strokeNoScale:!0},t.brushStyle)}function tH(t,e,r,n){var i=[wv(t,r),wv(e,n)],a=[ch(t,r),ch(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function lue(t){return fs(t.group)}function FT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=n_(r[e],lue(t));return n[i]}function uue(t,e){var r=[FT(t,e[0]),FT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function TR(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=rH(e,i,a);R(n,function(u){var c=iue[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(tH(s[0][0],s[1][0],s[0][1],s[1][1])),xA(e,r),ou(e,{isEnd:!1})}function cue(t,e,r,n){var i=e.__brushOption.range,a=rH(t,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),xA(t,e),ou(t,{isEnd:!1})}function rH(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function TA(t,e,r){var n=K6(t,e);return n&&n!==au?n.clipPath(r,t._transform):ye(r)}function hue(t){var e=wv(t[0][0],t[1][0]),r=wv(t[0][1],t[1][1]),n=ch(t[0][0],t[1][0]),i=ch(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function fue(t,e,r){if(!(!t._brushType||vue(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=bA(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var S_={lineX:AR(0),lineY:AR(1),rect:{createCover:function(t,e){function r(n){return n}return J6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=Q6(t);return tH(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){eH(t,e,r,n)},updateCommon:VT,contain:HT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new Tr({name:"main",style:wA(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Or({name:"main",draggable:!0,drift:Ie(cue,t,e),ondragend:Ie(ou,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:TA(t,e,r)})},updateCommon:VT,contain:HT}};function AR(t){return{createCover:function(e,r){return J6({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=Q6(e),n=wv(r[0][t],r[1][t]),i=ch(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=K6(e,r);if(o!==au&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),eH(e,r,l,i)},updateCommon:VT,contain:HT}}function iH(t){return t=CA(t),function(e){return eM(e,t)}}function aH(t,e){return t=CA(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function oH(t,e,r){var n=CA(t);return function(i,a){return n.contain(a[0],a[1])&&!h6(i,e,r)}}function CA(t){return Ce.create(t)}var pue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new _A(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!gue(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=yue(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,h=r.axis.dim,f=l.getAxisLayout(h),d=J({strokeContainThreshold:c},f),p=new rn(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Zv(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=Ce.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:iH(h),isTargetByCursor:oH(h,s,a),getLinearBrushOtherExtent:aH(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(mue(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(gt);function gue(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function mue(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function yue(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var _ue={type:"axisAreaSelect",event:"axisAreaSelected"};function xue(t){t.registerAction(_ue,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var Sue={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function sH(t){t.registerComponentView(Hle),t.registerComponentModel(Ule),t.registerCoordinateSystem("parallel",Jle),t.registerPreprocessor(jle),t.registerComponentModel(BT),t.registerComponentView(pue),lh(t,"parallel",BT,Sue),xue(t)}function bue(t){Oe(sH),t.registerChartView(Dle),t.registerSeriesModel(Nle),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Ble)}var wue=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),Tue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new wue},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){fo(this)},e.prototype.downplay=function(){vo(this)},e}(Ue),Cue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new yu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,h=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),f6(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new Tue,m=Le(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),S=_.get("curveness"),w=p.node1.getLayout(),C=p.node1.getModel(),M=C.get("localX"),A=C.get("localY"),k=p.node2.getLayout(),E=p.node2.getModel(),D=E.get("localX"),I=E.get("localY"),z=p.getLayout(),O,V,G,F,U,j,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=d,d==="vertical"?(O=(M!=null?M*u:w.x)+z.sy,V=(A!=null?A*c:w.y)+w.dy,G=(D!=null?D*u:k.x)+z.ty,F=I!=null?I*c:k.y,U=O,j=V*(1-S)+F*S,W=G,H=V*S+F*(1-S)):(O=(M!=null?M*u:w.x)+w.dx,V=(A!=null?A*c:w.y)+z.sy,G=D!=null?D*u:k.x,F=(I!=null?I*c:k.y)+z.ty,U=O*(1-S)+G*S,j=V,W=O*S+G*(1-S),H=F),g.setShape({x1:O,y1:V,x2:G,y2:F,cpx1:U,cpy1:j,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),LR(g.style,d,p);var X=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,ve,Ge,xe,ge,ke){return r.getFormattedLabel(ue,ve,"edge",xe,xn(ge,K.normal&&K.normal.get("formatter"),X),ke)}},labelDataIndex:p.dataIndex,defaultText:X}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var ve=ue.getItemStyle();return LR(ve,d,p),ve}),s.add(g),f.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");wt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),_=m.get("localY"),S=m.getModel("emphasis"),w=m.get(["itemStyle","borderRadius"])||0,C=new je({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:w},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(C,ar(m),{labelFetcher:{getFormattedLabel:function(A,k){return r.getFormattedLabel(A,k,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),C.disableLabelAnimation=!0,C.setStyle("fill",p.getVisual("color")),C.setStyle("decal",p.getVisual("style").decal),ir(C,m),s.add(C),h.setItemGraphicEl(p.dataIndex,C),Le(C).dataType="node";var M=S.get("focus");wt(C,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,S.get("blurScope"),S.get("disabled"))}),h.eachItemGraphicEl(function(p,g){var m=h.getItemModel(g);m.get("draggable")&&(p.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Mue(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new _u(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(st);function LR(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new fu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Mue(t,e,r){var n=new je({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return St(n,{shape:{width:t.width+20}},e,r),n}var Aue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new We(o[l],this,n));var u=yA(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,_=g.levelModels[y];_&&(d.parentModel=_)}return d}),f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var _=y.depth,S=g.levelModels[_];S&&(d.parentModel=S)}return d})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),h=c.getLayout().value,f=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:q.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:q.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(ht);function Lue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sr(r,e).refContainer,o=bt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,h=u.edges;kue(c);var f=et(c,function(m){return m.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");Pue(c,h,n,i,s,l,d,p,g)})}function Pue(t,e,r,n,i,a,o,s,l){Due(t,e,r,i,a,s,l),Rue(t,e,a,i,n,o,s),Wue(t,s)}function kue(t){R(t,function(e){var r=ps(e.outEdges,r0),n=ps(e.inEdges,r0),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function Due(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:h},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_h-1?d:h-1;o&&o!=="left"&&Iue(t,o,a,A);var k=a==="vertical"?(i-r)/A:(n-r)/A;Nue(t,k,a)}function lH(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function Iue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,Bue(s,l,o),wS(s,i,r,n,o),Hue(s,l,o),wS(s,i,r,n,o)}function Oue(t,e){var r=[],n=e==="vertical"?"y":"x",i=Lw(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function zue(t,e,r,n,i,a){var o=1/0;R(t,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function Bue(t,e,r){R(t.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=ps(i.outEdges,jue,r)/ps(i.outEdges,r0);if(isNaN(a)){var o=i.outEdges.length;a=o?ps(i.outEdges,Vue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-Ts(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ts(i,r))*e;i.setLayout({y:l},!0)}}})})}function jue(t,e){return Ts(t.node2,e)*t.getValue()}function Vue(t,e){return Ts(t.node2,e)}function Fue(t,e){return Ts(t.node1,e)*t.getValue()}function Gue(t,e){return Ts(t.node1,e)}function Ts(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function r0(t){return t.getValue()}function ps(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),R(n,function(s){var l=new dr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Zue(t){t.registerChartView(Cue),t.registerSeriesModel(Aue),t.registerLayout(Lue),t.registerVisual(Uue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=m_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var uH=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),m=e.data;if(m&&l){var y=[];R(m,function(w,C){var M;ee(w)?(M=w.slice(),w.unshift(C)):ee(w.value)?(M=J({},w),M.value=M.value.slice(),w.value.unshift(C)):M=w,y.push(M)}),e.data=y}var _=this.defaultValueDimensions,S=[{name:h,type:jy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:jy(g),dimsDef:_.slice()}];return Oh(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:Ie(_V,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),cH=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:q.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:q.color.shadow}},animationDuration:800},e}(ht);Bt(cH,uH,!0);var $ue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=PR(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(fi(h),hH(f,h,a,u)):h=PR(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(st),Yue=function(){function t(){}return t}(),Xue=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Yue},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var w=[y,S];n.push(w)}}}return{boxData:r,outliers:n}}var rce={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Cr){var n="";it(n)}var i=tce(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function nce(t){t.registerSeriesModel(cH),t.registerChartView($ue),t.registerLayout(Kue),t.registerTransform(rce)}var ice=["itemStyle","borderColor"],ace=["itemStyle","borderColor0"],oce=["itemStyle","borderColorDoji"],sce=["itemStyle","color"],lce=["itemStyle","color0"];function MA(t,e){return e.get(t>0?sce:lce)}function AA(t,e){return e.get(t===0?oce:t>0?ice:ace)}var uce={seriesType:"candlestick",plan:Ph(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=MA(s,o),l.stroke=AA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},cce=["color","borderColor"],hce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){Ds(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&kR(u,h))return;var f=TS(h,c,!0);St(f,{shape:{points:h.ends}},r,c),CS(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&kR(u,d)){a.remove(f);return}f?(Qe(f,{shape:{points:d.ends}},r,c),fi(f)):f=TS(d),CS(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),DR(r,this.group);var n=r.get("clip",!0)?Jv(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=TS(s);CS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){DR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(st),fce=function(){function t(){}return t}(),dce=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new fce},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(Ue);function TS(t,e,r){var n=t.ends;return new dce({shape:{points:r?vce(n,t):n},z2:100})}function kR(t,e){for(var r=!0,n=0;nC?I[a]:D[a],ends:V,brushRect:W(M,A,S)})}function U(X,K){var ne=[];return ne[i]=K,ne[a]=X,isNaN(K)||isNaN(X)?[NaN,NaN]:e.dataToPoint(ne)}function j(X,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=Sm(ie[i]+n/2,1,!1),ue[i]=Sm(ue[i]-n/2,1,!0),ne?X.push(ie,ue):X.push(ue,ie)}function W(X,K,ne){var ie=U(X,ne),ue=U(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(X){return X[i]=Sm(X[i],1),X}}function p(g,m){for(var y=ha(g.count*4),_=0,S,w=[],C=[],M,A=m.getStore(),k=!!t.get(["itemStyle","borderColorDoji"]);(M=g.next())!=null;){var E=A.get(s,M),D=A.get(u,M),I=A.get(c,M),z=A.get(h,M),O=A.get(f,M);if(isNaN(E)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=IR(A,M,D,I,c,k),w[i]=E,w[a]=z,S=e.dataToPoint(w,null,C),y[_++]=S?S[0]:NaN,y[_++]=S?S[1]:NaN,w[a]=O,S=e.dataToPoint(w,null,C),y[_++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function IR(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function yce(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function _ce(t){t.registerChartView(hce),t.registerSeriesModel(fH),t.registerPreprocessor(gce),t.registerVisual(uce),t.registerLayout(mce)}function ER(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var xce=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=new Kv(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;me(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return Ya(r.__p1,r.__cp1)+Ya(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Sr,c=fw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];r.x=h[0]*(1-c)+c*f[0],r.y=h[1]*(1-c)+c*f[1];var d=r.__t<1?f[0]-h[0]:h[0]-f[0],p=r.__t<1?f[1]-h[1]:h[1]-f[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(dH),Cce=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),Mce=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Cce},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;r.quadraticCurveTo(d,p,h,f)}else r.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var h=a[u++],f=a[u++],d=1;d0){var m=(h+p)/2-(f-g)*o,y=(f+g)/2-(p-h)*o;if(vj(h,f,m,y,p,g,s,r,n))return l}else if(Bo(h,f,p,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),pH={seriesType:"lines",plan:Ph(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&Jv(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=pH.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Ace:new mA(o?a?Tce:vH:a?dH:gA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(st),Pce=typeof Uint32Array>"u"?Array:Uint32Array,kce=typeof Float64Array>"u"?Array:Float64Array;function NR(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),F0([i,r[0],r[1]])}))}var Dce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],NR(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(NR(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=qc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=qc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ht);function jg(t){return t instanceof Array||(t=[t,t]),t}var Ice={seriesType:"lines",reset:function(t){var e=jg(t.get("symbol")),r=jg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=jg(s.getShallow("symbol",!0)),u=jg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function Ece(t){t.registerChartView(Lce),t.registerSeriesModel(Dce),t.registerLayout(pH),t.registerVisual(Ice)}var Nce=256,Rce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Sn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=e.length;h.width=r,h.height=n;for(var p=0;p0){var z=o(S)?l:u;S>0&&(S=S*D+k),C[M++]=z[I],C[M++]=z[I+1],C[M++]=z[I+2],C[M++]=z[I+3]*S*256}else M+=4}return f.putImageData(w,0,0),h},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Sn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=q.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function Oce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function RR(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Bce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):RR(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(RR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Ds(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=bs(s,"cartesian2d"),u=bs(s,"matrix"),c,h,f,d;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,h=g.getBandWidth()+.5,f=p.scale.getExtent(),d=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),S=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),C=r.get(["itemStyle","borderRadius"]),M=ar(r),A=r.getModel("emphasis"),k=A.get("focus"),E=A.get("blurScope"),D=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zf[1]||Fd[1])continue;var U=s.dataToPoint([G,F]);O=new je({shape:{x:U[0]-c/2,y:U[1]-h/2,width:c,height:h},style:V})}else if(u){var j=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(Dr(j.x))continue;O=new je({z2:1,shape:j,style:V})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),j=W.contentRect||W.rect;if(Dr(j.x)||Dr(j.y))continue;O=new je({z2:1,shape:j,style:V})}if(y.hasItemOption){var H=y.getItemModel(z),X=H.getModel("emphasis");_=X.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),w=H.getModel(["select","itemStyle"]).getItemStyle(),C=H.get(["itemStyle","borderRadius"]),k=X.get("focus"),E=X.get("blurScope"),D=X.get("disabled"),M=ar(H)}O.shape.r=C;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,M,{labelFetcher:r,labelDataIndex:z,defaultOpacity:V.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=S,O.ensureState("select").style=w,wt(O,k,E,D),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new Rce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),h=r.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-f,y=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(A,k,E){var D=r.dataToPoint([A,k]);return D[0]-=f,D[1]-=d,D.push(E),D}),w=i.getExtent(),C=i.type==="visualMap.continuous"?zce(w,i.option.range):Oce(w,i.getPieceList(),i.option.selected);u.update(S,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},C);var M=new pr({style:{width:m,height:y,x:f,y:d,image:u.canvas},silent:!0});this.group.add(M)},e.type="heatmap",e}(st),jce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=Lh.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function Vce(t){t.registerChartView(Bce),t.registerSeriesModel(jce)}var Fce=["itemStyle","borderWidth"],OR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],LS=new Pa,Gce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:OR[+c],categoryDim:OR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=BR(o,p),m=zR(o,p,g,f),y=jR(o,f,m);o.setItemGraphicEl(p,y),a.add(y),FR(y,f,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=BR(o,p),_=zR(o,p,y,f),S=SH(o,_);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Xce(m,f,_):m=jR(o,f,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),FR(m,f,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&VR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?Jv(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){VR(a,Le(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(st);function zR(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),f={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};Hce(r,a,i,n,f),Wce(t,e,i,a,o,f.boundingLength,f.pxSign,c,n,f),Uce(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=gu(r.get("symbolOffset"),d);return Zce(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function Hce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var h=[PS(s,o[0])-l,PS(s,o[1])-l];h[1]=0?1:-1:c>0?1:-1}function PS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Wce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(r[h.wh]),d=t.getItemVisual(e,"symbolSize"),p;ee(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=oe(p[h.index],f),p[c.index]=oe(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function Uce(t,e,r,n,i){var a=t.get(Fce)||0;a&&(LS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),LS.updateTransform(),a/=LS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function Zce(t,e,r,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,g=Math.max(e[d.index]+s,0),m=g;if(n){var y=Math.abs(l),_=br(t.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var w=oe(_,e[d.index]),C=Math.max(g+w*2,0),M=S?0:w*2,A=z2(n),k=A?n:GR((y+M)/C),E=y-k*g;w=E/2/(S?k:Math.max(k-1,1)),C=g+w*2,M=S?0:w*2,!A&&n!=="fixed"&&(k=u?GR((Math.abs(u)+M)/C):0),m=k*C-M,h.repeatTimes=k,h.symbolMargin=w}var D=p*(m/2),I=h.pathPosition=[];I[f.index]=r[f.wh]/2,I[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=h.bundlePosition=[];z[f.index]=r[f.xy],z[d.index]=r[d.xy];var O=h.barRectShape=J({},r);O[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(I[d.index]+D)),O[f.wh]=r[f.wh];var V=h.clipShape={};V[f.xy]=-r[f.xy],V[f.wh]=c.ecSize[f.wh],V[d.xy]=0,V[d.wh]=r[d.wh]}function gH(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function mH(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,h=a[e.valueDim.index]+o+r.symbolMargin*2;for(LA(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=h*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function yH(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?jc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=gH(r),i.add(a),jc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function _H(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?jc(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new je({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function xH(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new je({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],du[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function BR(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=$ce,r.isAnimationEnabled=Yce,r}function $ce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Yce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function jR(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?mH(i,e,r):yH(i,e,r),_H(i,r,n),xH(i,e,r,n),i.__pictorialShapeStr=SH(t,r),i.__pictorialSymbolMeta=r,i}function Xce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?mH(t,e,r,!0):yH(t,e,r,!0),_H(t,r,!0),xH(t,e,r,!0)}function VR(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];LA(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){Ss(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function SH(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function LA(t,e,r){R(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function jc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&du[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function FR(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");LA(t,function(g){if(g instanceof pr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,f&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:sh(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),wt(t,c,h,a.get("disabled"))}function GR(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var qce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Is(mv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:q.color.primary}}}),e}(mv);function Kce(t){t.registerChartView(Gce),t.registerSeriesModel(qce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(FF,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,GF("pictorialBar"))}var Qce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(m){return m.name}var d=new po(this._layersSeries||[],l,f,f),p=[];d.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,_){var S=o._layers;if(m==="remove"){s.remove(S[y]);return}for(var w=[],C=[],M,A=l[y].indices,k=0;ka&&(a=s),n.push(s)}for(var u=0;ua&&(a=h)}return{y0:i,max:a}}function nhe(t){t.registerChartView(Qce),t.registerSeriesModel(ehe),t.registerLayout(the),t.registerProcessor(Rh("themeRiver"))}var ihe=2,ahe=4,WR=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=ihe,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:ahe,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Le(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=J({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=ih(d,o));var p=da(l.getModel("itemStyle"),h,!0);J(h,p),R(an,function(_){var S=s.ensureState(_),w=l.getModel([_,"itemStyle"]);S.style=w.getItemStyle();var C=da(w,h);C&&(S.shape=C)}),r?(s.setShape(h),s.shape.r=c.r0,St(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:h},i),fi(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?qc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;wt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)V&&!Jc(F-V)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new WR(_,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(w){o._rootToNode(S.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Py(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:WT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(st),uhe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};bH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=cA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=__(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){M6(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ht);function bH(t){var e=0;R(t.children,function(n){bH(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var ZR=Math.PI/180;function che(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),h=oe(a[0],l/2),f=oe(a[1],l/2),d=-n.get("startAngle")*ZR,p=n.get("minAngle")*ZR,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&wH(m,_);var S=0;R(m.children,function(F){!isNaN(F.getValue())&&S++});var w=m.getValue(),C=Math.PI/(w||S)*2,M=m.depth>0,A=m.height-(M?-1:1),k=(f-h)/(A||1),E=n.get("clockwise"),D=n.get("stillShowZeroSum"),I=E?1:-1,z=function(F,U){if(F){var j=U;if(F!==g){var W=F.getValue(),H=w===0&&D?C:W*C;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=py(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function dhe(t){t.registerChartView(lhe),t.registerSeriesModel(uhe),t.registerLayout(Ie(che,"sunburst")),t.registerProcessor(Ie(Rh,"sunburst")),t.registerVisual(fhe),she(t)}var $R={color:"fill",borderColor:"stroke"},vhe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},no=Fe(),phe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return ka(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=no(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ht);function ghe(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function mhe(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(ghe,t)}}}function yhe(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function _he(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(yhe,t)}}}function xhe(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function She(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(xhe,t)}}}function bhe(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function whe(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(bhe,t)}}}function The(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function Che(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function TH(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||he(t,"text")))}function CH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},he(n,"text")&&(o.text=n.text),he(n,"rich")&&(o.rich=n.rich),he(n,"textFill")&&(o.fill=n.textFill),he(n,"textStroke")&&(o.stroke=n.textStroke),he(n,"fontFamily")&&(o.fontFamily=n.fontFamily),he(n,"fontSize")&&(o.fontSize=n.fontSize),he(n,"fontStyle")&&(o.fontStyle=n.fontStyle),he(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=he(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),he(n,"textPosition")&&(i.position=n.textPosition),he(n,"textOffset")&&(i.offset=n.textOffset),he(n,"textRotation")&&(i.rotation=n.textRotation),he(n,"textDistance")&&(i.distance=n.textDistance)}return YR(o,t),R(o.rich,function(l){YR(l,l)}),{textConfig:i,textContent:a}}function YR(t,e){e&&(e.font=e.textFont||e.font,he(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),he(e,"textAlign")&&(t.align=e.textAlign),he(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),he(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),he(e,"textWidth")&&(t.width=e.textWidth),he(e,"textHeight")&&(t.height=e.textHeight),he(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),he(e,"textPadding")&&(t.padding=e.textPadding),he(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),he(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),he(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),he(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),he(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),he(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),he(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function XR(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||q.color.neutral99;qR(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||q.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||q.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,R(e.rich,function(s){qR(s,s)}),n}function qR(t,e){e&&(he(e,"fill")&&(t.textFill=e.fill),he(e,"stroke")&&(t.textStroke=e.fill),he(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),he(e,"font")&&(t.font=e.font),he(e,"fontStyle")&&(t.fontStyle=e.fontStyle),he(e,"fontWeight")&&(t.fontWeight=e.fontWeight),he(e,"fontSize")&&(t.fontSize=e.fontSize),he(e,"fontFamily")&&(t.fontFamily=e.fontFamily),he(e,"align")&&(t.textAlign=e.align),he(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),he(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),he(e,"width")&&(t.textWidth=e.width),he(e,"height")&&(t.textHeight=e.height),he(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),he(e,"padding")&&(t.textPadding=e.padding),he(e,"borderColor")&&(t.textBorderColor=e.borderColor),he(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),he(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),he(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),he(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),he(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),he(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),he(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),he(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),he(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),he(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var MH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},KR=$e(MH);ui(Sa,function(t,e){return t[e]=1,t},{});Sa.join(", ");var n0=["","style","shape","extra"],hh=Fe();function PA(t,e,r,n,i){var a=t+"Animation",o=wh(t,n,i)||{},s=hh(e).userDuring;return o.duration>0&&(o.during=s?le(khe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function Pm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=hh(t),u=e.style;l.userDuring=e.during;var c={},h={};if(Ihe(t,e,h),t.type==="compound")for(var f=t.shape.paths,d=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else Ahe(t,e,i||0,r,c);AH(t,e),u?t.dirty():t.markRedraw()}function AH(t,e){for(var r=hh(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function Lhe(t,e){he(e,"silent")&&(t.silent=e.silent),he(e,"ignore")&&(t.ignore=e.ignore),t instanceof hi&&he(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ue&&he(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var ta={},Phe={setTransform:function(t,e){return ta.el[t]=e,this},getTransform:function(t){return ta.el[t]},setShape:function(t,e){var r=ta.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=ta.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=ta.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=ta.el.style;if(e)return e[t]},setExtra:function(t,e){var r=ta.el.extra||(ta.el.extra={});return r[t]=e,this},getExtra:function(t){var e=ta.el.extra;if(e)return e[t]}};function khe(){var t=this,e=t.el;if(e){var r=hh(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}ta.el=e,n(Phe)}}function QR(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Hl(l))J(o,a);else for(var u=pt(l),c=0;c=0){!o&&(o=n[t]={});for(var d=$e(a),c=0;c=0)){var f=t.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=$e(r),u=0;u=0?e.getStore().get(j,F):void 0}var W=e.get(U.name,F),H=U&&U.ordinalMeta;return H?H.categories[W]:W}function A(G,F){F==null&&(F=c);var U=e.getItemVisual(F,"style"),j=U&&U.fill,W=U&&U.opacity,H=S(F,qo).getItemStyle();j!=null&&(H.fill=j),W!=null&&(H.opacity=W);var X={inheritColor:se(j)?j:q.color.neutral99},K=w(F,qo),ne=vt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(F,qo),sh(e,F)):null;var ie=My(K,X,!1);return D(G,H),H=XR(H,ne,ie),G&&E(H,G),H.legacy=!0,H}function k(G,F){F==null&&(F=c);var U=S(F,io).getItemStyle(),j=w(F,io),W=vt(j,null,null,!0,!0);W.text=j.getShallow("show")?xn(t.getFormattedLabel(F,io),t.getFormattedLabel(F,qo),sh(e,F)):null;var H=My(j,null,!0);return D(G,U),U=XR(U,W,H),G&&E(U,G),U.legacy=!0,U}function E(G,F){for(var U in F)he(F,U)&&(G[U]=F[U])}function D(G,F){G&&(G.textFill&&(F.textFill=G.textFill),G.textPosition&&(F.textPosition=G.textPosition))}function I(G,F){if(F==null&&(F=c),he($R,G)){var U=e.getItemVisual(F,"style");return U?U[$R[G]]:null}if(he(vhe,G))return e.getItemVisual(F,G)}function z(G){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Bte(Se({axis:F},G))}}function O(){return r.getCurrentSeriesIndices()}function V(G){return nM(G,r)}}function Hhe(t){var e={};return R(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function NS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=NA(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function NA(t,e,r,n,i,a){var o=-1,s=e;e&&DH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=IA(n),s&&jhe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Un.normal.cfg=Un.normal.conOpt=Un.emphasis.cfg=Un.emphasis.conOpt=Un.blur.cfg=Un.blur.conOpt=Un.select.cfg=Un.select.conOpt=null,Un.isLegacy=!1,Uhe(u,r,n,i,l,Un),Whe(u,r,n,i,l),EA(t,u,r,n,Un,i,l),he(n,"info")&&(no(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function DH(t,e,r){var n=no(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&qhe(a)&&IH(a)!==n.customPathData||i==="image"&&he(o,"image")&&o.image!==n.customImagePath}function Whe(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&DH(o,a,n)&&(o=null),o||(o=IA(a),t.setClipPath(o)),EA(null,o,e,a,null,n,i)}}function Uhe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){eO(r,null,a),eO(r,io,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=IA(o),t.setTextContent(c)),EA(null,c,e,o,null,n,i);for(var h=o&&o.style,f=0;f=c;d--){var p=e.childAt(d);$he(e,p,i)}}}function $he(t,e,r){e&&b_(e,no(t).option,r)}function Yhe(t){new po(t.oldChildren,t.newChildren,tO,tO,t).add(rO).update(rO).remove(Xhe).execute()}function tO(t,e){var r=t&&t.name;return r??zhe+e}function rO(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;NA(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Xhe(t){var e=this.context,r=e.oldChildren[t];r&&b_(r,no(r).option,e.seriesModel)}function IH(t){return t&&(t.pathData||t.d)}function qhe(t){return t&&(he(t,"pathData")||he(t,"d"))}function Khe(t){t.registerChartView(Vhe),t.registerSeriesModel(phe)}var wl=Fe(),nO=ye,RS=le,OA=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var f=Ie(iO,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}oO(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=nA(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=wl(e).pointerEl=new du[a.type](nO(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=wl(e).labelEl=new Xe(nO(r.label));e.add(a),aO(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=wl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=wl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),aO(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Th(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ho(u.event)},onmousedown:RS(this._onHandleDragMove,this,0,0),drift:RS(this._onHandleDragMove,this),ondragend:RS(this._onHandleDragEnd,this)}),n.add(i)),oO(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,kh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){iO(this._axisPointerModel,!r&&this._moveAnimation,this._handle,OS(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(OS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(OS(i)),wl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),uv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function iO(t,e,r,n){EH(wl(r).lastProp,n)||(wl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function EH(t,e){if(be(t)&&be(e)){var r=!0;return R(e,function(n,i){r=r&&EH(t[i],n)}),!!r}else return t===e}function aO(t,e){t[e.get(["label","show"])?"show":"hide"]()}function OS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function oO(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function zA(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function NH(t,e,r,n,i){var a=r.get("value"),o=RH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Ah(s.get("padding")||0),u=s.getFont(),c=Z0(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=d),g==="middle"&&(h[1]-=d/2),Qhe(h,f,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:vt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Qhe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function RH(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:Vy(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function BA(t,e,r){var n=fr();return xo(n,n,r.rotation),Oi(n,n,r.position),Ei([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function OH(t,e,r,n,i,a){var o=rn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),NH(e,n,i,a,{position:BA(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function jA(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function zH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function sO(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Jhe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=lO(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=zA(a),d=efe[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=qy(l.getRect(),i);OH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=qy(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=BA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=lO(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[r.x,r.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(OA);function lO(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var efe={line:function(t,e,r){var n=jA([e,r[0]],[e,r[1]],uO(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:zH([e-n/2,r[0]],[n,i],uO(t))}}};function uO(t){return t.dim==="x"?0:1}var tfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:q.color.border,width:1,type:"dashed"},shadowStyle:{color:q.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:q.color.neutral00,padding:[5,7,5,7],backgroundColor:q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:q.color.accent40,throttle:40}},e}(Ve),Qa=Fe(),rfe=R;function BH(t,e,r){if(!Ze.node){var n=e.getZr();Qa(n).records||(Qa(n).records={}),nfe(n,e);var i=Qa(n).records[t]||(Qa(n).records[t]={});i.handler=r}}function nfe(t,e){if(Qa(t).initialized)return;Qa(t).initialized=!0,r("click",Ie(cO,"click")),r("mousemove",Ie(cO,"mousemove")),r("globalout",afe);function r(n,i){t.on(n,function(a){var o=ofe(e);rfe(Qa(t).records,function(s){s&&i(s,a,o.dispatchAction)}),ife(o.pendings,e)})}}function ife(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function afe(t,e,r){t.handler("leave",null,r)}function cO(t,e,r,n){e.handler(t,r,n)}function ofe(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function $T(t,e){if(!Ze.node){var r=e.getZr(),n=(Qa(r).records||{})[t];n&&(Qa(r).records[t]=null)}}var sfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";BH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){$T("axisPointer",n)},e.prototype.dispose=function(r,n){$T("axisPointer",n)},e.type="axisPointer",e}(gt);function jH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Ql(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var hO=Fe();function lfe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){km(i)&&(i=jH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=km(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||km(i),f={},d={},p={list:[],map:{}},g={showPointer:Ie(cfe,d),showTooltip:Ie(hfe,p)};R(s.coordSysMap,function(y,_){var S=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(w,C){var M=w.axis,A=pfe(u,w);if(!h&&S&&(!u||A)){var k=A&&A.value;k==null&&!l&&(k=M.pointToData(i)),k!=null&&fO(w,k,g,!1,f)}})});var m={};return R(c,function(y,_){var S=y.linkGroup;S&&!d[_]&&R(S.axesInfo,function(w,C){var M=d[C];if(w!==y&&M){var A=M.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,dO(w),dO(y)))),m[y.key]=A}})}),R(m,function(y,_){fO(c[_],y,g,!0,f)}),ffe(d,c,f),dfe(p,i,t,o),vfe(c,o,r),f}}function fO(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=ufe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function ufe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return R(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,t,r);f=d.dataIndices,h=d.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=t-h,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=h,a.length=0),R(f,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function cfe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function hfe(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=yv(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function ffe(t,e,r){var n=r.axesInfo=[];R(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function dfe(t,e,r,n){if(km(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function vfe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=hO(n)[i]||{},o=hO(n)[i]={};R(t,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function pfe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function dO(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function km(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function rp(t){mu.registerAxisPointerClass("CartesianAxisPointer",Jhe),t.registerComponentModel(tfe),t.registerComponentView(sfe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=gae(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},lfe)}function gfe(t){Oe(u6),Oe(rp)}var mfe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=zA(a),p=_fe[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=yfe(n,i,a,l,g);NH(r,i,a,o,m)},e}(OA);function yfe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=fr();xo(f,f,s),Oi(f,f,[n.cx,n.cy]),u=Ei([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,p=rn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",h=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var _fe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:jA(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:sO(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:sO(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},xfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ve),VA=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",kt).models[0]},e.type="polarAxis",e}(Ve);Bt(VA,Nh);var Sfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(VA),bfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(VA),FA=function(t){Y(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(pi);FA.prototype.dataToRadius=pi.prototype.dataToCoord;FA.prototype.radiusToData=pi.prototype.coordToData;var wfe=Fe(),GA=function(t){Y(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=Z0(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=wfe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(pi);GA.prototype.dataToAngle=pi.prototype.dataToCoord;GA.prototype.angleToData=pi.prototype.coordToData;var VH=["radius","angle"],Tfe=function(){function t(e){this.dimensions=VH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new FA,this._angleAxis=new GA,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=vO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=vO(r);return i===this?this.pointToData(n):null},t}();function vO(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Cfe(t,e,r){var n=e.get("center"),i=sr(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function Mfe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(Fy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(Fy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),iu(n.scale,n.model),iu(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Afe(t){return t.mainType==="angleAxis"}function pO(t,e){var r;if(t.type=e.get("type"),t.scale=qv(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),Afe(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var Lfe={dimensions:VH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new Tfe(i+"");a.update=Mfe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");pO(o,l),pO(s,u),Cfe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",kt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},Pfe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Vg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Fg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function gO(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var kfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});gO(u),gO(s),R(Pfe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Dfe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(mu),Dfe={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Fg(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new du[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new Sh({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,t.add(f)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Fg(r)],u=re(n,function(c){return new Wt({shape:Vg(r,[l,l+s],c.coord)})});t.add(An(u,{style:Se(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Fg(r)],c=[],h=0;hy?"left":"right",w=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var C=s[p];be(C)&&C.textStyle&&(d=new We(C.textStyle,l,l.ecModel))}var M=new Xe({silent:rn.isLabelSilent(e),style:vt(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:S,verticalAlign:w})});if(t.add(M),bo({el:M,componentModel:e,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:h.rawLabel,tickIndex:f}}),c){var A=rn.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=h.rawLabel,Le(M).eventData=A}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h=0?"p":"n",G=E;C&&(n[c][O]||(n[c][O]={p:E,n:E}),G=n[c][O][V]);var F=void 0,U=void 0,j=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-E,X=l.dataToCoord(O);Math.abs(H)=W})}}})}function zfe(t){var e={};R(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=GH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;e[l]=h;var d=FH(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),g&&(f[d].maxWidth=g),m!=null&&(h.gap=m),y!=null&&(h.categoryGap=y)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=mO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=mO(r);return i===this?this.pointToData(n):null},t}();function mO(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function $fe(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new Zfe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",kt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Yfe={create:$fe,dimensions:HH},yO=["x","y"],Xfe=["width","height"],qfe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=zS(l,1-o0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=zA(a),d=Kfe[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=YT(i);OH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=YT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=BA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=o0(o),u=zS(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=zS(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(OA),Kfe={line:function(t,e,r){var n=jA([e,r[0]],[e,r[1]],o0(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:zH([e-n/2,r[0]],[n,i],o0(t))}}};function o0(t){return t.isHorizontal()?0:1}function zS(t,e){var r=t.getRect();return[r[yO[e]],r[yO[e]]+r[Xfe[e]]]}var Qfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(gt);function Jfe(t){Oe(rp),mu.registerAxisPointerClass("SingleAxisPointer",qfe),t.registerComponentView(Qfe),t.registerComponentView(Hfe),t.registerComponentModel(Dm),lh(t,"single",Dm,Dm.defaultOption),t.registerCoordinateSystem("single",Yfe)}var ede=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=vu(r);t.prototype.init.apply(this,arguments),_O(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),_O(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:q.color.axisLine,width:1,type:"solid"}},itemStyle:{color:q.color.neutral00,borderWidth:1,borderColor:q.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:q.size.s,color:q.color.secondary},monthLabel:{show:!0,position:"start",margin:q.size.s,align:"center",formatter:null,color:q.color.secondary},yearLabel:{show:!0,position:null,margin:q.size.xl,formatter:null,color:q.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ve);function _O(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return bQ(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Ta(t,e,{type:"box",ignoreSize:i})}var tde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,h=new je({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new Tr({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?pQ(r,n):me(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),_=new Xe({z2:30,style:vt(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Hw(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/BS)-Math.floor(r[0].time/BS)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),h=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){Yv({targetModel:a,coordSysType:"calendar",coordSysProvider:lV})}),n},t.dimensions=["time","value"],t}();function jS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function nde(t){t.registerComponentModel(ede),t.registerComponentView(tde),t.registerCoordinateSystem("calendar",rde)}var Ua={level:1,leaf:2,nonLeaf:3},ao={none:0,all:1,body:2,corner:3};function XT(t,e,r){var n=e[De[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[De[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function WH(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function UH(t,e,r,n,i){xO(t[0],e,i,r,n,0),xO(t[1],e,i,r,n,1)}function xO(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(SO(t,e,s,u,i,a,0),l>1&&SO(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[De[1-a]].getLocatorCount(a),h=i[De[a]].getLocatorCount(a)-1;r===ao.body?c=Gt(0,c):r===ao.corner&&(h=Nn(-1,h)),h=e[0]&&t[0]<=e[1]}function TO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function ode(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function CO(t,e,r,n){var i=XT(e[n][0],r,n),a=XT(e[n][1],r,n);t[De[n]]=t[qt[n]]=NaN,i&&a&&(t[De[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function Df(t,e,r,n){return t[De[e]]=r,t[De[1-e]]=n,t}function sde(t){return t&&(t.type===Ua.leaf||t.type===Ua.nonLeaf)?t:null}function s0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var MO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=lde(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,h){var f=0;return u&&R(u,function(d,p){var g;se(d)?g={value:d}:be(d)?(g=d,d.value!=null&&!se(d.value)&&(g={value:null})):g={value:null};var m={type:Ua.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new Te,span:Df(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:s0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:Ua.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,h+1),_=Math.max(1,y);m.span[De[r.dimIdx]]=_,f+=_,c+=_}),f}function l(){for(var u=[];n.length=1,S=r[De[n]],w=a.getLocatorCount(n)-1,C=new cs;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){Dr(A.wh)&&(A.wh=y),A.xy=S,A.id[De[n]]===w&&!_&&(A.wh=r[De[n]]+r[qt[n]]-A.xy),S+=A.wh}}function EO(t,e){for(var r=e[De[t]].resetCellIterator();r.next();){var n=r.item;l0(n.rect,t,n.id,n.span,e),l0(n.rect,1-t,n.id,n.span,e),n.type===Ua.nonLeaf&&(n.xy=n.rect[De[t]],n.wh=n.rect[qt[t]])}}function NO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;l0(i,0,a,n,e),l0(i,1,a,n,e)}})}function l0(t,e,r,n,i){t[qt[e]]=0;var a=r[De[e]],o=a<0?i[De[1-e]]:i[De[e]],s=o.getUnitLayoutInfo(e,r[De[e]]);if(t[De[e]]=s.xy,t[qt[e]]=s.wh,n[De[e]]>1){var l=o.getUnitLayoutInfo(e,r[De[e]]+n[De[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function Sde(t,e,r){var n=Sy(t,r[qt[e]]);return KT(n,r[qt[e]])}function KT(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function GS(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Pr={inBody:1,inCorner:2,outside:3},Ji={x:null,y:null,point:[]};function RO(t,e,r,n,i){var a=r[De[e]],o=r[De[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,h=t.point[e]=n[e];if(!l&&!c){t[De[e]]=Pr.outside;return}if(i===ao.body){l?(t[De[e]]=Pr.inBody,h=Nn(s.xy+s.wh,Gt(l.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}else if(i===ao.corner){c?(t[De[e]]=Pr.inCorner,h=Nn(c.xy+c.wh,Gt(u.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}var f=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:f,p=s?s.xy+s.wh:f;if(hp){if(!i){t[De[e]]=Pr.outside;return}h=p}t.point[e]=h,t[De[e]]=f<=h&&h<=p?Pr.inBody:d<=h&&h<=f?Pr.inCorner:Pr.outside}function OO(t,e,r,n){var i=1-r;if(t[De[r]]!==Pr.outside)for(n[De[r]].resetCellIterator(FS);FS.next();){var a=FS.item;if(BO(t.point[r],a.rect,r)&&BO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[De[i]];return}}}function zO(t,e,r,n){if(t[De[r]]!==Pr.outside){var i=t[De[r]]===Pr.inCorner?n[De[1-r]]:n[De[r]];for(i.resetLayoutIterator(Zg,r);Zg.next();)if(bde(t.point[r],Zg.item)){e[r]=Zg.item.id[De[r]];return}}}function bde(t,e){return e.xy<=t&&t<=e.xy+e.wh}function BO(t,e,r){return e[De[r]]<=t&&t<=e[De[r]]+e[qt[r]]}function wde(t){t.registerComponentModel(fde),t.registerComponentView(mde),t.registerCoordinateSystem("matrix",xde)}function Tde(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function jO(t,e){var r;return R(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function Cde(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Ne(i,n,!0),Ta(i,n,{ignoreSize:!0}),dV(r,i),$g(r,i),$g(r,i,"shape"),$g(r,i,"style"),$g(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var $H=["transition","enterFrom","leaveTo"],Mde=$H.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function $g(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?$H:Mde,i=0;i=0;c--){var h=i[c],f=rr(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,y=qn(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},w=o_(d,h,_,null,{hv:h.hv,boundingMode:h.bounding},S);if(!qn(d).isNew&&w){for(var C=h.transition,M={},A=0;A=0)?M[k]=E:d[k]=E}Qe(d,M,r,0)}else d.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Im(i,qn(i).option,n,r._lastGraphicModel)}),this._elMap=de()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(gt);function QT(t){var e=he(VO,t)?VO[t]:av(t),r=new e({});return qn(r).type=t,r}function FO(t,e,r,n){var i=QT(r);return e.add(i),n.set(t,i),qn(i).id=t,qn(i).isNew=!0,i}function Im(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Im(a,e,r,n)}),b_(t,e,n),r.removeKey(qn(t).id))}function GO(t,e,r,n){t.isGroup||R([["cursor",hi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];he(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),R($e(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),he(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function kde(t){return t=J({},t),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(uV),function(e){delete t[e]}),t}function Dde(t,e,r){var n=Le(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Le(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function Ide(t){t.registerComponentModel(Lde),t.registerComponentView(Pde),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var HO=["x","y","radius","angle","single"],Ede=["cartesian2d","polar","singleAxis"];function Nde(t){var e=t.get("coordinateSystem");return Ee(Ede,e)>=0}function Ko(t){return t+"Axis"}function Rde(t,e){var r=de(),n=[],i=de();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=r.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(r.get(h)||r.set(h,[]))[f]=!0})}return n}function YH(t){var e=t.ecModel,r={infoList:[],infoMap:de()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Ko(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var HS=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),Tv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=WO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=WO(r);Ne(this.option,r,!0),Ne(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=de(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(HO,function(i){var a=this.getReferringComponents(Ko(i),JX);if(a.specified){n=!0;var o=new HS;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new HS;if(f.add(h.componentIndex),r.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",kt).models[0];d&&R(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",kt).models[0]&&f.add(p.componentIndex)})}}}a&&R(HO,function(u){if(a){var c=i.findComponents({mainType:Ko(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new HS;h.add(c[0].componentIndex),r.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Ko(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Ko(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(S&&!w&&!C)return!0;S&&(m=!0),w&&(p=!0),C&&(g=!0)}return m&&p&&g})}else sc(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});sc(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;sc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=nt(n[0]+o,n,[0,100],!0):a!=null&&(o=nt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=N2(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function jde(t,e,r){var n=[1/0,-1/0];sc(r,function(o){nre(n,o.getData(),e)});var i=t.getAxisModel(),a=$F(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Vde={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Ko(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Bde(i,a,s,t),r.push(o.__dzAxisProxy))});var n=de();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function Fde(t){t.registerAction("dataZoom",function(e,r){var n=Rde(r,e);R(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var ZO=!1;function ZA(t){ZO||(ZO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Vde),Fde(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Gde(t){t.registerComponentModel(Ode),t.registerComponentView(zde),ZA(t)}var ei=function(){function t(){}return t}(),XH={};function lc(t,e){XH[t]=e}function qH(t){return XH[t]}var Hde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=qH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ne(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:q.size.m,itemSize:15,itemGap:q.size.s,showTitle:!0,iconStyle:{borderColor:q.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:q.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Ve);function KH(t,e){var r=Ah(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new je({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var Wde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(_,S){h.push(S)}),new po(this._featureNames||[],h).add(f).update(f).remove(Ie(f,null)).execute(),this._featureNames=h;function f(_,S){var w=h[_],C=h[S],M=u[w],A=new We(M,r,r.ecModel),k;if(a&&a.newTitle!=null&&a.featureName===w&&(M.title=a.newTitle),w&&!C){if(Ude(w))k={onclick:A.option.onclick,featureName:w};else{var E=qH(w);if(!E)return;k=new E}c[w]=k}else if(k=c[C],!k)return;k.uid=Mh("toolbox-feature"),k.model=A,k.ecModel=n,k.api=i;var D=k instanceof ei;if(!w&&C){D&&k.dispose&&k.dispose(n,i);return}if(!A.get("show")||D&&k.unusable){D&&k.remove&&k.remove(n,i);return}d(A,k,w),A.setIconStatus=function(I,z){var O=this.option,V=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,V[I]&&(z==="emphasis"?fo:vo)(V[I])},k instanceof ei&&k.render&&k.render(A,n,i,a)}function d(_,S,w){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=S instanceof ei&&S.getIcons?S.getIcons():_.get("icon"),k=_.get("title")||{},E,D;se(A)?(E={},E[w]=A):E=A,se(k)?(D={},D[w]=k):D=k;var I=_.iconPaths={};R(E,function(z,O){var V=Th(z,{},{x:-s/2,y:-s/2,width:s,height:s});V.setStyle(C.getItemStyle());var G=V.ensureState("emphasis");G.style=M.getItemStyle();var F=new Xe({style:{text:D[O],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:nM({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});V.setTextContent(F),bo({el:V,componentModel:r,itemName:O,formatterParamsExtra:{title:D[O]}}),V.__title=D[O],V.on("mouseover",function(){var U=M.getItemStyle(),j=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:M.get("textFill")||U.fill||U.stroke||q.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),V.setTextConfig({position:M.get("textPosition")||j}),F.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),F.hide()}),(_.get(["iconStatus",O])==="emphasis"?fo:vo)(V),o.add(V),V.on("click",le(S.onclick,S,n,i,O)),I[O]=V})}var p=sr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=bt(g,p,m);Vl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),o_(o,g,p,m),o.add(KH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var S=_.__title,w=_.ensureState("emphasis"),C=w.textConfig||(w.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&S){var k=A.style||(A.style={}),E=Z0(S,Xe.makeFont(k)),D=_.x+o.x,I=_.y+o.y+s,z=!1;I+E.height>i.getHeight()&&(C.position="top",z=!0);var O=z?-5-E.height:s+10;D+E.width/2>i.getWidth()?(C.position=["100%",O],k.align="right"):D-E.width/2<0&&(C.position=[0,O],k.align="left")}})},e.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof ei&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){R(this._features,function(i){i instanceof ei&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof ei&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(gt);function Ude(t){return t.indexOf("my")===0}var Zde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||q.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ze.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var S=document.createElement("iframe");document.body.appendChild(S);var w=S.contentWindow,C=w.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),w.focus(),C.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var M=i.get("lang"),A='',k=window.open();k.document.write(A),k.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:q.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(ei),$O="__ec_magicType_stack__",$de=[["line","bar"],["stack"]],Yde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(YO[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=YO[i](f,d,h,a);p&&(Se(p,h.option),s.series.push(p));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",S=h.getReferringComponents(_,kt).models[0],w=S.componentIndex;s[_]=s[_]||[];for(var C=0;C<=w;C++)s[_][w]=s[_][w]||{};s[_][w].boundaryGap=i==="bar"}}};R($de,function(h){Ee(h,i)>=0&&R(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ne({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(ei),YO={line:function(t,e,r,n){if(t==="bar")return Ne({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return Ne({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===$O;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ne({id:e,stack:i?"":$O},n.get(["option","stack"])||{},!0)}};Vi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var w_=new Array(60).join("-"),fh=" ";function Xde(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function qde(t){var e=[];return R(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(fh)],c=0;c"].join(n)}function yT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function CN(t,e,r,n){return hr("svg","root",{width:t,height:e,xmlns:g6,"xmlns:xlink":m6,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var cne=0;function _6(){return cne++}var MN={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},vl="transform-origin";function hne(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new p6;return i.reset(j4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function fne(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[vl]=r+"px "+n+"px")}var dne={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function x6(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function vne(t,e,r){var n=t.shape.paths,i={},a,o;if(R(n,function(l){var u=yT(r.zrId);u.animation=!0,p_(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=$e(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var g in p){var m=p[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in h){var _=h[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=x6(i,r);return a.replace(o,s)}}function AN(t){return se(t)?MN[t]?"cubic-bezier("+MN[t]+")":P2(t)?t:"":""}function p_(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof $v){var s=vne(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Ge=x6(A,r);return Ge+" "+_[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+_6();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function pne(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};LN(n,e,r)}else{var i=t.states.emphasis&&t.states.emphasis.style?t.states.emphasis.style:{},a=i.fill;if(!a){var o=t.style&&t.style.fill,s=t.states.select&&t.states.select.style&&t.states.select.style.fill,l=t.currentStates.indexOf("select")>=0&&s||o;l&&(a=yy(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&t.transform?t.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),LN(n,e,r)}}function LN(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+_6(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var gv=Math.round;function b6(t){return t&&se(t.src)}function S6(t){return t&&me(t.toDataURL)}function YM(t,e,r,n){ine(function(i,a){var o=i==="fill"||i==="stroke";o&&B4(a)?T6(e,t,i,n):o&&D2(a)?C6(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),Sne(r,t,n)}function XM(t,e){var r=$4(e);r&&(r.each(function(n,i){n!=null&&(t[(TN+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[TN+"silent"]="true"))}function PN(t){return Yo(t[0]-1)&&Yo(t[1])&&Yo(t[2])&&Yo(t[3]-1)}function gne(t){return Yo(t[4])&&Yo(t[5])}function qM(t,e,r){if(e&&!(gne(e)&&PN(e))){var n=1e4;t.transform=PN(e)?"translate("+gv(e[4]*n)/n+" "+gv(e[5]*n)/n+")":KY(e)}}function kN(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Er(f,m),Er(d,m)}else if(f==null||d==null){var y=function(D,I){if(D){var z=D.elm,O=f||I.width,V=d||I.height;D.tag==="pattern"&&(u?(V=1,O/=a.width):c&&(O=1,V/=a.height)),D.attrs.width=O,D.attrs.height=V,z&&(z.setAttribute("width",O),z.setAttribute("height",V))}},_=V2(p,null,t,function(D){l||y(M,D),y(h,D)});_&&_.width&&_.height&&(f=f||_.width,d=d||_.height)}h=hr("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var b,w;l?b=w=1:u?(w=1,b=o.width/a.width):c?(b=1,w=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),w!=null&&!isNaN(w)&&(o.height=w);var C=V4(i);C&&(o.patternTransform=C);var M=hr("pattern","",o,[h]),A=$M(M),k=n.patternCache,N=k[A];N||(N=n.zrId+"-p"+n.patternIdx++,k[A]=N,o.id=N,M=n.defs[N]=hr("pattern",N,o,[h])),e[r]=Z0(N)}}function wne(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=hr("clipPath",a,o,[w6(t,r)])}e["clip-path"]=Z0(a)}function NN(t){return document.createTextNode(t)}function bl(t,e,r){t.insertBefore(e,r)}function EN(t,e){t.removeChild(e)}function RN(t,e){t.appendChild(e)}function M6(t){return t.parentNode}function A6(t){return t.nextSibling}function Z1(t,e){t.textContent=e}var ON=58,Tne=120,Cne=hr("","");function _T(t){return t===void 0}function ia(t){return t!==void 0}function Mne(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function Xf(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function mv(t){var e,r=t.children,n=t.tag;if(ia(n)){var i=t.elm=y6(n);if(KM(Cne,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,L6(t,p,r,i,l)):Xy(t,e,n,a))}function ac(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(KM(t,e),_T(e.text)?ia(n)&&ia(i)?n!==i&&Ane(r,n,i):ia(i)?(ia(t.text)&&Z1(r,""),L6(r,null,i,0,i.length-1)):ia(n)?Xy(r,n,0,n.length-1):ia(t.text)&&Z1(r,""):t.text!==e.text&&(ia(n)&&Xy(r,n,0,n.length-1),Z1(r,e.text)))}function Lne(t,e){if(Xf(t,e))ac(t,e);else{var r=t.elm,n=M6(r);mv(e),n!==null&&(bl(n,e.elm,A6(r)),Xy(n,[t],0,0))}return e}var Pne=0,kne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=zN(),this.configLayer=zN(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+Pne++,this._oldVNode=CN(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=y6("svg");KM(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Lne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return IN(e,yT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=yT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=Dne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=hr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re($e(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(hr("defs","defs",{},u)),e.animation){var c=une(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=hr("style","stl",{},[],c);o.push(h)}}return CN(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},$M(this.renderToVNode({animation:pe(e.cssAnimation,!0),emphasis:pe(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:pe(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(f&&l&&f[g]===l[g]);g--);for(var m=p-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var h=this.__startIndex;h15)break}}V.prevElClipPaths&&y.restore()};if(_)if(_.length===0)k=m.__endIndex;else for(var D=d.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*D,z.y*D,z.width*D,z.height*D),y.clip(),N(z),y.restore()}else y.save(),N(),y.restore();m.__drawIndex=k,m.__drawIndex0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.painter||(r.painter=this)}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?Lg:0),this._needsManuallyCompositing),c.__builtin__||F0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,r(l),a=c),i.__dirty&Mn&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?Ee(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill=q.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(ht);function sh(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=nh(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var Jv=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o,s){this.removeAll();var l=Ut(r,-1,-1,2,2,null,s);l.attr({z2:pe(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=jne,this._symbolType=r,this.add(l)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){fo(this.childAt(0))},e.prototype.downplay=function(){vo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=e.getSymbolZ2(r,n),c=o!==this._symbolType,h=a&&a.disableAnimation;if(c){var f=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,f)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};h?d.attr(p):Qe(d,p,s,n),fi(d)}if(this._updateCommon(r,n,l,i,a),c){var d=this.childAt(0);if(!h){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,bt(d,p,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,h,f,d,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||r.hasItemOption){var _=a&&a.itemModel?a.itemModel:r.getItemModel(n),b=_.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),h=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),f=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=ar(_),m=b.getShallow("scale"),y=_.getShallow("cursor")}var w=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var C=pu(r.getItemVisual(n,"symbolOffset"),i);C&&(s.x=C[0],s.y=C[1]),y&&s.attr("cursor",y);var M=r.getItemVisual(n,"style"),A=M.fill;if(s instanceof pr){var k=s.style;s.useStyle(J({image:k.image,x:k.x,y:k.y,width:k.width,height:k.height},M))}else s.__isEmptyBrush?s.useStyle(J({},M)):s.useStyle(M),s.style.decal=null,s.setColor(A,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var N=r.getItemVisual(n,"liftZ"),D=this._z2;N!=null?D==null&&(this._z2=s.z2,s.z2+=N):D!=null&&(s.z2=D,this._z2=null);var I=o&&o.useNameLabel;vr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:z,inheritColor:A,defaultOpacity:M.opacity});function z(G){return I?r.getName(G):sh(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var V=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*V,O.scaleY=this._sizeY*V,this.setSymbolScale(1),wt(this,f,d,p)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=Le(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&xs(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();xs(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Dh(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function jne(t,e){this.parent.drift(t,e)}function Y1(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function VN(t){return t!=null&&!Se(t)&&(t={isIgnore:t}),t||{}}function FN(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:ar(e),cursorStyle:e.get("cursor")}}var ep=function(){function t(e){this.group=new _e,this._SymbolCtor=e||Jv}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=VN(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=FN(e),u={disableAnimation:s},c=r.getSymbolPoint||function(h){return e.getItemLayout(h)};a||n.removeAll(),e.diff(a).add(function(h){var f=c(h);if(Y1(e,f,h,r)){var d=new o(e,h,l,u);d.setPosition(f),e.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!Y1(e,p,h,r)){n.remove(d);return}var g=e.getItemVisual(h,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(e,h,l,u),d.setPosition(p);else{d.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?d.attr(y):Qe(d,y,i)}n.add(d),e.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=FN(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=VN(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function D6(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function Fne(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function Gne(t,e,r,n,i,a,o,s){for(var l=Fne(t,e),u=[],c=[],h=[],f=[],d=[],p=[],g=[],m=k6(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],b=0;b=i||g<0)break;if(Fl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),h=y,f=_;else{var b=y-u,w=_-c;if(b*b+w*w<.5){g+=a;continue}if(o>0){for(var C=g+a,M=e[C*2],A=e[C*2+1];M===y&&A===_&&m=n||Fl(M,A))d=y,p=_;else{D=M-u,I=A-c;var V=y-u,G=M-y,F=_-c,Z=A-_,j=void 0,W=void 0;if(s==="x"){j=Math.abs(V),W=Math.abs(G);var H=D>0?1:-1;d=y-H*j*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){j=Math.abs(F),W=Math.abs(Z);var X=I>0?1:-1;d=y,p=_-X*j*o,z=y,O=_+X*W*o}else j=Math.sqrt(V*V+F*F),W=Math.sqrt(G*G+Z*Z),N=W/(W+j),d=y-D*o*(1-N),p=_-I*o*(1-N),z=y+D*o*N,O=_+I*o*N,z=Do(z,Io(M,y)),O=Do(O,Io(A,_)),z=Io(z,Do(M,y)),O=Io(O,Do(A,_)),D=z-y,I=O-_,d=y-D*j/W,p=_-I*j/W,d=Do(d,Io(u,y)),p=Do(p,Io(c,_)),d=Io(d,Do(u,y)),p=Io(p,Do(c,_)),D=y-d,I=_-p,z=y+D*W/j,O=_+I*W/j}t.bezierCurveTo(h,f,d,p,y,_),h=z,f=O}else t.lineTo(y,_)}u=y,c=_,g+=a}return m}var I6=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),Hne=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new I6},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Fl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var w=u?(p-l)*b+l:(d-s)*b+s;return u?[r,w]:[w,r]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++],_=a[h++];var C=u?gy(s,d,g,y,r,c):gy(l,p,m,_,r,c);if(C>0)for(var M=0;M=0){var w=u?ur(l,p,m,_,A):ur(s,d,g,y,A);return u?[r,w]:[w,r]}}s=y,l=_;break}}},e}(Ue),Wne=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(I6),N6=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new Wne},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Fl(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function $ne(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=re(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=Zne(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,g=f[0].coord-p,m=f[d-1].coord+p,y=m-g;if(y<.001)return"transparent";R(f,function(b){b.offset=(b.coord-g)/y}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var _=new hu(0,0,0,0,f,!0);return _[i]=g,_[i+"2"]=m,_}}}function Yne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Xne(a,e))){var o=e.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Xne(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function qne(t,e){return isNaN(t)||isNaN(e)}function Kne(t){for(var e=t.length/2;e>0&&qne(t[e*2-2],t[e*2-1]);e--);return e-1}function ZN(t,e){return[t[e*2],t[e*2+1]]}function Qne(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function O6(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var W=p.getState("emphasis").style;W.lineWidth=+p.style.lineWidth+1}Le(p).seriesIndex=r.seriesIndex,wt(p,F,Z,j);var H=UN(r.get("smooth")),X=r.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:X,connectNulls:A}),g){var K=s.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(be(u.getAreaStyle(),{fill:z,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),K&&(ne=UN(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:X,connectNulls:A}),ir(g,r,"areaStyle"),Le(g).seriesIndex=r.seriesIndex,wt(g,F,Z,j)}var ie=this._changePolyState;s.eachItemGraphicEl(function(ue){ue&&(ue.onHoverStateChange=ie)}),this._polyline.onHoverStateChange=ie,this._data=s,this._coordSys=a,this._stackedOnPoints=C,this._points=c,this._step=D,this._valueOrigin=b,r.get("triggerLineEvent")&&(this.packEventData(r,p),g&&this.packEventData(r,g))},e.prototype.packEventData=function(r,n){Le(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Kl(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new Jv(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else st.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Kl(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else st.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;Ay(this._polyline,r),n&&Ay(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new Hne({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new N6({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,c=u.get("animationDuration");me(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=me(h)?h(null):h;r.eachItemGraphicEl(function(d,p){var g=d;if(g){var m=[d.x,d.y],y=void 0,_=void 0,b=void 0;if(i)if(o){var w=i,C=n.pointToCoord(m);a?(y=w.startAngle,_=w.endAngle,b=-C[1]/180*Math.PI):(y=w.r0,_=w.r,b=C[0])}else{var M=i;a?(y=M.x,_=M.x+M.width,b=d.x):(y=M.y+M.height,_=M.y,b=d.y)}var A=_===y?0:(b-y)/(_-y);l&&(A=1-A);var k=me(h)?h(p):c*A+f,N=g.getSymbolPath(),D=N.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:k}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:k}),N.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(O6(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Xe({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Kne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?P6(o,d):sh(o,h)},enableTextSetter:!0},Jne(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,b=n.shape,w=_?y?b.x:b.y+b.height:y?b.x+b.width:b.y,C=(y?g:0)*(_?-1:1),M=(y?0:-g)*(_?-1:1),A=y?"x":"y",k=Qne(h,w,A),N=k.range,D=N[1]-N[0],I=void 0;if(D>=1){if(D>1&&!d){var z=ZN(h,N[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=f.getRawValue(N[0]))}else{var z=c.getPointOn(w,A);z&&u.attr({x:z[0]+C,y:z[1]+M});var O=f.getRawValue(N[0]),V=f.getRawValue(N[1]);o&&(I=sj(i,p,O,V,k.t))}a.lastFrameIndex=N[0]}else{var G=r===1||a.lastFrameIndex>0?N[0]:0,z=ZN(h,G);o&&(I=f.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var F=Ch(u);typeof F.setLabelText=="function"&&F.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=r.hostModel,f=Gne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,g=f.next,m=f.stackedOnNext;if(o&&(p=No(f.stackedOnCurrent,f.current,i,o,l),d=No(f.current,null,i,o,l),m=No(f.stackedOnNext,f.next,i,o,l),g=No(f.next,null,i,o,l)),WN(d,g)>3e3||c&&WN(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=f.current,u.shape.points=d;var y={shape:{points:g}};f.current!==d&&(y.shape.__points=f.next),u.stopAnimation(),Qe(u,y,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],b=f.status,w=0;we&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;se(a)?p=tie[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,rie))}}}}}function nie(t){t.registerChartView(eie),t.registerSeriesModel(Bne),t.registerLayout(rp("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,z6("line"))}var yv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)R(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),g=f.getTickModel().get("alignWithLabel"),m=o[d],y=n[d]==="x1"||n[d]==="y1";if(y&&!g&&(m+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[y?1:0]);return}for(var _=void 0,b=void 0,w=1,C=0;Cm){b=(M+_)/2;break}C===1&&(w=A-p[0].tickValue)}b==null&&(_?_&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=f.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(ht);ht.registerClass(yv);var iie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return ka(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Ds(yv.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:q.color.primary,borderWidth:2}},realtimeSort:!1}),e}(yv),aie=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),qy=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new aie},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-cMath.PI/2&&cs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){ro(a,r,Le(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(st),$N={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=q1(e.x,t.x),s=K1(e.x+e.width,i),l=q1(e.y,t.y),u=K1(e.y+e.height,a),c=si?s:o,e.y=h&&l>a?u:l,e.width=c?0:s-o,e.height=h?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=K1(e.r,t.r),a=q1(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},YN={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new Be({shape:J({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?qy:Rr,c=new u({shape:n,z2:1});c.name="item";var h=B6(i);if(c.calculateTextPosition=oie(h,{isRoundCap:u===qy}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Qe:bt)(c,{shape:p},a)}return c}};function cie(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function XN(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Qe:bt)(r,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(o?Qe:bt)(r,{shape:u},c,i)}function qN(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function die(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function B6(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function QN(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,h=da(n.getModel("itemStyle"),c,!0);J(c,h),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var f=n.getShallow("cursor");f&&t.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=ar(n);vr(t,p,{labelFetcher:a,labelDataIndex:r,defaultText:sh(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,sie(t,m==="outside"?d:m,B6(o),n.get(["label","rotate"]))}Yj(g,p,a.getRawValue(r),function(_){return P6(e,_)});var y=n.getModel(["emphasis"]);wt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),die(i)&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function vie(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var pie=function(){function t(){}return t}(),JN=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new pie},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?r:null},30,!1);function gie(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,h=a.length/3;c=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[c]}return-1}function j6(t,e,r){if(bs(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function mie(t,e,r){var n=t.type==="polar"?Rr:Be;return new n({shape:j6(e,r,t),silent:!0,z2:0})}function yie(t){t.registerChartView(uie),t.registerSeriesModel(iie),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(GF,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,HF("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,z6("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var rE=Math.PI*2,Ig=Math.PI/180;function _ie(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=fV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*Ig,d=n.get("endAngle"),p=n.get("padAngle")*Ig;d=d==="auto"?f-rE:-d*Ig;var g=n.get("minAngle")*Ig,m=g+p,y=0;i.each(a,function(Z){!isNaN(Z)&&y++});var _=i.getSum(a),b=Math.PI/(_||y)*2,w=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var k=w?1:-1,N=[f,d],D=k*p/2;e_(N,!w),f=N[0],d=N[1];var I=V6(n);I.startAngle=f,I.endAngle=d,I.clockwise=w,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(d-f),O=z,V=0,G=f;if(i.setLayout({viewRect:h,r:u}),i.each(a,function(Z,j){var W;if(isNaN(Z)){i.setItemLayout(j,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:w,cx:s,cy:l,r0:c,r:C?NaN:u});return}C!=="area"?W=_===0&&M?b:Z*b:W=z/y,WW?(X=G+k*W/2,K=X):(X=G+D,K=H-D),i.setItemLayout(j,{angle:W,startAngle:X,endAngle:K,clockwise:w,cx:s,cy:l,r0:c,r:C?nt(Z,A,[c,u]):u}),G=H}),Or?y:m,C=Math.abs(b.label.y-r);if(C>=w.maxY){var M=b.label.x-e-b.len2*i,A=n+b.len,k=Math.abs(M)t.unconstrainedWidth?null:f:null;n.setStyle("width",d)}G6(a,n)}}}function G6(t,e){iE.rect=t,f6(iE,e,Sie)}var Sie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},iE={};function Q1(t){return t.position==="center"}function wie(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*xie,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(M){M.ignore=!0}function p(M){if(!M.ignore)return!0;for(var A in M.states)if(M.states[A].ignore===!1)return!0;return!1}e.each(function(M){var A=e.getItemGraphicEl(M),k=A.shape,N=A.getTextContent(),D=A.getTextGuideLine(),I=e.getItemModel(M),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),V=z.get("distanceToLabelLine"),G=z.get("alignTo"),F=oe(z.get("edgeDistance"),u),Z=z.get("bleedMargin");Z==null&&(Z=Math.min(u,f)>200?10:2);var j=I.getModel("labelLine"),W=j.get("length");W=oe(W,u);var H=j.get("length2");if(H=oe(H,u),Math.abs(k.endAngle-k.startAngle)0?"right":"left":K>0?"left":"right"}var tt=Math.PI,lt=0,Dt=z.get("rotate");if(qe(Dt))lt=Dt*(tt/180);else if(O==="center")lt=0;else if(Dt==="radial"||Dt===!0){var gr=K<0?-X+tt:-X;lt=gr}else if(Dt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=tt*2+zr);var Fi=ne>0;Fi&&(zr=tt+zr),lt=zr-tt}if(a=!!lt,N.x=ie,N.y=ue,N.rotation=lt,N.setStyle({verticalAlign:"middle"}),xe){N.setStyle({align:Ge});var xu=N.states.select;xu&&(xu.x+=N.x,xu.y+=N.y)}else{var Gi=new Ce(0,0,0,0);G6(Gi,N),r.push({label:N,labelLine:D,position:O,len:W,len2:H,minTurnAngle:j.get("minTurnAngle"),maxSurfaceAngle:j.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:ve,textAlign:Ge,labelDistance:V,labelAlignTo:G,edgeDistance:F,bleedMargin:Z,rect:Gi,unconstrainedWidth:Gi.width,labelStyleWidth:N.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&bie(r,n,i,l,u,f,c,h);for(var g=0;g0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h=a.r0}},e.type="pie",e}(st);function Oh(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Ih(n,e).dimensions,a=new $r(i,t);return a.initData(n,r),a}var zh=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}(),Mie=Fe(),H6=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Oh(this,{coordDimensions:["value"],encodeDefaulter:Ie(yM,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=Mie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=K4(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){ql(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(ht);_Q({fullType:H6.type,getCoord2:function(t){return t.getShallow("center")}});function Aie(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(qe(o)&&!isNaN(o)&&o<0)})}}}function Lie(t){t.registerChartView(Cie),t.registerSeriesModel(H6),nF("pie",t.registerAction),t.registerLayout(Ie(_ie,"pie")),t.registerProcessor(Rh("pie")),t.registerProcessor(Aie("pie"))}var Pie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:q.color.primary}},universalTransition:{divideShape:"clone"}},e}(ht),W6=4,kie=function(){function t(){}return t}(),Die=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new kie},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(r>=h&&n>=f&&r<=h+s&&n<=f+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f=0&&(u.dataIndex=h+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Nie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=rp("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){if(r.get("clip",!0)){var n=r.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Iie:new ep,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(st),U6={left:0,right:0,top:0,bottom:0},Ky=["25%","25%"],Eie=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=du(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Ta(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Ta(this.option.outerBounds,r.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:U6,outerBoundsContain:"all",outerBoundsClampWidth:Ky[0],outerBoundsClampHeight:Ky[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},e}(Ve),bT=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",kt).models[0]},e.type="cartesian2dAxis",e}(Ve);Bt(bT,Eh);var Z6={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:q.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:q.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[q.color.backgroundTint,q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:q.color.neutral00,borderColor:q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},Rie=Ee({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Z6),QM=Ee({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:q.color.axisMinorSplitLine,width:1}}},Z6),Oie=Ee({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},QM),zie=be({logBase:10},QM);const $6={category:Rie,value:QM,time:Oie,log:zie};var Bie={value:1,category:1,time:1,log:1},ST=null;function jie(t){ST||(ST=t)}function np(){return ST}function lh(t,e,r,n){R(Bie,function(i,a){var o=Ee(Ee({},$6[a],!0),n,!0),s=function(l){Y(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=lv(this),d=f?du(c):{},p=h.getTheme();Ee(c,p.get(a+"Axis")),Ee(c,this.getDefaultOption()),c.type=aE(c),f&&Ta(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=vv.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var h=np();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",aE)}function aE(t){return t.type||(t.data?"category":"value")}var Vie=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return re(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),et(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}(),wT=["x","y"];function oE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Fie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=wT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!oE(r)||!oE(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=ci([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new Ce(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ot(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n,i){if(i=i||[],this._invTransform)return Ot(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(r){r=r||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-r,o=Math.min(i[0],i[1])-r,s=Math.max(n[0],n[1])-a+r,l=Math.max(i[0],i[1])-o+r;return new Ce(a,o,s,l)},e}(Vie),Y6=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(pi),g_="expandAxisBreak",X6="collapseAxisBreak",q6="toggleAxisBreak",JM="axisbreakchanged",Gie={type:g_,event:JM,update:"update",refineEvent:eA},Hie={type:X6,event:JM,update:"update",refineEvent:eA},Wie={type:q6,event:JM,update:"update",refineEvent:eA};function eA(t,e,r,n){var i=[];return R(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function Uie(t){t.registerAction(Gie,e),t.registerAction(Hie,e),t.registerAction(Wie,e);function e(r,n){var i=[],a=Oc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(h){var f;i.push(be((f={},f[l]=u.componentIndex,f),h))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var Xo=Math.PI,Zie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],$ie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],uh=Fe(),K6=Fe(),Q6=function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var r=e.axis.dim,n=e.componentIndex,i=this.recordMap,a=i[r]||(i[r]=[]);return a[n]||(a[n]={ready:{}})},t}();function Yie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=tA(t.axisName)&&oh(t.nameLocation);R(n,function(p){var g=Ca(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?ci(Sf,m.transform):Fv(Sf),g.transform&&Di(Sf,Sf,g.transform),Ce.copy(Ng,g.localRect),Ng.applyTransform(Sf),s?s.union(Ng):Ce.copy(s=new Ce(0,0,0,0),Ng))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",c=a.transGroup[u];if(o.sort(function(p,g){return Math.abs(p.label[u]-c)-Math.abs(g.label[u]-c)}),l&&s){var h=i.getExtent(),f=Math.min(h[0],h[1]),d=Math.max(h[0],h[1])-f;s.union(new Ce(f,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Sf=fr(),Ng=new Ce(0,0,0,0),J6=function(t,e,r,n,i,a){if(oh(t.nameLocation)){var o=a.stOccupiedRect;o&&eG(Zre({},o,a.transGroup.transform),n,i)}else tG(a.labelInfoList,a.dirVec,n,i)};function eG(t,e,r){var n=new Te;v_(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&vT(e,n)}function tG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):Jc(i-Xo)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),Xie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],qie={axisLine:function(t,e,r,n,i,a,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,t.raw.axisLineAutoShow!=null&&(s=!!t.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=a.transform,c=[l[0],0],h=[l[1],0],f=c[0]>h[0];u&&(Ot(c,c,u),Ot(h,h,u));var d=J({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:d};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())np().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},p));rh(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var m=n.get(["axisLine","symbol"]);if(m!=null){var y=n.get(["axisLine","symbolSize"]);se(m)&&(m=[m,m]),(se(y)||qe(y))&&(y=[y,y]);var _=pu(n.get(["axisLine","symbolOffset"])||0,y),b=y[0],w=y[1];R([{rotate:t.rotation+Math.PI/2,offset:_[0],r:0},{rotate:t.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(C,M){if(m[M]!=="none"&&m[M]!=null){var A=Ut(m[M],-b/2,-w/2,b,w,d.stroke,!0),k=C.r+C.offset,N=f?h:c;A.attr({rotation:C.rotate,x:N[0]+k*Math.cos(t.rotation),y:N[1]-k*Math.sin(t.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=lE(e,i,s);l&&sE(t,e,r,n,i,a,o,Bi.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=lE(e,i,s);l&&sE(t,e,r,n,i,a,o,Bi.determine);var u=eae(t,i,a,n);Jie(t,e.labelLayoutList,u),tae(t,i,a,n,t.tickDirection)},axisName:function(t,e,r,n,i,a,o,s){var l=r.ensureRecord(n);e.nameEl&&(i.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(tA(u)){var c=t.nameLocation,h=t.nameDirection,f=n.getModel("nameTextStyle"),d=n.get("nameGap")||0,p=n.axis.getExtent(),g=n.axis.inverse?-1:1,m=new Te(0,0),y=new Te(0,0);c==="start"?(m.x=p[0]-g*d,y.x=-g):c==="end"?(m.x=p[1]+g*d,y.x=g):(m.x=(p[0]+p[1])/2,m.y=t.labelOffset+h*d,y.y=h);var _=fr();y.transform(xo(_,_,t.rotation));var b=n.get("nameRotate");b!=null&&(b=b*Xo/180);var w,C;oh(c)?w=rn.innerTextLayout(t.rotation,b??t.rotation,h):(w=Kie(t.rotation,c,b||0,p),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(w.rotation)),!isFinite(C)&&(C=null)));var M=f.getFont(),A=n.get("nameTruncate",!0)||{},k=A.ellipsis,N=Sr(t.raw.nameTruncateMaxWidth,A.maxWidth,C),D=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:w.rotation,silent:rn.isLabelSilent(n),style:vt(f,{text:u,font:M,overflow:"truncate",width:N,ellipsis:k,fill:f.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:f.get("align")||w.textAlign,verticalAlign:f.get("verticalAlign")||w.textVerticalAlign}),z2:1});if(So({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=rn.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Le(I).eventData=z}a.add(I),I.updateTransform(),e.nameEl=I;var O=l.nameLayout=Ca({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:oh(c)?Zie[D]:$ie[D]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),t.shouldNameMoveOverlap&&O){var V=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,V)}}}};function sE(t,e,r,n,i,a,o,s){nG(e)||rae(t,e,i,s,n,o);var l=e.labelLayoutList;nae(t,n,l,a),oae(n,t.rotation,l);var u=t.optionHideOverlap;Qie(n,l,u),u&&d6(et(l,function(c){return c&&!c.label.ignore})),Yie(t,r,n,l)}function Kie(t,e,r,n){var i=E2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Jc(i-Xo/2)?(o=l?"bottom":"top",a="center"):Jc(i-Xo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iXo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Qie(t,e,r){if(qF(t.axis))return;function n(s,l,u){var c=Ca(e[l]),h=Ca(e[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){qf(c.label);return}if(h.suggestIgnore){qf(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=pT({marginForce:d},c),h=pT({marginForce:d},h)}v_(c,h,null,{touchThreshold:f})&&qf(s?h.label:c.label)}}var i=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),o=e.length;n(i,0,1),n(a,o-1,o-2)}function Jie(t,e,r){t.showMinorTicks||R(e,function(n){if(n&&n.label.ignore)for(var i=0;iu[0]&&isFinite(p)&&isFinite(u[0]);)d=z1(d),p=u[1]-d*o;else{var m=t.getTicks().length-1;m>o&&(d=z1(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Ht(g-y),p<0&&u[0]>=0?(p=0,g=Ht(y)):g>0&&u[1]<=0&&(g=0,p=-Ht(y))}var _=(i[0].value-a[0].value)/s,b=(i[o].value-a[o].value)/s;n.setExtent.call(t,p+d*_,g+d*b),n.setInterval.call(t,d),(_||b)&&n.setNiceExtent.call(t,p+d,g-d)}var cE=[[3,1],[0,2]],cae=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=wT,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=$e(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,g=d.scale;lT(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(nu(g,p),lT(g)&&(s=d))}c.length&&(s||(s=c.pop(),nu(s.scale,s.model)),R(c,function(m){iG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){hE(n,"y",o,a)}),R(n.y,function(o){hE(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=sr(e,r),a=this._rect=St(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(CT(o,a),!n){var u=dae(a,s,o,l,r),c=void 0;if(l)MT?(MT(this._axesList,a),CT(o,a)):c=vE(a.clone(),"axisLabel",null,a,o,u,i);else{var h=vae(e,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=vE(f,d,p,a,o,u,i))}aG(a,o,Bi.determine,null,c,i)}R(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}Se(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return eu(n,s,!0,!0,r),CT(i,n),l;function u(f){R(i[De[f]],function(d){if(pv(d.model)){var p=a.ensureRecord(d.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!Dr(d)&&d>1e-4&&(f/=d),f}}function dae(t,e,r,n,i){var a=new Q6(pae);return R(r,function(o){return R(o,function(s){if(pv(s.model)){var l=!n;s.axisBuilder=lae(t,e,s.model,i,a,l)}})}),a}function aG(t,e,r,n,i,a){var o=r===Bi.determine;R(e,function(u){return R(u,function(c){pv(c.model)&&(uae(c.axisBuilder,t,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[De[1-u]]=t[qt[u]]<=a.refContainer[qt[u]]*.5?0:1-u===1?2:1}R(e,function(u,c){return R(u,function(h){pv(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function vae(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=St(t.get("outerBounds",!0)||U6,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ne(["all","axisLabel"],a)<0?o="all":o=a;var s=[wy(pe(t.get("outerBoundsClampWidth",!0),Ky[0]),e.width),wy(pe(t.get("outerBoundsClampHeight",!0),Ky[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var pae=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";J6(t,e,r,n,i,a),oh(t.nameLocation)||R(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&tG(s.labelInfoList,s.dirVec,n,i)})};function gae(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return mae(r,t,e),r.seriesInvolved&&_ae(r,t),r}function mae(t,e,r){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];R(r.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=_v(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(R(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&R(p.baseAxes,Ie(g,d?"cross":!0,f)),d&&R(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var b=_.model.getModel("axisPointer",i),w=b.get("show");if(!(!w||w==="auto"&&!m&&!AT(b))){y==null&&(y=b.get("triggerTooltip")),b=m?yae(_,h,i,e,m,y):b;var C=b.get("snap"),M=b.get("triggerEmphasis"),A=_v(_.model),k=y||C||_.type==="category",N=t.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:b,triggerTooltip:y,triggerEmphasis:M,involveSeries:k,snap:C,useHandle:AT(b),seriesModels:[],linkGroup:null};u[A]=N,t.seriesInvolved=t.seriesInvolved||k;var D=xae(a,_);if(D!=null){var I=o[D]||(o[D]={axesInfo:{}});I.axesInfo[A]=N,I.mapper=a[D].mapper,N.linkGroup=I}}}})}function yae(t,e,r,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};R(s,function(f){l[f]=ye(o.get(f))}),l.snap=t.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&be(u,h.textStyle)}}return t.model.getModel("axisPointer",new We(l,r,n))}function _ae(t,e){e.eachSeries(function(r){var n=r.coordinateSystem,i=r.get(["tooltip","trigger"],!0),a=r.get(["tooltip","show"],!0);!n||!n.model||i==="none"||i===!1||i==="item"||a===!1||r.get(["axisPointer","show"],!0)===!1||R(t.coordSysAxesInfo[_v(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(r),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=r.getData().count())})})}function xae(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function bae(t){var e=rA(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=AT(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var Lae=Fe();function mE(t,e,r,n){if(t instanceof Y6){var i=t.scale.type;if(i!=="category"&&i!=="ordinal")return r}var a=t.model,o=a.get("jitter"),s=a.get("jitterOverlap"),l=a.get("jitterMargin")||0,u=t.scale.type==="ordinal"?t.getBandWidth():null;return o>0?s?hG(r,o,u,n):Pae(t,e,r,n,o,l):r}function hG(t,e,r,n){if(r===null)return t+(Math.random()-.5)*e;var i=r-n*2,a=Math.min(Math.max(0,e),i);return t+(Math.random()-.5)*a}function Pae(t,e,r,n,i,a){var o=Lae(t);o.items||(o.items=[]);var s=o.items,l=yE(s,e,r,n,i,a,1),u=yE(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||h&&f>h/2-n?hG(r,i,h,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function yE(t,e,r,n,i,a,o){for(var s=r,l=0;li/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=be({color:p.color},l));var m=Ee(ye(p),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:f},!1);if(se(c)){var y=m.name;m.name=c.replace("{value}",y??"")}else me(c)&&(m.name=c(m.name,m));var _=new We(m,null,this.ecModel);return Bt(_,Eh.prototype),_.mainType="radar",_.componentIndex=this.componentIndex,_},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:q.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ee({lineStyle:{color:q.color.neutral20}},wf.axisLine),axisLabel:Eg(wf.axisLabel,!1),axisTick:Eg(wf.axisTick,!1),splitLine:Eg(wf.splitLine,!0),splitArea:Eg(wf.splitArea,!0),indicator:[]},e}(Ve),Bae=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r,i),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r,n){var i=r.coordinateSystem,a=i.getIndicatorAxes(),o=re(a,function(s){var l=s.model.get("showName")?s.name:"",u=new rn(s.model,n,{axisName:l,position:[i.cx,i.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});R(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=ee(f)?f:[f],g=ee(d)?d:[d],m=[],y=[];function _(G,F,Z){var j=Z%F.length;return G[j]=G[j]||[],j}if(a==="circle")for(var b=i[0].getTicksCoords(),w=n.cx,C=n.cy,M=0;M3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",r,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(bE(this._zr,"globalPan")||Tf(r))){var n=r.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(r,n,i,a,o){r._checkPointer(a,o.originX,o.originY)&&(ho(a.event),a.__ecRoamConsumed=!0,SE(r,n,i,a,o))},e}(di);function Tf(t){return t.__ecRoamConsumed}var Zae=Fe();function m_(t){var e=Zae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function Cf(t,e,r,n){for(var i=m_(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=mG(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new _e,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Be({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var c=tb[s];if(c&&he(tb,s)){l=c.call(this,e,r);var h=e.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=ME[s];if(d&&he(ME,s)){var p=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new eh({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),qae(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){tb={g:function(e,r){var n=new _e;return Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new Be;return Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new Pa;return Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new Wt;return Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new Uv;return Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=PE(n));var a=new Or({shape:{points:i||[]},silent:!0});return Wn(r,a),Sn(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=PE(n));var a=new Tr({shape:{points:i||[]},silent:!0});return Wn(r,a),Sn(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new pr;return Wn(r,n),Sn(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new _e;return Wn(r,s),Sn(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new _e;return Wn(r,s),Sn(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=Nj(n);return Wn(r,i),Sn(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),ME={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new hu(e,r,n,i);return AE(t,a),LE(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new X2(e,r,n);return AE(t,i),LE(t,i),i}};function AE(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function LE(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};gG(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=Zr(o),u=l&&l[3];u&&(l[3]*=eo(s),o=ai(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Wn(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),be(e.__inheritedStyle,t.__inheritedStyle))}function PE(t){for(var e=__(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=__(o);switch(i=i||fr(),s){case"translate":Oi(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":U0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":xo(i,i,-parseFloat(l[0])*rb,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*rb);Di(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*rb);Di(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var DE=/([^\s:;]+)\s*:\s*([^:;]+)/g;function gG(t,e,r){var n=t.getAttribute("style");if(n){DE.lastIndex=0;for(var i;(i=DE.exec(n))!=null;){var a=i[1],o=he(Jy,a)?Jy[a]:null;o&&(e[o]=i[2]);var s=he(e0,a)?e0[a]:null;s&&(r[s]=i[2])}}}function roe(t,e,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(_):l.resourceType==="geoSVG"&&this._buildSVG(_),this._updateController(e,m,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=de(),n=de(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:f,labelDataIndex:h,defaultText:r},d);var p=e.getTextContent();if(p&&(yG(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function OE(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):Le(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function zE(t,e,r,n,i){t.data||So({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function BE(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return wt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&hK(e,i,r),o}function jE(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),R(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill=q.color.neutral00,i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:q.color.border,areaColor:q.color.background},emphasis:{label:{show:!0,color:q.color.primary},itemStyle:{areaColor:q.color.highlight}},select:{label:{show:!0,color:q.color.primary},itemStyle:{color:q.color.highlight}},nameProperty:"name"},e}(ht);function Soe(t,e){var r={};return R(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,c=0;c1?(b.width=_,b.height=_/g):(b.height=_,b.width=_*g),b.y=y[1]-b.height/2,b.x=y[0]-b.width/2;else{var w=t.getBoxLayoutParams();w.aspect=g,b=St(w,p),b=dV(t,b,g)}this.setViewRect(b.x,b.y,b.width,b.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Moe(t,e){R(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var Aoe=function(){function t(){this.dimensions=xG}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new kT(l+s,l,J({nameMap:o.get("nameMap"),api:r,ecModel:e},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=HE,u.resize(o,r)}),e.eachSeries(function(o){qv({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",kt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),R(a,function(o,s){var l=re(o,function(c){return c.get("nameMap")}),u=new kT(s,s,J({nameMap:G0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=Sr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=HE,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,Moe(u,c)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=de(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Noe(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){Roe(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=Ooe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Eoe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function WE(t){return arguments.length?t:joe}function Kf(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Roe(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Ooe(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=nb(s),a=ib(a),s&&a;){i=nb(i),o=ib(o),i.hierNode.ancestor=t;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(Boe(zoe(s,t,r),t,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!nb(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!ib(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function nb(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function ib(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function zoe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Boe(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function joe(t,e){return t.parentNode===e.parentNode?1:2}var Voe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Foe=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Voe},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=oe(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[c]=s[c],r.lineTo(d[0],d[1]),d[c]=l[c],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var p=1;p_.x,C||(w=w-Math.PI));var A=C?"left":"right",k=s.getModel("label"),N=k.get("rotate"),D=N*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:k.get("position")||A,rotation:N==null?-w:D,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?qc(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Le(r).focus=O),Hoe(i,o,c,r,p,d,g,n),r.__edge&&(r.onHoverStateChange=function(V){if(V!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===Wv||Ay(r.__edge,V)}})}function Hoe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),f=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new Sh({shape:DT(c,h,f,i,i)})),Qe(g,{shape:DT(c,h,f,a,o)},t));else if(u==="polyline"&&c==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],_=0;_r&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(se(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function MG(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function cA(t,e){var r=MG(t);return Ne(r,e)>=0}function x_(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var Qoe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new We(i,this,this.ecModel),o=uA.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Kt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=x_(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:q.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(ht);function Joe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function ese(t,e){t.eachSeriesByType("tree",function(r){tse(r,e)})}function tse(t,e){var r=sr(t,e).refContainer,n=St(t.getBoxLayoutParams(),r);t.layoutInfo=n;var i=t.get("layout"),a=0,o=0,s=null;i==="radial"?(a=2*Math.PI,o=Math.min(n.height,n.width)/2,s=WE(function(w,C){return(w.parentNode===C.parentNode?1:2)/w.depth})):(a=n.width,o=n.height,s=WE());var l=t.getData().tree.root,u=l.children[0];if(u){Ioe(l),Joe(u,Noe,s),l.hierNode.modifier=-u.hierNode.prelim,Lf(u,Eoe);var c=u,h=u,f=u;Lf(u,function(w){var C=w.getLayout().x;Ch.getLayout().x&&(h=w),w.depth>f.depth&&(f=w)});var d=c===h?1:s(c,h)/2,p=d-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Lf(u,function(w){y=(w.getLayout().x+p)*g,_=(w.depth-1)*m;var C=Kf(y,_);w.setLayout({x:C.x,y:C.y,rawX:y,rawY:_},!0)});else{var b=t.getOrient();b==="RL"||b==="LR"?(m=o/(h.getLayout().x+d+p),g=a/(f.depth-1||1),Lf(u,function(w){_=(w.getLayout().x+p)*m,y=b==="LR"?(w.depth-1)*g:a-(w.depth-1)*g,w.setLayout({x:y,y:_},!0)})):(b==="TB"||b==="BT")&&(g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Lf(u,function(w){y=(w.getLayout().x+p)*g,_=b==="TB"?(w.depth-1)*m:o-(w.depth-1)*m,w.setLayout({x:y,y:_},!0)}))}}}function rse(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");J(s,o)})})}function nse(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=y_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function ise(t){t.registerChartView(Goe),t.registerSeriesModel(Qoe),t.registerLayout(ese),t.registerVisual(rse),nse(t)}var XE=["treemapZoomToNode","treemapRender","treemapMove"];function ase(t){for(var e=0;e1;)a=a.parentNode;var o=Yw(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var ose=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};LG(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=sse(a,n);var l=re(a||[],function(h){return new We(h,s,n)},this),u=uA.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return f.parentModel=g||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Kt("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=x_(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},J(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=de(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){AG(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:q.size.l,top:q.size.xxxl,right:q.size.l,bottom:q.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:q.size.m,emptyItemWidth:25,itemStyle:{color:q.color.backgroundShade,textStyle:{color:q.color.secondary}},emphasis:{itemStyle:{color:q.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:q.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(ht);function LG(t){var e=0;R(t.children,function(n){LG(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}function sse(t,e){var r=pt(e.get("color")),n=pt(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;R(t,function(s){var l=new We(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}var lse=8,qE=8,ab=5,use=function(){function t(e){this.group=new _e,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h=sr(e,r).refContainer,f={left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},d={emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},p=St(f,h);this._prepare(n,d,u),this._renderContent(e,d,p,s,l,u,c,i),s_(o,f,h)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=rr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+lse*2,r.emptyItemWidth);r.totalWidth+=s+qE,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s,l){for(var u=0,c=r.emptyItemWidth,h=e.get(["breadcrumb","height"]),f=r.totalWidth,d=r.renderList,p=a.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,_=m.width,b=m.text;f>n.width&&(f-=_-c,_=c,b=null);var w=new Or({shape:{points:cse(u,0,_,h,g===d.length-1,g===0)},style:be(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:vt(o,{text:b})}),textConfig:{position:"inside"},z2:xh*1e4,onclick:Ie(l,y)});w.disableLabelAnimation=!0,w.getTextContent().ensureState("emphasis").style=vt(s,{text:b}),w.ensureState("emphasis").style=p,wt(w,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(w),hse(w,e,y),u+=_+qE}},t.prototype.remove=function(){this.group.removeAll()},t}();function cse(t,e,r,n,i,a){var o=[[i?t:t-ab,e],[t+r,e],[t+r,e+n],[i?t:t-ab,e+n]];return!a&&o.splice(2,0,[t+r+ab,e+n/2]),!i&&o.push([t,e+n/2]),o}function hse(t,e,r){Le(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&x_(r,e)}}var fse=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;iQE||Math.abs(r.dy)>QE)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY,a=r.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=fr();Oi(m,m,[-n,-i]),U0(m,m,[p,p]),Oi(m,m,[n,i]),l.applyTransform(m),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&Dy(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new use(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(cA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Pf(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(st);function Pf(){return{nodeGroup:[],background:[],content:[]}}function yse(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=t.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,m=c.invisible,y=o.getRawIndex(),_=s&&s.getRawIndex(),b=o.viewChildren,w=c.upperHeight,C=b&&b.length,M=f.getModel("itemStyle"),A=f.getModel(["emphasis","itemStyle"]),k=f.getModel(["blur","itemStyle"]),N=f.getModel(["select","itemStyle"]),D=M.get("borderRadius")||0,I=ue("nodeGroup",IT);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),t0(I).nodeWidth=d,t0(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",KE,u,pse);z&&H(I,z,C&&c.upperLabelHeight);var O=f.getModel("emphasis"),V=O.get("focus"),G=O.get("blurScope"),F=O.get("disabled"),Z=V==="ancestor"?o.getAncestorsIndices():V==="descendant"?o.getDescendantIndices():V;if(C)av(I)&&Pl(I,!1),z&&(Pl(z,!F),h.setItemGraphicEl(o.dataIndex,z),zw(z,Z,G));else{var j=ue("content",KE,u,gse);j&&X(I,j),z.disableMorphing=!0,z&&av(z)&&Pl(z,!1),Pl(I,!F),h.setItemGraphicEl(o.dataIndex,I);var W=f.getShallow("cursor");W&&j.attr("cursor",W),zw(I,Z,G)}return I;function H(xe,ge,ke){var fe=Le(ge);if(fe.dataIndex=o.dataIndex,fe.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:d,height:p,r:D}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),ot=Me.stroke,Ye=tR(M);Ye.fill=ot;var tt=gl(A);tt.fill=A.get("borderColor");var lt=gl(k);lt.fill=k.get("borderColor");var Dt=gl(N);if(Dt.fill=N.get("borderColor"),ke){var gr=d-2*g;ne(ge,ot,Me.opacity,{x:g,y:0,width:gr,height:w})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=tt,ge.ensureState("blur").style=lt,ge.ensureState("select").style=Dt,Jl(ge)}xe.add(ge)}function X(xe,ge){var ke=Le(ge);ke.dataIndex=o.dataIndex,ke.seriesIndex=t.seriesIndex;var fe=Math.max(d-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:fe,height:Me,r:D}),m)K(ge);else{ge.invisible=!1;var ot=o.getVisual("style"),Ye=ot.fill,tt=tR(M);tt.fill=Ye,tt.decal=ot.decal;var lt=gl(A),Dt=gl(k),gr=gl(N);ne(ge,Ye,ot.opacity,null),ge.setStyle(tt),ge.ensureState("emphasis").style=lt,ge.ensureState("blur").style=Dt,ge.ensureState("select").style=gr,Jl(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,ke,fe){var Me=f.getModel(fe?eR:JE),ot=rr(f.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(f,fe?eR:JE),{defaultText:Ye?ot:null,inheritColor:ge,defaultOpacity:ke,labelFetcher:t,labelDataIndex:o.dataIndex});var tt=xe.getTextContent();if(tt){var lt=tt.style,Dt=jv(lt.padding||0);fe&&(xe.setTextConfig({layoutRect:fe}),tt.disableLabelLayout=!0),tt.beforeUpdate=function(){var zr=Math.max((fe?fe.width:xe.shape.width)-Dt[1]-Dt[3],0),Fi=Math.max((fe?fe.height:xe.shape.height)-Dt[0]-Dt[2],0);(lt.width!==zr||lt.height!==Fi)&&tt.setStyle({width:zr,height:Fi})},lt.truncateMinChar=2,lt.lineOverflow="truncate",ie(lt,fe,c);var gr=tt.getState("emphasis");ie(gr?gr.style:null,fe,c)}}function ie(xe,ge,ke){var fe=xe?xe.text:null;if(!ge&&ke.isLeafRoot&&fe!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+fe:fe}}function ue(xe,ge,ke,fe){var Me=_!=null&&r[xe][_],ot=i[xe];return Me?(r[xe][_]=null,ve(ot,Me)):m||(Me=new ge,Me instanceof hi&&(Me.z2=_se(ke,fe)),Ge(ot,Me)),e[xe][y]=Me}function ve(xe,ge){var ke=xe[y]={};ge instanceof IT?(ke.oldX=ge.x,ke.oldY=ge.y):ke.oldShape=J({},ge.shape)}function Ge(xe,ge){var ke=xe[y]={},fe=o.parentNode,Me=ge instanceof _e;if(fe&&(!n||n.direction==="drillDown")){var ot=0,Ye=0,tt=i.background[fe.getRawIndex()];!n&&tt&&tt.oldShape&&(ot=tt.oldShape.width,Ye=tt.oldShape.height),Me?(ke.oldX=0,ke.oldY=Ye):ke.oldShape={x:ot,y:Ye,width:0,height:0}}ke.fadein=!Me}}function _se(t,e){return t*vse+e}var bv=R,xse=Se,r0=-1,dr=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ye(e);this.type=n,this.mappingMethod=r,this._normalizeData=wse[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(ob(i),bse(i)):r==="category"?i.categories?Sse(i):ob(i,!0):(Er(r!=="linear"||i.dataExtent),ob(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return le(this._normalizeData,this)},t.listVisualTypes=function(){return $e(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){Se(e)?R(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:Se(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&bv(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(ee(e))e=e.slice();else if(xse(e)){var r=[];bv(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function ob(t,e){var r=t.visual,n=[];Se(r)?bv(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),PG(t,n)}function Og(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:NT([0,1])}}function rR(t){var e=this.option.visual;return e[Math.round(nt(t,[0,1],[0,e.length-1],!0))]||{}}function kf(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Qf(t){var e=this.option.visual;return e[this.option.loop&&t!==r0?t%e.length:t]}function ml(){return this.option.visual[0]}function NT(t){return{linear:function(e){return nt(e,t,this.option.visual,!0)},category:Qf,piecewise:function(e,r){var n=ET.call(this,r);return n==null&&(n=nt(e,t,this.option.visual,!0)),n},fixed:ml}}function ET(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=dr.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function PG(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=Zr(r);return n||[0,0,0,1]})),e}var wse={linear:function(t){return nt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=dr.findPieceIndex(t,e,!0);if(r!=null)return nt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??r0},fixed:Rt};function zg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=Pse(i,l,g,m,p,n);DG(g,y,r,n)}})}}}function Mse(t,e,r){var n=J({},e),i=r.designatedVisualItemStyle;return R(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function nR(t){var e=sb(t,"color");if(e){var r=sb(t,"colorAlpha"),n=sb(t,"colorSaturation");return n&&(e=to(e,null,null,n)),r&&(e=ev(e,r)),e}}function Ase(t,e){return e!=null?to(e,null,null,t):null}function sb(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function Lse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=lb(e,"color")||i.color!=null&&i.color!=="none"&&(lb(e,"colorAlpha")||lb(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new dr(h);return kG(f).drColorMappingBy=c,f}}}function lb(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function Pse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&kG(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Sv=Math.max,n0=Math.min,iR=Sr,hA=R,IG=["itemStyle","borderWidth"],kse=["itemStyle","gapWidth"],Dse=["upperLabel","show"],Ise=["upperLabel","height"];const Nse={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=sr(t,r).refContainer,o=St(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(iR(o.width,s[0]),a.width),u=oe(iR(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=xv(n,h,t),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=MG(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?jse(t,f,p,l,u):d?[d.width,d.height]:[l,u],y=i.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:i.squareRatio,sort:y,leafDepth:i.leafDepth};p.hostTree.clearLayouts();var b={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(b),NG(p,_,!1,0),b=p.getLayout(),hA(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},b))})}var w=t.getData().tree.root;w.setLayout(Vse(o,d,f),!0),t.setLayoutInfo(o),EG(w,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function NG(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(IG),u=s.get(kse)/2,c=RG(s),h=Math.max(l,c),f=l-u,d=h-u;t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=Sv(i-2*f,0),a=Sv(a-f-d,0);var p=i*a,g=Ese(t,s,p,e,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=n0(i,a),_=1/0,b=[];b.area=0;for(var w=0,C=g.length;w=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Bse(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?Sv(u*n/l,l/(u*i)):1/0}function aR(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],c=e?t.area/e:0;(i||c>r[l[o]])&&(c=r[l[o]]);for(var h=0,f=t.length;hMw&&(u=Mw),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(C[0]=-C[0],C[1]=-C[1]);var A=w[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var k=-Math.atan2(w[1],w[0]);h[0].8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+c[0],a.y=-f[1]*_+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+N,p=w[0]<0?"right":"left",a.originX=-y*A,a.originY=-N;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=M[0],a.y=M[1]+N,p="center",a.originY=-N;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*A+h[0],a.y=h[1]+N,p=w[0]>=0?"right":"left",a.originX=y*A,a.originY=-N;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(_e),gA=function(){function t(e){this.group=new _e,this._LineCtor=e||pA}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=hR(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=hR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!nle(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function hR(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:ar(e)}}function fR(t){return isNaN(t[0])||isNaN(t[1])}function db(t){return t&&!fR(t[0])&&!fR(t[1])}var vb=[],pb=[],gb=[],Yu=br,mb=ss,dR=Math.abs;function vR(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,c=.1;c<=.9;c+=.1){vb[0]=Yu(n[0],i[0],a[0],c),vb[1]=Yu(n[1],i[1],a[1],c);var h=dR(mb(vb,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function yb(t,e){var r=[],n=Qd,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ma(u[0]),ma(u[1])],u[2]&&u.__original.push(ma(u[2])));var f=u.__original;if(u[2]!=null){if(Gr(i[0],f[0]),Gr(i[1],f[2]),Gr(i[2],f[1]),c&&c!=="none"){var d=ed(s.node1),p=vR(i,f[0],d*e);n(i[0][0],i[1][0],i[2][0],p,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],p,r),i[0][1]=r[3],i[1][1]=r[4]}if(h&&h!=="none"){var d=ed(s.node2),p=vR(i,f[1],d*e);n(i[0][0],i[1][0],i[2][0],p,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],p,r),i[1][1]=r[1],i[2][1]=r[2]}Gr(u[0],i[0]),Gr(u[1],i[2]),Gr(u[2],i[1])}else{if(Gr(a[0],f[0]),Gr(a[1],f[1]),Uo(o,a[1],a[0]),cu(o,o),c&&c!=="none"){var d=ed(s.node1);hy(a[0],a[0],o,d*e)}if(h&&h!=="none"){var d=ed(s.node2);hy(a[1],a[1],o,-d*e)}Gr(u[0],a[0]),Gr(u[1],a[1])}})}var GG=Fe();function ile(t){if(t)return GG(t).bridge}function pR(t,e){t&&(GG(t).bridge=e)}function gR(t){return t.type==="view"}var ale=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new ep,a=new gA,o=this.group,s=new _e;this._controller=new mu(n.getZr()),this._controllerHost={target:s},s.add(i.group),s.add(a.group),o.add(s),this._symbolDraw=i,this._lineDraw=a,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem,s=!1;this._model=r,this._api=i,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(i);var u=this._symbolDraw,c=this._lineDraw;if(gR(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(h):Qe(this._mainGroup,h,r)}yb(r.getGraph(),Jf(r));var f=r.getData();u.updateData(f);var d=r.getEdgeData();c.updateData(d),this._updateNodeAndLinkScale(),this._updateController(null,r,i),clearTimeout(this._layoutTimeout);var p=r.forceLayout,g=r.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,i,g));var m=r.get("layout");f.graph.eachNode(function(w){var C=w.dataIndex,M=w.getGraphicEl(),A=w.getModel();if(M){M.off("drag").off("dragend");var k=A.get("draggable");k&&M.on("drag",function(D){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(C),f.setItemLayout(C,[M.x,M.y]);break;case"circular":f.setItemLayout(C,[M.x,M.y]),w.setLayout({fixed:!0},!0),vA(r,"symbolSize",w,[D.offsetX,D.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(C,[M.x,M.y]),dA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(C)}),M.setDraggable(k,!!A.get("cursor"));var N=A.get(["emphasis","focus"]);N==="adjacency"&&(Le(M).focus=w.getAdjacentDataIndices())}}),f.graph.eachEdge(function(w){var C=w.getGraphicEl(),M=w.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Le(C).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=f.getLayout("cx"),b=f.getLayout("cy");f.graph.eachNode(function(w){jG(w,y,_,b)}),this._firstRender=!1,s||this._renderThumbnail(r,i,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n,i){var a=this,o=!1;(function s(){r.step(function(l){a.updateLayout(a._model),(l||!o)&&(o=!0,a._renderThumbnail(a._model,n,a._symbolDraw,a._lineDraw)),(a._layouting=!l)&&(i?a._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(r,n,i){var a=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!gR(s)){a.disable();return}a.enable(n.get("roam"),{api:i,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!r||r.contain(u,c)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),a.off("pan").off("zoom").on("pan",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){i.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(r,n,i){this._active&&(iA(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(aA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),yb(r.getGraph(),Jf(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=Jf(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(yb(r.getGraph(),Jf(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var r=this._model,n=r.coordinateSystem;if(n.type==="view"){var i=ile(r);if(i)return{bridge:i,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var r=this._getThumbnailInfo();r&&r.bridge.updateWindow(r.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(r,n,i,a){var o=this._getThumbnailInfo();if(o){var s=new _e,l=i.group.children(),u=a.group.children(),c=new _e,h=new _e;s.add(h),s.add(c);for(var f=0;f=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof yl||(r=this._nodesMap[Xu(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(d.node1))}for(l=0;l=0&&!e.hasKey(b)&&(e.set(b,!0),s.push(_.node2))}}}return{edge:e.keys(),node:r.keys()}},t}(),HG=function(){function t(e,r,n){this.dataIndex=-1,this.node1=e,this.node2=r,this.dataIndex=n??-1}return t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostGraph,n=r.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},t.prototype.getTrajectoryDataIndices=function(){var e=de(),r=de();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a=0&&!e.hasKey(h)&&(e.set(h,!0),n.push(c.node1))}for(a=0;a=0&&!e.hasKey(g)&&(e.set(g,!0),i.push(p.node2))}return{edge:e.keys(),node:r.keys()}},t}();function WG(t,e){return{getValue:function(r){var n=this[t][e];return n.getStore().get(n.getDimensionIndex(r||"value"),this.dataIndex)},setVisual:function(r,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Bt(yl,WG("hostGraph","data"));Bt(HG,WG("hostGraph","edgeData"));function mA(t,e,r,n,i){for(var a=new ole(n),o=0;o "+f)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=ka(t,r);else{var g=Lh.get(d),m=g?g.dimensions||[]:[];Ne(m,"value")<0&&m.concat(["value"]);var y=Ih(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new $r(y,r),p.initData(t)}var _=new $r(["value"],r);return _.initData(l,s),i&&i(p,_),TG({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var sle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new zh(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),ql(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){$se(this);var s=mA(a,i,this,!0,l);return R(s.edges,function(u){Yse(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,m=p.getShallow("category"),y=g[m];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=We.prototype.getModel;function f(p,g){var m=h.call(this,p,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=$V({series:this,dataIndex:r,multipleSeries:n});return h},e.prototype._updateCategoriesData=function(){var r=re(this.option.categories||[],function(i){return i.value!=null?i:J({value:0},i)}),n=new $r(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function lle(t){t.registerChartView(ale),t.registerSeriesModel(sle),t.registerProcessor(Gse),t.registerVisual(Hse),t.registerVisual(Wse),t.registerLayout(Xse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Kse),t.registerLayout(Jse),t.registerCoordinateSystem("graphView",{dimensions:yu.dimensions,create:tle}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Rt),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Rt),t.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=n.getViewOfSeriesModel(i);a&&(e.dx!=null&&e.dy!=null&&a.updateViewOnPan(i,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&a.updateViewOnZoom(i,n,e));var o=i.coordinateSystem,s=y_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var mR=function(t){Y(e,t);function e(r,n,i){var a=t.call(this)||this;Le(a).dataType="node",a.z2=2;var o=new Xe;return a.setTextContent(o),a.updateData(r,n,i,!0),a}return e.prototype.updateData=function(r,n,i,a){var o=this,s=r.graph.getNodeByIndex(n),l=r.hostModel,u=s.getModel(),c=u.getModel("emphasis"),h=r.getItemLayout(n),f=J(da(u.getModel("itemStyle"),h,!0),h),d=this;if(isNaN(f.startAngle)){d.setShape(f);return}a?d.setShape(f):Qe(d,{shape:f},l,n);var p=J(da(u.getModel("itemStyle"),h,!0),h);o.setShape(p),o.useStyle(r.getItemVisual(n,"style")),ir(o,u),this._updateLabel(l,u,s),r.setItemGraphicEl(n,d),ir(d,u,"itemStyle");var g=c.get("focus");wt(this,g==="adjacency"?s.getAdjacentDataIndices():g,c.get("blurScope"),c.get("disabled"))},e.prototype._updateLabel=function(r,n,i){var a=this.getTextContent(),o=i.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=n.getModel("label");a.ignore=!c.get("show");var h=ar(n),f=i.getVisual("style");vr(a,h,{labelFetcher:{getFormattedLabel:function(_,b,w,C,M,A){return r.getFormattedLabel(_,b,"node",C,xn(M,h.normal&&h.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:f.fill,defaultOpacity:f.opacity,defaultOutsidePosition:"startArc"});var d=c.get("position")||"outside",p=c.get("distance")||0,g;d==="outside"?g=o.r+p:g=(o.r+o.r0)/2,this.textConfig={inside:d!=="outside"};var m=d!=="outside"?c.get("align")||"center":l>0?"left":"right",y=d!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";a.attr({x:l*g+o.cx,y:u*g+o.cy,rotation:0,style:{align:m,verticalAlign:y}})},e}(Rr),ule=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;return Le(o).dataType="edge",o.updateData(r,n,i,a,!0),o}return e.prototype.buildPath=function(r,n){r.moveTo(n.s1[0],n.s1[1]);var i=.7,a=n.clockwise;r.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!a),r.bezierCurveTo((n.cx-n.s2[0])*i+n.s2[0],(n.cy-n.s2[1])*i+n.s2[1],(n.cx-n.t1[0])*i+n.t1[0],(n.cy-n.t1[1])*i+n.t1[1],n.t1[0],n.t1[1]),r.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!a),r.bezierCurveTo((n.cx-n.t2[0])*i+n.t2[0],(n.cy-n.t2[1])*i+n.t2[1],(n.cx-n.s1[0])*i+n.s1[0],(n.cy-n.s1[1])*i+n.s1[1],n.s1[0],n.s1[1]),r.closePath()},e.prototype.updateData=function(r,n,i,a,o){var s=r.hostModel,l=n.graph.getEdgeByIndex(i),u=l.getLayout(),c=l.node1.getModel(),h=n.getItemModel(l.dataIndex),f=h.getModel("lineStyle"),d=h.getModel("emphasis"),p=d.get("focus"),g=J(da(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),yR(m,l,r,f)):(fi(m),yR(m,l,r,f),Qe(m,{shape:g},s,i)),wt(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),ir(m,h,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(Ue);function yR(t,e,r,n){var i=e.node1,a=e.node2,o=t.style;t.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=r.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"target":o.fill=r.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"gradient":var l=r.getItemVisual(i.dataIndex,"style").fill,u=r.getItemVisual(a.dataIndex,"style").fill;if(se(l)&&se(u)){var c=t.shape,h=(c.s1[0]+c.s2[0])/2,f=(c.s1[1]+c.s2[1])/2,d=(c.t1[0]+c.t2[0])/2,p=(c.t1[1]+c.t2[1])/2;o.fill=new hu(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var cle=Math.PI/180,hle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){},e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group,l=-r.get("startAngle")*cle;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new mR(a,c,l);Le(f).dataIndex=c,s.add(f)}}).update(function(c,h){var f=o.getItemGraphicEl(h),d=a.getItemLayout(c);if(!d){f&&ro(f,r,h);return}f?f.updateData(a,c,l):f=new mR(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&ro(h,r,c)}).execute(),!o){var u=r.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=oe(u[0],i.getWidth()),this.group.originY=oe(u[1],i.getHeight()),bt(this.group,{scaleX:1,scaleY:1},r)}this._data=a,this.renderEdges(r,l)},e.prototype.renderEdges=function(r,n){var i=r.getData(),a=r.getEdgeData(),o=this._edgeData,s=this.group;a.diff(o).add(function(l){var u=new ule(i,a,l,n);Le(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,a,l,n),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&ro(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(st),fle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new zh(le(this.getData,this),le(this.getRawData,this))},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links)},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[];if(a&&i){var o=mA(a,i,this,!0,s);return o.data}function s(l,u){var c=We.prototype.getModel;function h(d,p){var g=c.call(this,d,p);return g.resolveParentPath=f,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=f,d.getModel=h,d});function f(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){var a=this.getDataParams(r,i);if(i==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(r),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Kt("nameValue",{name:c.join(" > "),value:a.value,noValue:a.value==null})}return Kt("nameValue",{name:a.name,value:a.value,noValue:a.value==null})},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(n==="node"){var a=this.getData(),o=this.getGraph().getNodeByIndex(r);if(i.name==null&&(i.name=a.getName(r)),i.value==null){var s=o.getLayout().value;i.value=s}}return i},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(ht),_b=Math.PI/180;function dle(t,e){t.eachSeriesByType("chord",function(r){vle(r,e)})}function vle(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=fV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((t.get("padAngle")||0)*_b,0),f=Math.max((t.get("minAngle")||0)*_b,0),d=-t.get("startAngle")*_b,p=d+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[d,p];e_(y,!g);var _=y[0],b=y[1],w=b-_,C=r.getSum("value")===0&&i.getSum("value")===0,M=[],A=0;n.eachEdge(function(j){var W=C?1:j.getValue("value");C&&(W>0||f)&&(A+=2);var H=j.node1.dataIndex,X=j.node2.dataIndex;M[H]=(M[H]||0)+W,M[X]=(M[X]||0)+W});var k=0;if(n.eachNode(function(j){var W=j.getValue("value");isNaN(W)||(M[j.dataIndex]=Math.max(W,M[j.dataIndex]||0)),!C&&(M[j.dataIndex]>0||f)&&A++,k+=M[j.dataIndex]||0}),!(A===0||k===0)){h*A>=Math.abs(w)&&(h=Math.max(0,(Math.abs(w)-f*A)/A)),(h+f)*A>=Math.abs(w)&&(f=(Math.abs(w)-h*A)/A);var N=(w-h*A*m)/k,D=0,I=0,z=0;n.eachNode(function(j){var W=M[j.dataIndex]||0,H=N*(k?W:1)*m;Math.abs(H)I){var V=D/I;n.eachNode(function(j){var W=j.getLayout().angle;Math.abs(W)>=f?j.setLayout({angle:W*V,ratio:V},!0):j.setLayout({angle:f,ratio:f===0?1:W/f},!0)})}else n.eachNode(function(j){if(!O){var W=j.getLayout().angle,H=Math.min(W/z,1),X=H*D;W-Xf&&f>0){var H=O?1:Math.min(W/z,1),X=W-f,K=Math.min(X,Math.min(G,D*H));G-=K,j.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else f>0&&j.setLayout({angle:f,ratio:W===0?1:f/W},!0)}});var F=_,Z=[];n.eachNode(function(j){var W=Math.max(j.getLayout().angle,f);j.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:F,endAngle:F+W*m,clockwise:g},!0),Z[j.dataIndex]=F,F+=(W+h)*m}),n.eachEdge(function(j){var W=C?1:j.getValue("value"),H=N*(k?W:1)*m,X=j.node1.dataIndex,K=Z[X]||0,ne=Math.abs((j.node1.getLayout().ratio||1)*H),ie=K+ne*m,ue=[s+c*Math.cos(K),l+c*Math.sin(K)],ve=[s+c*Math.cos(ie),l+c*Math.sin(ie)],Ge=j.node2.dataIndex,xe=Z[Ge]||0,ge=Math.abs((j.node2.getLayout().ratio||1)*H),ke=xe+ge*m,fe=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(ke),l+c*Math.sin(ke)];j.setLayout({s1:ue,s2:ve,sStartAngle:K,sEndAngle:ie,t1:fe,t2:Me,tStartAngle:xe,tEndAngle:ke,cx:s,cy:l,r:c,value:W,clockwise:g}),Z[X]=ie,Z[Ge]=ke})}}}function ple(t){t.registerChartView(hle),t.registerSeriesModel(fle),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,dle),t.registerProcessor(Rh("chord"))}var gle=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),mle=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new gle},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,c),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,c)},e}(Ue);function yle(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=oe(r[0],e.getWidth()),s=oe(r[1],e.getHeight()),l=oe(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function jg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var _le=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=yle(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,c=-r.get("endAngle")/180*Math.PI,h=r.getModel("axisLine"),f=h.get("roundCap"),d=f?qy:Rr,p=h.get("show"),g=h.getModel("lineStyle"),m=g.get("width"),y=[u,c];e_(y,!l),u=y[0],c=y[1];for(var _=c-u,b=u,w=[],C=0;p&&C=N&&(D===0?0:a[D-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-k-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?h.add(new Xe({style:vt(b,{text:W,x:X,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:V<-.4?"left":V>.4?"right":"center"},{inheritColor:H}),silent:!0})):h.add(new Xe({style:vt(b,{text:W,x:X,y:K,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:X,originY:K,rotation:ie}))}if(_.get("show")&&F!==w){var Z=_.get("distance");Z=Z?Z+c:c;for(var ue=0;ue<=C;ue++){V=Math.cos(k),G=Math.sin(k);var ve=new Wt({shape:{x1:V*(p-Z)+f,y1:G*(p-Z)+d,x2:V*(p-A-Z)+f,y2:G*(p-A-Z)+d},silent:!0,style:z});z.stroke==="auto"&&ve.setStyle({stroke:a((F+ue/C)/w)}),h.add(ve),k+=D}k-=D}else k+=N}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),b=_.mapDimension("value"),w=+r.get("min"),C=+r.get("max"),M=[w,C],A=[s,l];function k(D,I){var z=_.getItemModel(D),O=z.getModel("pointer"),V=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),F=r.get(["pointer","icon"]),Z=O.get("offsetCenter"),j=oe(Z[0],o.r),W=oe(Z[1],o.r),H=O.get("keepAspect"),X;return F?X=Ut(F,j-V/2,W-G,V,G,null,H):X=new mle({shape:{angle:-Math.PI/2,width:V,r:G,x:j,y:W}}),X.rotation=-(I+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function N(D,I){var z=m.get("roundCap"),O=z?qy:Rr,V=m.get("overlap"),G=V?m.get("width"):c/_.count(),F=V?o.r-G:o.r-(D+1)*G,Z=V?o.r:o.r-D*G,j=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:Z}});return V&&(j.z2=nt(_.get(b,D),[w,C],[100,0],!0)),j}(y||g)&&(_.diff(f).add(function(D){var I=_.get(b,D);if(g){var z=k(D,s);bt(z,{rotation:-((isNaN(+I)?A[0]:nt(I,M,A,!0))+Math.PI/2)},r),h.add(z),_.setItemGraphicEl(D,z)}if(y){var O=N(D,s),V=m.get("clip");bt(O,{shape:{endAngle:nt(I,M,A,V)}},r),h.add(O),Nw(r.seriesIndex,_.dataType,D,O),p[D]=O}}).update(function(D,I){var z=_.get(b,D);if(g){var O=f.getItemGraphicEl(I),V=O?O.rotation:s,G=k(D,V);G.rotation=V,Qe(G,{rotation:-((isNaN(+z)?A[0]:nt(z,M,A,!0))+Math.PI/2)},r),h.add(G),_.setItemGraphicEl(D,G)}if(y){var F=d[I],Z=F?F.shape.endAngle:s,j=N(D,Z),W=m.get("clip");Qe(j,{shape:{endAngle:nt(z,M,A,W)}},r),h.add(j),Nw(r.seriesIndex,_.dataType,D,j),p[D]=j}}).execute(),_.each(function(D){var I=_.getItemModel(D),z=I.getModel("emphasis"),O=z.get("focus"),V=z.get("blurScope"),G=z.get("disabled");if(g){var F=_.getItemGraphicEl(D),Z=_.getItemVisual(D,"style"),j=Z.fill;if(F instanceof pr){var W=F.style;F.useStyle(J({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},Z))}else F.useStyle(Z),F.type!=="pointer"&&F.setColor(j);F.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(nt(_.get(b,D),M,[0,1],!0))),F.z2EmphasisLift=0,ir(F,I),wt(F,O,V,G)}if(y){var H=p[D];H.useStyle(_.getItemVisual(D,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),wt(H,O,V,G)}}),this._progressEls=p)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=Ut(s,n.cx-o/2+oe(l[0],n.r),n.cy-o/2+oe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),c=+r.get("min"),h=+r.get("max"),f=new _e,d=[],p=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new Xe({silent:!0}),p[y]=new Xe({silent:!0})}).update(function(y,_){d[y]=s._titleEls[_],p[y]=s._detailEls[_]}).execute(),l.each(function(y){var _=l.getItemModel(y),b=l.get(u,y),w=new _e,C=a(nt(b,[c,h],[0,1],!0)),M=_.getModel("title");if(M.get("show")){var A=M.get("offsetCenter"),k=o.cx+oe(A[0],o.r),N=o.cy+oe(A[1],o.r),D=d[y];D.attr({z2:m?0:2,style:vt(M,{x:k,y:N,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),w.add(D)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),V=o.cy+oe(z[1],o.r),G=oe(I.get("width"),o.r),F=oe(I.get("height"),o.r),Z=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:C,D=p[y],j=I.get("formatter");D.attr({z2:m?0:2,style:vt(I,{x:O,y:V,text:jg(b,j),width:isNaN(G)?null:G,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:Z})}),Yj(D,{normal:I},b,function(H){return jg(H,j)}),g&&Xj(D,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return jg(ue?ue.interpolatedValue:b,j)}}),w.add(D)}f.add(w)}),this.group.add(f),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(st),xle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return Oh(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,q.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:q.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:q.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:q.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:q.color.neutral00,borderWidth:0,borderColor:q.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:q.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:q.color.transparent,borderWidth:0,borderColor:q.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:q.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(ht);function ble(t){t.registerChartView(_le),t.registerSeriesModel(xle)}var Sle=["itemStyle","opacity"],wle=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new Tr,s=new Xe;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(Sle);c=c??1,i||fi(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,bt(a,{style:{opacity:c}},o,n)):Qe(a,{style:{opacity:c},shape:{points:l.points}},o,n),ir(a,s),this._updateLabel(r,n),wt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),c=u.label,h=r.getItemVisual(n,"style"),f=h.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),g=p==="inherit"?f:null;i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:g,outsideFill:g});var m=c.linePoints;a.setShape({points:m}),i.textGuideLineConfig={anchor:m?new Te(m[0][0],m[0][1]):null},Qe(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),WM(i,UM(l),{stroke:f})},e}(Or),Tle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new wle(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);ro(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(st),Cle=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Oh(this,{coordDimensions:["value"],encodeDefaulter:Ie(yM,this)})},e.prototype._defaultLabelLine=function(r){ql(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:q.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function Mle(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();oGle)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!bb(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function bb(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var Ule=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&Ee(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=et(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);R(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Ve),Zle=function(t){Y(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(pi);function Ss(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=qu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=qu(s,[0,o]),i=a=qu(s,[i,a]),n=0}e[0]=qu(e[0],r),e[1]=qu(e[1],r);var l=Sb(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=qu(e[n],c);var h;return h=Sb(e,n),i!=null&&(h.sign!==l.sign||h.spana&&(e[1-n]=e[n]+h.sign*a),e}function Sb(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function qu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var wb=R,ZG=Math.min,$G=Math.max,bR=Math.floor,$le=Math.ceil,SR=Ht,Yle=Math.PI,Xle=function(){function t(e,r,n){this.type="parallel",this._axesMap=de(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;wb(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Zle(o,Qv(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();wb(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),nu(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer;this._rect=St(e.getBoxLayoutParams(),n),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,c=Vg(e.get("axisExpandWidth"),l),h=Vg(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=Vg(d[1]-d[0],l),d[1]=d[0]+p;else{p=Vg(c*(h-1),l);var g=e.get("axisExpandCenter")||bR(u/2);d=[c*g-p/2],d[1]=d[0]+p}var m=(s-p)/(u-h);m<3&&(m=0);var y=[bR(SR(d[0]/c,1))+1,$le(SR(d[1]/c,1))-1],_=m/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:_}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),wb(n,function(o,s){var l=(i.axisExpandable?Kle:qle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Yle/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],f=c[a],d=fr();xo(d,d,f),Oi(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];R(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=r.axisExpandWidth/c,l?Ss(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[$G(0,p-d/2)],i[1]=ZG(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Vg(t,e){return ZG($G(t,e[0]),e[1])}function qle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Kle(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return t=0;i--)kn(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;arue}function JG(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function eH(t,e,r,n){var i=new _e;return i.add(new Be({name:"main",style:SA(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(CR,t,e,i,["n","s","w","e"]),ondragend:Ie(au,e,{isEnd:!0})})),R(n,function(a){i.add(new Be({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(CR,t,e,i,a),ondragend:Ie(au,e,{isEnd:!0})}))}),i}function tH(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=ch(i,nue),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],h=r[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,g=h-s,m=p+i,y=g+i;ja(t,e,"main",o,s,p,g),n.transformable&&(ja(t,e,"w",l,u,a,y),ja(t,e,"e",f,u,a,y),ja(t,e,"n",l,u,m,a),ja(t,e,"s",l,d,m,a),ja(t,e,"nw",l,u,a,a),ja(t,e,"ne",f,u,a,a),ja(t,e,"sw",l,d,a,a),ja(t,e,"se",f,d,a,a))}function VT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(SA(r)),i.attr({silent:!n,cursor:n?"move":"default"}),R([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?FT(t,a[0]):uue(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?aue[s]+"-resize":null})})}function ja(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(hue(wA(t,e,[[n,i],[n+a,i+o]])))}function SA(t){return be({strokeNoScale:!0},t.brushStyle)}function rH(t,e,r,n){var i=[Tv(t,r),Tv(e,n)],a=[ch(t,r),ch(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function lue(t){return hs(t.group)}function FT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=i_(r[e],lue(t));return n[i]}function uue(t,e){var r=[FT(t,e[0]),FT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function CR(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=nH(e,i,a);R(n,function(u){var c=iue[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(rH(s[0][0],s[1][0],s[0][1],s[1][1])),_A(e,r),au(e,{isEnd:!1})}function cue(t,e,r,n){var i=e.__brushOption.range,a=nH(t,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),_A(t,e),au(t,{isEnd:!1})}function nH(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function wA(t,e,r){var n=QG(t,e);return n&&n!==iu?n.clipPath(r,t._transform):ye(r)}function hue(t){var e=Tv(t[0][0],t[1][0]),r=Tv(t[0][1],t[1][1]),n=ch(t[0][0],t[1][0]),i=ch(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function fue(t,e,r){if(!(!t._brushType||vue(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=bA(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var S_={lineX:LR(0),lineY:LR(1),rect:{createCover:function(t,e){function r(n){return n}return eH({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=JG(t);return rH(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){tH(t,e,r,n)},updateCommon:VT,contain:HT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new Tr({name:"main",style:SA(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Or({name:"main",draggable:!0,drift:Ie(cue,t,e),ondragend:Ie(au,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:wA(t,e,r)})},updateCommon:VT,contain:HT}};function LR(t){return{createCover:function(e,r){return eH({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=JG(e),n=Tv(r[0][t],r[1][t]),i=ch(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=QG(e,r);if(o!==iu&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),tH(e,r,l,i)},updateCommon:VT,contain:HT}}function aH(t){return t=TA(t),function(e){return J2(e,t)}}function oH(t,e){return t=TA(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function sH(t,e,r){var n=TA(t);return function(i,a){return n.contain(a[0],a[1])&&!fG(i,e,r)}}function TA(t){return Ce.create(t)}var pue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new yA(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!gue(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!r.get("show")){var s=yue(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,h=r.axis.dim,f=l.getAxisLayout(h),d=J({strokeContainThreshold:c},f),p=new rn(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Yv(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=Ce.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:aH(h),isTargetByCursor:sH(h,s,a),getLinearBrushOtherExtent:oH(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(mue(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=re(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(gt);function gue(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function mue(t){var e=t.axis;return re(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function yue(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var _ue={type:"axisAreaSelect",event:"axisAreaSelected"};function xue(t){t.registerAction(_ue,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var bue={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function lH(t){t.registerComponentView(Hle),t.registerComponentModel(Ule),t.registerCoordinateSystem("parallel",Jle),t.registerPreprocessor(jle),t.registerComponentModel(BT),t.registerComponentView(pue),lh(t,"parallel",BT,bue),xue(t)}function Sue(t){Oe(lH),t.registerChartView(Dle),t.registerSeriesModel(Ele),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Ble)}var wue=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),Tue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new wue},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){fo(this)},e.prototype.downplay=function(){vo(this)},e}(Ue),Cue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._mainGroup=new _e,r._focusAdjacencyDisabled=!1,r}return e.prototype.init=function(r,n){this._controller=new mu(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this._mainGroup,l=r.layoutInfo,u=l.width,c=l.height,h=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),dG(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new Tue,m=Le(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),b=_.get("curveness"),w=p.node1.getLayout(),C=p.node1.getModel(),M=C.get("localX"),A=C.get("localY"),k=p.node2.getLayout(),N=p.node2.getModel(),D=N.get("localX"),I=N.get("localY"),z=p.getLayout(),O,V,G,F,Z,j,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=d,d==="vertical"?(O=(M!=null?M*u:w.x)+z.sy,V=(A!=null?A*c:w.y)+w.dy,G=(D!=null?D*u:k.x)+z.ty,F=I!=null?I*c:k.y,Z=O,j=V*(1-b)+F*b,W=G,H=V*b+F*(1-b)):(O=(M!=null?M*u:w.x)+w.dx,V=(A!=null?A*c:w.y)+z.sy,G=D!=null?D*u:k.x,F=(I!=null?I*c:k.y)+z.ty,Z=O*(1-b)+G*b,j=V,W=O*b+G*(1-b),H=F),g.setShape({x1:O,y1:V,x2:G,y2:F,cpx1:Z,cpy1:j,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),PR(g.style,d,p);var X=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,ve,Ge,xe,ge,ke){return r.getFormattedLabel(ue,ve,"edge",xe,xn(ge,K.normal&&K.normal.get("formatter"),X),ke)}},labelDataIndex:p.dataIndex,defaultText:X}),g.setTextConfig({position:"inside"});var ne=y.getModel("emphasis");ir(g,y,"lineStyle",function(ue){var ve=ue.getItemStyle();return PR(ve,d,p),ve}),s.add(g),f.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");wt(g,ie==="adjacency"?p.getAdjacentDataIndices():ie==="trajectory"?p.getTrajectoryDataIndices():ie,ne.get("blurScope"),ne.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),m=p.getModel(),y=m.get("localX"),_=m.get("localY"),b=m.getModel("emphasis"),w=m.get(["itemStyle","borderRadius"])||0,C=new Be({shape:{x:y!=null?y*u:g.x,y:_!=null?_*c:g.y,width:g.dx,height:g.dy,r:w},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(C,ar(m),{labelFetcher:{getFormattedLabel:function(A,k){return r.getFormattedLabel(A,k,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),C.disableLabelAnimation=!0,C.setStyle("fill",p.getVisual("color")),C.setStyle("decal",p.getVisual("style").decal),ir(C,m),s.add(C),h.setItemGraphicEl(p.dataIndex,C),Le(C).dataType="node";var M=b.get("focus");wt(C,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,b.get("blurScope"),b.get("disabled"))}),h.eachItemGraphicEl(function(p,g){var m=h.getItemModel(g);m.get("draggable")&&(p.drift=function(y,_){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=_,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:h.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(Mue(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(r,n){var i=r.layoutInfo,a=i.width,o=i.height,s=r.coordinateSystem=new yu(null,{api:n,ecModel:r.ecModel});s.zoomLimit=r.get("scaleLimit"),s.setBoundingRect(0,0,a,o),s.setCenter(r.get("center")),s.setZoom(r.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(st);function PR(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");se(n)&&se(i)&&(t.fill=new hu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function Mue(t,e,r){var n=new Be({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return bt(n,{shape:{width:t.width+20}},e,r),n}var Aue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=r.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new We(o[l],this,n));var u=mA(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getData().getItemLayout(p);if(m){var y=m.depth,_=g.levelModels[y];_&&(d.parentModel=_)}return d}),f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(p),y=m.node1.getLayout();if(y){var _=y.depth,b=g.levelModels[_];b&&(d.parentModel=b)}return d})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Kt("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(r),h=c.getLayout().value,f=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:q.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:q.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(ht);function Lue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sr(r,e).refContainer,o=St(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,h=u.edges;kue(c);var f=et(c,function(m){return m.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");Pue(c,h,n,i,s,l,d,p,g)})}function Pue(t,e,r,n,i,a,o,s,l){Due(t,e,r,i,a,s,l),Rue(t,e,a,i,n,o,s),Wue(t,s)}function kue(t){R(t,function(e){var r=vs(e.outEdges,i0),n=vs(e.inEdges,i0),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function Due(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:h},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_h-1?d:h-1;o&&o!=="left"&&Iue(t,o,a,A);var k=a==="vertical"?(i-r)/A:(n-r)/A;Eue(t,k,a)}function uH(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function Iue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,Bue(s,l,o),Tb(s,i,r,n,o),Hue(s,l,o),Tb(s,i,r,n,o)}function Oue(t,e){var r=[],n=e==="vertical"?"y":"x",i=Lw(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),R(i.keys,function(a){r.push(i.buckets.get(a))}),r}function zue(t,e,r,n,i,a){var o=1/0;R(t,function(s){var l=s.length,u=0;R(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+e;var p=i==="vertical"?n:r;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function Bue(t,e,r){R(t.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=vs(i.outEdges,jue,r)/vs(i.outEdges,i0);if(isNaN(a)){var o=i.outEdges.length;a=o?vs(i.outEdges,Vue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-ws(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-ws(i,r))*e;i.setLayout({y:l},!0)}}})})}function jue(t,e){return ws(t.node2,e)*t.getValue()}function Vue(t,e){return ws(t.node2,e)}function Fue(t,e){return ws(t.node1,e)*t.getValue()}function Gue(t,e){return ws(t.node1,e)}function ws(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function i0(t){return t.getValue()}function vs(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),R(n,function(s){var l=new dr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&R(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Zue(t){t.registerChartView(Cue),t.registerSeriesModel(Aue),t.registerLayout(Lue),t.registerVisual(Uue),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),t.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(i){var a=i.coordinateSystem,o=y_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var cH=function(){function t(){}return t.prototype._hasEncodeRule=function(e){var r=this.getEncode();return r&&r.get(e)!=null},t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),m=e.data;if(m&&l){var y=[];R(m,function(w,C){var M;ee(w)?(M=w.slice(),w.unshift(C)):ee(w.value)?(M=J({},w),M.value=M.value.slice(),w.value.unshift(C)):M=w,y.push(M)}),e.data=y}var _=this.defaultValueDimensions,b=[{name:h,type:Fy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Fy(g),dimsDef:_.slice()}];return Oh(this,{coordDimensions:b,dimensionsCount:_.length+1,encodeDefaulter:Ie(xV,b,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),hH=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:q.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:q.color.shadow}},animationDuration:800},e}(ht);Bt(hH,cH,!0);var $ue=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=kR(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(fi(h),fH(f,h,a,u)):h=kR(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(st),Yue=function(){function t(){}return t}(),Xue=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Yue},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var w=[y,b];n.push(w)}}}return{boxData:r,outliers:n}}var rce={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Cr){var n="";it(n)}var i=tce(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function nce(t){t.registerSeriesModel(hH),t.registerChartView($ue),t.registerLayout(Kue),t.registerTransform(rce)}var ice=["itemStyle","borderColor"],ace=["itemStyle","borderColor0"],oce=["itemStyle","borderColorDoji"],sce=["itemStyle","color"],lce=["itemStyle","color0"];function CA(t,e){return e.get(t>0?sce:lce)}function MA(t,e){return e.get(t===0?oce:t>0?ice:ace)}var uce={seriesType:"candlestick",plan:Ph(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=CA(s,o),l.stroke=MA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},cce=["color","borderColor"],hce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){ks(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&DR(u,h))return;var f=Cb(h,c,!0);bt(f,{shape:{points:h.ends}},r,c),Mb(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&DR(u,d)){a.remove(f);return}f?(Qe(f,{shape:{points:d.ends}},r,c),fi(f)):f=Cb(d),Mb(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),IR(r,this.group);var n=r.get("clip",!0)?tp(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=Cb(s);Mb(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){IR(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(st),fce=function(){function t(){}return t}(),dce=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new fce},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(Ue);function Cb(t,e,r){var n=t.ends;return new dce({shape:{points:r?vce(n,t):n},z2:100})}function DR(t,e){for(var r=!0,n=0;nC?I[a]:D[a],ends:V,brushRect:W(M,A,b)})}function Z(X,K){var ne=[];return ne[i]=K,ne[a]=X,isNaN(K)||isNaN(X)?[NaN,NaN]:e.dataToPoint(ne)}function j(X,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=wm(ie[i]+n/2,1,!1),ue[i]=wm(ue[i]-n/2,1,!0),ne?X.push(ie,ue):X.push(ue,ie)}function W(X,K,ne){var ie=Z(X,ne),ue=Z(K,ne);return ie[i]-=n/2,ue[i]-=n/2,{x:ie[0],y:ie[1],width:n,height:ue[1]-ie[1]}}function H(X){return X[i]=wm(X[i],1),X}}function p(g,m){for(var y=ha(g.count*4),_=0,b,w=[],C=[],M,A=m.getStore(),k=!!t.get(["itemStyle","borderColorDoji"]);(M=g.next())!=null;){var N=A.get(s,M),D=A.get(u,M),I=A.get(c,M),z=A.get(h,M),O=A.get(f,M);if(isNaN(N)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=NR(A,M,D,I,c,k),w[i]=N,w[a]=z,b=e.dataToPoint(w,null,C),y[_++]=b?b[0]:NaN,y[_++]=b?b[1]:NaN,w[a]=O,b=e.dataToPoint(w,null,C),y[_++]=b?b[1]:NaN}m.setLayout("largePoints",y)}}};function NR(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function yce(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=oe(pe(t.get("barMaxWidth"),i),i),o=oe(pe(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?oe(s,i):Math.max(Math.min(i/2,a),o)}function _ce(t){t.registerChartView(hce),t.registerSeriesModel(dH),t.registerPreprocessor(gce),t.registerVisual(uce),t.registerLayout(mce)}function ER(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var xce=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=new Jv(r,n),o=new _e;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;me(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return Ya(r.__p1,r.__cp1)+Ya(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=br,c=fw;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];r.x=h[0]*(1-c)+c*f[0],r.y=h[1]*(1-c)+c*f[1];var d=r.__t<1?f[0]-h[0]:h[0]-f[0],p=r.__t<1?f[1]-h[1]:h[1]-f[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(vH),Cce=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),Mce=function(t){Y(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:q.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new Cce},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;r.quadraticCurveTo(d,p,h,f)}else r.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var h=a[u++],f=a[u++],d=1;d0){var m=(h+p)/2-(f-g)*o,y=(f+g)/2-(p-h)*o;if(pj(h,f,m,y,p,g,s,r,n))return l}else if(Bo(h,f,p,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),gH={seriesType:"lines",plan:Ph(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=r.get("clip",!0)&&tp(r.coordinateSystem,!1,r);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=gH.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Ace:new gA(o?a?Tce:pH:a?vH:pA),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(st),Pce=typeof Uint32Array>"u"?Array:Uint32Array,kce=typeof Float64Array>"u"?Array:Float64Array;function RR(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=re(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),G0([i,r[0],r[1]])}))}var Dce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],RR(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(RR(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=qc(this._flatCoords,n.flatCoords),this._flatCoordsOffset=qc(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(ht);function Fg(t){return t instanceof Array||(t=[t,t]),t}var Ice={seriesType:"lines",reset:function(t){var e=Fg(t.get("symbol")),r=Fg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Fg(s.getShallow("symbol",!0)),u=Fg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function Nce(t){t.registerChartView(Lce),t.registerSeriesModel(Dce),t.registerLayout(gH),t.registerVisual(Ice)}var Ece=256,Rce=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=bn.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=e.length;h.width=r,h.height=n;for(var p=0;p0){var z=o(b)?l:u;b>0&&(b=b*D+k),C[M++]=z[I],C[M++]=z[I+1],C[M++]=z[I+2],C[M++]=z[I+3]*b*256}else M+=4}return f.putImageData(w,0,0),h},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=bn.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor=q.color.neutral99,i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();function Oce(t,e,r){var n=t[1]-t[0];e=re(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function OR(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Bce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(r,i,0,r.getData().count()):OR(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(OR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){ks(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=bs(s,"cartesian2d"),u=bs(s,"matrix"),c,h,f,d;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,h=g.getBandWidth()+.5,f=p.scale.getExtent(),d=g.scale.getExtent()}for(var m=this.group,y=r.getData(),_=r.getModel(["emphasis","itemStyle"]).getItemStyle(),b=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),C=r.get(["itemStyle","borderRadius"]),M=ar(r),A=r.getModel("emphasis"),k=A.get("focus"),N=A.get("blurScope"),D=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zf[1]||Fd[1])continue;var Z=s.dataToPoint([G,F]);O=new Be({shape:{x:Z[0]-c/2,y:Z[1]-h/2,width:c,height:h},style:V})}else if(u){var j=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(Dr(j.x))continue;O=new Be({z2:1,shape:j,style:V})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),j=W.contentRect||W.rect;if(Dr(j.x)||Dr(j.y))continue;O=new Be({z2:1,shape:j,style:V})}if(y.hasItemOption){var H=y.getItemModel(z),X=H.getModel("emphasis");_=X.getModel("itemStyle").getItemStyle(),b=H.getModel(["blur","itemStyle"]).getItemStyle(),w=H.getModel(["select","itemStyle"]).getItemStyle(),C=H.get(["itemStyle","borderRadius"]),k=X.get("focus"),N=X.get("blurScope"),D=X.get("disabled"),M=ar(H)}O.shape.r=C;var K=r.getRawValue(z),ne="-";K&&K[2]!=null&&(ne=K[2]+""),vr(O,M,{labelFetcher:r,labelDataIndex:z,defaultOpacity:V.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=b,O.ensureState("select").style=w,wt(O,k,N,D),O.incremental=o,o&&(O.states.emphasis.hoverLayer=!0),m.add(O),y.setItemGraphicEl(z,O),this._progressiveEls&&this._progressiveEls.push(O)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new Rce;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=r.getViewRect().clone(),h=r.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),m=p-f,y=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(_,function(A,k,N){var D=r.dataToPoint([A,k]);return D[0]-=f,D[1]-=d,D.push(N),D}),w=i.getExtent(),C=i.type==="visualMap.continuous"?zce(w,i.option.range):Oce(w,i.getPieceList(),i.option.selected);u.update(b,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},C);var M=new pr({style:{width:m,height:y,x:f,y:d,image:u.canvas},silent:!0});this.group.add(M)},e.type="heatmap",e}(st),jce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ka(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=Lh.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:q.color.primary}}},e}(ht);function Vce(t){t.registerChartView(Bce),t.registerSeriesModel(jce)}var Fce=["itemStyle","borderWidth"],zR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Pb=new Pa,Gce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:zR[+c],categoryDim:zR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=jR(o,p),m=BR(o,p,g,f),y=VR(o,f,m);o.setItemGraphicEl(p,y),a.add(y),GR(y,f,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=jR(o,p),_=BR(o,p,y,f),b=SH(o,_);m&&b!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Xce(m,f,_):m=VR(o,f,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),GR(m,f,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&FR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?tp(r.coordinateSystem,!1,r):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){FR(a,Le(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(st);function BR(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=r.get("symbolPatternSize")||2,h=r.isAnimationEnabled(),f={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?r:null,hoverScale:h&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};Hce(r,a,i,n,f),Wce(t,e,i,a,o,f.boundingLength,f.pxSign,c,n,f),Uce(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=pu(r.get("symbolOffset"),d);return Zce(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function Hce(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),c;if(ee(o)){var h=[kb(s,o[0])-l,kb(s,o[1])-l];h[1]=0?1:-1:c>0?1:-1}function kb(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Wce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(r[h.wh]),d=t.getItemVisual(e,"symbolSize"),p;ee(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=oe(p[h.index],f),p[c.index]=oe(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function Uce(t,e,r,n,i){var a=t.get(Fce)||0;a&&(Pb.attr({scaleX:e[0],scaleY:e[1],rotation:r}),Pb.updateTransform(),a/=Pb.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function Zce(t,e,r,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,g=Math.max(e[d.index]+s,0),m=g;if(n){var y=Math.abs(l),_=Sr(t.get("symbolMargin"),"15%")+"",b=!1;_.lastIndexOf("!")===_.length-1&&(b=!0,_=_.slice(0,_.length-1));var w=oe(_,e[d.index]),C=Math.max(g+w*2,0),M=b?0:w*2,A=O2(n),k=A?n:HR((y+M)/C),N=y-k*g;w=N/2/(b?k:Math.max(k-1,1)),C=g+w*2,M=b?0:w*2,!A&&n!=="fixed"&&(k=u?HR((Math.abs(u)+M)/C):0),m=k*C-M,h.repeatTimes=k,h.symbolMargin=w}var D=p*(m/2),I=h.pathPosition=[];I[f.index]=r[f.wh]/2,I[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=h.bundlePosition=[];z[f.index]=r[f.xy],z[d.index]=r[d.xy];var O=h.barRectShape=J({},r);O[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(I[d.index]+D)),O[f.wh]=r[f.wh];var V=h.clipShape={};V[f.xy]=-r[f.xy],V[f.wh]=c.ecSize[f.wh],V[d.xy]=0,V[d.wh]=r[d.wh]}function mH(t){var e=t.symbolPatternSize,r=Ut(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function yH(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,c=0,h=a[e.valueDim.index]+o+r.symbolMargin*2;for(AA(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=h*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function _H(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?jc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=mH(r),i.add(a),jc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function xH(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?jc(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new Be({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function bH(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=J({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Qe(i,{shape:a},s,l);else{a[o.wh]=0,i=new Be({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],fu[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function jR(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=$ce,r.isAnimationEnabled=Yce,r}function $ce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Yce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function VR(t,e,r,n){var i=new _e,a=new _e;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?yH(i,e,r):_H(i,e,r),xH(i,r,n),bH(i,e,r,n),i.__pictorialShapeStr=SH(t,r),i.__pictorialSymbolMeta=r,i}function Xce(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Qe(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?yH(t,e,r,!0):_H(t,e,r,!0),xH(t,r,!0),bH(t,e,r,!0)}function FR(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];AA(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){xs(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function SH(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function AA(t,e,r){R(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function jc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&fu[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function GR(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");AA(t,function(g){if(g instanceof pr){var m=g.style;g.useStyle(J({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,f&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=e.valueDim.posDesc[+(r.boundingLength>0)],p=t.__pictorialBarRect;p.ignoreClip=!0,vr(p,ar(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:sh(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),wt(t,c,h,a.get("disabled"))}function HR(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var qce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Ds(yv.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:q.color.primary}}}),e}(yv);function Kce(t){t.registerChartView(Gce),t.registerSeriesModel(qce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(GF,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,HF("pictorialBar"))}var Qce=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(m){return m.name}var d=new po(this._layersSeries||[],l,f,f),p=[];d.add(le(g,this,"add")).update(le(g,this,"update")).remove(le(g,this,"remove")).execute();function g(m,y,_){var b=o._layers;if(m==="remove"){s.remove(b[y]);return}for(var w=[],C=[],M,A=l[y].indices,k=0;ka&&(a=s),n.push(s)}for(var u=0;ua&&(a=h)}return{y0:i,max:a}}function nhe(t){t.registerChartView(Qce),t.registerSeriesModel(ehe),t.registerLayout(the),t.registerProcessor(Rh("themeRiver"))}var ihe=2,ahe=4,UR=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=ihe,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:ahe,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Le(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=J({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=ih(d,o));var p=da(l.getModel("itemStyle"),h,!0);J(h,p),R(an,function(_){var b=s.ensureState(_),w=l.getModel([_,"itemStyle"]);b.style=w.getItemStyle();var C=da(w,h);C&&(b.shape=C)}),r?(s.setShape(h),s.shape.r=c.r0,bt(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:h},i),fi(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="relative"?qc(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;wt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)V&&!Jc(F-V)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new UR(_,r,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(w){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";Dy(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:WT,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(st),uhe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};wH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=uA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=x_(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){AG(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(ht);function wH(t){var e=0;R(t.children,function(n){wH(n);var i=n.value;ee(i)&&(i=i[0]),e+=i});var r=t.value;ee(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),ee(t.value)?t.value[0]=r:t.value=r}var $R=Math.PI/180;function che(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");ee(a)||(a=[0,a]),ee(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=oe(i[0],o),c=oe(i[1],s),h=oe(a[0],l/2),f=oe(a[1],l/2),d=-n.get("startAngle")*$R,p=n.get("minAngle")*$R,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&TH(m,_);var b=0;R(m.children,function(F){!isNaN(F.getValue())&&b++});var w=m.getValue(),C=Math.PI/(w||b)*2,M=m.depth>0,A=m.height-(M?-1:1),k=(f-h)/(A||1),N=n.get("clockwise"),D=n.get("stillShowZeroSum"),I=N?1:-1,z=function(F,Z){if(F){var j=Z;if(F!==g){var W=F.getValue(),H=w===0&&D?C:W*C;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=my(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");J(u,l)})})}function dhe(t){t.registerChartView(lhe),t.registerSeriesModel(uhe),t.registerLayout(Ie(che,"sunburst")),t.registerProcessor(Ie(Rh,"sunburst")),t.registerVisual(fhe),she(t)}var YR={color:"fill",borderColor:"stroke"},vhe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},no=Fe(),phe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return ka(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=no(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(ht);function ghe(t,e){return e=e||[0,0],re(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function mhe(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(ghe,t)}}}function yhe(t,e){return e=e||[0,0],re([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function _he(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:le(yhe,t)}}}function xhe(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function bhe(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:le(xhe,t)}}}function She(t,e){return e=e||[0,0],re(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function whe(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:le(She,t)}}}function The(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)},layout:function(n,i){return t.dataToLayout(n,i)}}}}function Che(t){var e=t.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r,n){return t.dataToPoint(r,n)},layout:function(r,n){return t.dataToLayout(r,n)}}}}function CH(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||he(t,"text")))}function MH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},he(n,"text")&&(o.text=n.text),he(n,"rich")&&(o.rich=n.rich),he(n,"textFill")&&(o.fill=n.textFill),he(n,"textStroke")&&(o.stroke=n.textStroke),he(n,"fontFamily")&&(o.fontFamily=n.fontFamily),he(n,"fontSize")&&(o.fontSize=n.fontSize),he(n,"fontStyle")&&(o.fontStyle=n.fontStyle),he(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=he(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),he(n,"textPosition")&&(i.position=n.textPosition),he(n,"textOffset")&&(i.offset=n.textOffset),he(n,"textRotation")&&(i.rotation=n.textRotation),he(n,"textDistance")&&(i.distance=n.textDistance)}return XR(o,t),R(o.rich,function(l){XR(l,l)}),{textConfig:i,textContent:a}}function XR(t,e){e&&(e.font=e.textFont||e.font,he(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),he(e,"textAlign")&&(t.align=e.textAlign),he(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),he(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),he(e,"textWidth")&&(t.width=e.textWidth),he(e,"textHeight")&&(t.height=e.textHeight),he(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),he(e,"textPadding")&&(t.padding=e.textPadding),he(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),he(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),he(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),he(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),he(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),he(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),he(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function qR(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||q.color.neutral99;KR(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||q.color.neutral00,!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||q.color.neutral00),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,R(e.rich,function(s){KR(s,s)}),n}function KR(t,e){e&&(he(e,"fill")&&(t.textFill=e.fill),he(e,"stroke")&&(t.textStroke=e.fill),he(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),he(e,"font")&&(t.font=e.font),he(e,"fontStyle")&&(t.fontStyle=e.fontStyle),he(e,"fontWeight")&&(t.fontWeight=e.fontWeight),he(e,"fontSize")&&(t.fontSize=e.fontSize),he(e,"fontFamily")&&(t.fontFamily=e.fontFamily),he(e,"align")&&(t.textAlign=e.align),he(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),he(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),he(e,"width")&&(t.textWidth=e.width),he(e,"height")&&(t.textHeight=e.height),he(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),he(e,"padding")&&(t.textPadding=e.padding),he(e,"borderColor")&&(t.textBorderColor=e.borderColor),he(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),he(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),he(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),he(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),he(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),he(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),he(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),he(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),he(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),he(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var AH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},QR=$e(AH);ui(ba,function(t,e){return t[e]=1,t},{});ba.join(", ");var a0=["","style","shape","extra"],hh=Fe();function LA(t,e,r,n,i){var a=t+"Animation",o=wh(t,n,i)||{},s=hh(e).userDuring;return o.duration>0&&(o.during=s?le(khe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function Dm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=hh(t),u=e.style;l.userDuring=e.during;var c={},h={};if(Ihe(t,e,h),t.type==="compound")for(var f=t.shape.paths,d=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else Ahe(t,e,i||0,r,c);LH(t,e),u?t.dirty():t.markRedraw()}function LH(t,e){for(var r=hh(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function Lhe(t,e){he(e,"silent")&&(t.silent=e.silent),he(e,"ignore")&&(t.ignore=e.ignore),t instanceof hi&&he(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ue&&he(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var ta={},Phe={setTransform:function(t,e){return ta.el[t]=e,this},getTransform:function(t){return ta.el[t]},setShape:function(t,e){var r=ta.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=ta.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=ta.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=ta.el.style;if(e)return e[t]},setExtra:function(t,e){var r=ta.el.extra||(ta.el.extra={});return r[t]=e,this},getExtra:function(t){var e=ta.el.extra;if(e)return e[t]}};function khe(){var t=this,e=t.el;if(e){var r=hh(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}ta.el=e,n(Phe)}}function JR(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Gl(l))J(o,a);else for(var u=pt(l),c=0;c=0){!o&&(o=n[t]={});for(var d=$e(a),c=0;c=0)){var f=t.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=$e(r),u=0;u=0?e.getStore().get(j,F):void 0}var W=e.get(Z.name,F),H=Z&&Z.ordinalMeta;return H?H.categories[W]:W}function A(G,F){F==null&&(F=c);var Z=e.getItemVisual(F,"style"),j=Z&&Z.fill,W=Z&&Z.opacity,H=b(F,qo).getItemStyle();j!=null&&(H.fill=j),W!=null&&(H.opacity=W);var X={inheritColor:se(j)?j:q.color.neutral99},K=w(F,qo),ne=vt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(F,qo),sh(e,F)):null;var ie=Ly(K,X,!1);return D(G,H),H=qR(H,ne,ie),G&&N(H,G),H.legacy=!0,H}function k(G,F){F==null&&(F=c);var Z=b(F,io).getItemStyle(),j=w(F,io),W=vt(j,null,null,!0,!0);W.text=j.getShallow("show")?xn(t.getFormattedLabel(F,io),t.getFormattedLabel(F,qo),sh(e,F)):null;var H=Ly(j,null,!0);return D(G,Z),Z=qR(Z,W,H),G&&N(Z,G),Z.legacy=!0,Z}function N(G,F){for(var Z in F)he(F,Z)&&(G[Z]=F[Z])}function D(G,F){G&&(G.textFill&&(F.textFill=G.textFill),G.textPosition&&(F.textPosition=G.textPosition))}function I(G,F){if(F==null&&(F=c),he(YR,G)){var Z=e.getItemVisual(F,"style");return Z?Z[YR[G]]:null}if(he(vhe,G))return e.getItemVisual(F,G)}function z(G){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Bte(be({axis:F},G))}}function O(){return r.getCurrentSeriesIndices()}function V(G){return rM(G,r)}}function Hhe(t){var e={};return R(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function Rb(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=NA(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function NA(t,e,r,n,i,a){var o=-1,s=e;e&&IH(e,n,i)&&(o=Ne(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=DA(n),s&&jhe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Un.normal.cfg=Un.normal.conOpt=Un.emphasis.cfg=Un.emphasis.conOpt=Un.blur.cfg=Un.blur.conOpt=Un.select.cfg=Un.select.conOpt=null,Un.isLegacy=!1,Uhe(u,r,n,i,l,Un),Whe(u,r,n,i,l),IA(t,u,r,n,Un,i,l),he(n,"info")&&(no(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function IH(t,e,r){var n=no(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&qhe(a)&&NH(a)!==n.customPathData||i==="image"&&he(o,"image")&&o.image!==n.customImagePath}function Whe(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&IH(o,a,n)&&(o=null),o||(o=DA(a),t.setClipPath(o)),IA(null,o,e,a,null,n,i)}}function Uhe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){tO(r,null,a),tO(r,io,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=t.getTextContent();if(o===!1)c&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=DA(o),t.setTextContent(c)),IA(null,c,e,o,null,n,i);for(var h=o&&o.style,f=0;f=c;d--){var p=e.childAt(d);$he(e,p,i)}}}function $he(t,e,r){e&&w_(e,no(t).option,r)}function Yhe(t){new po(t.oldChildren,t.newChildren,rO,rO,t).add(nO).update(nO).remove(Xhe).execute()}function rO(t,e){var r=t&&t.name;return r??zhe+e}function nO(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;NA(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Xhe(t){var e=this.context,r=e.oldChildren[t];r&&w_(r,no(r).option,e.seriesModel)}function NH(t){return t&&(t.pathData||t.d)}function qhe(t){return t&&(he(t,"pathData")||he(t,"d"))}function Khe(t){t.registerChartView(Vhe),t.registerSeriesModel(phe)}var Sl=Fe(),iO=ye,Ob=le,RA=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new _e,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var f=Ie(aO,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}sO(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=rA(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=Sl(e).pointerEl=new fu[a.type](iO(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=Sl(e).labelEl=new Xe(iO(r.label));e.add(a),oO(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=Sl(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=Sl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),oO(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Th(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ho(u.event)},onmousedown:Ob(this._onHandleDragMove,this,0,0),drift:Ob(this._onHandleDragMove,this),ondragend:Ob(this._onHandleDragEnd,this)}),n.add(i)),sO(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");ee(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,kh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){aO(this._axisPointerModel,!r&&this._moveAnimation,this._handle,zb(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(zb(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(zb(i)),Sl(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),cv(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function aO(t,e,r,n){EH(Sl(r).lastProp,n)||(Sl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function EH(t,e){if(Se(t)&&Se(e)){var r=!0;return R(e,function(n,i){r=r&&EH(t[i],n)}),!!r}else return t===e}function oO(t,e){t[e.get(["label","show"])?"show":"hide"]()}function zb(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function sO(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}function OA(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function RH(t,e,r,n,i){var a=r.get("value"),o=OH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Ah(s.get("padding")||0),u=s.getFont(),c=$0(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=d),g==="middle"&&(h[1]-=d/2),Qhe(h,f,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:vt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Qhe(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function OH(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:Gy(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function zA(t,e,r){var n=fr();return xo(n,n,r.rotation),Oi(n,n,r.position),Ni([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function zH(t,e,r,n,i,a){var o=rn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),RH(e,n,i,a,{position:zA(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function BA(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function BH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function lO(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Jhe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=uO(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=OA(a),d=efe[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=Qy(l.getRect(),i);zH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Qy(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=zA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=uO(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[r.x,r.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(RA);function uO(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var efe={line:function(t,e,r){var n=BA([e,r[0]],[e,r[1]],cO(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:BH([e-n/2,r[0]],[n,i],cO(t))}}};function cO(t){return t.dim==="x"?0:1}var tfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:q.color.border,width:1,type:"dashed"},shadowStyle:{color:q.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:q.color.neutral00,padding:[5,7,5,7],backgroundColor:q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:q.color.accent40,throttle:40}},e}(Ve),Qa=Fe(),rfe=R;function jH(t,e,r){if(!Ze.node){var n=e.getZr();Qa(n).records||(Qa(n).records={}),nfe(n,e);var i=Qa(n).records[t]||(Qa(n).records[t]={});i.handler=r}}function nfe(t,e){if(Qa(t).initialized)return;Qa(t).initialized=!0,r("click",Ie(hO,"click")),r("mousemove",Ie(hO,"mousemove")),r("globalout",afe);function r(n,i){t.on(n,function(a){var o=ofe(e);rfe(Qa(t).records,function(s){s&&i(s,a,o.dispatchAction)}),ife(o.pendings,e)})}}function ife(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function afe(t,e,r){t.handler("leave",null,r)}function hO(t,e,r,n){e.handler(t,r,n)}function ofe(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function $T(t,e){if(!Ze.node){var r=e.getZr(),n=(Qa(r).records||{})[t];n&&(Qa(r).records[t]=null)}}var sfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";jH("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){$T("axisPointer",n)},e.prototype.dispose=function(r,n){$T("axisPointer",n)},e.type="axisPointer",e}(gt);function VH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Kl(a,t);if(o==null||o<0||ee(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(re(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var fO=Fe();function lfe(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||le(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Im(i)&&(i=VH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Im(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Im(i),f={},d={},p={list:[],map:{}},g={showPointer:Ie(cfe,d),showTooltip:Ie(hfe,p)};R(s.coordSysMap,function(y,_){var b=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(w,C){var M=w.axis,A=pfe(u,w);if(!h&&b&&(!u||A)){var k=A&&A.value;k==null&&!l&&(k=M.pointToData(i)),k!=null&&dO(w,k,g,!1,f)}})});var m={};return R(c,function(y,_){var b=y.linkGroup;b&&!d[_]&&R(b.axesInfo,function(w,C){var M=d[C];if(w!==y&&M){var A=M.value;b.mapper&&(A=y.axis.scale.parse(b.mapper(A,vO(w),vO(y)))),m[y.key]=A}})}),R(m,function(y,_){dO(c[_],y,g,!0,f)}),ffe(d,c,f),dfe(p,i,t,o),vfe(c,o,r),f}}function dO(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=ufe(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&J(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function ufe(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return R(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,t,r);f=d.dataIndices,h=d.nestestValue}else{if(f=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=t-h,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=h,a.length=0),R(f,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function cfe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function hfe(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=_v(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function ffe(t,e,r){var n=r.axesInfo=[];R(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function dfe(t,e,r,n){if(Im(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function vfe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=fO(n)[i]||{},o=fO(n)[i]={};R(t,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&R(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];R(a,function(u,c){!o[c]&&l.push(u)}),R(o,function(u,c){!a[c]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function pfe(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function vO(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Im(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function ip(t){gu.registerAxisPointerClass("CartesianAxisPointer",Jhe),t.registerComponentModel(tfe),t.registerComponentView(sfe),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!ee(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=gae(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},lfe)}function gfe(t){Oe(cG),Oe(ip)}var mfe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=OA(a),p=_fe[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=yfe(n,i,a,l,g);RH(r,i,a,o,m)},e}(RA);function yfe(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=fr();xo(f,f,s),Oi(f,f,[n.cx,n.cy]),u=Ni([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,p=rn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;c=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",h=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var _fe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:BA(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:lO(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:lO(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},xfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Ve),jA=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",kt).models[0]},e.type="polarAxis",e}(Ve);Bt(jA,Eh);var bfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(jA),Sfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(jA),VA=function(t){Y(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(pi);VA.prototype.dataToRadius=pi.prototype.dataToCoord;VA.prototype.radiusToData=pi.prototype.coordToData;var wfe=Fe(),FA=function(t){Y(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),c=$0(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=wfe(r.model),g=p.lastAutoInterval,m=p.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(pi);FA.prototype.dataToAngle=pi.prototype.dataToCoord;FA.prototype.angleToData=pi.prototype.coordToData;var FH=["radius","angle"],Tfe=function(){function t(e){this.dimensions=FH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new VA,this._angleAxis=new FA,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)],n)},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(i[0],r),n[1]=this._angleAxis.angleToData(i[1],r),n},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,c=us;)u+=c*360;return[l,u]},t.prototype.coordToPoint=function(e,r){r=r||[];var n=e[0],i=e[1]/180*Math.PI;return r[0]=Math.cos(i)*n+this.cx,r[1]=-Math.sin(i)*n+this.cy,r},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},t.prototype.convertToPixel=function(e,r,n){var i=pO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=pO(r);return i===this?this.pointToData(n):null},t}();function pO(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Cfe(t,e,r){var n=e.get("center"),i=sr(e,r).refContainer;t.cx=oe(n[0],i.width)+i.x,t.cy=oe(n[1],i.height)+i.y;var a=t.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:ee(s)||(s=[0,s]);var l=[oe(s[0],o),oe(s[1],o)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}function Mfe(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();R(Hy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(Hy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),nu(n.scale,n.model),nu(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function Afe(t){return t.mainType==="angleAxis"}function gO(t,e){var r;if(t.type=e.get("type"),t.scale=Qv(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),Afe(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(r=e.get("endAngle"))!==null&&r!==void 0?r:n+(t.inverse?-360:360);t.setExtent(n,i)}e.axis=t,t.model=e}var Lfe={dimensions:FH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new Tfe(i+"");a.update=Mfe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");gO(o,l),gO(s,u),Cfe(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",kt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},Pfe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Gg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Hg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function mO(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var kfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords({breakTicks:"none"}),l=i.getMinorTicksCoords(),u=re(i.getViewLabels(),function(c){c=ye(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});mO(u),mO(s),R(Pfe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Dfe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(gu),Dfe={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=r.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Hg(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new fu[d]({shape:{cx:r.cx,cy:r.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new bh({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,t.add(f)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Hg(r)],u=re(n,function(c){return new Wt({shape:Gg(r,[l,l+s],c.coord)})});t.add(An(u,{style:be(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Hg(r)],c=[],h=0;hy?"left":"right",w=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var C=s[p];Se(C)&&C.textStyle&&(d=new We(C.textStyle,l,l.ecModel))}var M=new Xe({silent:rn.isLabelSilent(e),style:vt(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:b,verticalAlign:w})});if(t.add(M),So({el:M,componentModel:e,itemName:h.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:h.rawLabel,tickIndex:f}}),c){var A=rn.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=h.rawLabel,Le(M).eventData=A}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h=0?"p":"n",G=N;C&&(n[c][O]||(n[c][O]={p:N,n:N}),G=n[c][O][V]);var F=void 0,Z=void 0,j=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-N,X=l.dataToCoord(O);Math.abs(H)=W})}}})}function zfe(t){var e={};R(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=HH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;e[l]=h;var d=GH(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=oe(n.get("barWidth"),c),g=oe(n.get("barMaxWidth"),c),m=n.get("barGap"),y=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),g&&(f[d].maxWidth=g),m!=null&&(h.gap=m),y!=null&&(h.categoryGap=y)});var r={};return R(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=oe(n.categoryGap,o),l=oe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),R(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e,r,n){n=n||[];var i=this.getAxis();return n[0]=i.coordToData(i.toLocalCoord(e[i.orient==="horizontal"?0:1])),n},t.prototype.dataToPoint=function(e,r,n){var i=this.getAxis(),a=this.getRect();n=n||[];var o=i.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=i.toGlobalCoord(i.dataToCoord(+e)),n[1-o]=o===0?a.y+a.height/2:a.x+a.width/2,n},t.prototype.convertToPixel=function(e,r,n){var i=yO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=yO(r);return i===this?this.pointToData(n):null},t}();function yO(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function $fe(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new Zfe(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",kt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var Yfe={create:$fe,dimensions:WH},_O=["x","y"],Xfe=["width","height"],qfe=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=Bb(l,1-l0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=OA(a),d=Kfe[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=YT(i);zH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=YT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=zA(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=l0(o),u=Bb(s,l),c=[r.x,r.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=Bb(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(RA),Kfe={line:function(t,e,r){var n=BA([e,r[0]],[e,r[1]],l0(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:BH([e-n/2,r[0]],[n,i],l0(t))}}};function l0(t){return t.isHorizontal()?0:1}function Bb(t,e){var r=t.getRect();return[r[_O[e]],r[_O[e]]+r[Xfe[e]]]}var Qfe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(gt);function Jfe(t){Oe(ip),gu.registerAxisPointerClass("SingleAxisPointer",qfe),t.registerComponentView(Qfe),t.registerComponentView(Hfe),t.registerComponentModel(Nm),lh(t,"single",Nm,Nm.defaultOption),t.registerCoordinateSystem("single",Yfe)}var ede=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=du(r);t.prototype.init.apply(this,arguments),xO(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),xO(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:q.color.axisLine,width:1,type:"solid"}},itemStyle:{color:q.color.neutral00,borderWidth:1,borderColor:q.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:q.size.s,color:q.color.secondary},monthLabel:{show:!0,position:"start",margin:q.size.s,align:"center",formatter:null,color:q.color.secondary},yearLabel:{show:!0,position:null,margin:q.size.xl,formatter:null,color:q.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Ve);function xO(t,e){var r=t.cellSize,n;ee(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=re([0,1],function(a){return SQ(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Ta(t,e,{type:"box",ignoreSize:i})}var tde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToCalendarLayout([u],!1).tl,h=new Be({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToCalendarLayout([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new Tr({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return se(r)&&r?pQ(r,n):me(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(g,m),_=new Xe({z2:30,style:vt(o,{text:y}),silent:o.get("silent")});_.attr(this._yearTextPositionControl(_,d[l],i,l,s)),a.add(_)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],c=r[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Hw(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),m=0;m=a.start.time&&i.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/jb)-Math.floor(r[0].time/jb)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+r[0].day+6)/7),h=n?-c+1:c-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:c,nthWeek:h,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i,e,r);n.push(a),i.coordinateSystem=a}),e.eachComponent(function(i,a){qv({targetModel:a,coordSysType:"calendar",coordSysProvider:uV})}),n},t.dimensions=["time","value"],t}();function Vb(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function nde(t){t.registerComponentModel(ede),t.registerComponentView(tde),t.registerCoordinateSystem("calendar",rde)}var Ua={level:1,leaf:2,nonLeaf:3},ao={none:0,all:1,body:2,corner:3};function XT(t,e,r){var n=e[De[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[De[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function UH(t){var e=t||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function ZH(t,e,r,n,i){bO(t[0],e,i,r,n,0),bO(t[1],e,i,r,n,1)}function bO(t,e,r,n,i,a){t[0]=1/0,t[1]=-1/0;var o=n[a],s=ee(o)?o:[o],l=s.length,u=!!r;if(l>=1?(SO(t,e,s,u,i,a,0),l>1&&SO(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[De[1-a]].getLocatorCount(a),h=i[De[a]].getLocatorCount(a)-1;r===ao.body?c=Gt(0,c):r===ao.corner&&(h=En(-1,h)),h=e[0]&&t[0]<=e[1]}function CO(t,e){t.id.set(e[0][0],e[1][0]),t.span.set(e[0][1]-t.id.x+1,e[1][1]-t.id.y+1)}function ode(t,e){t[0][0]=e[0][0],t[0][1]=e[0][1],t[1][0]=e[1][0],t[1][1]=e[1][1]}function MO(t,e,r,n){var i=XT(e[n][0],r,n),a=XT(e[n][1],r,n);t[De[n]]=t[qt[n]]=NaN,i&&a&&(t[De[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function Df(t,e,r,n){return t[De[e]]=r,t[De[1-e]]=n,t}function sde(t){return t&&(t.type===Ua.leaf||t.type===Ua.nonLeaf)?t:null}function u0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var AO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=lde(e);var n=r.get("data",!0);n!=null&&!ee(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return t.prototype._initByDimModelData=function(e){var r=this,n=r._cells,i=r._levels,a=[],o=0;r._leavesCount=s(e,0,0),l();return;function s(u,c,h){var f=0;return u&&R(u,function(d,p){var g;se(d)?g={value:d}:Se(d)?(g=d,d.value!=null&&!se(d.value)&&(g={value:null})):g={value:null};var m={type:Ua.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new Te,span:Df(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:u0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:Ua.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,h+1),_=Math.max(1,y);m.span[De[r.dimIdx]]=_,f+=_,c+=_}),f}function l(){for(var u=[];n.length=1,b=r[De[n]],w=a.getLocatorCount(n)-1,C=new us;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){Dr(A.wh)&&(A.wh=y),A.xy=b,A.id[De[n]]===w&&!_&&(A.wh=r[De[n]]+r[qt[n]]-A.xy),b+=A.wh}}function EO(t,e){for(var r=e[De[t]].resetCellIterator();r.next();){var n=r.item;c0(n.rect,t,n.id,n.span,e),c0(n.rect,1-t,n.id,n.span,e),n.type===Ua.nonLeaf&&(n.xy=n.rect[De[t]],n.wh=n.rect[qt[t]])}}function RO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;c0(i,0,a,n,e),c0(i,1,a,n,e)}})}function c0(t,e,r,n,i){t[qt[e]]=0;var a=r[De[e]],o=a<0?i[De[1-e]]:i[De[e]],s=o.getUnitLayoutInfo(e,r[De[e]]);if(t[De[e]]=s.xy,t[qt[e]]=s.wh,n[De[e]]>1){var l=o.getUnitLayoutInfo(e,r[De[e]]+n[De[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function bde(t,e,r){var n=wy(t,r[qt[e]]);return KT(n,r[qt[e]])}function KT(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function Hb(t){var e=t.matrixModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}var Pr={inBody:1,inCorner:2,outside:3},Ji={x:null,y:null,point:[]};function OO(t,e,r,n,i){var a=r[De[e]],o=r[De[1-e]],s=a.getUnitLayoutInfo(e,a.getLocatorCount(e)-1),l=a.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),c=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,h=t.point[e]=n[e];if(!l&&!c){t[De[e]]=Pr.outside;return}if(i===ao.body){l?(t[De[e]]=Pr.inBody,h=En(s.xy+s.wh,Gt(l.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}else if(i===ao.corner){c?(t[De[e]]=Pr.inCorner,h=En(c.xy+c.wh,Gt(u.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}var f=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:f,p=s?s.xy+s.wh:f;if(hp){if(!i){t[De[e]]=Pr.outside;return}h=p}t.point[e]=h,t[De[e]]=f<=h&&h<=p?Pr.inBody:d<=h&&h<=f?Pr.inCorner:Pr.outside}function zO(t,e,r,n){var i=1-r;if(t[De[r]]!==Pr.outside)for(n[De[r]].resetCellIterator(Gb);Gb.next();){var a=Gb.item;if(jO(t.point[r],a.rect,r)&&jO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[De[i]];return}}}function BO(t,e,r,n){if(t[De[r]]!==Pr.outside){var i=t[De[r]]===Pr.inCorner?n[De[1-r]]:n[De[r]];for(i.resetLayoutIterator(Yg,r);Yg.next();)if(Sde(t.point[r],Yg.item)){e[r]=Yg.item.id[De[r]];return}}}function Sde(t,e){return e.xy<=t&&t<=e.xy+e.wh}function jO(t,e,r){return e[De[r]]<=t&&t<=e[De[r]]+e[qt[r]]}function wde(t){t.registerComponentModel(fde),t.registerComponentView(mde),t.registerCoordinateSystem("matrix",xde)}function Tde(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function VO(t,e){var r;return R(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function Cde(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Ee(i,n,!0),Ta(i,n,{ignoreSize:!0}),vV(r,i),Xg(r,i),Xg(r,i,"shape"),Xg(r,i,"style"),Xg(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var YH=["transition","enterFrom","leaveTo"],Mde=YH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Xg(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?YH:Mde,i=0;i=0;c--){var h=i[c],f=rr(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,y=qn(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},b={},w=s_(d,h,_,null,{hv:h.hv,boundingMode:h.bounding},b);if(!qn(d).isNew&&w){for(var C=h.transition,M={},A=0;A=0)?M[k]=N:d[k]=N}Qe(d,M,r,0)}else d.attr(b)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Em(i,qn(i).option,n,r._lastGraphicModel)}),this._elMap=de()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(gt);function QT(t){var e=he(FO,t)?FO[t]:ov(t),r=new e({});return qn(r).type=t,r}function GO(t,e,r,n){var i=QT(r);return e.add(i),n.set(t,i),qn(i).id=t,qn(i).isNew=!0,i}function Em(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Em(a,e,r,n)}),w_(t,e,n),r.removeKey(qn(t).id))}function HO(t,e,r,n){t.isGroup||R([["cursor",hi.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];he(e,a)?t[a]=pe(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),R($e(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=me(a)?a:null}}),he(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function kde(t){return t=J({},t),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(cV),function(e){delete t[e]}),t}function Dde(t,e,r){var n=Le(t).eventData;!t.silent&&!t.ignore&&!n&&(n=Le(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function Ide(t){t.registerComponentModel(Lde),t.registerComponentView(Pde),t.registerPreprocessor(function(e){var r=e.graphic;ee(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var WO=["x","y","radius","angle","single"],Nde=["cartesian2d","polar","singleAxis"];function Ede(t){var e=t.get("coordinateSystem");return Ne(Nde,e)>=0}function Ko(t){return t+"Axis"}function Rde(t,e){var r=de(),n=[],i=de();t.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=r.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(r.get(h)||r.set(h,[]))[f]=!0})}return n}function XH(t){var e=t.ecModel,r={infoList:[],infoMap:de()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Ko(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var Wb=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),Cv=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=UO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=UO(r);Ee(this.option,r,!0),Ee(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=de(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return R(WO,function(i){var a=this.getReferringComponents(Ko(i),JX);if(a.specified){n=!0;var o=new Wb;R(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new Wb;if(f.add(h.componentIndex),r.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",kt).models[0];d&&R(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",kt).models[0]&&f.add(p.componentIndex)})}}}a&&R(WO,function(u){if(a){var c=i.findComponents({mainType:Ko(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new Wb;h.add(c[0].componentIndex),r.set(u,h),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Ko(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){R(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Ko(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;R([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;R(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(b&&!w&&!C)return!0;b&&(m=!0),w&&(p=!0),C&&(g=!0)}return m&&p&&g})}else oc(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});oc(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;oc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=nt(n[0]+o,n,[0,100],!0):a!=null&&(o=nt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=N2(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function jde(t,e,r){var n=[1/0,-1/0];oc(r,function(o){nre(n,o.getData(),e)});var i=t.getAxisModel(),a=YF(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Vde={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Ko(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Bde(i,a,s,t),r.push(o.__dzAxisProxy))});var n=de();return R(r,function(i){R(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function Fde(t){t.registerAction("dataZoom",function(e,r){var n=Rde(r,e);R(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var $O=!1;function UA(t){$O||($O=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Vde),Fde(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Gde(t){t.registerComponentModel(Ode),t.registerComponentView(zde),UA(t)}var ei=function(){function t(){}return t}(),qH={};function sc(t,e){qH[t]=e}function KH(t){return qH[t]}var Hde=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;R(this.option.feature,function(n,i){var a=KH(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),Ee(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:q.size.m,itemSize:15,itemGap:q.size.s,showTitle:!0,iconStyle:{borderColor:q.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:q.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Ve);function QH(t,e){var r=Ah(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var i=new Be({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return i}var Wde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},c=this._features||(this._features={}),h=[];R(u,function(_,b){h.push(b)}),new po(this._featureNames||[],h).add(f).update(f).remove(Ie(f,null)).execute(),this._featureNames=h;function f(_,b){var w=h[_],C=h[b],M=u[w],A=new We(M,r,r.ecModel),k;if(a&&a.newTitle!=null&&a.featureName===w&&(M.title=a.newTitle),w&&!C){if(Ude(w))k={onclick:A.option.onclick,featureName:w};else{var N=KH(w);if(!N)return;k=new N}c[w]=k}else if(k=c[C],!k)return;k.uid=Mh("toolbox-feature"),k.model=A,k.ecModel=n,k.api=i;var D=k instanceof ei;if(!w&&C){D&&k.dispose&&k.dispose(n,i);return}if(!A.get("show")||D&&k.unusable){D&&k.remove&&k.remove(n,i);return}d(A,k,w),A.setIconStatus=function(I,z){var O=this.option,V=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,V[I]&&(z==="emphasis"?fo:vo)(V[I])},k instanceof ei&&k.render&&k.render(A,n,i,a)}function d(_,b,w){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=b instanceof ei&&b.getIcons?b.getIcons():_.get("icon"),k=_.get("title")||{},N,D;se(A)?(N={},N[w]=A):N=A,se(k)?(D={},D[w]=k):D=k;var I=_.iconPaths={};R(N,function(z,O){var V=Th(z,{},{x:-s/2,y:-s/2,width:s,height:s});V.setStyle(C.getItemStyle());var G=V.ensureState("emphasis");G.style=M.getItemStyle();var F=new Xe({style:{text:D[O],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:rM({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});V.setTextContent(F),So({el:V,componentModel:r,itemName:O,formatterParamsExtra:{title:D[O]}}),V.__title=D[O],V.on("mouseover",function(){var Z=M.getItemStyle(),j=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";F.setStyle({fill:M.get("textFill")||Z.fill||Z.stroke||q.color.neutral99,backgroundColor:M.get("textBackgroundColor")}),V.setTextConfig({position:M.get("textPosition")||j}),F.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),F.hide()}),(_.get(["iconStatus",O])==="emphasis"?fo:vo)(V),o.add(V),V.on("click",le(b.onclick,b,n,i,O)),I[O]=V})}var p=sr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=St(g,p,m);jl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),s_(o,g,p,m),o.add(QH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var b=_.__title,w=_.ensureState("emphasis"),C=w.textConfig||(w.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&b){var k=A.style||(A.style={}),N=$0(b,Xe.makeFont(k)),D=_.x+o.x,I=_.y+o.y+s,z=!1;I+N.height>i.getHeight()&&(C.position="top",z=!0);var O=z?-5-N.height:s+10;D+N.width/2>i.getWidth()?(C.position=["100%",O],k.align="right"):D-N.width/2<0&&(C.position=[0,O],k.align="left")}})},e.prototype.updateView=function(r,n,i,a){R(this._features,function(o){o instanceof ei&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){R(this._features,function(i){i instanceof ei&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof ei&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(gt);function Ude(t){return t.indexOf("my")===0}var Zde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||q.color.neutral00,connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=Ze.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=p.length,y=new Uint8Array(m);m--;)y[m]=p.charCodeAt(m);var _=new Blob([y]);window.navigator.msSaveOrOpenBlob(_,g)}else{var b=document.createElement("iframe");document.body.appendChild(b);var w=b.contentWindow,C=w.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),w.focus(),C.execCommand("SaveAs",!0,g),document.body.removeChild(b)}}else{var M=i.get("lang"),A='',k=window.open();k.document.write(A),k.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:q.color.neutral00,name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(ei),YO="__ec_magicType_stack__",$de=[["line","bar"],["stack"]],Yde=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return R(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(XO[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=XO[i](f,d,h,a);p&&(be(p,h.option),s.series.push(p));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,_=y+"Axis",b=h.getReferringComponents(_,kt).models[0],w=b.componentIndex;s[_]=s[_]||[];for(var C=0;C<=w;C++)s[_][w]=s[_][w]||{};s[_][w].boundaryGap=i==="bar"}}};R($de,function(h){Ne(h,i)>=0&&R(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ee({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(ei),XO={line:function(t,e,r,n){if(t==="bar")return Ee({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return Ee({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===YO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ee({id:e,stack:i?"":YO},n.get(["option","stack"])||{},!0)}};Vi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var T_=new Array(60).join("-"),fh=" ";function Xde(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function qde(t){var e=[];return R(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(re(r.series,function(d){return d.name})),l=[i.model.getCategories()];R(r.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(fh)],c=0;c=0)return!0}var JT=new RegExp("["+fh+"]+","g");function eve(t){for(var e=t.split(/\n+/g),r=u0(e.shift()).split(JT),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function ove(t){var e=$A(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return QH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function sve(t){JH(t).snapshots=null}function lve(t){return $A(t).length}function $A(t){var e=JH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var uve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){sve(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(ei);Vi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var cve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],YA=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=XO(r,e);R(hve,function(o,s){(!n||!n.include||Ee(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=WS[n.brushType](0,a,i);n.__rangeOffset={offset:JO[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){R(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=WS[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){R(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=WS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?JO[n.brushType](a.values,o.offset,fve(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:iH(i),isTargetByCursor:oH(i,e,n.coordSysModel),getLinearBrushOtherExtent:aH(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ee(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=XO(r,e),a=0;at[1]&&t.reverse(),t}function XO(t,e){return Oc(t,e,{includeMainTypes:cve})}var hve={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=de(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,f){(Ee(r,h.getAxis("x").model)>=0||Ee(n,h.getAxis("y").model)>=0)&&c.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:KO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){R(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:KO.geo})})}},qO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],KO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(fs(t)),e}},WS={lineX:Ie(QO,0),lineY:Ie(QO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[eC([i[0],a[0]]),eC([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function QO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=eC(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var JO={lineX:Ie(e5,0),lineY:Ie(e5,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function e5(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function fve(t,e){var r=t5(t),n=t5(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function t5(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var tC=R,dve=YX("toolbox-dataZoom_"),vve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new _A(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),mve(r,n,this,a,i),gve(r,n)},e.prototype.onclick=function(r,n,i){pve[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new YA(XA(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),ave(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=ws(0,h.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},e.prototype._dispatchZoomAction=function(r){var n=[];tC(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:q.color.backgroundTint}};return n},e}(ei),pve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(ove(this.ecModel))}};function XA(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function gve(t,e){t.setIconStatus("back",lve(e)>1?"emphasis":"normal")}function mve(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new YA(XA(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}PQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=XA(n),o=Oc(t,a);tC(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),tC(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:dve+u+h};f[c]=h,i.push(f)}return i});function yve(t){t.registerComponentModel(Hde),t.registerComponentView(Wde),lc("saveAsImage",Zde),lc("magicType",Yde),lc("dataView",nve),lc("dataZoom",vve),lc("restore",uve),Oe(Gde)}var _ve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:q.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:q.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:q.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:q.color.tertiary,fontSize:14}},e}(Ve);function e8(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function t8(t){if(Ze.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function Mve(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(Ze.transformSupported?""+qA+i:",left"+i+",top"+i)),bve+":"+a}function r5(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Ze.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ze.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+qA+":"+o+";":[["top",0],["left",0],[r8,o]]}function Ave(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Lve(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),h=t.getModel("textStyle"),f=UV(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&a>0&&i.push(Mve(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=gM(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(Ave(h)),f!=null&&i.push("padding:"+Ah(f).join("px ")+"px"),i.join(";")+";"}function n5(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&dY(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Pve=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ze.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):ql(a)?a:me(a)&&a(e.getDom()));n5(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();$n(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=Sve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=wve+Lve(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+r5(a[0],a[1],!0)+("border-color:"+nu(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!e8(n)&&(s=Cve(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ze.node||!i.getDom())){var o=o5(a,i);this._ticket="";var s=a.dataByCoordSys,l=Ove(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=Dve;c.x=a.x,c.y=a.y,c.update(),Le(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var h=jH(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(o5(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=Ef([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Le(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Il(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Le(c).dataIndex!=null?l=c:Le(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Ef([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),h=[],f=new C1;R(r,function(_){R(_.dataByAxis,function(S){var w=i.getComponent(S.axisDim+"Axis",S.axisIndex),C=S.value;if(!(!w||C==null)){var M=RH(C,w.axis,i,S.seriesDataIndices,S.valueLabelOpt),A=Kt("section",{header:M,noHeader:!Pn(M),sortBlocks:!0,blocks:[]});c.blocks.push(A),R(S.seriesDataIndices,function(k){var E=i.getSeriesByIndex(k.seriesIndex),D=k.dataIndexInside,I=E.getDataParams(D);if(!(I.dataIndex<0)){I.axisDim=S.axisDim,I.axisIndex=S.axisIndex,I.axisType=S.axisType,I.axisId=S.axisId,I.axisValue=Vy(w.axis,{value:C}),I.axisValueLabel=M,I.marker=f.makeTooltipMarker("item",nu(I.color),l);var z=bI(E.formatTooltip(D,!0,null)),O=z.frag;if(O){var V=Ef([E],a).get("valueFormatter");A.blocks.push(V?J({valueFormatter:V},O):O)}z.text&&h.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),g=LI(c,f,l,p,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var m=l==="richText"?` +`),meta:e.meta}}function h0(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Jde(t){var e=t.slice(0,t.indexOf(` +`));if(e.indexOf(fh)>=0)return!0}var JT=new RegExp("["+fh+"]+","g");function eve(t){for(var e=t.split(/\n+/g),r=h0(e.shift()).split(JT),n=[],i=re(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function ove(t){var e=ZA(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return JH(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function sve(t){e8(t).snapshots=null}function lve(t){return ZA(t).length}function ZA(t){var e=e8(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var uve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){sve(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(ei);Vi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var cve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],$A=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=qO(r,e);R(hve,function(o,s){(!n||!n.include||Ne(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Ub[n.brushType](0,a,i);n.__rangeOffset={offset:e5[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){R(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&R(a.coordSyses,function(o){var s=Ub[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){R(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Ub[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?e5[n.brushType](a.values,o.offset,fve(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return re(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:aH(i),isTargetByCursor:sH(i,e,n.coordSysModel),getLinearBrushOtherExtent:oH(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ne(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=qO(r,e),a=0;at[1]&&t.reverse(),t}function qO(t,e){return Oc(t,e,{includeMainTypes:cve})}var hve={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=de(),o={},s={};!r&&!n&&!i||(R(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),R(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),R(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];R(u.getCartesians(),function(h,f){(Ne(r,h.getAxis("x").model)>=0||Ne(n,h.getAxis("y").model)>=0)&&c.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:QO.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){R(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:QO.geo})})}},KO=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],QO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(hs(t)),e}},Ub={lineX:Ie(JO,0),lineY:Ie(JO,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[eC([i[0],a[0]]),eC([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=re(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function JO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=eC(re([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var e5={lineX:Ie(t5,0),lineY:Ie(t5,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return re(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function t5(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function fve(t,e){var r=r5(t),n=r5(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function r5(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var tC=R,dve=YX("toolbox-dataZoom_"),vve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new yA(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),mve(r,n,this,a,i),gve(r,n)},e.prototype.onclick=function(r,n,i){pve[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new $A(YA(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),ave(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=Ss(0,h.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},e.prototype._dispatchZoomAction=function(r){var n=[];tC(r,function(i,a){n.push(ye(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:q.color.backgroundTint}};return n},e}(ei),pve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(ove(this.ecModel))}};function YA(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function gve(t,e){t.setIconStatus("back",lve(e)>1?"emphasis":"normal")}function mve(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new $A(YA(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}PQ("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=YA(n),o=Oc(t,a);tC(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),tC(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:dve+u+h};f[c]=h,i.push(f)}return i});function yve(t){t.registerComponentModel(Hde),t.registerComponentView(Wde),sc("saveAsImage",Zde),sc("magicType",Yde),sc("dataView",nve),sc("dataZoom",vve),sc("restore",uve),Oe(Gde)}var _ve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:q.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:q.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:q.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:q.color.tertiary,fontSize:14}},e}(Ve);function t8(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function r8(t){if(Ze.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function Mve(t,e,r){var n="cubic-bezier(0.23,1,0.32,1)",i="",a="";return r&&(i=" "+t/2+"s "+n,a="opacity"+i+",visibility"+i),e||(i=" "+t+"s "+n,a+=(a.length?",":"")+(Ze.transformSupported?""+XA+i:",left"+i+",top"+i)),Sve+":"+a}function n5(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!Ze.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=Ze.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+XA+":"+o+";":[["top",0],["left",0],[n8,o]]}function Ave(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var i=pe(t.get("lineHeight"),Math.round(r*3/2));r&&e.push("line-height:"+i+"px");var a=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),R(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Lve(t,e,r,n){var i=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),h=t.getModel("textStyle"),f=ZV(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&a>0&&i.push(Mve(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=pM(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(Ave(h)),f!=null&&i.push("padding:"+Ah(f).join("px ")+"px"),i.join(";")+";"}function i5(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&dY(t,o,r,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Pve=function(){function t(e,r){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ze.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=r.appendTo,o=a&&(se(a)?document.querySelector(a):Xl(a)?a:me(a)&&a(e.getDom()));i5(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();$n(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var r=this._api.getDom(),n=bve(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=wve+Lve(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+n5(a[0],a[1],!0)+("border-color:"+ru(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(se(a)&&n.get("trigger")==="item"&&!t8(n)&&(s=Cve(n,i,a)),se(e))o.innerHTML=e+s;else if(e){o.innerHTML="",ee(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||Ze.node||!i.getDom())){var o=s5(a,i);this._ticket="";var s=a.dataByCoordSys,l=Ove(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=Dve;c.x=a.x,c.y=a.y,c.update(),Le(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var h=VH(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(s5(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=Nf([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){var s=Le(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Dl(i,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(Le(c).dataIndex!=null?l=c:Le(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(r,l,n):u?this._showComponentItemTooltip(r,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=le(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Nf([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),h=[],f=new M1;R(r,function(_){R(_.dataByAxis,function(b){var w=i.getComponent(b.axisDim+"Axis",b.axisIndex),C=b.value;if(!(!w||C==null)){var M=OH(C,w.axis,i,b.seriesDataIndices,b.valueLabelOpt),A=Kt("section",{header:M,noHeader:!Pn(M),sortBlocks:!0,blocks:[]});c.blocks.push(A),R(b.seriesDataIndices,function(k){var N=i.getSeriesByIndex(k.seriesIndex),D=k.dataIndexInside,I=N.getDataParams(D);if(!(I.dataIndex<0)){I.axisDim=b.axisDim,I.axisIndex=b.axisIndex,I.axisType=b.axisType,I.axisId=b.axisId,I.axisValue=Gy(w.axis,{value:C}),I.axisValueLabel=M,I.marker=f.makeTooltipMarker("item",ru(I.color),l);var z=wI(N.formatTooltip(D,!0,null)),O=z.frag;if(O){var V=Nf([N],a).get("valueFormatter");A.blocks.push(V?J({valueFormatter:V},O):O)}z.text&&h.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),g=PI(c,f,l,p,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var m=l==="richText"?` -`:"
",y=h.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,f)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Le(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=r.positionDefault,g=Ef([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,h),_=new C1;y.marker=_.makeTooltipMarker("item",nu(y.color),d);var S=bI(u.formatTooltip(c,!1,h)),w=g.get("order"),C=g.get("valueFormatter"),M=S.frag,A=M?LI(C?J({valueFormatter:C},M):M,_,d,w,a.get("useUTC"),g.get("textStyle")):S.text,k="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,k,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Le(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Ur(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=r.positionDefault,p=Ef(h,this._tooltipModel,d?{position:d}:null),g=p.get("content"),m=Math.random()+"",y=new C1;this._showOrMove(p,function(){var _=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(f)if(se(f)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=f,_&&(d=$v(y.axisValue,d,m)),d=mM(d,i,!0)}else if(me(f)){var S=le(function(w,C){w===this._ticket&&(h.setContent(C,c,r,g,l),this._updatePosition(r,l,o,s,h,i,u))},this);this._ticket=a,d=f(i,a,S)}else d=f;h.setContent(d,c,r,g,l),h.show(r,g),this._updatePosition(r,l,o,s,h,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(be(n)){var g=n;g.width=h[0],g.height=h[1];var m=bt(g,{width:u,height:c});i=m.x,a=m.y,f=null,d=null}else if(se(n)&&l){var y=Rve(n,p,h,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=Eve(i,a,o,u,c,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=s5(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=s5(d)?h[1]/2:d==="bottom"?h[1]:0),e8(r)){var y=Nve(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&R(u,function(f,d){var p=h[d]||{},g=f.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&g.length===m.length,o&&R(g,function(y,_){var S=m[_];o=o&&y.seriesIndex===S.seriesIndex&&y.dataIndex===S.dataIndex}),a&&R(f.seriesDataIndices,function(y){var _=y.seriesIndex,S=n[_],w=a[_];S&&w&&w.data!==S.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Ze.node||!n.getDom()||(uv(this,"_updatePosition"),this._tooltipContent.dispose(),$T("itemTooltip",n))},e.type="tooltip",e}(gt);function Ef(t,e,r){var n=e.ecModel,i;r?(i=new We(r,n,n),i=new We(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof We&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new We(o,i,n)))}return i}function o5(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function Eve(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function Nve(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Rve(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function s5(t){return t==="center"||t==="middle"}function Ove(t,e,r){var n=j2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=_h(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Le(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function zve(t){Oe(rp),t.registerComponentModel(_ve),t.registerComponentView(Ive),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Bve=["rect","polygon","keep","clear"];function jve(t,e){var r=pt(t?t.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Vve(s),e&&!s.length&&s.push.apply(s,Bve)}}function Vve(t){var e={};R(t,function(r){e[r]=1}),t.length=0,R(e,function(r,n){t.push(n)})}var l5=R;function u5(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function rC(t,e,r){var n={};return l5(e,function(a){var o=n[a]=i();l5(t[a],function(s,l){if(dr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new dr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new dr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function i8(t,e,r){var n;R(r,function(i){e.hasOwnProperty(i)&&u5(e[i])&&(n=!0)}),n&&R(r,function(i){e.hasOwnProperty(i)&&u5(e[i])?t[i]=ye(e[i]):delete t[i]})}function Fve(t,e,r,n,i,a){var o={};R(t,function(h){var f=dr.prepareVisualTypes(e[h]);o[h]=f});var s;function l(h){return AM(r,s,h)}function u(h,f){tF(r,s,h,f)}r.each(c);function c(h,f){s=h;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,h),g=e[p],m=o[p],y=0,_=m.length;y<_;y++){var S=m[y];g[S]&&g[S].applyVisual(h,l,u)}}}function Gve(t,e,r,n){var i={};return R(t,function(a){var o=dr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(C){return AM(s,h,C)}function c(C,M){tF(s,h,C,M)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=n!=null?f.get(l,h):h,g=r(p),m=e[g],y=i[g],_=0,S=y.length;_e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&v5(e)}};function v5(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Xve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new _A(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){a8(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(gt),qve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&i8(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return p5(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=p5(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:q.color.backgroundTint,borderColor:q.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:q.color.disabled},e}(Ve);function p5(t,e){return Ne({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new We(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Kve=["rect","polygon","lineX","lineY","keep","clear"],Qve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:Kve.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(ei);function Jve(t){t.registerComponentView(Xve),t.registerComponentModel(qve),t.registerPreprocessor(jve),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Wve),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Rt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Rt),lc("brush",Qve)}var epe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:q.size.m,backgroundColor:q.color.transparent,borderColor:q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:q.color.primary},subtextStyle:{fontSize:12,color:q.color.quaternary}},e}(Ve),tpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:vt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=r.get("subtext"),d=new Xe({style:vt(s,{text:f,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,d.silent=!g&&!m,p&&c.on("click",function(){Py(p,"_"+r.get("target"))}),g&&d.on("click",function(){Py(g,"_"+r.get("subtarget"))}),Le(c).eventData=Le(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),f&&a.add(d);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var S=sr(r,i),w=bt(_,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?w.x+=w.width:l==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),a.x=w.x,a.y=w.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),d.setStyle(C),y=a.getBoundingRect();var M=w.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var k=new je({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(k)}},e.type="title",e}(gt);function rpe(t){t.registerComponentModel(epe),t.registerComponentView(tpe)}var g5=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var h=rr(yh(u),""),f;be(u)?(f=ye(u),f.value=c):f=c,o.push(f),a.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new $r([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:q.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:q.color.secondary},data:[]},e}(Ve),o8=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=Is(g5.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:q.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:q.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:q.color.tertiary},itemStyle:{color:q.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:q.color.accent60},itemStyle:{color:q.color.accent60,borderColor:q.color.accent60},controlStyle:{color:q.color.accent70,borderColor:q.color.accent70}},progress:{lineStyle:{color:q.color.accent30},itemStyle:{color:q.color.accent40}},data:[]}),e}(g5);Bt(o8,l_.prototype);var npe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(gt),ipe=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(pi),ZS=Math.PI,m5=Fe(),ape=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=spe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:ZS/2},h=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*ZS/180;var _,S,w,C=f.get("position",!0),M=d&&f.get("showPlayBtn",!0),A=d&&f.get("showPrevBtn",!0),k=d&&f.get("showNextBtn",!0),E=0,D=h;C==="left"||C==="bottom"?(M&&(_=[0,0],E+=m),A&&(S=[E,0],E+=m),k&&(w=[D-p,0],D-=m)):(M&&(_=[D-p,0],D-=m),A&&(S=[0,0],E+=m),k&&(w=[D-p,0],D-=m));var I=[E,D];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:S,nextBtnPosition:w,axisExtent:I,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;Oi(s,s,[-l,-u]),xo(s,s,-ZS/2),Oi(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),h=_(i.getBoundingRect()),f=_(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;S(d,h,c,1,m),S(p,f,c,1,1-m)}else{var m=g>=0?0:1;S(d,h,c,1,m),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(w){w.originX=c[0][0]-w.x,w.originY=c[1][0]-w.y}function _(w){return[[w.x,w.x+w.width],[w.y,w.y+w.height]]}function S(w,C,M,A,k){w[A]+=M[A][k]-C[A][k]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=ope(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new ipe("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Se({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=y5(h,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),hs(m);var y=Le(m);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],R(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,h),silent:!1,style:vt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=vt(p),y.ensureState("progress").style=vt(g),n.add(y),hs(y),m5(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);f(r.nextBtnPosition,"next",le(this._changeTimeline,this,h?"-":"+")),f(r.prevBtnPosition,"prev",le(this._changeTimeline,this,h?"+":"-")),f(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function f(d,p,g,m){if(d){var y=zi(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],S=lpe(a,p+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});S.ensureState("emphasis").style=u,n.add(S),hs(S)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=le(u._handlePointerDrag,u),h.ondragend=le(u._handlePointerDragend,u),_5(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){_5(h,u._progressLine,s,i,a)}};this._currentPointer=y5(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=kn(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var Kg={min:Ie(qg,"min"),max:Ie(qg,"max"),average:Ie(qg,"average"),median:Ie(qg,"median")};function Cv(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!vpe(e)&&!ee(e.coord)&&ee(i)){var a=s8(e,r,n,t);if(e=ye(e),e.type&&Kg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=Kg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&Kg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=c0(r,r.mapDimension(c.dim),e.type))}}else for(var h=e.coord,f=0;f<2;f++)Kg[h[f]]&&(h[f]=c0(r,r.mapDimension(i[f]),h[f]));return e}}function s8(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(ppe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function ppe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function Mv(t,e){return t&&t.containData&&e.coord&&!iC(e)?t.containData(e.coord):!0}function gpe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!iC(e)&&!iC(r)?t.containZone(e.coord,r.coord):!0}function l8(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return vs(o,e[a])}:function(r,n,i,a){return vs(r.value,e[a])}}function c0(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var $S=Fe(),QA=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=de()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){$S(s).keep=!1}),n.eachSeries(function(s){var l=Ma.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!$S(s).keep&&a.group.remove(s.group)}),mpe(n,o,this.type)},e.prototype.markKeep=function(r){$S(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Ma.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?wj(l):$2(l))})}})},e.type="marker",e}(gt);function mpe(t,e,r){t.eachSeries(function(n){var i=Ma.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=ru(i),s=o.z,l=o.zlevel;i_(a.group,s,l)}})}function S5(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,h=u?o?o.height:0:a,f=u&&o?o.x:0,d=u&&o?o.y:0,p,g=oe(l.get("x"),c)+f,m=oe(l.get("y"),h)+d;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),_=t.get(n.dimensions[1],s);p=n.dataToPoint([y,_])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var ype=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markPoint");o&&(S5(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Qv),h=_pe(o,r,n);n.setData(h),S5(n.getData(),r,a),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var S=n.getRawValue(f),w=n.getDataParams(f);me(p)&&(p=p(S,w)),me(g)&&(g=g(S,w)),me(m)&&(m=m(S,w)),me(y)&&(y=y(S,w))}var C=d.getModel("itemStyle").getItemStyle(),M=d.get("z2"),A=Xv(l,"color");C.fill||(C.fill=A),h.setItemVisual(f,{z2:pe(M,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:C})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){Le(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(QA);function _pe(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new $r(n,r),a=re(r.get("data"),Ie(Cv,e));t&&(a=et(a,Ie(Mv,t)));var o=l8(!!t,n);return i.initData(a,null,o),i}function xpe(t){t.registerComponentModel(dpe),t.registerComponentView(ype),t.registerPreprocessor(function(e){KA(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Spe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Ma),Qg=Fe(),bpe=function(t,e,r,n){var i=t.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=br(n.yAxis,n.xAxis);else{var u=s8(n,i,e,t);s=u.valueAxis;var c=VM(i,u.valueDataDim);l=c0(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=ye(n),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=p.coord[h]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[Cv(t,a[0]),Cv(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Ne(m[2],m[0]),Ne(m[2],m[1]),m};function h0(t){return!isNaN(t)&&!isFinite(t)}function b5(t,e,r,n){var i=1-t,a=n.dimensions[t];return h0(e[i])&&h0(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function wpe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(b5(1,r,n,t)||b5(0,r,n,t)))return!0}return Mv(t,e[0])&&Mv(t,e[1])}function YS(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,h=t.get(c[0],e),f=t.get(c[1],e);s=a.dataToPoint([h,f])}if(bs(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;h0(t.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):h0(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var Tpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Qg(o).from,u=Qg(o).to;l.each(function(c){YS(l,c,!0,a,i),YS(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new mA);this.group.add(c.group);var h=Cpe(o,r,n),f=h.from,d=h.to,p=h.line;Qg(n).from=f,Qg(n).to=d,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(_)||(_=[_,_]),h.from.each(function(w){S(f,w,!0),S(d,w,!1)}),p.each(function(w){var C=p.getItemModel(w),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(w,[f.getItemLayout(w),d.getItemLayout(w)]);var A=C.get("z2");M.stroke==null&&(M.stroke=f.getItemVisual(w,"style").fill),p.setItemVisual(w,{z2:pe(A,0),fromSymbolKeepAspect:f.getItemVisual(w,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(w,"symbolOffset"),fromSymbolRotate:f.getItemVisual(w,"symbolRotate"),fromSymbolSize:f.getItemVisual(w,"symbolSize"),fromSymbol:f.getItemVisual(w,"symbol"),toSymbolKeepAspect:d.getItemVisual(w,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(w,"symbolOffset"),toSymbolRotate:d.getItemVisual(w,"symbolRotate"),toSymbolSize:d.getItemVisual(w,"symbolSize"),toSymbol:d.getItemVisual(w,"symbol"),style:M})}),c.updateData(p),h.line.eachItemGraphicEl(function(w){Le(w).dataModel=n,w.traverse(function(C){Le(C).dataModel=n})});function S(w,C,M){var A=w.getItemModel(C);YS(w,C,M,r,a);var k=A.getModel("itemStyle").getItemStyle();k.fill==null&&(k.fill=Xv(l,"color")),w.setItemVisual(C,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pe(A.get("symbolOffset",!0),_[M?0:1]),symbolRotate:pe(A.get("symbolRotate",!0),y[M?0:1]),symbolSize:pe(A.get("symbolSize"),m[M?0:1]),symbol:pe(A.get("symbol",!0),g[M?0:1]),style:k})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(QA);function Cpe(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new $r(n,r),a=new $r(n,r),o=new $r([],r),s=re(r.get("data"),Ie(bpe,e,t,r));t&&(s=et(s,Ie(wpe,t)));var l=l8(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Mpe(t){t.registerComponentModel(Spe),t.registerComponentView(Tpe),t.registerPreprocessor(function(e){KA(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Ape=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Ma),Jg=Fe(),Lpe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Cv(t,i),s=Cv(t,a),l=o.coord,u=s.coord;l[0]=br(l[0],-1/0),l[1]=br(l[1],-1/0),u[0]=br(u[0],1/0),u[1]=br(u[1],1/0);var c=F0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function f0(t){return!isNaN(t)&&!isFinite(t)}function w5(t,e,r,n){var i=1-t;return f0(e[i])&&f0(r[i])}function Ppe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return bs(t,"cartesian2d")?r&&n&&(w5(1,r,n)||w5(0,r,n))?!0:gpe(t,i,a):Mv(t,i)||Mv(t,a)}function T5(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),h=t.getValues(["x1","y1"],e),f=a.clampData(c),d=a.clampData(h),p=[];r[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],r[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(bs(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);f0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):f0(m)&&(s[1]=S.toGlobalCoord(S.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var C5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],kpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(C5,function(h){return T5(s,l,h,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var h=Dpe(o,r,n);n.setData(h),h.each(function(f){var d=re(C5,function(D){return T5(h,f,D,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],S=[g.parse(h.get("y0",f)),g.parse(h.get("y1",f))];kn(_),kn(S);var w=!(m[0]>_[1]||m[1]<_[0]||y[0]>S[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:q.size.m,align:"auto",backgroundColor:q.color.transparent,borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:q.color.disabled,inactiveBorderColor:q.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:q.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:q.color.tertiary,borderWidth:1,borderColor:q.color.border},emphasis:{selectorLabel:{show:!0,color:q.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Ve),ec=Ie,oC=R,em=_e,u8=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new em),this.group.add(this._selectorGroup=new em),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=sr(r,i).refContainer,h=r.getBoxLayoutParams(),f=r.get("padding"),d=bt(h,c,f),p=this.layoutInner(r,o,d,a,l,u),g=bt(Se({width:p.width,height:p.height},h),c,f);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=KH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=de(),h=n.get("selectedMode"),f=n.get("triggerEvent"),d=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),oC(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` -`)){var _=new em;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var w=S.getData(),C=w.getVisual("legendLineStyle")||{},M=w.getVisual("legendIcon"),A=w.getVisual("style"),k=this._createItem(S,y,g,p,n,r,C,A,M,h,a);k.on("click",ec(M5,y,null,a,d)).on("mouseover",ec(sC,S.name,null,a,d)).on("mouseout",ec(lC,S.name,null,a,d)),i.ssr&&k.eachChild(function(E){var D=Le(E);D.seriesIndex=S.seriesIndex,D.dataIndex=g,D.ssrType="legend"}),f&&k.eachChild(function(E){m.packEventData(E,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(E){var D=this;if(!c.get(y)&&E.legendVisualProvider){var I=E.legendVisualProvider;if(!I.containName(y))return;var z=I.indexOfName(y),O=I.getItemVisual(z,"style"),V=I.getItemVisual(z,"legendIcon"),G=Zr(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ai(G,"rgba")}));var F=this._createItem(E,y,g,p,n,r,{},O,V,h,a);F.on("click",ec(M5,null,y,a,d)).on("mouseover",ec(sC,null,y,a,d)).on("mouseout",ec(lC,null,y,a,d)),i.ssr&&F.eachChild(function(U){var j=Le(U);j.seriesIndex=E.seriesIndex,j.dataIndex=g,j.ssrType="legend"}),f&&F.eachChild(function(U){D.packEventData(U,n,E,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Le(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();oC(r,function(u){var c=u.type,h=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);vr(h,{normal:f,emphasis:d},{defaultText:u.title}),hs(h)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,h,f){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),S=a.get("icon");c=S||c||"roundRect";var w=Npe(c,a,l,u,d,m,f),C=new em,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:_}));else{var A=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(Rpe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:w.itemStyle,symbolKeepAspect:_}))}var k=s==="left"?p+5:-5,E=s,D=o.get("formatter"),I=n;se(D)&&D?I=D.replace("{name}",n??""):me(D)&&(I=D(n));var z=m?M.getTextColor():a.get("inactiveColor");C.add(new Xe({style:vt(M,{text:I,x:k,y:g/2,fill:z,align:E,verticalAlign:"middle"},{inheritColor:z})}));var O=new je({shape:C.getBoundingRect(),style:{fill:"transparent"}}),V=a.getModel("tooltip");return V.get("show")&&bo({el:O,componentModel:o,itemName:n,itemTooltipOption:V.option}),C.add(O),C.eachChild(function(G){G.silent=!0}),O.silent=!h,this.getContentGroup().add(C),hs(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Vl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Vl("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?d[g]+=c[m]+p:h[g]+=f[m]+p,d[1-g]+=c[y]/2-f[y]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var S={x:0,y:0};return S[m]=c[m]+p+f[m],S[y]=Math.max(c[y],f[y]),S[_]=Math.min(0,f[_]+d[1-g]),S}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(gt);function Npe(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),oC(m,function(_,S){m[S]==="inherit"&&(m[S]=y[S])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:ih(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Rpe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=q.color.neutral00,r.style.lineWidth=2),r}function M5(t,e,r,n){lC(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),sC(t,e,r,n)}function c8(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var y=[0,0],_=[-p.x,-p.y],S=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var w=r.get("pageButtonPosition",!0);w==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+S}_[1-a]+=d[s]/2-p[s]/2,c.setPosition(m),h.setPosition(y),f.setPosition(_);var C={x:0,y:0};if(C[o]=g?i[o]:d[o],C[s]=Math.max(d[s],p[s]),C[l]=Math.min(0,p[l]+_[1-a]),h.__rectSize=i[o],g){var M={x:0,y:0};M[o]=Math.max(i[o]-p[o]-S,0),M[s]=C[s],h.setClipPath(new je({shape:M})),h.__rectSize=M[o]}else f.eachChild(function(k){k.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&Qe(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?r:null),this._updatePageInfoView(r,A),C},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=n[h]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",f?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=XS[o],l=qS[o],u=this._findTargetItemIndex(n),c=i.children(),h=c[u],f=c.length,d=f?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=w(h);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,S=null;m<=f;++m)S=w(c[m]),(!S&&_.e>y.s+a||S&&!C(S,y.s))&&(_.i>y.i?y=_:y=S,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),_=S;for(var m=u-1,y=g,_=g,S=null;m>=-1;--m)S=w(c[m]),(!S||!C(_,S.s))&&y.i<_.i&&(_=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=S;return p;function w(M){if(M){var A=M.getBoundingRect(),k=A[l]+M[l];return{s:k,e:k+A[s],i:M.__legendDataIndex}}}function C(M,A){return M.e>=A&&M.s<=A+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(u8);function Vpe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function Fpe(t){Oe(h8),t.registerComponentModel(Bpe),t.registerComponentView(jpe),Vpe(t)}function Gpe(t){Oe(h8),Oe(Fpe)}var Hpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=Is(Tv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Tv),JA=Fe();function Wpe(t,e,r){JA(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function Upe(t,e){for(var r=JA(t).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function qpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=JA(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=de());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=YH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Zpe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=de());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){f8(i,a);return}var c=Xpe(l,a,r);o.enable(c.controlType,c.opt),kh(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Kpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),Wpe(i,r,{pan:le(KS.pan,this),zoom:le(KS.zoom,this),scrollMove:le(KS.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Upe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(UA),KS={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=QS[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ws(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:k5(function(t,e,r,n,i,a){var o=QS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:k5(function(t,e,r,n,i,a){var o=QS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function k5(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(ws(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var QS={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function d8(t){ZA(t),t.registerComponentModel(Hpe),t.registerComponentView(Kpe),qpe(t)}var Qpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Is(Tv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:q.color.accent10,borderRadius:0,backgroundColor:q.color.transparent,dataBackground:{lineStyle:{color:q.color.accent30,width:.5},areaStyle:{color:q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:q.color.accent40,width:.5},areaStyle:{color:q.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:q.color.neutral00,borderColor:q.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:q.color.tertiary},brushSelect:!0,brushStyle:{color:q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(Tv),Of=je,Jpe=1,JS=30,ege=7,zf="horizontal",D5="vertical",tge=5,rge=["line","bar","candlestick","scatter"],nge={easing:"cubicOut",duration:100,delay:0},ige=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),kh(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){uv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?ege:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===zf?{right:o.width-s.x-s.width,top:o.height-JS-l-a,width:s.width,height:JS}:{right:l,top:s.y,width:JS,height:s.height},c=vu(r.option);R(["right","top","width","height"],function(f){c[f]==="ph"&&(c[f]=u[f])});var h=bt(c,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===D5&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===zf&&!o?{scaleY:l?1:-1,scaleX:1}:i===zf&&o?{scaleY:l?1:-1,scaleX:-1}:i===D5&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Of({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Of({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(r.thisDim),f=o.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),S=n[0]/(h[1]-h[0]),w=r.thisAxis.type==="time",C=-_,M=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,V){if(M>0&&V%M){w||(C+=_);return}C=w?(+z-h[0])*S:C+_;var G=O==null||isNaN(O)||O==="",F=G?0:nt(O,f,p,!0);G&&!A&&V?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&A&&(m.push([C,0]),y.push([C,0])),G||(m.push([C,F]),y.push([C,F])),A=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var k=this.dataZoomModel;function E(z){var O=k.getModel(z?"selectedDataBackground":"dataBackground"),V=new _e,G=new Or({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),F=new Tr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return V.add(G),V.add(F),V}for(var D=0;D<3;D++){var I=E(D===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();R(l,function(u){if(!i&&!(n!==!0&&Ee(rge,u.get("type"))<0)){var c=a.getComponent(Ko(o),s).axis,h=age(o),f,d=u.coordinateSystem;h!=null&&d.getOtherAxis&&(f=d.getOtherAxis(c).inverse),h=u.getData().mapDimension(h);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:h,otherAxisInverse:f}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=n.filler=new Of({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new Of({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Jpe,fill:q.color.transparent}})),R([0,1],function(S){var w=l.get("handleIcon");!Iy[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w);var C=Ut(w,-1,0,2,2,null,!0);C.attr({cursor:oge(this._orient),draggable:!0,drift:le(this._onDragMove,this,S),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var M=C.getBoundingRect(),A=l.get("handleSize");this._handleHeight=oe(A,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,C.setStyle(l.getModel("handleStyle").getItemStyle()),C.style.strokeNoScale=!0,C.rectHover=!0,C.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),hs(C);var k=l.get("handleColor");k!=null&&(C.style.fill=k),o.add(i[S]=C);var E=l.getModel("textStyle"),D=l.get("handleLabel")||{},I=D.show||!1;r.add(a[S]=new Xe({silent:!0,invisible:!I,style:vt(E,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:E.getTextColor(),font:E.getFont()}),z2:10}))},this);var d=f;if(h){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new je({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,q.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new je({invisible:!0,shape:{y:s[1]-_,height:p+_}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[nt(r[0],[0,100],n,!0),nt(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ws(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?nt(s.minSpan,l,o,!0):null,s.maxSpan!=null?nt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=kn([nt(a[0],o,l,!0),nt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=kn(i.slice()),o=this._size;R([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ws(0,l,o,0,u.minSpan!=null?nt(u.minSpan,s,o,!0):null,u.maxSpan!=null?nt(u.maxSpan,s,o,!0):null),this._range=kn([nt(l[0],o,s,!0),nt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(ho(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Of({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?nge:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=YH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(UA);function age(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function oge(t){return t==="vertical"?"ns-resize":"ew-resize"}function v8(t){t.registerComponentModel(Qpe),t.registerComponentView(ige),ZA(t)}function sge(t){Oe(d8),Oe(v8)}var p8={get:function(t,e,r){var n=ye((lge[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},lge={color:{active:["#006edd","#e0ffff"],inactive:[q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},I5=dr.mapVisual,uge=dr.eachVisual,cge=ee,E5=R,hge=kn,fge=nt,d0=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&i8(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=rC(this.option.controller,n,r),this.targetVisuals=rC(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=_h(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){R(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[h(r[0]),h(r[1])]:h(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=hge([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ne(a,i),Ne(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(h){cge(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:r.get("gradientColor")}}function u(h,f,d){var p=h[f],g=h[d];p&&!g&&(g=h[d]={},E5(p,function(m,y){if(dr.isValidType(y)){var _=p8.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(h){var f=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,d=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";E5(this.stateList,function(y){var _=this.itemSize,S=h[y];S||(S=h[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=f&&ye(f)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=d&&ye(d)||(s?_[0]:[_[0],_[0]])),S.symbol=I5(S.symbol,function(M){return M==="none"?m:M});var w=S.symbolSize;if(w!=null){var C=-1/0;uge(w,function(M){M>C&&(C=M)}),S.symbolSize=I5(w,function(M){return fge(M,[0,C],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:q.color.transparent,borderColor:q.color.borderTint,contentColor:q.color.theme[0],inactiveColor:q.color.disabled,borderWidth:0,padding:q.size.m,textGap:10,precision:0,textStyle:{color:q.color.secondary}},e}(Ve),N5=[20,140],dge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=N5[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=N5[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=kn((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=R5(this,"outOfRange",this.getExtent()),i=R5(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:r(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);vge([0,1],function(h){var f=o[h];f.setStyle("fill",n.handlesColor[h]),f.y=r[h];var d=ra(r[h],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var g=Ei(i.handleLabelPoints[h],fs(f,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[h].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",f),p=this.getControllerVisual(r,"symbolSize"),g=ra(r,s,u,!0),m=l[0]-p/2,y={x:h.x,y:h.y};h.y=g,h.x=m;var _=Ei(c.indicatorLabelPoint,fs(h,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var w=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?w:"middle",align:M?"center":w});var A={x:m,y:g,style:{fill:d}},k={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(A,E),S.animateTo(k,E)}else h.attr(A),S.attr(k);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var I=0;Io[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||j5(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=KX(f,d);this._dispatchHighDown("downplay",Em(p[0],i)),this._dispatchHighDown("highlight",Em(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Il(r.target,function(l){var u=Le(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function bge(t,e,r,n){for(var i=e.targetVisuals[n],a=dr.prepareVisualTypes(i),o={color:Xv(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(_ge,xge),R(Sge,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(wge))}function _8(t){t.registerComponentModel(dge),t.registerComponentView(mge),y8(t)}var Tge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Cge[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=dr.listVisualTypes(),a=this.isCategory();R(r.pieces,function(s){R(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),R(n,function(s,l){var u=!1;R(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&R(this.stateList,function(c){(r[c]||(r[c]={}))[l]=p8.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,R(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=dr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=dr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,h){var f=a.getRepresentValue({interval:c});h||(h=a.getValueState(f));var d=r(f,h);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return R(s,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Is(d0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(d0),Cge={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function H5(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var Mge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=br(n.get("showLabel",!0),!u),h=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(f){var d=f.piece,p=new _e;p.onclick=le(this._onItemClick,this,d),this._enableHoverLink(p,f.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],h),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:vt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:h}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),Vl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Em(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return m8(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:vt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,R(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(g8);function x8(t){t.registerComponentModel(Tge),t.registerComponentView(Mge),y8(t)}function Age(t){Oe(_8),Oe(x8)}var Lge=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Wj(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),Pge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new Lge(this);if(this._target=null,this.ecModel.eachSeries(function(i){vR(i,null)}),this.shouldShow()){var n=this.getTarget();vR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:q.color.neutral30,borderColor:q.color.neutral40,opacity:.3},z:10},e}(Ve),kge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new _u),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||q.color.neutral00);var l=sr(r,i).refContainer,u=bt(cV(r,!0),l),c=s.lineWidth||0,h=this._contentRect=tu(u.clone(),c/2,!0,!0),f=new _e;a.add(f),f.setClipPath(new je({shape:h.plain()}));var d=this._targetGroup=new _e;f.add(d);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new je({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);f.add(this._windowRect=new je({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),U5(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),U5(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=bt({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=ci([],r.targetTrans),i=Di([],this._coordSys.transform,n);this._transThisToTarget=ci([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(Se({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new yu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(W5(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(W5(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(gt);function W5(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function U5(t,e){var r=ru(t);i_(e.group,r.z,r.zlevel)}function Dge(t){t.registerComponentModel(Pge),t.registerComponentView(kge)}var Ige={label:{enabled:!0},decal:{show:!1}},Z5=Fe(),Ege={};function Nge(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(Ige);Ne(n.label,t.getLocaleModel().get("aria"),!1),Ne(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var h=de();t.eachSeries(function(f){if(!f.isColorBySeries()){var d=h.get(f.type);d||(d={},h.set(f.type,d)),Z5(f).scope=d}}),t.eachRawSeries(function(f){if(t.isSeriesFiltered(f))return;if(me(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var _=Yw(f.ecModel,f.name,Ege,t.getSeriesCount()),S=d.getVisual("decal");d.setVisual("decal",w(S,_))}else{var p=f.getRawData(),g={},m=Z5(f).scope;d.each(function(C){var M=d.getRawIndex(C);g[M]=C});var y=p.count();p.each(function(C){var M=g[C],A=p.getName(C)||C+"",k=Yw(f.ecModel,A,m,y),E=d.getItemVisual(M,"decal");d.setItemVisual(M,"decal",w(E,k))})}function w(C,M){var A=C?J(J({},M),C):M;return A.dirty=!0,A}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=Se(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var f=t.getSeriesCount(),d=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,g=Math.min(f,p),m;if(!(f<1)){var y=s();if(y){var _=h.get(["general","withTitle"]);m=o(_,{title:y})}else m=h.get(["general","withoutTitle"]);var S=[],w=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(w,{seriesCount:f}),t.eachSeries(function(k,E){if(E1?h.get(["series","multiple",z]):h.get(["series","single",z]),D=o(D,{seriesId:k.seriesIndex,seriesName:k.get("name"),seriesType:l(k.subType)});var O=k.getData();if(O.count()>d){var V=h.get(["data","partialData"]);D+=o(V,{displayCnt:d})}else D+=h.get(["data","allData"]);for(var G=h.get(["data","separator","middle"]),F=h.get(["data","separator","end"]),U=h.get(["data","excludeDimensionId"]),j=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},zge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):v4(e)?e:null;if(r==null){var n="";it(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):qe(r)?this._condVal.test(e+""):!1},t}(),Bge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),jge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,V]}function c(O,V,G,F){Ac(O,G)&&Ac(V,F)||i.push(O,V,G,F,G,F)}function h(O,V,G,F,U,j){var W=Math.abs(V-O),H=Math.tan(W/4)*4/3,X=Vk:I2&&n.push(i),n}function cC(t,e,r,n,i,a,o,s,l,u){if(Ac(t,r)&&Ac(e,n)&&Ac(i,o)&&Ac(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-t,d=s-e,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var g=r-t,m=n-e,y=i-o,_=a-s,S=g*g+m*m,w=y*y+_*_;if(S=0&&k=0){l.push(o,s);return}var E=[],D=[];xs(t,r,i,o,.5,E),xs(e,n,a,s,.5,D),cC(E[0],D[0],E[1],D[1],E[2],D[2],E[3],D[3],l,u),cC(E[4],D[4],E[5],D[5],E[6],D[6],E[7],D[7],l,u)}function Jge(t,e){var r=uC(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),h=b8([l,u],c?0:1,e),f=(c?s:u)/h.length,d=0;di,o=b8([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=t[s]/o.length,f=0;f1?null:new Te(g*l+t,g*u+e)}function rme(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function rc(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function nme(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),nme(e,u,c)}function v0(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);v0(t,a[0],i,n),v0(t,a[1],r-i,n)}return n}function ime(t,e){for(var r=[],n=0;n0;u/=2){var c=0,h=0;(t&u)>0&&(c=1),(e&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function m0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(h,r),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=re(a,function(s,l){return{cp:s,z:dme(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function C8(t){return sme(t.path,t.count)}function hC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function vme(t,e,r){var n=[];function i(C){for(var M=0;M=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var gme={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;tz(t)&&(u=t,c=e),tz(e)&&(u=e,c=t);function h(y,_,S,w,C){var M=y.many,A=y.one;if(M.length===1&&!C){var k=_?M[0]:A,E=_?A:M[0];if(p0(k))h({many:[k],one:E},!0,S,w,!0);else{var D=s?Se({delay:s(S,w)},l):l;tL(k,E,D),a(k,E,k,E,D)}}else for(var I=Se({dividePath:gme[r],individualDelay:s&&function(U,j,W,H){return s(U+S,w)}},l),z=_?vme(M,A,I):pme(A,M,I),O=z.fromIndividuals,V=z.toIndividuals,G=O.length,F=0;Fe.length,d=u?rz(c,u):rz(f?e:t,[f?t:e]),p=0,g=0;gM8))for(var a=n.getIndices(),o=0;o0&&M.group.traverse(function(k){k instanceof Ue&&!k.animators.length&&k.animateFrom({style:{opacity:0}},A)})})}function sz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function lz(t){return ee(t)?t.sort().join(","):t}function jo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function wme(t,e){var r=de(),n=de(),i=de();return R(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=sz(a),c=lz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&R(u,function(h){i.set(h,{key:c,dataGroupId:s,data:l})})}),R(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=sz(a),u=lz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:jo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:jo(s),data:s}]});else if(ee(l)){var h=[];R(l,function(p){var g=n.get(p);g.data&&h.push({dataGroupId:g.dataGroupId,divide:jo(g.data),data:g.data})}),h.length&&r.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:jo(s)}]})}else{var f=i.get(l);if(f){var d=r.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:jo(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:jo(s)})}}}}),r}function uz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:jo(e.oldData[s]),groupIdDim:o.dimension})}),R(pt(t.to),function(o){var s=uz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:jo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&A8(i,a,n)}function Cme(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){R(pt(n.seriesTransition),function(i){R(pt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=cz,n=hz,i=!0,a=0,o=0;ol?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function Ame(){return new Mme}var cz=0,hz=0;function Lme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=rL(s,e);if(u){var c=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(c&&h))if(c||h){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=f,a[d][l.type].inExtFrac=f/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function Pme(t,e,r,n,i,a){t!=="no"&&R(r,function(o){var s=rL(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),h=i*3/4;c>s.vmin-h&&ce[0]&&r=0&&o<1-1e-5}R(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=Pn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var h=e(o.gap);(!isFinite(h)||h<0)&&(h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function nL(t,e){return dC(e)===dC(t)}function dC(t){return t.start+"_\0_"+t.end}function Dme(t,e,r){var n=[];R(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),R(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=Ps(n,function(u){return nL(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function Ime(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=Ps(r,function(h){return nL(h.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function Eme(t,e,r){var n={noNegative:!0},i=fC(t,r,n),a=fC(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var Nme={vmin:"start",vmax:"end"};function Rme(t,e){return e&&(t=t||{},t.break={type:Nme[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function Ome(){iQ({createScaleBreakContext:Ame,pruneTicksByBreak:Pme,addBreaksToTicks:kme,parseAxisBreakOption:fC,identifyAxisBreak:nL,serializeAxisBreakIdentifier:dC,retrieveAxisBreakPairs:Dme,getTicksLogTransformBreak:Ime,logarithmicParseBreaksFromOption:Eme,makeAxisLabelFormatterParamBreak:Rme})}var fz=Fe();function zme(t,e){var r=Ps(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function Bme(t){R(t,function(e){return e.shouldRemove=!0})}function jme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Vme(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(E){return E.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),d=s.getModel("itemStyle"),p=d.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,_=p.fill,S=new _e({ignoreModelZ:!0}),w=a.isHorizontal(),C=fz(e).visualList||(fz(e).visualList=[]);Bme(C);for(var M=function(E){var D=o[E][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(D.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(D.vmax,!0)),I[1]=j;ve&&(ne=j);var Ge=[],xe=[];Ge[F]=I,xe[F]=z,!ue&&!ve&&(Ge[F]+=K?-l:l,xe[F]-=K?l:-l),Ge[U]=ne,xe[U]=ne,H.push(Ge),X.push(xe);var ge=void 0;if(ie_[1]&&_.reverse(),{coordPair:_,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,h=0;h=0?l[0].width:l[1].width),f=(h+c.x)/2-u.x,d=Math.min(f,f-c.x),p=Math.max(f,f-c.x),g=p<0?p:d>0?d:0;s=(f-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),vT(r[0],m),vT(r[1],y)}function Hme(t,e){var r={breaks:[]};return R(e.breaks,function(n){if(n){var i=Ps(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===p_?!0:a===YG?!1:a===XG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function Wme(){jie({adjustBreakLabelPair:Gme,buildAxisBreakLine:Fme,rectCoordBuildBreakAxis:Vme,updateModelAxisBreak:Hme})}function Ume(t){Uie(t),Ome(),Wme()}function Zme(){fae($me)}function $me(t,e){R(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Yme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function Yme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof ah?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Eh(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function hye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function fye(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function dye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=Z.useRef(null),[a,o]=Z.useState("connected"),s=Z.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=Z.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>pz.includes(y.role))),m},[t,a,s]),u=Z.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=Z.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),h=Z.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),f=Z.useMemo(()=>{const m=l.map(_=>{const S=hye(_.latitude),w=vz[S%vz.length],C=pz.includes(_.role),M=_.node_num===r,A=h.has(_.node_num),k=r===null||M||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:fye(_.role),itemStyle:{color:C?w:"#111827",borderColor:w,borderWidth:C?0:2,opacity:k?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:k?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const S=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:cye(_.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,h]),d=Z.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:f.nodes,links:f.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[f]),p=Z.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=Z.useMemo(()=>({click:p}),[p]);return Z.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),b.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[b.jsx(uye,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),b.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[b.jsx(_2,{size:14,className:"text-slate-500"}),b.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>b.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),b.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),b.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[b.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),b.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),b.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),b.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[b.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),b.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),b.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function k8(t,e){const r=Z.useRef(e);Z.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function vye(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const pye=1;function gye(t){return Object.freeze({__version:pye,map:t})}function D8(t,e){return Object.freeze({...t,...e})}const I8=Z.createContext(null),E8=I8.Provider;function A_(){const t=Z.useContext(I8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function mye(t){function e(r,n){const{instance:i,context:a}=t(r).current;return Z.useImperativeHandle(n,()=>i),r.children==null?null:Vc.createElement(E8,{value:a},r.children)}return Z.forwardRef(e)}function yye(t){function e(r,n){const[i,a]=Z.useState(!1),{instance:o}=t(r,a).current;Z.useImperativeHandle(n,()=>o),Z.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?OB.createPortal(r.children,s):null}return Z.forwardRef(e)}function _ye(t){function e(r,n){const{instance:i}=t(r).current;return Z.useImperativeHandle(n,()=>i),null}return Z.forwardRef(e)}function sL(t,e){const r=Z.useRef();Z.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function L_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function xye(t,e){return function(n,i){const a=A_(),o=t(L_(n,a),a);return k8(a.map,n.attribution),sL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var gC={exports:{}};/* @preserve +`:"
",y=h.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,f)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=Le(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=r.positionDefault,g=Nf([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(c,h),_=new M1;y.marker=_.makeTooltipMarker("item",ru(y.color),d);var b=wI(u.formatTooltip(c,!1,h)),w=g.get("order"),C=g.get("valueFormatter"),M=b.frag,A=M?PI(C?J({valueFormatter:C},M):M,_,d,w,a.get("useUTC"),g.get("textStyle")):b.text,k="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,k,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=this._renderMode==="html",o=Le(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(se(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=ye(l),l.content=Ur(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=r.positionDefault,p=Nf(h,this._tooltipModel,d?{position:d}:null),g=p.get("content"),m=Math.random()+"",y=new M1;this._showOrMove(p,function(){var _=ye(p.get("formatterParams")||{});this._showTooltipContent(p,g,_,m,r.offsetX,r.offsetY,r.position,n,y)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,c){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,p=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor"),r.get("defaultBorderColor",!0)),g=p.color;if(f)if(se(f)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=f,_&&(d=Xv(y.axisValue,d,m)),d=gM(d,i,!0)}else if(me(f)){var b=le(function(w,C){w===this._ticket&&(h.setContent(C,c,r,g,l),this._updatePosition(r,l,o,s,h,i,u))},this);this._ticket=a,d=f(i,a,b)}else d=f;h.setContent(d,c,r,g,l),h.show(r,g),this._updatePosition(r,l,o,s,h,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a,o){if(i==="axis"||ee(n))return{color:a||o};if(!ee(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),me(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(Se(n)){var g=n;g.width=h[0],g.height=h[1];var m=St(g,{width:u,height:c});i=m.x,a=m.y,f=null,d=null}else if(se(n)&&l){var y=Rve(n,p,h,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=Nve(i,a,o,u,c,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=l5(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=l5(d)?h[1]/2:d==="bottom"?h[1]:0),t8(r)){var y=Eve(i,a,o,u,c);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],c=r[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&R(u,function(f,d){var p=h[d]||{},g=f.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&g.length===m.length,o&&R(g,function(y,_){var b=m[_];o=o&&y.seriesIndex===b.seriesIndex&&y.dataIndex===b.dataIndex}),a&&R(f.seriesDataIndices,function(y){var _=y.seriesIndex,b=n[_],w=a[_];b&&w&&w.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){Ze.node||!n.getDom()||(cv(this,"_updatePosition"),this._tooltipContent.dispose(),$T("itemTooltip",n))},e.type="tooltip",e}(gt);function Nf(t,e,r){var n=e.ecModel,i;r?(i=new We(r,n,n),i=new We(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof We&&(o=o.get("tooltip",!0)),se(o)&&(o={formatter:o}),o&&(i=new We(o,i,n)))}return i}function s5(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function Nve(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function Eve(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Rve(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function l5(t){return t==="center"||t==="middle"}function Ove(t,e,r){var n=B2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=_h(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Le(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function zve(t){Oe(ip),t.registerComponentModel(_ve),t.registerComponentView(Ive),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Bve=["rect","polygon","keep","clear"];function jve(t,e){var r=pt(t?t.brush:[]);if(r.length){var n=[];R(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;ee(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),Vve(s),e&&!s.length&&s.push.apply(s,Bve)}}function Vve(t){var e={};R(t,function(r){e[r]=1}),t.length=0,R(e,function(r,n){t.push(n)})}var u5=R;function c5(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function rC(t,e,r){var n={};return u5(e,function(a){var o=n[a]=i();u5(t[a],function(s,l){if(dr.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new dr(u),l==="opacity"&&(u=ye(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new dr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function a8(t,e,r){var n;R(r,function(i){e.hasOwnProperty(i)&&c5(e[i])&&(n=!0)}),n&&R(r,function(i){e.hasOwnProperty(i)&&c5(e[i])?t[i]=ye(e[i]):delete t[i]})}function Fve(t,e,r,n,i,a){var o={};R(t,function(h){var f=dr.prepareVisualTypes(e[h]);o[h]=f});var s;function l(h){return MM(r,s,h)}function u(h,f){rF(r,s,h,f)}r.each(c);function c(h,f){s=h;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,h),g=e[p],m=o[p],y=0,_=m.length;y<_;y++){var b=m[y];g[b]&&g[b].applyVisual(h,l,u)}}}function Gve(t,e,r,n){var i={};return R(t,function(a){var o=dr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(C){return MM(s,h,C)}function c(C,M){rF(s,h,C,M)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=n!=null?f.get(l,h):h,g=r(p),m=e[g],y=i[g],_=0,b=y.length;_e[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&p5(e)}};function p5(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Xve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new yA(n.getZr())).on("brush",le(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){o8(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ye(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ye(i),$from:n})},e.type="brush",e}(gt),qve=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&a8(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:this.option.defaultOutOfBrushColor},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=re(r,function(n){return g5(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=g5(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:q.color.backgroundTint,borderColor:q.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:q.color.disabled},e}(Ve);function g5(t,e){return Ee({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new We(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Kve=["rect","polygon","lineX","lineY","keep","clear"],Qve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,R(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return R(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:Kve.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(ei);function Jve(t){t.registerComponentView(Xve),t.registerComponentModel(qve),t.registerPreprocessor(jve),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Wve),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Rt),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Rt),sc("brush",Qve)}var epe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:q.size.m,backgroundColor:q.color.transparent,borderColor:q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:q.color.primary},subtextStyle:{fontSize:12,color:q.color.quaternary}},e}(Ve),tpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=pe(r.get("textBaseline"),r.get("textVerticalAlign")),c=new Xe({style:vt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=r.get("subtext"),d=new Xe({style:vt(s,{text:f,fill:s.getTextColor(),y:h.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);c.silent=!p&&!m,d.silent=!g&&!m,p&&c.on("click",function(){Dy(p,"_"+r.get("target"))}),g&&d.on("click",function(){Dy(g,"_"+r.get("subtarget"))}),Le(c).eventData=Le(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),f&&a.add(d);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var b=sr(r,i),w=St(_,b.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?w.x+=w.width:l==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),a.x=w.x,a.y=w.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),d.setStyle(C),y=a.getBoundingRect();var M=w.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var k=new Be({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(k)}},e.type="title",e}(gt);function rpe(t){t.registerComponentModel(epe),t.registerComponentView(tpe)}var m5=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],R(n,function(u,c){var h=rr(yh(u),""),f;Se(u)?(f=ye(u),f.value=c):f=c,o.push(f),a.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new $r([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:q.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:q.color.secondary},data:[]},e}(Ve),s8=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=Ds(m5.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:q.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:q.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:q.color.tertiary},itemStyle:{color:q.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:q.color.accent50,borderColor:q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:q.color.accent60},itemStyle:{color:q.color.accent60,borderColor:q.color.accent60},controlStyle:{color:q.color.accent70,borderColor:q.color.accent70}},progress:{lineStyle:{color:q.color.accent30},itemStyle:{color:q.color.accent40}},data:[]}),e}(m5);Bt(s8,u_.prototype);var npe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(gt),ipe=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(pi),$b=Math.PI,y5=Fe(),ape=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Kt("nameValue",{noName:!0,value:c})},R(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=spe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:$b/2},h=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*$b/180;var _,b,w,C=f.get("position",!0),M=d&&f.get("showPlayBtn",!0),A=d&&f.get("showPrevBtn",!0),k=d&&f.get("showNextBtn",!0),N=0,D=h;C==="left"||C==="bottom"?(M&&(_=[0,0],N+=m),A&&(b=[N,0],N+=m),k&&(w=[D-p,0],D-=m)):(M&&(_=[D-p,0],D-=m),A&&(b=[0,0],N+=m),k&&(w=[D-p,0],D-=m));var I=[N,D];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:c[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:_,prevBtnPosition:b,nextBtnPosition:w,axisExtent:I,controlSize:p,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=fr(),l=o.x,u=o.y+o.height;Oi(s,s,[-l,-u]),xo(s,s,-$b/2),Oi(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),h=_(i.getBoundingRect()),f=_(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=r.labelPosOpt;if(g==null||se(g)){var m=g==="+"?0:1;b(d,h,c,1,m),b(p,f,c,1,1-m)}else{var m=g>=0?0:1;b(d,h,c,1,m),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(w){w.originX=c[0][0]-w.x,w.originY=c[1][0]-w.y}function _(w){return[[w.x,w.x+w.width],[w.y,w.y+w.height]]}function b(w,C,M,A,k){w[A]+=M[A][k]-C[A][k]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=ope(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new ipe("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new _e;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Wt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:J({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Wt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:be({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],R(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=_5(h,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),cs(m);var y=Le(m);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],R(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),m=i.dataToCoord(c.tickValue),y=new Xe({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:le(o._changeTimeline,o,h),silent:!1,style:vt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=vt(p),y.ensureState("progress").style=vt(g),n.add(y),cs(y),y5(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);f(r.nextBtnPosition,"next",le(this._changeTimeline,this,h?"-":"+")),f(r.prevBtnPosition,"prev",le(this._changeTimeline,this,h?"+":"-")),f(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function f(d,p,g,m){if(d){var y=zi(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],b=lpe(a,p+"Icon",_,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});b.ensureState("emphasis").style=u,n.add(b),cs(b)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=le(u._handlePointerDrag,u),h.ondragend=le(u._handlePointerDragend,u),x5(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){x5(h,u._progressLine,s,i,a)}};this._currentPointer=_5(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=kn(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var Jg={min:Ie(Qg,"min"),max:Ie(Qg,"max"),average:Ie(Qg,"average"),median:Ie(Qg,"median")};function Mv(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!vpe(e)&&!ee(e.coord)&&ee(i)){var a=l8(e,r,n,t);if(e=ye(e),e.type&&Jg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ne(i,a.baseAxis.dim),s=Ne(i,a.valueAxis.dim),l=Jg[e.type](r,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!ee(i)){e.coord=[];var u=t.getBaseAxis();if(u&&e.type&&Jg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=f0(r,r.mapDimension(c.dim),e.type))}}else for(var h=e.coord,f=0;f<2;f++)Jg[h[f]]&&(h[f]=f0(r,r.mapDimension(i[f]),h[f]));return e}}function l8(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(ppe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function ppe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function Av(t,e){return t&&t.containData&&e.coord&&!iC(e)?t.containData(e.coord):!0}function gpe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!iC(e)&&!iC(r)?t.containZone(e.coord,r.coord):!0}function u8(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return ds(o,e[a])}:function(r,n,i,a){return ds(r.value,e[a])}}function f0(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var Yb=Fe(),KA=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=de()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){Yb(s).keep=!1}),n.eachSeries(function(s){var l=Ma.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!Yb(s).keep&&a.group.remove(s.group)}),mpe(n,o,this.type)},e.prototype.markKeep=function(r){Yb(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Ma.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?Tj(l):Z2(l))})}})},e.type="marker",e}(gt);function mpe(t,e,r){t.eachSeries(function(n){var i=Ma.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=tu(i),s=o.z,l=o.zlevel;a_(a.group,s,l)}})}function S5(t,e,r){var n=e.coordinateSystem,i=r.getWidth(),a=r.getHeight(),o=n&&n.getArea&&n.getArea();t.each(function(s){var l=t.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:i,h=u?o?o.height:0:a,f=u&&o?o.x:0,d=u&&o?o.y:0,p,g=oe(l.get("x"),c)+f,m=oe(l.get("y"),h)+d;if(!isNaN(g)&&!isNaN(m))p=[g,m];else if(e.getMarkerPosition)p=e.getMarkerPosition(t.getValues(t.dimensions,s));else if(n){var y=t.get(n.dimensions[0],s),_=t.get(n.dimensions[1],s);p=n.dataToPoint([y,_])}isNaN(g)||(p[0]=g),isNaN(m)||(p[1]=m),t.setItemLayout(s,p)})}var ype=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markPoint");o&&(S5(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new ep),h=_pe(o,r,n);n.setData(h),S5(n.getData(),r,a),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),_=d.getShallow("symbolKeepAspect");if(me(p)||me(g)||me(m)||me(y)){var b=n.getRawValue(f),w=n.getDataParams(f);me(p)&&(p=p(b,w)),me(g)&&(g=g(b,w)),me(m)&&(m=m(b,w)),me(y)&&(y=y(b,w))}var C=d.getModel("itemStyle").getItemStyle(),M=d.get("z2"),A=Kv(l,"color");C.fill||(C.fill=A),h.setItemVisual(f,{z2:pe(M,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:C})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){Le(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(KA);function _pe(t,e,r){var n;t?n=re(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return J(J({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new $r(n,r),a=re(r.get("data"),Ie(Mv,e));t&&(a=et(a,Ie(Av,t)));var o=u8(!!t,n);return i.initData(a,null,o),i}function xpe(t){t.registerComponentModel(dpe),t.registerComponentView(ype),t.registerPreprocessor(function(e){qA(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var bpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Ma),em=Fe(),Spe=function(t,e,r,n){var i=t.getData(),a;if(ee(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Sr(n.yAxis,n.xAxis);else{var u=l8(n,i,e,t);s=u.valueAxis;var c=jM(i,u.valueDataDim);l=f0(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=ye(n),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=p.coord[h]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[Mv(t,a[0]),Mv(t,a[1]),J({},a[2])];return m[2].type=m[2].type||null,Ee(m[2],m[0]),Ee(m[2],m[1]),m};function d0(t){return!isNaN(t)&&!isFinite(t)}function w5(t,e,r,n){var i=1-t,a=n.dimensions[t];return d0(e[i])&&d0(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function wpe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(w5(1,r,n,t)||w5(0,r,n,t)))return!0}return Av(t,e[0])&&Av(t,e[1])}function Xb(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get("x"),i.getWidth()),u=oe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,h=t.get(c[0],e),f=t.get(c[1],e);s=a.dataToPoint([h,f])}if(bs(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;d0(t.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):d0(t.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var Tpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=em(o).from,u=em(o).to;l.each(function(c){Xb(l,c,!0,a,i),Xb(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new gA);this.group.add(c.group);var h=Cpe(o,r,n),f=h.from,d=h.to,p=h.line;em(n).from=f,em(n).to=d,n.setData(p);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),_=n.get("symbolOffset");ee(g)||(g=[g,g]),ee(m)||(m=[m,m]),ee(y)||(y=[y,y]),ee(_)||(_=[_,_]),h.from.each(function(w){b(f,w,!0),b(d,w,!1)}),p.each(function(w){var C=p.getItemModel(w),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(w,[f.getItemLayout(w),d.getItemLayout(w)]);var A=C.get("z2");M.stroke==null&&(M.stroke=f.getItemVisual(w,"style").fill),p.setItemVisual(w,{z2:pe(A,0),fromSymbolKeepAspect:f.getItemVisual(w,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(w,"symbolOffset"),fromSymbolRotate:f.getItemVisual(w,"symbolRotate"),fromSymbolSize:f.getItemVisual(w,"symbolSize"),fromSymbol:f.getItemVisual(w,"symbol"),toSymbolKeepAspect:d.getItemVisual(w,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(w,"symbolOffset"),toSymbolRotate:d.getItemVisual(w,"symbolRotate"),toSymbolSize:d.getItemVisual(w,"symbolSize"),toSymbol:d.getItemVisual(w,"symbol"),style:M})}),c.updateData(p),h.line.eachItemGraphicEl(function(w){Le(w).dataModel=n,w.traverse(function(C){Le(C).dataModel=n})});function b(w,C,M){var A=w.getItemModel(C);Xb(w,C,M,r,a);var k=A.getModel("itemStyle").getItemStyle();k.fill==null&&(k.fill=Kv(l,"color")),w.setItemVisual(C,{symbolKeepAspect:A.get("symbolKeepAspect"),symbolOffset:pe(A.get("symbolOffset",!0),_[M?0:1]),symbolRotate:pe(A.get("symbolRotate",!0),y[M?0:1]),symbolSize:pe(A.get("symbolSize"),m[M?0:1]),symbol:pe(A.get("symbol",!0),g[M?0:1]),style:k})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(KA);function Cpe(t,e,r){var n;t?n=re(t&&t.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J(J({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new $r(n,r),a=new $r(n,r),o=new $r([],r),s=re(r.get("data"),Ie(Spe,e,t,r));t&&(s=et(s,Ie(wpe,t)));var l=u8(!!t,n);return i.initData(re(s,function(u){return u[0]}),null,l),a.initData(re(s,function(u){return u[1]}),null,l),o.initData(re(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Mpe(t){t.registerComponentModel(bpe),t.registerComponentView(Tpe),t.registerPreprocessor(function(e){qA(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Ape=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Ma),tm=Fe(),Lpe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=Mv(t,i),s=Mv(t,a),l=o.coord,u=s.coord;l[0]=Sr(l[0],-1/0),l[1]=Sr(l[1],-1/0),u[0]=Sr(u[0],1/0),u[1]=Sr(u[1],1/0);var c=G0([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function v0(t){return!isNaN(t)&&!isFinite(t)}function T5(t,e,r,n){var i=1-t;return v0(e[i])&&v0(r[i])}function Ppe(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return bs(t,"cartesian2d")?r&&n&&(T5(1,r,n)||T5(0,r,n))?!0:gpe(t,i,a):Av(t,i)||Av(t,a)}function C5(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=oe(o.get(r[0]),i.getWidth()),u=oe(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=t.getValues(["x0","y0"],e),h=t.getValues(["x1","y1"],e),f=a.clampData(c),d=a.clampData(h),p=[];r[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],r[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=n.getMarkerPosition(p,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(bs(a,"cartesian2d")){var _=a.getAxis("x"),b=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);v0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):v0(m)&&(s[1]=b.toGlobalCoord(b.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var M5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],kpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Ma.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(M5,function(h){return C5(s,l,h,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var h=Dpe(o,r,n);n.setData(h),h.each(function(f){var d=re(M5,function(D){return C5(h,f,D,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],b=[g.parse(h.get("y0",f)),g.parse(h.get("y1",f))];kn(_),kn(b);var w=!(m[0]>_[1]||m[1]<_[0]||y[0]>b[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:q.size.m,align:"auto",backgroundColor:q.color.transparent,borderColor:q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:q.color.disabled,inactiveBorderColor:q.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:q.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:q.color.tertiary,borderWidth:1,borderColor:q.color.border},emphasis:{selectorLabel:{show:!0,color:q.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Ve),Ju=Ie,oC=R,rm=_e,c8=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new rm),this.group.add(this._selectorGroup=new rm),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var c=sr(r,i).refContainer,h=r.getBoxLayoutParams(),f=r.get("padding"),d=St(h,c,f),p=this.layoutInner(r,o,d,a,l,u),g=St(be({width:p.width,height:p.height},h),c,f);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=QH(p,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),c=de(),h=n.get("selectedMode"),f=n.get("triggerEvent"),d=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),oC(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` +`)){var _=new rm;_.newline=!0,u.add(_);return}var b=i.getSeriesByName(y)[0];if(!c.get(y))if(b){var w=b.getData(),C=w.getVisual("legendLineStyle")||{},M=w.getVisual("legendIcon"),A=w.getVisual("style"),k=this._createItem(b,y,g,p,n,r,C,A,M,h,a);k.on("click",Ju(A5,y,null,a,d)).on("mouseover",Ju(sC,b.name,null,a,d)).on("mouseout",Ju(lC,b.name,null,a,d)),i.ssr&&k.eachChild(function(N){var D=Le(N);D.seriesIndex=b.seriesIndex,D.dataIndex=g,D.ssrType="legend"}),f&&k.eachChild(function(N){m.packEventData(N,n,b,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(N){var D=this;if(!c.get(y)&&N.legendVisualProvider){var I=N.legendVisualProvider;if(!I.containName(y))return;var z=I.indexOfName(y),O=I.getItemVisual(z,"style"),V=I.getItemVisual(z,"legendIcon"),G=Zr(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ai(G,"rgba")}));var F=this._createItem(N,y,g,p,n,r,{},O,V,h,a);F.on("click",Ju(A5,null,y,a,d)).on("mouseover",Ju(sC,null,y,a,d)).on("mouseout",Ju(lC,null,y,a,d)),i.ssr&&F.eachChild(function(Z){var j=Le(Z);j.seriesIndex=N.seriesIndex,j.dataIndex=g,j.ssrType="legend"}),f&&F.eachChild(function(Z){D.packEventData(Z,n,N,g,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype.packEventData=function(r,n,i,a,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:a,value:o,seriesIndex:i.seriesIndex};Le(r).eventData=s},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();oC(r,function(u){var c=u.type,h=new Xe({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);vr(h,{normal:f,emphasis:d},{defaultText:u.title}),cs(h)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,h,f){var d=r.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),_=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var w=Epe(c,a,l,u,d,m,f),C=new rm,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!b||b==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:_}));else{var A=b==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(Rpe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:w.itemStyle,symbolKeepAspect:_}))}var k=s==="left"?p+5:-5,N=s,D=o.get("formatter"),I=n;se(D)&&D?I=D.replace("{name}",n??""):me(D)&&(I=D(n));var z=m?M.getTextColor():a.get("inactiveColor");C.add(new Xe({style:vt(M,{text:I,x:k,y:g/2,fill:z,align:N,verticalAlign:"middle"},{inheritColor:z})}));var O=new Be({shape:C.getBoundingRect(),style:{fill:"transparent"}}),V=a.getModel("tooltip");return V.get("show")&&So({el:O,componentModel:o,itemName:n,itemTooltipOption:V.option}),C.add(O),C.eachChild(function(G){G.silent=!0}),O.silent=!h,this.getContentGroup().add(C),cs(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();jl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){jl("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",_=g===0?"y":"x";s==="end"?d[g]+=c[m]+p:h[g]+=f[m]+p,d[1-g]+=c[y]/2-f[y]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var b={x:0,y:0};return b[m]=c[m]+p+f[m],b[y]=Math.max(c[y],f[y]),b[_]=Math.min(0,f[_]+d[1-g]),b}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(gt);function Epe(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),oC(m,function(_,b){m[b]==="inherit"&&(m[b]=y[b])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=t.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:ih(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Rpe(t){var e=t.icon||"roundRect",r=Ut(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill=q.color.neutral00,r.style.lineWidth=2),r}function A5(t,e,r,n){lC(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),sC(t,e,r,n)}function h8(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-d.x,-d.y];n||(m[a]=c[u]);var y=[0,0],_=[-p.x,-p.y],b=pe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var w=r.get("pageButtonPosition",!0);w==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+b}_[1-a]+=d[s]/2-p[s]/2,c.setPosition(m),h.setPosition(y),f.setPosition(_);var C={x:0,y:0};if(C[o]=g?i[o]:d[o],C[s]=Math.max(d[s],p[s]),C[l]=Math.min(0,p[l]+_[1-a]),h.__rectSize=i[o],g){var M={x:0,y:0};M[o]=Math.max(i[o]-p[o]-b,0),M[s]=C[s],h.setClipPath(new Be({shape:M})),h.__rectSize=M[o]}else f.eachChild(function(k){k.attr({invisible:!0,silent:!0})});var A=this._getPageInfo(r);return A.pageIndex!=null&&Qe(c,{x:A.contentPosition[0],y:A.contentPosition[1]},g?r:null),this._updatePageInfoView(r,A),C},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=n[h]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",f?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",se(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=qb[o],l=Kb[o],u=this._findTargetItemIndex(n),c=i.children(),h=c[u],f=c.length,d=f?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=w(h);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,b=null;m<=f;++m)b=w(c[m]),(!b&&_.e>y.s+a||b&&!C(b,y.s))&&(_.i>y.i?y=_:y=b,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),_=b;for(var m=u-1,y=g,_=g,b=null;m>=-1;--m)b=w(c[m]),(!b||!C(_,b.s))&&y.i<_.i&&(_=y,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=y.i),++p.pageCount,++p.pageIndex),y=b;return p;function w(M){if(M){var A=M.getBoundingRect(),k=A[l]+M[l];return{s:k,e:k+A[s],i:M.__legendDataIndex}}}function C(M,A){return M.e>=A&&M.s<=A+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(c8);function Vpe(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function Fpe(t){Oe(f8),t.registerComponentModel(Bpe),t.registerComponentView(jpe),Vpe(t)}function Gpe(t){Oe(f8),Oe(Fpe)}var Hpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=Ds(Cv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Cv),QA=Fe();function Wpe(t,e,r){QA(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function Upe(t,e){for(var r=QA(t).coordSysRecordMap,n=r.keys(),i=0;ia[i+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:r,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function qpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=QA(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=de());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=XH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Zpe(r,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=de());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){d8(i,a);return}var c=Xpe(l,a,r);o.enable(c.controlType,c.opt),kh(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Kpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),Wpe(i,r,{pan:le(Qb.pan,this),zoom:le(Qb.zoom,this),scrollMove:le(Qb.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Upe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(WA),Qb={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=Jb[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ss(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:D5(function(t,e,r,n,i,a){var o=Jb[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:D5(function(t,e,r,n,i,a){var o=Jb[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function D5(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(Ss(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Jb={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function v8(t){UA(t),t.registerComponentModel(Hpe),t.registerComponentView(Kpe),qpe(t)}var Qpe=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Ds(Cv.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:q.color.accent10,borderRadius:0,backgroundColor:q.color.transparent,dataBackground:{lineStyle:{color:q.color.accent30,width:.5},areaStyle:{color:q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:q.color.accent40,width:.5},areaStyle:{color:q.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:q.color.neutral00,borderColor:q.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:q.color.tertiary},brushSelect:!0,brushStyle:{color:q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(Cv),Of=Be,Jpe=1,eS=30,ege=7,zf="horizontal",I5="vertical",tge=5,rge=["line","bar","candlestick","scatter"],nge={easing:"cubicOut",duration:100,delay:0},ige=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=le(this._onBrush,this),this._onBrushEnd=le(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),kh(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){cv(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?ege:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===zf?{right:o.width-s.x-s.width,top:o.height-eS-l-a,width:s.width,height:eS}:{right:l,top:s.y,width:eS,height:s.height},c=du(r.option);R(["right","top","width","height"],function(f){c[f]==="ph"&&(c[f]=u[f])});var h=St(c,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===I5&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===zf&&!o?{scaleY:l?1:-1,scaleX:1}:i===zf&&o?{scaleY:l?1:-1,scaleX:-1}:i===I5&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new Of({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Of({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:le(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(r.thisDim),f=o.getDataExtent(l),d=(f[1]-f[0])*.3;f=[f[0]-d,f[1]+d];var p=[0,n[1]],g=[0,n[0]],m=[[n[0],0],[0,0]],y=[],_=g[1]/Math.max(1,o.count()-1),b=n[0]/(h[1]-h[0]),w=r.thisAxis.type==="time",C=-_,M=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,V){if(M>0&&V%M){w||(C+=_);return}C=w?(+z-h[0])*b:C+_;var G=O==null||isNaN(O)||O==="",F=G?0:nt(O,f,p,!0);G&&!A&&V?(m.push([m[m.length-1][0],0]),y.push([y[y.length-1][0],0])):!G&&A&&(m.push([C,0]),y.push([C,0])),G||(m.push([C,F]),y.push([C,F])),A=G}),u=this._shadowPolygonPts=m,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var k=this.dataZoomModel;function N(z){var O=k.getModel(z?"selectedDataBackground":"dataBackground"),V=new _e,G=new Or({shape:{points:u},segmentIgnoreThreshold:1,style:O.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),F=new Tr({shape:{points:c},segmentIgnoreThreshold:1,style:O.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return V.add(G),V.add(F),V}for(var D=0;D<3;D++){var I=N(D===1);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();R(l,function(u){if(!i&&!(n!==!0&&Ne(rge,u.get("type"))<0)){var c=a.getComponent(Ko(o),s).axis,h=age(o),f,d=u.coordinateSystem;h!=null&&d.getOtherAxis&&(f=d.getOtherAxis(c).inverse),h=u.getData().mapDimension(h);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:h,otherAxisInverse:f}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=n.filler=new Of({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new Of({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Jpe,fill:q.color.transparent}})),R([0,1],function(b){var w=l.get("handleIcon");!Ey[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w);var C=Ut(w,-1,0,2,2,null,!0);C.attr({cursor:oge(this._orient),draggable:!0,drift:le(this._onDragMove,this,b),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1),z2:5});var M=C.getBoundingRect(),A=l.get("handleSize");this._handleHeight=oe(A,this._size[1]),this._handleWidth=M.width/M.height*this._handleHeight,C.setStyle(l.getModel("handleStyle").getItemStyle()),C.style.strokeNoScale=!0,C.rectHover=!0,C.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),cs(C);var k=l.get("handleColor");k!=null&&(C.style.fill=k),o.add(i[b]=C);var N=l.getModel("textStyle"),D=l.get("handleLabel")||{},I=D.show||!1;r.add(a[b]=new Xe({silent:!0,invisible:!I,style:vt(N,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:N.getTextColor(),font:N.getFont()}),z2:10}))},this);var d=f;if(h){var p=oe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Be({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),m=p*.8,y=n.moveHandleIcon=Ut(l.get("moveHandleIcon"),-m/2,-m/2,m,m,q.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var _=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new Be({invisible:!0,shape:{y:s[1]-_,height:p+_}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:"default",drift:le(this._onDragMove,this,"all"),ondragstart:le(this._showDataInfo,this,!0),ondragend:le(this._onDragEnd,this),onmouseover:le(this._showDataInfo,this,!0),onmouseout:le(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[nt(r[0],[0,100],n,!0),nt(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Ss(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?nt(s.minSpan,l,o,!0):null,s.maxSpan!=null?nt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=kn([nt(a[0],o,l,!0),nt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=kn(i.slice()),o=this._size;R([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new Te(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[i.x,i.x+i.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Ss(0,l,o,0,u.minSpan!=null?nt(u.minSpan,s,o,!0):null,u.maxSpan!=null?nt(u.maxSpan,s,o,!0):null),this._range=kn([nt(l[0],o,s,!0),nt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(ho(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Of({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?nge:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=XH(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(WA);function age(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function oge(t){return t==="vertical"?"ns-resize":"ew-resize"}function p8(t){t.registerComponentModel(Qpe),t.registerComponentView(ige),UA(t)}function sge(t){Oe(v8),Oe(p8)}var g8={get:function(t,e,r){var n=ye((lge[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},lge={color:{active:["#006edd","#e0ffff"],inactive:[q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},N5=dr.mapVisual,uge=dr.eachVisual,cge=ee,E5=R,hge=kn,fge=nt,p0=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&a8(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=le(r,this),this.controllerVisuals=rC(this.option.controller,n,r),this.targetVisuals=rC(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesId,n=this.option.seriesIndex;n==null&&r==null&&(n="all");var i=_h(this.ecModel,"series",{index:n,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return re(i,function(a){return a.componentIndex})},e.prototype.eachTargetSeries=function(r,n){R(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],ee(r)&&(r=r.slice(),u=!0);var c=n?r:u?[h(r[0]),h(r[1])]:h(r);if(se(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(me(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+c[1]:r[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=hge([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ee(a,i),Ee(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(h){cge(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:r.get("gradientColor")}}function u(h,f,d){var p=h[f],g=h[d];p&&!g&&(g=h[d]={},E5(p,function(m,y){if(dr.isValidType(y)){var _=g8.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(h){var f=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,d=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";E5(this.stateList,function(y){var _=this.itemSize,b=h[y];b||(b=h[y]={color:s?p:[p]}),b.symbol==null&&(b.symbol=f&&ye(f)||(s?m:[m])),b.symbolSize==null&&(b.symbolSize=d&&ye(d)||(s?_[0]:[_[0],_[0]])),b.symbol=N5(b.symbol,function(M){return M==="none"?m:M});var w=b.symbolSize;if(w!=null){var C=-1/0;uge(w,function(M){M>C&&(C=M)}),b.symbolSize=N5(w,function(M){return fge(M,[0,C],[0,_[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:q.color.transparent,borderColor:q.color.borderTint,contentColor:q.color.theme[0],inactiveColor:q.color.disabled,borderWidth:0,padding:q.size.m,textGap:10,precision:0,textStyle:{color:q.color.secondary}},e}(Ve),R5=[20,140],dge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=R5[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=R5[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):ee(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=kn((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=O5(this,"outOfRange",this.getExtent()),i=O5(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:r(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new _e(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);vge([0,1],function(h){var f=o[h];f.setStyle("fill",n.handlesColor[h]),f.y=r[h];var d=ra(r[h],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var g=Ni(i.handleLabelPoints[h],hs(f,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[h].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",f),p=this.getControllerVisual(r,"symbolSize"),g=ra(r,s,u,!0),m=l[0]-p/2,y={x:h.x,y:h.y};h.y=g,h.x=m;var _=Ni(c.indicatorLabelPoint,hs(h,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var w=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?w:"middle",align:M?"center":w});var A={x:m,y:g,style:{fill:d}},k={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var N={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(A,N),b.animateTo(k,N)}else h.attr(A),b.attr(k);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var I=0;Io[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||V5(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=KX(f,d);this._dispatchHighDown("downplay",Rm(p[0],i)),this._dispatchHighDown("highlight",Rm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Dl(r.target,function(l){var u=Le(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function Sge(t,e,r,n){for(var i=e.targetVisuals[n],a=dr.prepareVisualTypes(i),o={color:Kv(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(_ge,xge),R(bge,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(wge))}function x8(t){t.registerComponentModel(dge),t.registerComponentView(mge),_8(t)}var Tge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Cge[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ye(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=re(this._pieceList,function(l){return l=ye(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=dr.listVisualTypes(),a=this.isCategory();R(r.pieces,function(s){R(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),R(n,function(s,l){var u=!1;R(this.stateList,function(c){u=u||o(r,c,l)||o(r.target,c,l)},this),!u&&R(this.stateList,function(c){(r[c]||(r[c]={}))[l]=g8.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,R(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;R(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ye(r)},e.prototype.getValueState=function(r){var n=dr.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=dr.findPieceIndex(l,i);c===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,h){var f=a.getRepresentValue({interval:c});h||(h=a.getValueState(f));var d=r(f,h);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return R(s,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Ds(p0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(p0),Cge={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function W5(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var Mge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,c=Sr(n.get("showLabel",!0),!u),h=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(f){var d=f.piece,p=new _e;p.onclick=le(this._onItemClick,this,d),this._enableHoverLink(p,f.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],h),c){var m=this.visualMapModel.getValueState(g),y=a.get("align")||o;p.add(new Xe({style:vt(a,{x:y==="right"?-i:s[0]+i,y:s[1]/2,text:d.text,verticalAlign:a.get("verticalAlign")||"middle",align:y,opacity:pe(a.get("opacity"),m==="outOfRange"?.5:1)}),silent:h}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),jl(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Rm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return y8(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Xe({style:vt(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=re(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i,a){var o=Ut(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,r.add(o)},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ye(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,R(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(m8);function b8(t){t.registerComponentModel(Tge),t.registerComponentView(Mge),_8(t)}function Age(t){Oe(x8),Oe(b8)}var Lge=function(){function t(e){this._thumbnailModel=e}return t.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},t.prototype.renderContent=function(e){var r=e.api.getViewOfComponentModel(this._thumbnailModel);r&&(e.group.silent=!0,r.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Uj(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},t.prototype.updateWindow=function(e,r){var n=r.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},t}(),Pge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventAutoZ=!0,r}return e.prototype.optionUpdated=function(r,n){this._updateBridge()},e.prototype._updateBridge=function(){var r=this._birdge=this._birdge||new Lge(this);if(this._target=null,this.ecModel.eachSeries(function(i){pR(i,null)}),this.shouldShow()){var n=this.getTarget();pR(n.baseMapProvider,r)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var r=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return r?r.subType!=="graph"&&(r=null):r=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:r},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:q.color.neutral30,borderColor:q.color.neutral40,opacity:.3},z:10},e}(Ve),kge=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this._api=i,this._model=r,this._coordSys||(this._coordSys=new yu),!this._isEnabled()){this._clear();return}this._renderVersion=i.getMainProcessVersion();var a=this.group;a.removeAll();var o=r.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||q.color.neutral00);var l=sr(r,i).refContainer,u=St(hV(r,!0),l),c=s.lineWidth||0,h=this._contentRect=eu(u.clone(),c/2,!0,!0),f=new _e;a.add(f),f.setClipPath(new Be({shape:h.plain()}));var d=this._targetGroup=new _e;f.add(d);var p=u.plain();p.r=o.getShallow("borderRadius",!0),a.add(this._bgRect=new Be({style:s,shape:p,silent:!1,cursor:"grab"}));var g=r.getModel("windowStyle"),m=g.getShallow("borderRadius",!0);f.add(this._windowRect=new Be({shape:{x:0,y:0,width:0,height:0,r:m},style:g.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),Z5(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),Z5(this._model,this))},e.prototype._dealRenderContent=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=this._targetGroup,i=this._coordSys,a=this._contentRect;if(n.removeAll(),!!r){var o=r.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=r.z2Range.min-10,i.setBoundingRect(s.x,s.y,s.width,s.height);var l=St({left:"center",top:"center",aspect:s.width/s.height},a);i.setViewRect(l.x,l.y,l.width,l.height),o.attr(i.getTransformInfo().raw),this._windowRect.z2=r.z2Range.max+10,this._resetRoamController(r.roamType)}}},e.prototype.updateWindow=function(r){var n=this._bridgeRendered;n&&n.renderVersion===r.renderVersion&&(n.targetTrans=r.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var r=this._bridgeRendered;if(!(!r||r.renderVersion!==this._renderVersion)){var n=ci([],r.targetTrans),i=Di([],this._coordSys.transform,n);this._transThisToTarget=ci([],i);var a=r.viewportRect;a?a=a.clone():a=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),a.applyTransform(i);var o=this._windowRect,s=o.shape.r;o.setShape(be({r:s},a))}},e.prototype._resetRoamController=function(r){var n=this,i=this._api,a=this._roamController;if(a||(a=this._roamController=new mu(i.getZr())),!r||!this._isEnabled()){a.disable();return}a.enable(r,{api:i,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),a.off("pan").off("zoom").on("pan",le(this._onPan,this)).on("zoom",le(this._onZoom,this))},e.prototype._onPan=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.oldX,r.oldY],n),a=Ot([],[r.oldX-r.dx,r.oldY-r.dy],n);this._api.dispatchAction(U5(this._model.getTarget().baseMapProvider,{dx:a[0]-i[0],dy:a[1]-i[1]}))}},e.prototype._onZoom=function(r){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var i=Ot([],[r.originX,r.originY],n);this._api.dispatchAction(U5(this._model.getTarget().baseMapProvider,{zoom:1/r.scale,originX:i[0],originY:i[1]}))}},e.prototype._isEnabled=function(){var r=this._model;if(!r||!r.shouldShow())return!1;var n=r.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(gt);function U5(t,e){var r=t.mainType==="series"?t.subType+"Roam":t.mainType+"Roam",n={type:r};return n[t.mainType+"Id"]=t.id,J(n,e),n}function Z5(t,e){var r=tu(t);a_(e.group,r.z,r.zlevel)}function Dge(t){t.registerComponentModel(Pge),t.registerComponentView(kge)}var Ige={label:{enabled:!0},decal:{show:!1}},$5=Fe(),Nge={};function Ege(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(Ige);Ee(n.label,t.getLocaleModel().get("aria"),!1),Ee(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),c=u.get("show");if(c){var h=de();t.eachSeries(function(f){if(!f.isColorBySeries()){var d=h.get(f.type);d||(d={},h.set(f.type,d)),$5(f).scope=d}}),t.eachRawSeries(function(f){if(t.isSeriesFiltered(f))return;if(me(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var _=Yw(f.ecModel,f.name,Nge,t.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",w(b,_))}else{var p=f.getRawData(),g={},m=$5(f).scope;d.each(function(C){var M=d.getRawIndex(C);g[M]=C});var y=p.count();p.each(function(C){var M=g[C],A=p.getName(C)||C+"",k=Yw(f.ecModel,A,m,y),N=d.getItemVisual(M,"decal");d.setItemVisual(M,"decal",w(N,k))})}function w(C,M){var A=C?J(J({},M),C):M;return A.dirty=!0,A}})}}function a(){var u=e.getZr().dom;if(u){var c=t.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=be(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var f=t.getSeriesCount(),d=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,g=Math.min(f,p),m;if(!(f<1)){var y=s();if(y){var _=h.get(["general","withTitle"]);m=o(_,{title:y})}else m=h.get(["general","withoutTitle"]);var b=[],w=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(w,{seriesCount:f}),t.eachSeries(function(k,N){if(N1?h.get(["series","multiple",z]):h.get(["series","single",z]),D=o(D,{seriesId:k.seriesIndex,seriesName:k.get("name"),seriesType:l(k.subType)});var O=k.getData();if(O.count()>d){var V=h.get(["data","partialData"]);D+=o(V,{displayCnt:d})}else D+=h.get(["data","allData"]);for(var G=h.get(["data","separator","middle"]),F=h.get(["data","separator","end"]),Z=h.get(["data","excludeDimensionId"]),j=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},zge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):p4(e)?e:null;if(r==null){var n="";it(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return se(r)?this._condVal.test(e):qe(r)?this._condVal.test(e+""):!1},t}(),Bge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),jge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,V]}function c(O,V,G,F){Mc(O,G)&&Mc(V,F)||i.push(O,V,G,F,G,F)}function h(O,V,G,F,Z,j){var W=Math.abs(V-O),H=Math.tan(W/4)*4/3,X=Vk:I2&&n.push(i),n}function cC(t,e,r,n,i,a,o,s,l,u){if(Mc(t,r)&&Mc(e,n)&&Mc(i,o)&&Mc(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-t,d=s-e,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var g=r-t,m=n-e,y=i-o,_=a-s,b=g*g+m*m,w=y*y+_*_;if(b=0&&k=0){l.push(o,s);return}var N=[],D=[];_s(t,r,i,o,.5,N),_s(e,n,a,s,.5,D),cC(N[0],D[0],N[1],D[1],N[2],D[2],N[3],D[3],l,u),cC(N[4],D[4],N[5],D[5],N[6],D[6],N[7],D[7],l,u)}function Jge(t,e){var r=uC(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),h=w8([l,u],c?0:1,e),f=(c?s:u)/h.length,d=0;di,o=w8([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=t[s]/o.length,f=0;f1?null:new Te(g*l+t,g*u+e)}function rme(t,e,r){var n=new Te;Te.sub(n,r,e),n.normalize();var i=new Te;Te.sub(i,t,e);var a=i.dot(n);return a}function tc(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function nme(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),nme(e,u,c)}function g0(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);g0(t,a[0],i,n),g0(t,a[1],r-i,n)}return n}function ime(t,e){for(var r=[],n=0;n0;u/=2){var c=0,h=0;(t&u)>0&&(c=1),(e&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function _0(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=re(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(h,r),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=re(a,function(s,l){return{cp:s,z:dme(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function M8(t){return sme(t.path,t.count)}function hC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function vme(t,e,r){var n=[];function i(C){for(var M=0;M=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var gme={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;rz(t)&&(u=t,c=e),rz(e)&&(u=e,c=t);function h(y,_,b,w,C){var M=y.many,A=y.one;if(M.length===1&&!C){var k=_?M[0]:A,N=_?A:M[0];if(m0(k))h({many:[k],one:N},!0,b,w,!0);else{var D=s?be({delay:s(b,w)},l):l;eL(k,N,D),a(k,N,k,N,D)}}else for(var I=be({dividePath:gme[r],individualDelay:s&&function(Z,j,W,H){return s(Z+b,w)}},l),z=_?vme(M,A,I):pme(A,M,I),O=z.fromIndividuals,V=z.toIndividuals,G=O.length,F=0;Fe.length,d=u?nz(c,u):nz(f?e:t,[f?t:e]),p=0,g=0;gA8))for(var a=n.getIndices(),o=0;o0&&M.group.traverse(function(k){k instanceof Ue&&!k.animators.length&&k.animateFrom({style:{opacity:0}},A)})})}function lz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function uz(t){return ee(t)?t.sort().join(","):t}function jo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function wme(t,e){var r=de(),n=de(),i=de();return R(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=lz(a),c=uz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&R(u,function(h){i.set(h,{key:c,dataGroupId:s,data:l})})}),R(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=lz(a),u=uz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:jo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:jo(s),data:s}]});else if(ee(l)){var h=[];R(l,function(p){var g=n.get(p);g.data&&h.push({dataGroupId:g.dataGroupId,divide:jo(g.data),data:g.data})}),h.length&&r.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:jo(s)}]})}else{var f=i.get(l);if(f){var d=r.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:jo(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:jo(s)})}}}}),r}function cz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:jo(e.oldData[s]),groupIdDim:o.dimension})}),R(pt(t.to),function(o){var s=cz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:jo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&L8(i,a,n)}function Cme(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){R(pt(n.seriesTransition),function(i){R(pt(i.to),function(a){for(var o=n.updatedSeries,s=0;so.vmin?r+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:r+=e-n,n=o.vmax,i=!1;break}r+=o.vmin-n+o.gapReal,n=o.vmax}return i&&(r+=e-n),r},t.prototype.unelapse=function(e){for(var r=hz,n=fz,i=!0,a=0,o=0;ol?a=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):a=n+e-r,n=s.vmax,i=!1;break}r=u,n=s.vmax}return i&&(a=n+e-r),a},t}();function Ame(){return new Mme}var hz=0,fz=0;function Lme(t,e){var r=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(r+=l.val);var u=tL(s,e);if(u){var c=u.vmin!==s.vmin,h=u.vmax!==s.vmax,f=u.vmax-u.vmin;if(!(c&&h))if(c||h){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=f,a[d][l.type].inExtFrac=f/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=f,n[l.type].val+=l.val}});var o=r*(0+(e[1]-e[0])+(n.tpAbs.val-n.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-n.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-n.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));R(t.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=r!==0?Math.max(o,0)*l.val/r:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function Pme(t,e,r,n,i,a){t!=="no"&&R(r,function(o){var s=tL(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),h=i*3/4;c>s.vmin-h&&ce[0]&&r=0&&o<1-1e-5}R(t,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:ye(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(se(o.gap)){var u=Pn(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;i(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var h=e(o.gap);(!isFinite(h)||h<0)&&(h=0),s.gapParsed.type="tpAbs",s.gapParsed.val=h}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),r&&r.noNegative&&R(["vmin","vmax"],function(d){s[d]<0&&(s[d]=0)}),s.vmin>s.vmax){var f=s.vmax;s.vmax=s.vmin,s.vmin=f}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var a=-1/0;return R(n,function(o,s){a>o.vmin&&(n[s]=null),a=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function rL(t,e){return dC(e)===dC(t)}function dC(t){return t.start+"_\0_"+t.end}function Dme(t,e,r){var n=[];R(t,function(a,o){var s=e(a);s&&s.type==="vmin"&&n.push([o])}),R(t,function(a,o){var s=e(a);if(s&&s.type==="vmax"){var l=Ls(n,function(u){return rL(e(t[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var i=[];return R(n,function(a){a.length===2&&i.push(r?a:[t[a[0]],t[a[1]]])}),i}function Ime(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=Ls(r,function(h){return rL(h.breakOption,t.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Ht(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};i={type:t.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},a=s[t.break.type]}return{brkRoundingCriterion:a,vBreak:i}}function Nme(t,e,r){var n={noNegative:!0},i=fC(t,r,n),a=fC(t,r,n),o=Math.log(e);return a.breaks=re(a.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:i,parsedLogged:a}}var Eme={vmin:"start",vmax:"end"};function Rme(t,e){return e&&(t=t||{},t.break={type:Eme[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function Ome(){iQ({createScaleBreakContext:Ame,pruneTicksByBreak:Pme,addBreaksToTicks:kme,parseAxisBreakOption:fC,identifyAxisBreak:rL,serializeAxisBreakIdentifier:dC,retrieveAxisBreakPairs:Dme,getTicksLogTransformBreak:Ime,logarithmicParseBreaksFromOption:Nme,makeAxisLabelFormatterParamBreak:Rme})}var dz=Fe();function zme(t,e){var r=Ls(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function Bme(t){R(t,function(e){return e.shouldRemove=!0})}function jme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Vme(t,e,r,n,i){var a=r.axis;if(a.scale.isBlank()||!Xt())return;var o=Xt().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:"only_break"}),function(N){return N.break},!1);if(!o.length)return;var s=r.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var h=s.get("expandOnClick"),f=s.get("zigzagZ"),d=s.getModel("itemStyle"),p=d.getItemStyle(),g=p.stroke,m=p.lineWidth,y=p.lineDash,_=p.fill,b=new _e({ignoreModelZ:!0}),w=a.isHorizontal(),C=dz(e).visualList||(dz(e).visualList=[]);Bme(C);for(var M=function(N){var D=o[N][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(D.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(D.vmax,!0)),I[1]=j;ve&&(ne=j);var Ge=[],xe=[];Ge[F]=I,xe[F]=z,!ue&&!ve&&(Ge[F]+=K?-l:l,xe[F]-=K?l:-l),Ge[Z]=ne,xe[Z]=ne,H.push(Ge),X.push(xe);var ge=void 0;if(ie_[1]&&_.reverse(),{coordPair:_,brkId:Xt().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(m,y){return m.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,h=0;h=0?l[0].width:l[1].width),f=(h+c.x)/2-u.x,d=Math.min(f,f-c.x),p=Math.max(f,f-c.x),g=p<0?p:d>0?d:0;s=(f-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),vT(r[0],m),vT(r[1],y)}function Hme(t,e){var r={breaks:[]};return R(e.breaks,function(n){if(n){var i=Ls(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===g_?!0:a===X6?!1:a===q6?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function Wme(){jie({adjustBreakLabelPair:Gme,buildAxisBreakLine:Fme,rectCoordBuildBreakAxis:Vme,updateModelAxisBreak:Hme})}function Ume(t){Uie(t),Ome(),Wme()}function Zme(){fae($me)}function $me(t,e){R(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Yme(r);if(n){var i=r.isHorizontal()?"height":"width",a=r.model.get(["axisLabel","margin"]);e[i]-=n[i]+a,r.position==="top"?e.y+=n.height+a:r.position==="left"&&(e.x+=n.width+a)}}})}function Yme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof ah?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Nh(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:60,i=null;return function(){for(var a=this,o=arguments.length,s=new Array(o),l=0;l12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function hye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function fye(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function dye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=U.useRef(null),[a,o]=U.useState("connected"),s=U.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=U.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>gz.includes(y.role))),m},[t,a,s]),u=U.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=U.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),h=U.useMemo(()=>{const m=new Set;return r!==null&&c.forEach(y=>{y.from_node===r&&m.add(y.to_node),y.to_node===r&&m.add(y.from_node)}),m},[r,c]),f=U.useMemo(()=>{const m=l.map(_=>{const b=hye(_.latitude),w=pz[b%pz.length],C=gz.includes(_.role),M=_.node_num===r,A=h.has(_.node_num),k=r===null||M||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:fye(_.role),itemStyle:{color:C?w:"#111827",borderColor:w,borderWidth:C?0:2,opacity:k?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:k?"#94a3b8":"#94a3b820"},nodeNum:_.node_num,longName:_.long_name,role:_.role}}),y=c.map(_=>{const b=r===null||_.from_node===r||_.to_node===r;return{source:String(_.from_node),target:String(_.to_node),value:_.snr,lineStyle:{color:cye(_.snr),width:b&&r!==null?2:1,opacity:r===null?.4:b?.6:.04}}});return{nodes:m,links:y}},[l,c,r,h]),d=U.useMemo(()=>({backgroundColor:"#111827",tooltip:{trigger:"item",backgroundColor:"#1e293b",borderColor:"#334155",textStyle:{color:"#e2e8f0",fontFamily:"JetBrains Mono, monospace",fontSize:11},formatter:m=>{if(m.data&&m.data.longName){const y=m.data;return`${y.name}
${y.longName}
Role: ${y.role}`}return""}},series:[{type:"graph",layout:"force",roam:!0,draggable:!0,animation:!1,data:f.nodes,links:f.links,force:{repulsion:200,edgeLength:[80,120],gravity:.1},emphasis:{focus:"adjacency",blurScope:"coordinateSystem",scale:1.1,lineStyle:{width:2}},blur:{itemStyle:{opacity:.15},lineStyle:{opacity:.04}},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace"},edgeLabel:{show:!1},edgeSymbol:["none","none"]}]}),[f]),p=U.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=U.useMemo(()=>({click:p}),[p]);return U.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),S.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[S.jsx(uye,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),S.jsxs("div",{className:"absolute top-4 left-4 flex items-center gap-2 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2",children:[S.jsx(y2,{size:14,className:"text-slate-500"}),S.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>S.jsx("button",{onClick:()=>o(m),className:`px-2 py-1 text-xs rounded transition-colors ${a===m?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:y},m))}),S.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),S.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[S.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),S.jsx("div",{className:"space-y-1",children:[{label:"Excellent (>12)",color:"#22c55e"},{label:"Good (8-12)",color:"#4ade80"},{label:"Fair (5-8)",color:"#f59e0b"},{label:"Marginal (3-5)",color:"#f97316"},{label:"Poor (<3)",color:"#ef4444"}].map(m=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),S.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),S.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[S.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),S.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),S.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function D8(t,e){const r=U.useRef(e);U.useEffect(function(){e!==r.current&&t.attributionControl!=null&&(r.current!=null&&t.attributionControl.removeAttribution(r.current),e!=null&&t.attributionControl.addAttribution(e)),r.current=e},[t,e])}function vye(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const pye=1;function gye(t){return Object.freeze({__version:pye,map:t})}function I8(t,e){return Object.freeze({...t,...e})}const N8=U.createContext(null),E8=N8.Provider;function L_(){const t=U.useContext(N8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function mye(t){function e(r,n){const{instance:i,context:a}=t(r).current;return U.useImperativeHandle(n,()=>i),r.children==null?null:Vc.createElement(E8,{value:a},r.children)}return U.forwardRef(e)}function yye(t){function e(r,n){const[i,a]=U.useState(!1),{instance:o}=t(r,a).current;U.useImperativeHandle(n,()=>o),U.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?OB.createPortal(r.children,s):null}return U.forwardRef(e)}function _ye(t){function e(r,n){const{instance:i}=t(r).current;return U.useImperativeHandle(n,()=>i),null}return U.forwardRef(e)}function oL(t,e){const r=U.useRef();U.useEffect(function(){return e!=null&&t.instance.on(e),r.current=e,function(){r.current!=null&&t.instance.off(r.current),r.current=null}},[t,e])}function P_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function xye(t,e){return function(n,i){const a=L_(),o=t(P_(n,a),a);return D8(a.map,n.attribution),oL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var gC={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(t,e){(function(r,n){n(e)})(cU,function(r){var n="1.9.4";function i(v){var x,T,P,N;for(T=1,P=arguments.length;T"u"||!L||!L.Mixin)){v=S(v)?v:[v];for(var x=0;x0?Math.floor(v):Math.ceil(v)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(v){return this.clone()._add(H(v))},_add:function(v){return this.x+=v.x,this.y+=v.y,this},subtract:function(v){return this.clone()._subtract(H(v))},_subtract:function(v){return this.x-=v.x,this.y-=v.y,this},divideBy:function(v){return this.clone()._divideBy(v)},_divideBy:function(v){return this.x/=v,this.y/=v,this},multiplyBy:function(v){return this.clone()._multiplyBy(v)},_multiplyBy:function(v){return this.x*=v,this.y*=v,this},scaleBy:function(v){return new j(this.x*v.x,this.y*v.y)},unscaleBy:function(v){return new j(this.x/v.x,this.y/v.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=W(this.x),this.y=W(this.y),this},distanceTo:function(v){v=H(v);var x=v.x-this.x,T=v.y-this.y;return Math.sqrt(x*x+T*T)},equals:function(v){return v=H(v),v.x===this.x&&v.y===this.y},contains:function(v){return v=H(v),Math.abs(v.x)<=Math.abs(this.x)&&Math.abs(v.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function H(v,x,T){return v instanceof j?v:S(v)?new j(v[0],v[1]):v==null?v:typeof v=="object"&&"x"in v&&"y"in v?new j(v.x,v.y):new j(v,x,T)}function X(v,x){if(v)for(var T=x?[v,x]:v,P=0,N=T.length;P=this.min.x&&T.x<=this.max.x&&x.y>=this.min.y&&T.y<=this.max.y},intersects:function(v){v=K(v);var x=this.min,T=this.max,P=v.min,N=v.max,B=N.x>=x.x&&P.x<=T.x,$=N.y>=x.y&&P.y<=T.y;return B&&$},overlaps:function(v){v=K(v);var x=this.min,T=this.max,P=v.min,N=v.max,B=N.x>x.x&&P.xx.y&&P.y=x.lat&&N.lat<=T.lat&&P.lng>=x.lng&&N.lng<=T.lng},intersects:function(v){v=ie(v);var x=this._southWest,T=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>=x.lat&&P.lat<=T.lat,$=N.lng>=x.lng&&P.lng<=T.lng;return B&&$},overlaps:function(v){v=ie(v);var x=this._southWest,T=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>x.lat&&P.latx.lng&&P.lng1,Q8=function(){var v=!1;try{var x=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("testPassiveEventSupport",h,x),window.removeEventListener("testPassiveEventSupport",h,x)}catch{}return v}(),J8=function(){return!!document.createElement("canvas").getContext}(),D_=!!(document.createElementNS&&tt("svg").createSVGRect),eW=!!D_&&function(){var v=document.createElement("div");return v.innerHTML="",(v.firstChild&&v.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),tW=!D_&&function(){try{var v=document.createElement("div");v.innerHTML='';var x=v.firstChild;return x.style.behavior="url(#default#VML)",x&&typeof x.adj=="object"}catch{return!1}}(),rW=navigator.platform.indexOf("Mac")===0,nW=navigator.platform.indexOf("Linux")===0;function Hi(v){return navigator.userAgent.toLowerCase().indexOf(v)>=0}var Re={ie:gr,ielt9:zr,edge:Fi,webkit:Gi,android:Su,android23:uL,androidStock:G8,opera:P_,chrome:cL,gecko:hL,safari:H8,phantom:fL,opera12:dL,win:W8,ie3d:vL,webkit3d:k_,gecko3d:pL,any3d:U8,mobile:Bh,mobileWebkit:Z8,mobileWebkit3d:$8,msPointer:gL,pointer:mL,touch:Y8,touchNative:yL,mobileOpera:X8,mobileGecko:q8,retina:K8,passiveEvents:Q8,canvas:J8,svg:D_,vml:tW,inlineSvg:eW,mac:rW,linux:nW},_L=Re.msPointer?"MSPointerDown":"pointerdown",xL=Re.msPointer?"MSPointerMove":"pointermove",SL=Re.msPointer?"MSPointerUp":"pointerup",bL=Re.msPointer?"MSPointerCancel":"pointercancel",I_={touchstart:_L,touchmove:xL,touchend:SL,touchcancel:bL},wL={touchstart:uW,touchmove:ip,touchend:ip,touchcancel:ip},bu={},TL=!1;function iW(v,x,T){return x==="touchstart"&&lW(),wL[x]?(T=wL[x].bind(this,T),v.addEventListener(I_[x],T,!1),T):(console.warn("wrong event specified:",x),h)}function aW(v,x,T){if(!I_[x]){console.warn("wrong event specified:",x);return}v.removeEventListener(I_[x],T,!1)}function oW(v){bu[v.pointerId]=v}function sW(v){bu[v.pointerId]&&(bu[v.pointerId]=v)}function CL(v){delete bu[v.pointerId]}function lW(){TL||(document.addEventListener(_L,oW,!0),document.addEventListener(xL,sW,!0),document.addEventListener(SL,CL,!0),document.addEventListener(bL,CL,!0),TL=!0)}function ip(v,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var T in bu)x.touches.push(bu[T]);x.changedTouches=[x],v(x)}}function uW(v,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),ip(v,x)}function cW(v){var x={},T,P;for(P in v)T=v[P],x[P]=T&&T.bind?T.bind(v):T;return v=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var hW=200;function fW(v,x){v.addEventListener("dblclick",x);var T=0,P;function N(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var $=kL(B);if(!($.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!$.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-T<=hW?(P++,P===2&&x(cW(B))):P=1,T=Q}}}return v.addEventListener("click",N),{dblclick:x,simDblclick:N}}function dW(v,x){v.removeEventListener("dblclick",x.dblclick),v.removeEventListener("click",x.simDblclick)}var E_=sp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),jh=sp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ML=jh==="webkitTransition"||jh==="OTransition"?jh+"End":"transitionend";function AL(v){return typeof v=="string"?document.getElementById(v):v}function Vh(v,x){var T=v.style[x]||v.currentStyle&&v.currentStyle[x];if((!T||T==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(v,null);T=P?P[x]:null}return T==="auto"?null:T}function ft(v,x,T){var P=document.createElement(v);return P.className=x||"",T&&T.appendChild(P),P}function It(v){var x=v.parentNode;x&&x.removeChild(v)}function ap(v){for(;v.firstChild;)v.removeChild(v.firstChild)}function wu(v){var x=v.parentNode;x&&x.lastChild!==v&&x.appendChild(v)}function Tu(v){var x=v.parentNode;x&&x.firstChild!==v&&x.insertBefore(v,x.firstChild)}function N_(v,x){if(v.classList!==void 0)return v.classList.contains(x);var T=op(v);return T.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(T)}function Je(v,x){if(v.classList!==void 0)for(var T=p(x),P=0,N=T.length;P0?2*window.devicePixelRatio:1;function IL(v){return Re.edge?v.wheelDeltaY/2:v.deltaY&&v.deltaMode===0?-v.deltaY/gW:v.deltaY&&v.deltaMode===1?-v.deltaY*20:v.deltaY&&v.deltaMode===2?-v.deltaY*60:v.deltaX||v.deltaZ?0:v.wheelDelta?(v.wheelDeltaY||v.wheelDelta)/2:v.detail&&Math.abs(v.detail)<32765?-v.detail*20:v.detail?v.detail/-32765*60:0}function Z_(v,x){var T=x.relatedTarget;if(!T)return!0;try{for(;T&&T!==v;)T=T.parentNode}catch{return!1}return T!==v}var mW={__proto__:null,on:Ke,off:Tt,stopPropagation:zs,disableScrollPropagation:U_,disableClickPropagation:Wh,preventDefault:Mr,stop:Bs,getPropagationPath:kL,getMousePosition:DL,getWheelDelta:IL,isExternalTarget:Z_,addListener:Ke,removeListener:Tt},EL=U.extend({run:function(v,x,T,P){this.stop(),this._el=v,this._inProgress=!0,this._duration=T||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Os(v),this._offset=x.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=I(this._animate,this),this._step()},_step:function(v){var x=+new Date-this._startTime,T=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(v):this},panInsideBounds:function(v,x){this._enforcingBounds=!0;var T=this.getCenter(),P=this._limitCenter(T,this._zoom,ie(v));return T.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(v,x){x=x||{};var T=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),N=this.project(this.getCenter()),B=this.project(v),$=this.getPixelBounds(),Q=K([$.min.add(T),$.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Ae=Q.extend(B).getSize().subtract(te);N.x+=ae.x<0?-Ae.x:Ae.x,N.y+=ae.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(N),x),this._enforcingBounds=!1}return this},invalidateSize:function(v){if(!this._loaded)return this;v=i({animate:!1,pan:!0},v===!0?{animate:!0}:v);var x=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var T=this.getSize(),P=x.divideBy(2).round(),N=T.divideBy(2).round(),B=P.subtract(N);return!B.x&&!B.y?this:(v.animate&&v.pan?this.panBy(B):(v.pan&&this._rawPanBy(B),this.fire("move"),v.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:x,newSize:T}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(v){if(v=this._locateOptions=i({timeout:1e4,watch:!1},v),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var x=o(this._handleGeolocationResponse,this),T=o(this._handleGeolocationError,this);return v.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,T,v):navigator.geolocation.getCurrentPosition(x,T,v),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(v){if(this._container._leaflet_id){var x=v.code,T=v.message||(x===1?"permission denied":x===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:x,message:"Geolocation error: "+T+"."})}},_handleGeolocationResponse:function(v){if(this._container._leaflet_id){var x=v.coords.latitude,T=v.coords.longitude,P=new ue(x,T),N=P.toBounds(v.coords.accuracy*2),B=this._locateOptions;if(B.setView){var $=this.getBoundsZoom(N);this.setView(P,B.maxZoom?Math.min($,B.maxZoom):$)}var Q={latlng:P,bounds:N,timestamp:v.timestamp};for(var te in v.coords)typeof v.coords[te]=="number"&&(Q[te]=v.coords[te]);this.fire("locationfound",Q)}},addHandler:function(v,x){if(!x)return this;var T=this[v]=new x(this);return this._handlers.push(T),this.options[v]&&T.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(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var v;for(v in this._layers)this._layers[v].remove();for(v in this._panes)It(this._panes[v]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(v,x){var T="leaflet-pane"+(v?" leaflet-"+v.replace("Pane","")+"-pane":""),P=ft("div",T,x||this._mapPane);return v&&(this._panes[v]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var v=this.getPixelBounds(),x=this.unproject(v.getBottomLeft()),T=this.unproject(v.getTopRight());return new ne(x,T)},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(v,x,T){v=ie(v),T=H(T||[0,0]);var P=this.getZoom()||0,N=this.getMinZoom(),B=this.getMaxZoom(),$=v.getNorthWest(),Q=v.getSouthEast(),te=this.getSize().subtract(T),ae=K(this.project(Q,P),this.project($,P)).getSize(),Ae=Re.any3d?this.options.zoomSnap:1,He=te.x/ae.x,rt=te.y/ae.y,Xr=x?Math.max(He,rt):Math.min(He,rt);return P=this.getScaleZoom(Xr,P),Ae&&(P=Math.round(P/(Ae/100))*(Ae/100),P=x?Math.ceil(P/Ae)*Ae:Math.floor(P/Ae)*Ae),Math.max(N,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(v,x){var T=this._getTopLeftPoint(v,x);return new X(T,T.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(v){return this.options.crs.getProjectedBounds(v===void 0?this.getZoom():v)},getPane:function(v){return typeof v=="string"?this._panes[v]:v},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(v,x){var T=this.options.crs;return x=x===void 0?this._zoom:x,T.scale(v)/T.scale(x)},getScaleZoom:function(v,x){var T=this.options.crs;x=x===void 0?this._zoom:x;var P=T.zoom(v*T.scale(x));return isNaN(P)?1/0:P},project:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.latLngToPoint(ve(v),x)},unproject:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.pointToLatLng(H(v),x)},layerPointToLatLng:function(v){var x=H(v).add(this.getPixelOrigin());return this.unproject(x)},latLngToLayerPoint:function(v){var x=this.project(ve(v))._round();return x._subtract(this.getPixelOrigin())},wrapLatLng:function(v){return this.options.crs.wrapLatLng(ve(v))},wrapLatLngBounds:function(v){return this.options.crs.wrapLatLngBounds(ie(v))},distance:function(v,x){return this.options.crs.distance(ve(v),ve(x))},containerPointToLayerPoint:function(v){return H(v).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(v){return H(v).add(this._getMapPanePos())},containerPointToLatLng:function(v){var x=this.containerPointToLayerPoint(H(v));return this.layerPointToLatLng(x)},latLngToContainerPoint:function(v){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ve(v)))},mouseEventToContainerPoint:function(v){return DL(v,this._container)},mouseEventToLayerPoint:function(v){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(v))},mouseEventToLatLng:function(v){return this.layerPointToLatLng(this.mouseEventToLayerPoint(v))},_initContainer:function(v){var x=this._container=AL(v);if(x){if(x._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(x,"scroll",this._onScroll,this),this._containerId=l(x)},_initLayout:function(){var v=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,Je(v,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var x=Vh(v,"position");x!=="absolute"&&x!=="relative"&&x!=="fixed"&&x!=="sticky"&&(v.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var v=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Je(v.markerPane,"leaflet-zoom-hide"),Je(v.shadowPane,"leaflet-zoom-hide"))},_resetView:function(v,x,T){Qt(this._mapPane,new j(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var N=this._zoom!==x;this._moveStart(N,T)._move(v,x)._moveEnd(N),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(v,x){return v&&this.fire("zoomstart"),x||this.fire("movestart"),this},_move:function(v,x,T,P){x===void 0&&(x=this._zoom);var N=this._zoom!==x;return this._zoom=x,this._lastCenter=v,this._pixelOrigin=this._getNewPixelOrigin(v),P?T&&T.pinch&&this.fire("zoom",T):((N||T&&T.pinch)&&this.fire("zoom",T),this.fire("move",T)),this},_moveEnd:function(v){return v&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(v){Qt(this._mapPane,this._getMapPanePos().subtract(v))},_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(v){this._targets={},this._targets[l(this._container)]=this;var x=v?Tt:Ke;x(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&x(window,"resize",this._onResize,this),Re.any3d&&this.options.transform3DLimit&&(v?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var v=this._getMapPanePos();Math.max(Math.abs(v.x),Math.abs(v.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(v,x){for(var T=[],P,N=x==="mouseout"||x==="mouseover",B=v.target||v.srcElement,$=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){$=!0;break}if(P&&P.listens(x,!0)&&(N&&!Z_(B,v)||(T.push(P),N))||B===this._container)break;B=B.parentNode}return!T.length&&!$&&!N&&this.listens(x,!0)&&(T=[this]),T},_isClickDisabled:function(v){for(;v&&v!==this._container;){if(v._leaflet_disable_click)return!0;v=v.parentNode}},_handleDOMEvent:function(v){var x=v.target||v.srcElement;if(!(!this._loaded||x._leaflet_disable_events||v.type==="click"&&this._isClickDisabled(x))){var T=v.type;T==="mousedown"&&V_(x),this._fireDOMEvent(v,T)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(v,x,T){if(v.type==="click"){var P=i({},v);P.type="preclick",this._fireDOMEvent(P,P.type,T)}var N=this._findEventTargets(v,x);if(T){for(var B=[],$=0;$0?Math.round(v-x)/2:Math.max(0,Math.ceil(v))-Math.max(0,Math.floor(x))},_limitZoom:function(v){var x=this.getMinZoom(),T=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(v=Math.round(v/P)*P),Math.max(x,Math.min(T,v))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(v,x){var T=this._getCenterOffset(v)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(T)?!1:(this.panBy(T,x),!0)},_createAnimProxy:function(){var v=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(v),this.on("zoomanim",function(x){var T=E_,P=this._proxy.style[T];Rs(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[T]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var v=this.getCenter(),x=this.getZoom();Rs(this._proxy,this.project(v,x),this.getZoomScale(x,1))},_catchTransitionEnd:function(v){this._animatingZoom&&v.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(v,x,T){if(this._animatingZoom)return!0;if(T=T||{},!this._zoomAnimated||T.animate===!1||this._nothingToAnimate()||Math.abs(x-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(x),N=this._getCenterOffset(v)._divideBy(1-1/P);return T.animate!==!0&&!this.getSize().contains(N)?!1:(I(function(){this._moveStart(!0,T.noMoveStart||!1)._animateZoom(v,x,!0)},this),!0)},_animateZoom:function(v,x,T,P){this._mapPane&&(T&&(this._animatingZoom=!0,this._animateToCenter=v,this._animateToZoom=x,Je(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:v,zoom:x,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(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 yW(v,x){return new ut(v,x)}var gi=V.extend({options:{position:"topright"},initialize:function(v){g(this,v)},getPosition:function(){return this.options.position},setPosition:function(v){var x=this._map;return x&&x.removeControl(this),this.options.position=v,x&&x.addControl(this),this},getContainer:function(){return this._container},addTo:function(v){this.remove(),this._map=v;var x=this._container=this.onAdd(v),T=this.getPosition(),P=v._controlCorners[T];return Je(x,"leaflet-control"),T.indexOf("bottom")!==-1?P.insertBefore(x,P.firstChild):P.appendChild(x),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(v){this._map&&v&&v.screenX>0&&v.screenY>0&&this._map.getContainer().focus()}}),Uh=function(v){return new gi(v)};ut.include({addControl:function(v){return v.addTo(this),this},removeControl:function(v){return v.remove(),this},_initControlPos:function(){var v=this._controlCorners={},x="leaflet-",T=this._controlContainer=ft("div",x+"control-container",this._container);function P(N,B){var $=x+N+" "+x+B;v[N+B]=ft("div",$,T)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var v in this._controlCorners)It(this._controlCorners[v]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var NL=gi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(v,x,T,P){return T1,this._baseLayersList.style.display=v?"":"none"),this._separator.style.display=x&&v?"":"none",this},_onLayerChange:function(v){this._handlingClick||this._update();var x=this._getLayer(l(v.target)),T=x.overlay?v.type==="add"?"overlayadd":"overlayremove":v.type==="add"?"baselayerchange":null;T&&this._map.fire(T,x)},_createRadioElement:function(v,x){var T='",P=document.createElement("div");return P.innerHTML=T,P.firstChild},_addItem:function(v){var x=document.createElement("label"),T=this._map.hasLayer(v.layer),P;v.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=T):P=this._createRadioElement("leaflet-base-layers_"+l(this),T),this._layerControlInputs.push(P),P.layerId=l(v.layer),Ke(P,"click",this._onInputClick,this);var N=document.createElement("span");N.innerHTML=" "+v.name;var B=document.createElement("span");x.appendChild(B),B.appendChild(P),B.appendChild(N);var $=v.overlay?this._overlaysList:this._baseLayersList;return $.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var v=this._layerControlInputs,x,T,P=[],N=[];this._handlingClick=!0;for(var B=v.length-1;B>=0;B--)x=v[B],T=this._getLayer(x.layerId).layer,x.checked?P.push(T):x.checked||N.push(T);for(B=0;B=0;N--)x=v[N],T=this._getLayer(x.layerId).layer,x.disabled=T.options.minZoom!==void 0&&PT.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var v=this._section;this._preventClick=!0,Ke(v,"click",Mr),this.expand();var x=this;setTimeout(function(){Tt(v,"click",Mr),x._preventClick=!1})}}),_W=function(v,x,T){return new NL(v,x,T)},$_=gi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(v){var x="leaflet-control-zoom",T=ft("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",T,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",T,this._zoomOut),this._updateDisabled(),v.on("zoomend zoomlevelschange",this._updateDisabled,this),T},onRemove:function(v){v.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(v){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(v.shiftKey?3:1))},_createButton:function(v,x,T,P,N){var B=ft("a",T,P);return B.innerHTML=v,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Wh(B),Ke(B,"click",Bs),Ke(B,"click",N,this),Ke(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var v=this._map,x="leaflet-disabled";Zt(this._zoomInButton,x),Zt(this._zoomOutButton,x),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||v._zoom===v.getMinZoom())&&(Je(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||v._zoom===v.getMaxZoom())&&(Je(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ut.mergeOptions({zoomControl:!0}),ut.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new $_,this.addControl(this.zoomControl))});var xW=function(v){return new $_(v)},RL=gi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(v){var x="leaflet-control-scale",T=ft("div",x),P=this.options;return this._addScales(P,x+"-line",T),v.on(P.updateWhenIdle?"moveend":"move",this._update,this),v.whenReady(this._update,this),T},onRemove:function(v){v.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(v,x,T){v.metric&&(this._mScale=ft("div",x,T)),v.imperial&&(this._iScale=ft("div",x,T))},_update:function(){var v=this._map,x=v.getSize().y/2,T=v.distance(v.containerPointToLatLng([0,x]),v.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(T)},_updateScales:function(v){this.options.metric&&v&&this._updateMetric(v),this.options.imperial&&v&&this._updateImperial(v)},_updateMetric:function(v){var x=this._getRoundNum(v),T=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,T,x/v)},_updateImperial:function(v){var x=v*3.2808399,T,P,N;x>5280?(T=x/5280,P=this._getRoundNum(T),this._updateScale(this._iScale,P+" mi",P/T)):(N=this._getRoundNum(x),this._updateScale(this._iScale,N+" ft",N/x))},_updateScale:function(v,x,T){v.style.width=Math.round(this.options.maxWidth*T)+"px",v.innerHTML=x},_getRoundNum:function(v){var x=Math.pow(10,(Math.floor(v)+"").length-1),T=v/x;return T=T>=10?10:T>=5?5:T>=3?3:T>=2?2:1,x*T}}),SW=function(v){return new RL(v)},bW='',Y_=gi.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?bW+" ":"")+"Leaflet"},initialize:function(v){g(this,v),this._attributions={}},onAdd:function(v){v.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),Wh(this._container);for(var x in v._layers)v._layers[x].getAttribution&&this.addAttribution(v._layers[x].getAttribution());return this._update(),v.on("layeradd",this._addAttribution,this),this._container},onRemove:function(v){v.off("layeradd",this._addAttribution,this)},_addAttribution:function(v){v.layer.getAttribution&&(this.addAttribution(v.layer.getAttribution()),v.layer.once("remove",function(){this.removeAttribution(v.layer.getAttribution())},this))},setPrefix:function(v){return this.options.prefix=v,this._update(),this},addAttribution:function(v){return v?(this._attributions[v]||(this._attributions[v]=0),this._attributions[v]++,this._update(),this):this},removeAttribution:function(v){return v?(this._attributions[v]&&(this._attributions[v]--,this._update()),this):this},_update:function(){if(this._map){var v=[];for(var x in this._attributions)this._attributions[x]&&v.push(x);var T=[];this.options.prefix&&T.push(this.options.prefix),v.length&&T.push(v.join(", ")),this._container.innerHTML=T.join(' ')}}});ut.mergeOptions({attributionControl:!0}),ut.addInitHook(function(){this.options.attributionControl&&new Y_().addTo(this)});var wW=function(v){return new Y_(v)};gi.Layers=NL,gi.Zoom=$_,gi.Scale=RL,gi.Attribution=Y_,Uh.layers=_W,Uh.zoom=xW,Uh.scale=SW,Uh.attribution=wW;var Ui=V.extend({initialize:function(v){this._map=v},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}});Ui.addTo=function(v,x){return v.addHandler(x,this),this};var TW={Events:F},OL=Re.touch?"touchstart mousedown":"mousedown",wo=U.extend({options:{clickTolerance:3},initialize:function(v,x,T,P){g(this,P),this._element=v,this._dragStartTarget=x||v,this._preventOutline=T},enable:function(){this._enabled||(Ke(this._dragStartTarget,OL,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,OL,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(v){if(this._enabled&&(this._moved=!1,!N_(this._element,"leaflet-zoom-anim"))){if(v.touches&&v.touches.length!==1){wo._dragging===this&&this.finishDrag();return}if(!(wo._dragging||v.shiftKey||v.which!==1&&v.button!==1&&!v.touches)&&(wo._dragging=this,this._preventOutline&&V_(this._element),z_(),Fh(),!this._moving)){this.fire("down");var x=v.touches?v.touches[0]:v,T=LL(this._element);this._startPoint=new j(x.clientX,x.clientY),this._startPos=Os(this._element),this._parentScale=F_(T);var P=v.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(v){if(this._enabled){if(v.touches&&v.touches.length>1){this._moved=!0;return}var x=v.touches&&v.touches.length===1?v.touches[0]:v,T=new j(x.clientX,x.clientY)._subtract(this._startPoint);!T.x&&!T.y||Math.abs(T.x)+Math.abs(T.y)B&&($=Q,B=te);B>T&&(x[$]=1,q_(v,x,T,P,$),q_(v,x,T,$,N))}function LW(v,x){for(var T=[v[0]],P=1,N=0,B=v.length;Px&&(T.push(v[P]),N=P);return Nx.max.x&&(T|=2),v.yx.max.y&&(T|=8),T}function PW(v,x){var T=x.x-v.x,P=x.y-v.y;return T*T+P*P}function Zh(v,x,T,P){var N=x.x,B=x.y,$=T.x-N,Q=T.y-B,te=$*$+Q*Q,ae;return te>0&&(ae=((v.x-N)*$+(v.y-B)*Q)/te,ae>1?(N=T.x,B=T.y):ae>0&&(N+=$*ae,B+=Q*ae)),$=v.x-N,Q=v.y-B,P?$*$+Q*Q:new j(N,B)}function Fn(v){return!S(v[0])||typeof v[0][0]!="object"&&typeof v[0][0]<"u"}function HL(v){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(v)}function WL(v,x){var T,P,N,B,$,Q,te,ae;if(!v||v.length===0)throw new Error("latlngs not passed");Fn(v)||(console.warn("latlngs are not flat! Only the first ring will be used"),v=v[0]);var Ae=ve([0,0]),He=ie(v),rt=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());rt<1700&&(Ae=X_(v));var Xr=v.length,mr=[];for(T=0;TP){te=(B-P)/N,ae=[Q.x-te*(Q.x-$.x),Q.y-te*(Q.y-$.y)];break}var cn=x.unproject(H(ae));return ve([cn.lat+Ae.lat,cn.lng+Ae.lng])}var kW={__proto__:null,simplify:jL,pointToSegmentDistance:VL,closestPointOnSegment:MW,clipSegment:GL,_getEdgeIntersection:cp,_getBitCode:js,_sqClosestPointOnSegment:Zh,isFlat:Fn,_flat:HL,polylineCenter:WL},K_={project:function(v){return new j(v.lng,v.lat)},unproject:function(v){return new ue(v.y,v.x)},bounds:new X([-180,-90],[180,90])},Q_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new X([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(v){var x=Math.PI/180,T=this.R,P=v.lat*x,N=this.R_MINOR/T,B=Math.sqrt(1-N*N),$=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-$)/(1+$),B/2);return P=-T*Math.log(Math.max(Q,1e-10)),new j(v.lng*x*T,P)},unproject:function(v){for(var x=180/Math.PI,T=this.R,P=this.R_MINOR/T,N=Math.sqrt(1-P*P),B=Math.exp(-v.y/T),$=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=N*Math.sin($),ae=Math.pow((1-ae)/(1+ae),N/2),te=Math.PI/2-2*Math.atan(B*ae)-$,$+=te;return new ue($*x,v.x*x/T)}},DW={__proto__:null,LonLat:K_,Mercator:Q_,SphericalMercator:ke},IW=i({},xe,{code:"EPSG:3395",projection:Q_,transformation:function(){var v=.5/(Math.PI*Q_.R);return Me(v,.5,-v,.5)}()}),UL=i({},xe,{code:"EPSG:4326",projection:K_,transformation:Me(1/180,1,-1/180,.5)}),EW=i({},Ge,{projection:K_,transformation:Me(1,0,-1,0),scale:function(v){return Math.pow(2,v)},zoom:function(v){return Math.log(v)/Math.LN2},distance:function(v,x){var T=x.lng-v.lng,P=x.lat-v.lat;return Math.sqrt(T*T+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=IW,Ge.EPSG3857=ot,Ge.EPSG900913=Ye,Ge.EPSG4326=UL,Ge.Simple=EW;var mi=U.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(v){return v.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(v){return v&&v.removeLayer(this),this},getPane:function(v){return this._map.getPane(v?this.options[v]||v:this.options.pane)},addInteractiveTarget:function(v){return this._map._targets[l(v)]=this,this},removeInteractiveTarget:function(v){return delete this._map._targets[l(v)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(v){var x=v.target;if(x.hasLayer(this)){if(this._map=x,this._zoomAnimated=x._zoomAnimated,this.getEvents){var T=this.getEvents();x.on(T,this),this.once("remove",function(){x.off(T,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ut.include({addLayer:function(v){if(!v._layerAdd)throw new Error("The provided object is not a Layer.");var x=l(v);return this._layers[x]?this:(this._layers[x]=v,v._mapToAdd=this,v.beforeAdd&&v.beforeAdd(this),this.whenReady(v._layerAdd,v),this)},removeLayer:function(v){var x=l(v);return this._layers[x]?(this._loaded&&v.onRemove(this),delete this._layers[x],this._loaded&&(this.fire("layerremove",{layer:v}),v.fire("remove")),v._map=v._mapToAdd=null,this):this},hasLayer:function(v){return l(v)in this._layers},eachLayer:function(v,x){for(var T in this._layers)v.call(x,this._layers[T]);return this},_addLayers:function(v){v=v?S(v)?v:[v]:[];for(var x=0,T=v.length;xthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&x[0]instanceof ue&&x[0].equals(x[T-1])&&x.pop(),x},_setLatLngs:function(v){Ia.prototype._setLatLngs.call(this,v),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var v=this._renderer._bounds,x=this.options.weight,T=new j(x,x);if(v=new X(v.min.subtract(T),v.max.add(T)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(v))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,N=this._rings.length,B;Pv.y!=N.y>v.y&&v.x<(N.x-P.x)*(v.y-P.y)/(N.y-P.y)+P.x&&(x=!x);return x||Ia.prototype._containsPoint.call(this,v,!0)}});function FW(v,x){return new Au(v,x)}var Ea=Da.extend({initialize:function(v,x){g(this,x),this._layers={},v&&this.addData(v)},addData:function(v){var x=S(v)?v:v.features,T,P,N;if(x){for(T=0,P=x.length;T0&&N.push(N[0].slice()),N}function Lu(v,x){return v.feature?i({},v.feature,{geometry:x}):gp(x)}function gp(v){return v.type==="Feature"||v.type==="FeatureCollection"?v:{type:"Feature",properties:{},geometry:v}}var rx={toGeoJSON:function(v){return Lu(this,{type:"Point",coordinates:tx(this.getLatLng(),v)})}};hp.include(rx),J_.include(rx),fp.include(rx),Ia.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),T=pp(this._latlngs,x?1:0,!1,v);return Lu(this,{type:(x?"Multi":"")+"LineString",coordinates:T})}}),Au.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),T=x&&!Fn(this._latlngs[0]),P=pp(this._latlngs,T?2:x?1:0,!0,v);return x||(P=[P]),Lu(this,{type:(T?"Multi":"")+"Polygon",coordinates:P})}}),Cu.include({toMultiPoint:function(v){var x=[];return this.eachLayer(function(T){x.push(T.toGeoJSON(v).geometry.coordinates)}),Lu(this,{type:"MultiPoint",coordinates:x})},toGeoJSON:function(v){var x=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(x==="MultiPoint")return this.toMultiPoint(v);var T=x==="GeometryCollection",P=[];return this.eachLayer(function(N){if(N.toGeoJSON){var B=N.toGeoJSON(v);if(T)P.push(B.geometry);else{var $=gp(B);$.type==="FeatureCollection"?P.push.apply(P,$.features):P.push($)}}}),T?Lu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function YL(v,x){return new Ea(v,x)}var GW=YL,mp=mi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(v,x,T){this._url=v,this._bounds=ie(x),g(this,T)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Je(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(v){return this.options.opacity=v,this._image&&this._updateOpacity(),this},setStyle:function(v){return v.opacity&&this.setOpacity(v.opacity),this},bringToFront:function(){return this._map&&wu(this._image),this},bringToBack:function(){return this._map&&Tu(this._image),this},setUrl:function(v){return this._url=v,this._image&&(this._image.src=v),this},setBounds:function(v){return this._bounds=ie(v),this._map&&this._reset(),this},getEvents:function(){var v={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(v.zoomanim=this._animateZoom),v},setZIndex:function(v){return this.options.zIndex=v,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var v=this._url.tagName==="IMG",x=this._image=v?this._url:ft("img");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onload=o(this.fire,this,"load"),x.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),v){this._url=x.src;return}x.src=this._url,x.alt=this.options.alt},_animateZoom:function(v){var x=this._map.getZoomScale(v.zoom),T=this._map._latLngBoundsToNewLayerBounds(this._bounds,v.zoom,v.center).min;Rs(this._image,T,x)},_reset:function(){var v=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),T=x.getSize();Qt(v,x.min),v.style.width=T.x+"px",v.style.height=T.y+"px"},_updateOpacity:function(){Vn(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 v=this.options.errorOverlayUrl;v&&this._url!==v&&(this._url=v,this._image.src=v)},getCenter:function(){return this._bounds.getCenter()}}),HW=function(v,x,T){return new mp(v,x,T)},XL=mp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var v=this._url.tagName==="VIDEO",x=this._image=v?this._url:ft("video");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onloadeddata=o(this.fire,this,"load"),v){for(var T=x.getElementsByTagName("source"),P=[],N=0;N0?P:[x.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(x.style,"objectFit")&&(x.style.objectFit="fill"),x.autoplay=!!this.options.autoplay,x.loop=!!this.options.loop,x.muted=!!this.options.muted,x.playsInline=!!this.options.playsInline;for(var B=0;BN?(x.height=N+"px",Je(v,B)):Zt(v,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center),T=this._getAnchor();Qt(this._container,x.add(T))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var v=this._map,x=parseInt(Vh(this._container,"marginBottom"),10)||0,T=this._container.offsetHeight+x,P=this._containerWidth,N=new j(this._containerLeft,-T-this._containerBottom);N._add(Os(this._container));var B=v.layerPointToContainerPoint(N),$=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||$),te=H(this.options.autoPanPaddingBottomRight||$),ae=v.getSize(),Ae=0,He=0;B.x+P+te.x>ae.x&&(Ae=B.x+P-ae.x+te.x),B.x-Ae-Q.x<0&&(Ae=B.x-Q.x),B.y+T+te.y>ae.y&&(He=B.y+T-ae.y+te.y),B.y-He-Q.y<0&&(He=B.y-Q.y),(Ae||He)&&(this.options.keepInView&&(this._autopanning=!0),v.fire("autopanstart").panBy([Ae,He]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ZW=function(v,x){return new yp(v,x)};ut.mergeOptions({closePopupOnClick:!0}),ut.include({openPopup:function(v,x,T){return this._initOverlay(yp,v,x,T).openOn(this),this},closePopup:function(v){return v=arguments.length?v:this._popup,v&&v.close(),this}}),mi.include({bindPopup:function(v,x){return this._popup=this._initOverlay(yp,this._popup,v,x),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(v){return this._popup&&(this instanceof Da||(this._popup._source=this),this._popup._prepareOpen(v||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(v){return this._popup&&this._popup.setContent(v),this},getPopup:function(){return this._popup},_openPopup:function(v){if(!(!this._popup||!this._map)){Bs(v);var x=v.layer||v.target;if(this._popup._source===x&&!(x instanceof To)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(v.latlng);return}this._popup._source=x,this.openPopup(v.latlng)}},_movePopup:function(v){this._popup.setLatLng(v.latlng)},_onKeyPress:function(v){v.originalEvent.keyCode===13&&this._openPopup(v)}});var _p=Zi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(v){Zi.prototype.onAdd.call(this,v),this.setOpacity(this.options.opacity),v.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(v){Zi.prototype.onRemove.call(this,v),v.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var v=Zi.prototype.getEvents.call(this);return this.options.permanent||(v.preclick=this.close),v},_initLayout:function(){var v="leaflet-tooltip",x=v+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(v){var x,T,P=this._map,N=this._container,B=P.latLngToContainerPoint(P.getCenter()),$=P.layerPointToContainerPoint(v),Q=this.options.direction,te=N.offsetWidth,ae=N.offsetHeight,Ae=H(this.options.offset),He=this._getAnchor();Q==="top"?(x=te/2,T=ae):Q==="bottom"?(x=te/2,T=0):Q==="center"?(x=te/2,T=ae/2):Q==="right"?(x=0,T=ae/2):Q==="left"?(x=te,T=ae/2):$.xthis.options.maxZoom||TP?this._retainParent(N,B,$,P):!1)},_retainChildren:function(v,x,T,P){for(var N=2*v;N<2*v+2;N++)for(var B=2*x;B<2*x+2;B++){var $=new j(N,B);$.z=T+1;var Q=this._tileCoordsToKey($),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);T+1this.options.maxZoom||this.options.minZoom!==void 0&&N1){this._setView(v,T);return}for(var He=N.min.y;He<=N.max.y;He++)for(var rt=N.min.x;rt<=N.max.x;rt++){var Xr=new j(rt,He);if(Xr.z=this._tileZoom,!!this._isValidTile(Xr)){var mr=this._tiles[this._tileCoordsToKey(Xr)];mr?mr.current=!0:$.push(Xr)}}if($.sort(function(cn,ku){return cn.distanceTo(B)-ku.distanceTo(B)}),$.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Gn=document.createDocumentFragment();for(rt=0;rt<$.length;rt++)this._addTile($[rt],Gn);this._level.el.appendChild(Gn)}}}},_isValidTile:function(v){var x=this._map.options.crs;if(!x.infinite){var T=this._globalTileRange;if(!x.wrapLng&&(v.xT.max.x)||!x.wrapLat&&(v.yT.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(v);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(v){return this._tileCoordsToBounds(this._keyToTileCoords(v))},_tileCoordsToNwSe:function(v){var x=this._map,T=this.getTileSize(),P=v.scaleBy(T),N=P.add(T),B=x.unproject(P,v.z),$=x.unproject(N,v.z);return[B,$]},_tileCoordsToBounds:function(v){var x=this._tileCoordsToNwSe(v),T=new ne(x[0],x[1]);return this.options.noWrap||(T=this._map.wrapLatLngBounds(T)),T},_tileCoordsToKey:function(v){return v.x+":"+v.y+":"+v.z},_keyToTileCoords:function(v){var x=v.split(":"),T=new j(+x[0],+x[1]);return T.z=+x[2],T},_removeTile:function(v){var x=this._tiles[v];x&&(It(x.el),delete this._tiles[v],this.fire("tileunload",{tile:x.el,coords:this._keyToTileCoords(v)}))},_initTile:function(v){Je(v,"leaflet-tile");var x=this.getTileSize();v.style.width=x.x+"px",v.style.height=x.y+"px",v.onselectstart=h,v.onmousemove=h,Re.ielt9&&this.options.opacity<1&&Vn(v,this.options.opacity)},_addTile:function(v,x){var T=this._getTilePos(v),P=this._tileCoordsToKey(v),N=this.createTile(this._wrapCoords(v),o(this._tileReady,this,v));this._initTile(N),this.createTile.length<2&&I(o(this._tileReady,this,v,null,N)),Qt(N,T),this._tiles[P]={el:N,coords:v,current:!0},x.appendChild(N),this.fire("tileloadstart",{tile:N,coords:v})},_tileReady:function(v,x,T){x&&this.fire("tileerror",{error:x,tile:T,coords:v});var P=this._tileCoordsToKey(v);T=this._tiles[P],T&&(T.loaded=+new Date,this._map._fadeAnimated?(Vn(T.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(T.active=!0,this._pruneTiles()),x||(Je(T.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:T.el,coords:v})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(v){return v.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(v){var x=new j(this._wrapX?c(v.x,this._wrapX):v.x,this._wrapY?c(v.y,this._wrapY):v.y);return x.z=v.z,x},_pxBoundsToTileRange:function(v){var x=this.getTileSize();return new X(v.min.unscaleBy(x).floor(),v.max.unscaleBy(x).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var v in this._tiles)if(!this._tiles[v].loaded)return!1;return!0}});function XW(v){return new Yh(v)}var Pu=Yh.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(v,x){this._url=v,x=g(this,x),x.detectRetina&&Re.retina&&x.maxZoom>0?(x.tileSize=Math.floor(x.tileSize/2),x.zoomReverse?(x.zoomOffset--,x.minZoom=Math.min(x.maxZoom,x.minZoom+1)):(x.zoomOffset++,x.maxZoom=Math.max(x.minZoom,x.maxZoom-1)),x.minZoom=Math.max(0,x.minZoom)):x.zoomReverse?x.minZoom=Math.min(x.maxZoom,x.minZoom):x.maxZoom=Math.max(x.minZoom,x.maxZoom),typeof x.subdomains=="string"&&(x.subdomains=x.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(v,x){return this._url===v&&x===void 0&&(x=!0),this._url=v,x||this.redraw(),this},createTile:function(v,x){var T=document.createElement("img");return Ke(T,"load",o(this._tileOnLoad,this,x,T)),Ke(T,"error",o(this._tileOnError,this,x,T)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(T.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(T.referrerPolicy=this.options.referrerPolicy),T.alt="",T.src=this.getTileUrl(v),T},getTileUrl:function(v){var x={r:Re.retina?"@2x":"",s:this._getSubdomain(v),x:v.x,y:v.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var T=this._globalTileRange.max.y-v.y;this.options.tms&&(x.y=T),x["-y"]=T}return _(this._url,i(x,this.options))},_tileOnLoad:function(v,x){Re.ielt9?setTimeout(o(v,this,null,x),0):v(null,x)},_tileOnError:function(v,x,T){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),v(T,x)},_onTileRemove:function(v){v.tile.onload=null},_getZoomForUrl:function(){var v=this._tileZoom,x=this.options.maxZoom,T=this.options.zoomReverse,P=this.options.zoomOffset;return T&&(v=x-v),v+P},_getSubdomain:function(v){var x=Math.abs(v.x+v.y)%this.options.subdomains.length;return this.options.subdomains[x]},_abortLoading:function(){var v,x;for(v in this._tiles)if(this._tiles[v].coords.z!==this._tileZoom&&(x=this._tiles[v].el,x.onload=h,x.onerror=h,!x.complete)){x.src=C;var T=this._tiles[v].coords;It(x),delete this._tiles[v],this.fire("tileabort",{tile:x,coords:T})}},_removeTile:function(v){var x=this._tiles[v];if(x)return x.el.setAttribute("src",C),Yh.prototype._removeTile.call(this,v)},_tileReady:function(v,x,T){if(!(!this._map||T&&T.getAttribute("src")===C))return Yh.prototype._tileReady.call(this,v,x,T)}});function QL(v,x){return new Pu(v,x)}var JL=Pu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(v,x){this._url=v;var T=i({},this.defaultWmsParams);for(var P in x)P in this.options||(T[P]=x[P]);x=g(this,x);var N=x.detectRetina&&Re.retina?2:1,B=this.getTileSize();T.width=B.x*N,T.height=B.y*N,this.wmsParams=T},onAdd:function(v){this._crs=this.options.crs||v.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var x=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[x]=this._crs.code,Pu.prototype.onAdd.call(this,v)},getTileUrl:function(v){var x=this._tileCoordsToNwSe(v),T=this._crs,P=K(T.project(x[0]),T.project(x[1])),N=P.min,B=P.max,$=(this._wmsVersion>=1.3&&this._crs===UL?[N.y,N.x,B.y,B.x]:[N.x,N.y,B.x,B.y]).join(","),Q=Pu.prototype.getTileUrl.call(this,v);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$},setParams:function(v,x){return i(this.wmsParams,v),x||this.redraw(),this}});function qW(v,x){return new JL(v,x)}Pu.WMS=JL,QL.wms=qW;var Na=mi.extend({options:{padding:.1},initialize:function(v){g(this,v),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Je(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 v={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(v.zoomanim=this._onAnimZoom),v},_onAnimZoom:function(v){this._updateTransform(v.center,v.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(v,x){var T=this._map.getZoomScale(x,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),N=this._map.project(this._center,x),B=P.multiplyBy(-T).add(N).subtract(this._map._getNewPixelOrigin(v,x));Re.any3d?Rs(this._container,B,T):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var v in this._layers)this._layers[v]._reset()},_onZoomEnd:function(){for(var v in this._layers)this._layers[v]._project()},_updatePaths:function(){for(var v in this._layers)this._layers[v]._update()},_update:function(){var v=this.options.padding,x=this._map.getSize(),T=this._map.containerPointToLayerPoint(x.multiplyBy(-v)).round();this._bounds=new X(T,T.add(x.multiplyBy(1+v*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),eP=Na.extend({options:{tolerance:0},getEvents:function(){var v=Na.prototype.getEvents.call(this);return v.viewprereset=this._onViewPreReset,v},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Na.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var v=this._container=document.createElement("canvas");Ke(v,"mousemove",this._onMouseMove,this),Ke(v,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(v,"mouseout",this._handleMouseOut,this),v._leaflet_disable_events=!0,this._ctx=v.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var v;this._redrawBounds=null;for(var x in this._layers)v=this._layers[x],v._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Na.prototype._update.call(this);var v=this._bounds,x=this._container,T=v.getSize(),P=Re.retina?2:1;Qt(x,v.min),x.width=P*T.x,x.height=P*T.y,x.style.width=T.x+"px",x.style.height=T.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-v.min.x,-v.min.y),this.fire("update")}},_reset:function(){Na.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(v){this._updateDashArray(v),this._layers[l(v)]=v;var x=v._order={layer:v,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=x),this._drawLast=x,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(v){this._requestRedraw(v)},_removePath:function(v){var x=v._order,T=x.next,P=x.prev;T?T.prev=P:this._drawLast=P,P?P.next=T:this._drawFirst=T,delete v._order,delete this._layers[l(v)],this._requestRedraw(v)},_updatePath:function(v){this._extendRedrawBounds(v),v._project(),v._update(),this._requestRedraw(v)},_updateStyle:function(v){this._updateDashArray(v),this._requestRedraw(v)},_updateDashArray:function(v){if(typeof v.options.dashArray=="string"){var x=v.options.dashArray.split(/[, ]+/),T=[],P,N;for(N=0;N')}}catch{}return function(v){return document.createElement("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),KW={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Na.prototype._update.call(this),this.fire("update"))},_initPath:function(v){var x=v._container=Xh("shape");Je(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",v._path=Xh("path"),x.appendChild(v._path),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){var x=v._container;this._container.appendChild(x),v.options.interactive&&v.addInteractiveTarget(x)},_removePath:function(v){var x=v._container;It(x),v.removeInteractiveTarget(x),delete this._layers[l(v)]},_updateStyle:function(v){var x=v._stroke,T=v._fill,P=v.options,N=v._container;N.stroked=!!P.stroke,N.filled=!!P.fill,P.stroke?(x||(x=v._stroke=Xh("stroke")),N.appendChild(x),x.weight=P.weight+"px",x.color=P.color,x.opacity=P.opacity,P.dashArray?x.dashStyle=S(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):x.dashStyle="",x.endcap=P.lineCap.replace("butt","flat"),x.joinstyle=P.lineJoin):x&&(N.removeChild(x),v._stroke=null),P.fill?(T||(T=v._fill=Xh("fill")),N.appendChild(T),T.color=P.fillColor||P.color,T.opacity=P.fillOpacity):T&&(N.removeChild(T),v._fill=null)},_updateCircle:function(v){var x=v._point.round(),T=Math.round(v._radius),P=Math.round(v._radiusY||T);this._setPath(v,v._empty()?"M0 0":"AL "+x.x+","+x.y+" "+T+","+P+" 0,"+65535*360)},_setPath:function(v,x){v._path.v=x},_bringToFront:function(v){wu(v._container)},_bringToBack:function(v){Tu(v._container)}},xp=Re.vml?Xh:tt,qh=Na.extend({_initContainer:function(){this._container=xp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=xp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Na.prototype._update.call(this);var v=this._bounds,x=v.getSize(),T=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,T.setAttribute("width",x.x),T.setAttribute("height",x.y)),Qt(T,v.min),T.setAttribute("viewBox",[v.min.x,v.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(v){var x=v._path=xp("path");v.options.className&&Je(x,v.options.className),v.options.interactive&&Je(x,"leaflet-interactive"),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(v._path),v.addInteractiveTarget(v._path)},_removePath:function(v){It(v._path),v.removeInteractiveTarget(v._path),delete this._layers[l(v)]},_updatePath:function(v){v._project(),v._update()},_updateStyle:function(v){var x=v._path,T=v.options;x&&(T.stroke?(x.setAttribute("stroke",T.color),x.setAttribute("stroke-opacity",T.opacity),x.setAttribute("stroke-width",T.weight),x.setAttribute("stroke-linecap",T.lineCap),x.setAttribute("stroke-linejoin",T.lineJoin),T.dashArray?x.setAttribute("stroke-dasharray",T.dashArray):x.removeAttribute("stroke-dasharray"),T.dashOffset?x.setAttribute("stroke-dashoffset",T.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),T.fill?(x.setAttribute("fill",T.fillColor||T.color),x.setAttribute("fill-opacity",T.fillOpacity),x.setAttribute("fill-rule",T.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(v,x){this._setPath(v,lt(v._parts,x))},_updateCircle:function(v){var x=v._point,T=Math.max(Math.round(v._radius),1),P=Math.max(Math.round(v._radiusY),1)||T,N="a"+T+","+P+" 0 1,0 ",B=v._empty()?"M0 0":"M"+(x.x-T)+","+x.y+N+T*2+",0 "+N+-T*2+",0 ";this._setPath(v,B)},_setPath:function(v,x){v._path.setAttribute("d",x)},_bringToFront:function(v){wu(v._path)},_bringToBack:function(v){Tu(v._path)}});Re.vml&&qh.include(KW);function rP(v){return Re.svg||Re.vml?new qh(v):null}ut.include({getRenderer:function(v){var x=v.options.renderer||this._getPaneRenderer(v.options.pane)||this.options.renderer||this._renderer;return x||(x=this._renderer=this._createRenderer()),this.hasLayer(x)||this.addLayer(x),x},_getPaneRenderer:function(v){if(v==="overlayPane"||v===void 0)return!1;var x=this._paneRenderers[v];return x===void 0&&(x=this._createRenderer({pane:v}),this._paneRenderers[v]=x),x},_createRenderer:function(v){return this.options.preferCanvas&&tP(v)||rP(v)}});var nP=Au.extend({initialize:function(v,x){Au.prototype.initialize.call(this,this._boundsToLatLngs(v),x)},setBounds:function(v){return this.setLatLngs(this._boundsToLatLngs(v))},_boundsToLatLngs:function(v){return v=ie(v),[v.getSouthWest(),v.getNorthWest(),v.getNorthEast(),v.getSouthEast()]}});function QW(v,x){return new nP(v,x)}qh.create=xp,qh.pointsToPath=lt,Ea.geometryToLayer=dp,Ea.coordsToLatLng=ex,Ea.coordsToLatLngs=vp,Ea.latLngToCoords=tx,Ea.latLngsToCoords=pp,Ea.getFeature=Lu,Ea.asFeature=gp,ut.mergeOptions({boxZoom:!0});var iP=Ui.extend({initialize:function(v){this._map=v,this._container=v._container,this._pane=v._panes.overlayPane,this._resetStateTimeout=0,v.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(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(v){if(!v.shiftKey||v.which!==1&&v.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Fh(),z_(),this._startPoint=this._map.mouseEventToContainerPoint(v),Ke(document,{contextmenu:Bs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(v){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Je(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(v);var x=new X(this._point,this._startPoint),T=x.getSize();Qt(this._box,x.min),this._box.style.width=T.x+"px",this._box.style.height=T.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Gh(),B_(),Tt(document,{contextmenu:Bs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(v){if(!(v.which!==1&&v.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var x=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(x).fire("boxzoomend",{boxZoomBounds:x})}},_onKeyDown:function(v){v.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ut.addInitHook("addHandler","boxZoom",iP),ut.mergeOptions({doubleClickZoom:!0});var aP=Ui.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(v){var x=this._map,T=x.getZoom(),P=x.options.zoomDelta,N=v.originalEvent.shiftKey?T-P:T+P;x.options.doubleClickZoom==="center"?x.setZoom(N):x.setZoomAround(v.containerPoint,N)}});ut.addInitHook("addHandler","doubleClickZoom",aP),ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var oP=Ui.extend({addHooks:function(){if(!this._draggable){var v=this._map;this._draggable=new wo(v._mapPane,v._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),v.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),v.on("zoomend",this._onZoomEnd,this),v.whenReady(this._onZoomEnd,this))}Je(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(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 v=this._map;if(v._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var x=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(x.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(x.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;v.fire("movestart").fire("dragstart"),v.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(v){if(this._map.options.inertia){var x=this._lastTime=+new Date,T=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(T),this._times.push(x),this._prunePositions(x)}this._map.fire("move",v).fire("drag",v)},_prunePositions:function(v){for(;this._positions.length>1&&v-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var v=this._map.getSize().divideBy(2),x=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=x.subtract(v).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(v,x){return v-(v-x)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var v=this._draggable._newPos.subtract(this._draggable._startPos),x=this._offsetLimit;v.xx.max.x&&(v.x=this._viscousLimit(v.x,x.max.x)),v.y>x.max.y&&(v.y=this._viscousLimit(v.y,x.max.y)),this._draggable._newPos=this._draggable._startPos.add(v)}},_onPreDragWrap:function(){var v=this._worldWidth,x=Math.round(v/2),T=this._initialWorldOffset,P=this._draggable._newPos.x,N=(P-x+T)%v+x-T,B=(P+x+T)%v-x-T,$=Math.abs(N+T)0?B:-B))-x;this._delta=0,this._startTime=null,$&&(v.options.scrollWheelZoom==="center"?v.setZoom(x+$):v.setZoomAround(this._lastMousePos,x+$))}});ut.addInitHook("addHandler","scrollWheelZoom",lP);var JW=600;ut.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var uP=Ui.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(v){if(clearTimeout(this._holdTimeout),v.touches.length===1){var x=v.touches[0];this._startPos=this._newPos=new j(x.clientX,x.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Mr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",x))},this),JW),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function v(){Tt(document,"touchend",Mr),Tt(document,"touchend touchcancel",v)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(v){var x=v.touches[0];this._newPos=new j(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(v,x){var T=new MouseEvent(v,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});T._simulated=!0,x.target.dispatchEvent(T)}});ut.addInitHook("addHandler","tapHold",uP),ut.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var cP=Ui.extend({addHooks:function(){Je(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(v){var x=this._map;if(!(!v.touches||v.touches.length!==2||x._animatingZoom||this._zooming)){var T=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(T.add(P)._divideBy(2))),this._startDist=T.distanceTo(P),this._startZoom=x.getZoom(),this._moved=!1,this._zooming=!0,x._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Mr(v)}},_onTouchMove:function(v){if(!(!v.touches||v.touches.length!==2||!this._zooming)){var x=this._map,T=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]),N=T.distanceTo(P)/this._startDist;if(this._zoom=x.getScaleZoom(N,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoomx.getMaxZoom()&&N>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,N===1)return}else{var B=T._add(P)._divideBy(2)._subtract(this._centerPoint);if(N===1&&B.x===0&&B.y===0)return;this._center=x.unproject(x.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(x._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var $=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I($,this,!0),Mr(v)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(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))}});ut.addInitHook("addHandler","touchZoom",cP),ut.BoxZoom=iP,ut.DoubleClickZoom=aP,ut.Drag=oP,ut.Keyboard=sP,ut.ScrollWheelZoom=lP,ut.TapHold=uP,ut.TouchZoom=cP,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=eP,r.Circle=J_,r.CircleMarker=fp,r.Class=V,r.Control=gi,r.DivIcon=KL,r.DivOverlay=Zi,r.DomEvent=mW,r.DomUtil=pW,r.Draggable=wo,r.Evented=U,r.FeatureGroup=Da,r.GeoJSON=Ea,r.GridLayer=Yh,r.Handler=Ui,r.Icon=Mu,r.ImageOverlay=mp,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=mi,r.LayerGroup=Cu,r.LineUtil=kW,r.Map=ut,r.Marker=hp,r.Mixin=TW,r.Path=To,r.Point=j,r.PolyUtil=CW,r.Polygon=Au,r.Polyline=Ia,r.Popup=yp,r.PosAnimation=EL,r.Projection=DW,r.Rectangle=nP,r.Renderer=Na,r.SVG=qh,r.SVGOverlay=qL,r.TileLayer=Pu,r.Tooltip=_p,r.Transformation=fe,r.Util=O,r.VideoOverlay=XL,r.bind=o,r.bounds=K,r.canvas=tP,r.circle=jW,r.circleMarker=BW,r.control=Uh,r.divIcon=YW,r.extend=i,r.featureGroup=RW,r.geoJSON=YL,r.geoJson=GW,r.gridLayer=XW,r.icon=OW,r.imageOverlay=HW,r.latLng=ve,r.latLngBounds=ie,r.layerGroup=NW,r.map=yW,r.marker=zW,r.point=H,r.polygon=FW,r.polyline=VW,r.popup=ZW,r.rectangle=QW,r.setOptions=g,r.stamp=l,r.svg=rP,r.svgOverlay=UW,r.tileLayer=QL,r.tooltip=$W,r.transformation=Me,r.version=n,r.videoOverlay=WW;var eU=window.L;r.noConflict=function(){return window.L=eU,this},window.L=r})})(gC,gC.exports);var xu=gC.exports;const N8=_C(xu);function np(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function lL(t,e){return e==null?function(n,i){const a=Z.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=Z.useRef();a.current||(a.current=t(n,i));const o=Z.useRef(n),{instance:s}=a.current;return Z.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function R8(t,e){Z.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function Sye(t){return function(r){const n=A_(),i=t(L_(r,n),n);return k8(n.map,r.attribution),sL(i.current,r.eventHandlers),R8(i.current,n),i}}function bye(t,e){const r=Z.useRef();Z.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function wye(t){return function(r){const n=A_(),i=t(L_(r,n),n);return sL(i.current,r.eventHandlers),R8(i.current,n),bye(i.current,r),i}}function O8(t,e){const r=lL(t),n=xye(r,e);return yye(n)}function z8(t,e){const r=lL(t,e),n=wye(r);return mye(n)}function Tye(t,e){const r=lL(t,e),n=Sye(r);return _ye(n)}function Cye(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function Mye(){return A_().map}const Aye=z8(function({center:e,children:r,...n},i){const a=new xu.CircleMarker(e,n);return np(a,D8(i,{overlayContainer:a}))},vye);function mC(){return mC=Object.assign||function(t){for(var e=1;e(d==null?void 0:d.map)??null,[d]);const g=Z.useCallback(y=>{if(y!==null&&d===null){const _=new xu.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(gye(_))}},[]);Z.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Vc.createElement(E8,{value:d},n):o??null;return Vc.createElement("div",mC({},f,{ref:g}),m)}const Pye=Z.forwardRef(Lye),kye=z8(function({positions:e,...r},n){const i=new xu.Polyline(e,r);return np(i,D8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),Dye=O8(function(e,r){const n=new xu.Popup(e,r.overlayContainer);return np(n,r)},function(e,r,{position:n},i){Z.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),Iye=Tye(function({url:e,...r},n){const i=new xu.TileLayer(e,L_(r,n));return np(i,n)},function(e,r,n){Cye(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),Eye=O8(function(e,r){const n=new xu.Tooltip(e,r.overlayContainer);return np(n,r)},function(e,r,{position:n},i){Z.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),Nye="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=",Rye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Oye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete N8.Icon.Default.prototype._getIconUrl;N8.Icon.Default.mergeOptions({iconUrl:Nye,iconRetinaUrl:Rye,shadowUrl:Oye});const gz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],zye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Bye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function jye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Vye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Fye({bounds:t}){const e=Mye();return Z.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function Gye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return b.jsxs("div",{className:"min-w-[200px]",children:[b.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),b.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),b.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[b.jsx("div",{className:"text-slate-500",children:"Role"}),b.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),b.jsx("div",{className:"text-slate-500",children:"Hardware"}),b.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),b.jsx("div",{className:"text-slate-500",children:"Battery"}),b.jsx("div",{className:"text-slate-700",children:r}),b.jsx("div",{className:"text-slate-500",children:"Last Heard"}),b.jsx("div",{className:"text-slate-700",children:Vye(t.last_heard)})]}),e&&b.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[b.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[b.jsx(Yc,{size:10}),"Google Maps"]}),b.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[b.jsx(Yc,{size:10}),"OSM"]})]})]})}function Hye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=Z.useMemo(()=>t.filter(h=>h.latitude!==null&&h.longitude!==null),[t]),a=t.length-i.length,o=Z.useMemo(()=>new Map(i.map(h=>[h.node_num,h])),[i]),s=Z.useMemo(()=>e.filter(h=>o.has(h.from_node)&&o.has(h.to_node)),[e,o]),l=Z.useMemo(()=>{if(i.length===0)return null;const h=i.map(d=>d.latitude),f=i.map(d=>d.longitude);return[[Math.min(...h),Math.min(...f)],[Math.max(...h),Math.max(...f)]]},[i]),u=[43.6,-114.4],c=Z.useMemo(()=>{const h=new Set;return r!==null&&e.forEach(f=>{f.from_node===r&&h.add(f.to_node),f.to_node===r&&h.add(f.from_node)}),h},[r,e]);return b.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[b.jsxs(Pye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[b.jsx(Iye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),b.jsx(Fye,{bounds:l}),s.map((h,f)=>{const d=o.get(h.from_node),p=o.get(h.to_node),g=r===null||h.from_node===r||h.to_node===r;return b.jsx(kye,{positions:[[d.latitude,d.longitude],[p.latitude,p.longitude]],color:Bye(h.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},f)}),i.map(h=>{const f=h.node_num===r,d=c.has(h.node_num),p=r===null||f||d,g=zye.includes(h.role),m=jye(h.latitude),y=gz[m%gz.length];return b.jsxs(Aye,{center:[h.latitude,h.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:f?"#ffffff":y,weight:f?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(f?null:h.node_num)},children:[b.jsx(Eye,{direction:"top",offset:[0,-8],children:b.jsx("span",{className:"font-mono text-xs",children:h.short_name})}),b.jsx(Dye,{children:b.jsx(Gye,{node:h})})]},h.node_num)})]}),b.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[b.jsx(JB,{size:12}),b.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&b.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const mz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Wye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function yz(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Uye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function Zye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function $ye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function Yye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Xye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function qye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=Z.useMemo(()=>{if(!t)return[];const h=new Map(r.map(d=>[d.node_num,d])),f=[];return e.forEach(d=>{if(d.from_node===t.node_num){const p=h.get(d.to_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}else if(d.to_node===t.node_num){const p=h.get(d.from_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}}),f.sort((d,p)=>p.snr-d.snr)},[t,e,r]);if(!t)return b.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[b.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:b.jsx(Xc,{size:24,className:"text-slate-500"})}),b.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=Wye.includes(t.role),o=Zye(t.latitude),s=mz[o%mz.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return b.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[b.jsxs("div",{className:"p-4 border-b border-border",children:[b.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),b.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),b.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),b.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),b.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),b.jsx("div",{className:"text-sm text-slate-300",children:$ye(o)})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),b.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&b.jsx(x2,{size:12,className:"text-amber-400"}),u]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${Xye(t.last_heard)}`}),b.jsx("span",{className:"text-sm text-slate-300",children:Yye(t.last_heard)})]})]}),b.jsxs("div",{className:"col-span-2",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),b.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&b.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[b.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[b.jsx(Yc,{size:10}),"Google Maps"]}),b.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[b.jsx(Yc,{size:10}),"OSM"]})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto",children:[b.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?b.jsx("div",{className:"divide-y divide-border",children:i.map(h=>b.jsxs("button",{onClick:()=>n(h.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:yz(h.snr)},children:[b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:h.node.short_name}),b.jsx("div",{className:"text-xs text-slate-500 truncate",children:h.node.long_name})]}),b.jsxs("div",{className:"text-right flex-shrink-0",children:[b.jsxs("div",{className:"text-xs font-mono",style:{color:yz(h.snr)},children:[h.snr.toFixed(1)," dB"]}),b.jsx("div",{className:"text-xs text-slate-500",children:Uye(h.snr)})]})]},h.node.node_num))}):b.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const _z=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Kye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Qye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Jye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function xz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function e0e({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=Z.useState(""),[a,o]=Z.useState("short_name"),[s,l]=Z.useState("asc"),[u,c]=Z.useState("all"),h=Z.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>_z.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||xz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),f=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},d=({field:p})=>a!==p?null:s==="asc"?b.jsx(XZ,{size:14,className:"inline ml-1"}):b.jsx(Nv,{size:14,className:"inline ml-1"});return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[b.jsxs("div",{className:"relative flex-1 max-w-xs",children:[b.jsx(a$,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),b.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(_2,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>b.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),b.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[h.length," of ",t.length," nodes"]})]}),b.jsxs("div",{className:"overflow-x-auto",children:[b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[b.jsx("th",{className:"w-8 px-3 py-2"}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("short_name"),children:["Name ",b.jsx(d,{field:"short_name"})]}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("role"),children:["Role ",b.jsx(d,{field:"role"})]}),b.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("battery_level"),children:["Battery ",b.jsx(d,{field:"battery_level"})]}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("last_heard"),children:["Last Heard ",b.jsx(d,{field:"last_heard"})]}),b.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("hardware"),children:["Hardware ",b.jsx(d,{field:"hardware"})]})]})}),b.jsx("tbody",{className:"divide-y divide-border",children:h.slice(0,100).map(p=>{const g=_z.includes(p.role),m=p.node_num===e;return b.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[b.jsx("td",{className:"px-3 py-2",children:b.jsx("div",{className:`w-2 h-2 rounded-full ${Kye(p.last_heard)}`})}),b.jsxs("td",{className:"px-3 py-2",children:[b.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),b.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),b.jsx("td",{className:"px-3 py-2",children:b.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),b.jsx("td",{className:"px-3 py-2 text-slate-400",children:xz(p.latitude)}),b.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Jye(p)}),b.jsx("td",{className:"px-3 py-2 text-slate-400",children:Qye(p.last_heard)}),b.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),h.length>100&&b.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",h.length," nodes"]}),h.length===0&&b.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function t0e(){const[t,e]=Z.useState([]),[r,n]=Z.useState([]),[i,a]=Z.useState([]),[o,s]=Z.useState(null),[l,u]=Z.useState("topo"),[c,h]=Z.useState(!0),[f,d]=Z.useState(null);Z.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([f$(),d$(),M$()]).then(([m,y,_])=>{e(m),n(y),a(_),h(!1)}).catch(m=>{d(m.message),h(!1)})},[]);const p=Z.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=Z.useCallback(m=>{s(m)},[]);return c?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):f?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),b.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[b.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[b.jsx(n$,{size:14}),"Topology"]}),b.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[b.jsx(e$,{size:14}),"Geographic"]})]})]}),b.jsxs("div",{className:"flex gap-0",children:[b.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?b.jsx(dye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):b.jsx(Hye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),b.jsx(qye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),b.jsx(e0e,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function r0e({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return b.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-center justify-between mb-2",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),b.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),b.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),b.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[b.jsxs("div",{children:["Events: ",t.event_count]}),b.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&b.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function n0e({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:O0,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:_s,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:sy,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:sy,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return b.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:b.jsxs("div",{className:"flex items-start gap-3",children:[b.jsx(n,{size:18,className:r.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),b.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),b.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&b.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[b.jsx("span",{className:"uppercase",children:t.source}),t.expires&&b.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function i0e({swpc:t}){var n,i;if(!t||!t.enabled)return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Ik,{size:14}),"Solar/Geomagnetic Indices"]}),b.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Ik,{size:14}),"Solar/Geomagnetic Indices"]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),b.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),b.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),b.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),b.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),b.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),b.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),b.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),b.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&b.jsxs("div",{className:"space-y-2",children:[b.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>b.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function a0e({ducting:t}){if(!t||!t.enabled)return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Ek,{size:14}),"Tropospheric Ducting"]}),b.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(Ek,{size:14}),"Tropospheric Ducting"]}),b.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),b.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),b.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),b.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),b.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),b.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&b.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),b.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),b.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),b.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[b.jsx("div",{children:"dM/dz reference:"}),b.jsxs("div",{className:"mt-1 space-y-0.5",children:[b.jsx("div",{children:">79: Normal propagation"}),b.jsx("div",{children:"0–79: Super-refraction"}),b.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&b.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function o0e(){var D;const[t,e]=Z.useState(null),[r,n]=Z.useState([]),[i,a]=Z.useState(null),[o,s]=Z.useState(null),[l,u]=Z.useState([]),[c,h]=Z.useState(null),[f,d]=Z.useState([]),[p,g]=Z.useState([]),[m,y]=Z.useState([]),[_,S]=Z.useState([]),[w,C]=Z.useState(0),[M,A]=Z.useState(!0),[k,E]=Z.useState(null);return Z.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([o4().catch(()=>null),g$().catch(()=>[]),y$().catch(()=>null),_$().catch(()=>null),x$().catch(()=>[]),S$().catch(()=>null),b$().catch(()=>[]),w$().catch(()=>[]),T$().catch(()=>[]),C$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,V,G,F,U,j,W,H])=>{e(I),n(z),a(O),s(V),u(G),h(F),d(U||[]),g(j||[]),y(W||[]),S((H==null?void 0:H.hotspots)||[]),C((H==null?void 0:H.new_ignitions)||0),A(!1)}).catch(I=>{E(I.message),A(!1)})},[]),M?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):k?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",k]})}):t!=null&&t.enabled?b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),b.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(m2,{size:14}),"Feed Status"]}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(I=>b.jsx(r0e,{feed:I},I.source))})]}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[b.jsx(i0e,{swpc:i}),b.jsx(a0e,{ducting:o})]}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(QZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?b.jsx("div",{className:"space-y-3",children:l.map(I=>b.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between mb-1",children:[b.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),b.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.severity==="warning"?"bg-red-500/20 text-red-400":I.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:I.severity})]}),b.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[b.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&b.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(cd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No active wildfires in the area"})]})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(r$,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?b.jsx("div",{className:"text-slate-500 py-4",children:b.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?b.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>b.jsxs("div",{className:`p-3 rounded-lg ${I.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":I.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":I.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between mb-1",children:[b.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),b.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.danger_level>=4?"bg-red-500/20 text-red-400":I.danger_level>=3?"bg-amber-500/20 text-amber-400":I.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:I.danger_name})]}),b.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&b.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((D=c.advisories[0])==null?void 0:D.center_link)&&b.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(cd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No avalanche advisories"})]})]})]}),f.length>0&&b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(KZ,{size:14}),"Stream Gauges (",f.length,")"]}),b.jsx("div",{className:"space-y-2",children:f.map(I=>{var z,O,V,G,F;return b.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),b.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(V=(O=I.properties)==null?void 0:O.value)==null?void 0:V.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),b.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(F=I.properties)==null?void 0:F.parameter})]},I.event_id)})})]}),(p.length>0||m.length>0)&&b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx($Z,{size:14}),"Road Conditions"]}),p.length>0&&b.jsxs("div",{className:"mb-4",children:[b.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),b.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,V,G,F,U,j,W,H;return b.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((O=I.properties)==null?void 0:O.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((V=I.properties)==null?void 0:V.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),b.jsx("span",{className:"text-sm font-mono text-slate-300",children:(F=I.properties)!=null&&F.roadClosure?"CLOSED":`${Math.round(((U=I.properties)==null?void 0:U.currentSpeed)||0)}mph`})]}),!((j=I.properties)!=null&&j.roadClosure)&&b.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((W=I.properties)==null?void 0:W.speedRatio)||1)*100),"% of free flow (",Math.round(((H=I.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},I.event_id)})})]}),m.length>0&&b.jsxs("div",{children:[b.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),b.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return b.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),b.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),b.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(i$,{size:14}),"Satellite Hotspots (",_.length,")",w>0&&b.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[w," NEW"]})]}),b.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,V,G,F,U;return b.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.new_ignition?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),b.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((V=I.properties)==null?void 0:V.frp)&&b.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),b.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[b.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((F=I.properties)==null?void 0:F.acq_time)&&b.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((U=I.properties)==null?void 0:U.near_fire)&&b.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(_s,{size:14}),"Active Events (",r.length,")"]}),r.length>0?b.jsx("div",{className:"space-y-3",children:r.map(I=>b.jsx(n0e,{event:I},I.event_id))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(cd,{size:16,className:"text-green-500"}),b.jsx("span",{children:"No active environmental events"})]})]})]}):b.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[b.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:b.jsx($d,{size:32,className:"text-slate-500"})}),b.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),b.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}const Sz=[{key:"bot",label:"Bot",icon:UZ},{key:"connection",label:"Connection",icon:i4},{key:"response",label:"Response",icon:t$},{key:"history",label:"History",icon:qZ},{key:"memory",label:"Memory",icon:ZZ},{key:"context",label:"Context",icon:y2},{key:"commands",label:"Commands",icon:s$},{key:"llm",label:"LLM",icon:qB},{key:"weather",label:"Weather",icon:$d},{key:"meshmonitor",label:"MeshMonitor",icon:Xc},{key:"knowledge",label:"Knowledge",icon:WZ},{key:"mesh_sources",label:"Mesh Sources",icon:JZ},{key:"mesh_intelligence",label:"Intelligence",icon:m2},{key:"environmental",label:"Environmental",icon:l$},{key:"dashboard",label:"Dashboard",icon:QB}],ln={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",environmental:"Live environmental data feeds for situational awareness. Each feed polls a public or authenticated API for real-time conditions affecting your area.",dashboard:"Web dashboard settings. You're looking at it right now."},s0e=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],l0e=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function Aa({info:t,link:e,linkText:r="Learn more"}){const[n,i]=Z.useState(!1);return b.jsxs("div",{className:"relative inline-block",children:[b.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),b.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[t,e&&b.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",b.jsx(Yc,{size:10})]})]})]})]})}function un({text:t}){return b.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:t})}function dt({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=Z.useState(!1),c=n==="password";return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,o&&b.jsx(Aa,{info:o,link:s})]}),b.jsxs("div",{className:"relative",children:[b.jsx("input",{type:c&&!l?"password":"text",value:e,onChange:h=>r(h.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&b.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?b.jsx(KB,{size:16}):b.jsx(y2,{size:16})})]}),a&&b.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Be({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,s&&b.jsx(Aa,{info:s,link:l})]}),b.jsx("input",{type:"number",value:e,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&b.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function _t({label:t,checked:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){return b.jsxs("div",{className:"flex items-center justify-between py-2",children:[b.jsxs("div",{children:[b.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[t,i&&b.jsx(Aa,{info:i,link:a})]}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]}),b.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function va({label:t,value:e,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&b.jsx(Aa,{info:a,link:o})]}),b.jsx("select",{value:e,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>b.jsx("option",{value:s.value,children:s.label},s.value))}),i&&b.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function u0e({label:t,value:e,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&b.jsx(Aa,{info:a,link:o})]}),b.jsx("textarea",{value:e,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&b.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Qo({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=Z.useState(e.join(", "));Z.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&b.jsx(Aa,{info:i,link:a})]}),b.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function B8({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=Z.useState(e.join(", "));Z.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&b.jsx(Aa,{info:i,link:a})]}),b.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Fr({label:t,description:e,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex-1",children:[b.jsx("span",{className:"text-sm text-slate-300",children:t}),b.jsx("p",{className:"text-xs text-slate-600",children:e})]}),b.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&b.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[b.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),b.jsx("input",{type:"number",value:i,onChange:h=>a(Number(h.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&b.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function c0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.bot}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),b.jsx(dt,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),b.jsx(_t,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),b.jsx(_t,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function h0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.connection}),b.jsx(va,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),t.type==="serial"?b.jsx(dt,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),b.jsx(Be,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function f0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.response}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),b.jsx(Be,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),b.jsx(Be,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function d0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.history}),b.jsx(dt,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),b.jsx(Be,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),b.jsx(_t,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r}),helper:"Automatically prune old conversations"}),t.auto_cleanup&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),b.jsx(Be,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function v0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.memory}),b.jsx(_t,{label:"Enable Memory",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Keep conversation context between messages"}),t.enabled&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),b.jsx(Be,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function p0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.context}),b.jsx(_t,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(B8,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Channel indexes to monitor (empty = all)",info:"Meshtastic channel numbers to listen on. Channel 0 is the default primary channel. Leave empty to monitor all channels."}),b.jsx(Qo,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Node IDs to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0,helper:"Ignore messages older than this"}),b.jsx(Be,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function g0e({data:t,onChange:e}){const r=new Set(t.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?e({...t,disabled_commands:t.disabled_commands.filter(o=>o.toLowerCase()!==a)}):e({...t,disabled_commands:[...t.disabled_commands,i]})};return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.commands}),b.jsx(_t,{label:"Enable Commands",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Allow !commands on the mesh"}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(dt,{label:"Command Prefix",value:t.prefix,onChange:i=>e({...t,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",b.jsx(Aa,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),b.jsx("div",{className:"grid gap-1",children:s0e.map(i=>{const a=!r.has(i.name.toLowerCase());return b.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),b.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),b.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function m0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.llm}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(va,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),b.jsx(dt,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),b.jsx(dt,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),b.jsx(dt,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),b.jsx(Be,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),b.jsx(_t,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r}),helper:"Enable custom system instructions"}),t.use_system_prompt&&b.jsx(u0e,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),b.jsx(_t,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),b.jsx(_t,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function y0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.weather}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(va,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),b.jsx(va,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),b.jsx(dt,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function _0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.meshmonitor}),b.jsx(_t,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(dt,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),b.jsx(_t,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),b.jsx(Be,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),b.jsx(_t,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function x0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.knowledge}),b.jsx(_t,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(va,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(t.backend==="qdrant"||t.backend==="auto")&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),b.jsx(Be,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r}),helper:"Default 6333"})]}),b.jsx(dt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r}),helper:"Qdrant collection name"}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"TEI Host",value:t.tei_host,onChange:r=>e({...t,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),b.jsx(Be,{label:"TEI Port",value:t.tei_port,onChange:r=>e({...t,tei_port:r}),helper:"Default 8090"})]}),b.jsx(_t,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),b.jsx(dt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r}),helper:"Local knowledge database file"}),b.jsx(Be,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function S0e({source:t,onChange:e,onDelete:r}){const[n,i]=Z.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[n?b.jsx(Nv,{size:16}):b.jsx(Rv,{size:16}),b.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),b.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),b.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),b.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(z0,{size:14})})]}),n&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Name",value:t.name,onChange:o=>e({...t,name:o}),helper:"Friendly name for this source"}),b.jsx(va,{label:"Type",value:t.type,onChange:o=>e({...t,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[t.type]||""})]}),t.type!=="mqtt"&&b.jsx(dt,{label:"URL",value:t.url,onChange:o=>e({...t,url:o}),helper:"Full URL including protocol"}),t.type==="meshmonitor"&&b.jsx(dt,{label:"API Token",value:t.api_token,onChange:o=>e({...t,api_token:o}),type:"password",helper:"Bearer token for authentication"}),t.type==="mqtt"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Host",value:t.host||"",onChange:o=>e({...t,host:o}),helper:"MQTT broker hostname"}),b.jsx(Be,{label:"Port",value:t.port||1883,onChange:o=>e({...t,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Username",value:t.username||"",onChange:o=>e({...t,username:o})}),b.jsx(dt,{label:"Password",value:t.password||"",onChange:o=>e({...t,password:o}),type:"password"})]}),b.jsx(dt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:o=>e({...t,topic_root:o}),helper:"Base topic to subscribe to"}),b.jsx(_t,{label:"Use TLS",checked:t.use_tls||!1,onChange:o=>e({...t,use_tls:o}),helper:"Encrypt MQTT connection"})]}),b.jsx(Be,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:o=>e({...t,refresh_interval:o}),min:10,helper:"Polling frequency"}),b.jsx(_t,{label:"Enabled",checked:t.enabled,onChange:o=>e({...t,enabled:o})}),b.jsx(_t,{label:"Polite Mode",checked:t.polite_mode,onChange:o=>e({...t,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function b0e({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.mesh_sources}),t.map((n,i)=>b.jsx(S0e,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),b.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(Yd,{size:16})," Add Source"]})]})}function w0e({data:t,onChange:e}){const[r,n]=Z.useState(null);return b.jsxs("div",{className:"space-y-6",children:[b.jsx(un,{text:ln.mesh_intelligence}),b.jsx(_t,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Activate health scoring and alerting"}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),b.jsx(Be,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),b.jsx(Be,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),b.jsx(Qo,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Short names of critical infrastructure",info:"Nodes that get priority alerting when they go offline. Use the node's short name (e.g., MHR, HPR)."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),min:-1,helper:"-1 = disabled",info:"Meshtastic channel number for broadcast alerts. Set to -1 to disable channel broadcasting."}),b.jsx(Be,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",b.jsx(Aa,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),t.regions.map((i,a)=>b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[r===a?b.jsx(Nv,{size:16}):b.jsx(Rv,{size:16}),b.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),b.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),b.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=t.regions.filter((l,u)=>u!==a);e({...t,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(z0,{size:14})})]}),r===a&&b.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),b.jsx(dt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),b.jsx(Be,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),b.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),b.jsx(Qo,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),b.jsx(Qo,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a)),b.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};e({...t,regions:[...t.regions,i]}),n(t.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(Yd,{size:16})," Add Region"]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",b.jsx(Aa,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),b.jsx(Fr,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),b.jsx(Fr,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),b.jsx(Fr,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),b.jsx(Fr,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:t.alert_rules.feeder_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,feeder_offline:i}})}),b.jsx(Fr,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),b.jsx(Fr,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),b.jsx(Fr,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}}),threshold:t.alert_rules.battery_warning_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),b.jsx(Fr,{label:"Battery Critical",description:"Alert at critical battery level",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}}),threshold:t.alert_rules.battery_critical_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),b.jsx(Fr,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}}),threshold:t.alert_rules.battery_emergency_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),b.jsx(Fr,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:t.alert_rules.battery_trend_declining,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_trend_declining:i}})}),b.jsx(Fr,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),b.jsx(Fr,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),b.jsx(Fr,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}}),threshold:t.alert_rules.high_util_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${t.alert_rules.high_util_hours}h`}),b.jsx(Fr,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}}),threshold:t.alert_rules.packet_flood_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),b.jsx(Fr,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:t.alert_rules.mesh_score_alert,onChange:i=>e({...t,alert_rules:{...t.alert_rules,mesh_score_alert:i}}),threshold:t.alert_rules.mesh_score_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),b.jsx(Fr,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:t.alert_rules.region_score_alert,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_score_alert:i}}),threshold:t.alert_rules.region_score_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function T0e({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,h,f,d,p,g,m,y;return b.jsxs("div",{className:"space-y-6",children:[b.jsx(un,{text:ln.environmental}),b.jsx(_t,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:_=>e({...t,enabled:_}),helper:"Activate live data polling"}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Qo,{label:"NWS Zones",value:t.nws_zones,onChange:_=>e({...t,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030",info:"NWS forecast zones covering your mesh area. Find yours at https://www.weather.gov/pimar/PubZone",infoLink:"https://www.weather.gov/pimar/PubZone"}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),b.jsx(_t,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(dt,{label:"User Agent",value:t.nws.user_agent,onChange:_=>e({...t,nws:{...t.nws,user_agent:_}}),placeholder:"(MeshAI, your@email.com)",helper:"Required format: (app_name, contact_email)",info:"Required by NWS. You make it up - just use the format (app_name, your_email). No signup needed."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),b.jsx(va,{label:"Min Severity",value:t.nws.severity_min,onChange:_=>e({...t,nws:{...t.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}],helper:"Filter out lower severity alerts",info:"Minimum severity level to display. 'Moderate' filters out minor advisories. 'Severe' shows only serious warnings."})]})]})]}),b.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),b.jsx(_t,{label:"",checked:t.swpc.enabled,onChange:_=>e({...t,swpc:{...t.swpc,enabled:_}})})]})}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),b.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),b.jsx(_t,{label:"",checked:t.ducting.enabled,onChange:_=>e({...t,ducting:{...t.ducting,enabled:_}})})]}),t.ducting.enabled&&b.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[b.jsx(Be,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),b.jsx(Be,{label:"Latitude",value:t.ducting.latitude,onChange:_=>e({...t,ducting:{...t.ducting,latitude:_}}),step:.01,info:"Center point of your mesh coverage area. The ducting adapter checks atmospheric conditions at this location."}),b.jsx(Be,{label:"Longitude",value:t.ducting.longitude,onChange:_=>e({...t,ducting:{...t.ducting,longitude:_}}),step:.01})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),b.jsx(_t,{label:"",checked:t.fires.enabled,onChange:_=>e({...t,fires:{...t.fires,enabled:_}})})]}),t.fires.enabled&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Be,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),b.jsx(va,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),options:l0e,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),b.jsx(_t,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Be,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),b.jsx(Qo,{label:"Center IDs",value:t.avalanche.center_ids,onChange:_=>e({...t,avalanche:{...t.avalanche,center_ids:_}}),helper:"e.g., SNFAC, IPAC, FAC",info:"Find your local center at https://avalanche.org/avalanche-centers/",infoLink:"https://avalanche.org/avalanche-centers/"}),b.jsx(B8,{label:"Season Months",value:t.avalanche.season_months,onChange:_=>e({...t,avalanche:{...t.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4",info:"Months when avalanche forecasts are active. Default Dec-Apr. Adjust for your region's season."})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),b.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),b.jsx(_t,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var S,w;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((S=t.usgs)==null?void 0:S.tick_seconds)||900,sites:((w=t.usgs)==null?void 0:w.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(Be,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:_=>e({...t,usgs:{...t.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),b.jsx(Qo,{label:"Site IDs",value:t.usgs.sites,onChange:_=>e({...t,usgs:{...t.usgs,sites:_}}),helper:"USGS gauge site numbers",info:"Find site IDs at waterdata.usgs.gov/nwis",infoLink:"https://waterdata.usgs.gov/nwis"})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),b.jsx(_t,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var S,w,C;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((S=t.traffic)==null?void 0:S.tick_seconds)||300,api_key:((w=t.traffic)==null?void 0:w.api_key)||"",corridors:((C=t.traffic)==null?void 0:C.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(dt,{label:"API Key",value:t.traffic.api_key,onChange:_=>e({...t,traffic:{...t.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com",infoLink:"https://developer.tomtom.com"}),b.jsx(Be,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:_=>e({...t,traffic:{...t.traffic,tick_seconds:_}}),min:60}),b.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((_,S)=>b.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[b.jsx(dt,{label:"Name",value:_.name,onChange:w=>{const C=[...t.traffic.corridors];C[S]={..._,name:w},e({...t,traffic:{...t.traffic,corridors:C}})}}),b.jsx(Be,{label:"Lat",value:_.lat,onChange:w=>{const C=[...t.traffic.corridors];C[S]={..._,lat:w},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),b.jsx(Be,{label:"Lon",value:_.lon,onChange:w=>{const C=[...t.traffic.corridors];C[S]={..._,lon:w},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),b.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((w,C)=>C!==S)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},S)),b.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:[...t.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),b.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),b.jsx(_t,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var S,w,C,M,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((S=t.roads511)==null?void 0:S.tick_seconds)||300,api_key:((w=t.roads511)==null?void 0:w.api_key)||"",base_url:((C=t.roads511)==null?void 0:C.base_url)||"",endpoints:((M=t.roads511)==null?void 0:M.endpoints)||["/get/event"],bbox:((A=t.roads511)==null?void 0:A.bbox)||[]}})}})]}),((s=t.roads511)==null?void 0:s.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(dt,{label:"Base URL",value:t.roads511.base_url,onChange:_=>e({...t,roads511:{...t.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2",helper:"State 511 API endpoint"}),b.jsx(dt,{label:"API Key",value:t.roads511.api_key,onChange:_=>e({...t,roads511:{...t.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),b.jsx(Be,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),b.jsx(Qo,{label:"Endpoints",value:t.roads511.endpoints,onChange:_=>e({...t,roads511:{...t.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),b.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[b.jsx(Be,{label:"West",value:((l=t.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[0]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),b.jsx(Be,{label:"South",value:((u=t.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[1]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),b.jsx(Be,{label:"East",value:((c=t.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[2]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01}),b.jsx(Be,{label:"North",value:((h=t.roads511.bbox)==null?void 0:h[3])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[3]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01})]}),b.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{children:[b.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),b.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),b.jsx(_t,{label:"",checked:((f=t.firms)==null?void 0:f.enabled)||!1,onChange:_=>{var S,w,C,M,A,k,E;return e({...t,firms:{...t.firms,enabled:_,tick_seconds:((S=t.firms)==null?void 0:S.tick_seconds)||1800,map_key:((w=t.firms)==null?void 0:w.map_key)||"",source:((C=t.firms)==null?void 0:C.source)||"VIIRS_SNPP_NRT",bbox:((M=t.firms)==null?void 0:M.bbox)||[],day_range:((A=t.firms)==null?void 0:A.day_range)||1,confidence_min:((k=t.firms)==null?void 0:k.confidence_min)||"nominal",proximity_km:((E=t.firms)==null?void 0:E.proximity_km)||10}})}})]}),((d=t.firms)==null?void 0:d.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(dt,{label:"MAP Key",value:t.firms.map_key,onChange:_=>e({...t,firms:{...t.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),b.jsx(Be,{label:"Tick Seconds",value:t.firms.tick_seconds,onChange:_=>e({...t,firms:{...t.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),b.jsx(va,{label:"Satellite Source",value:t.firms.source,onChange:_=>e({...t,firms:{...t.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),b.jsx(Be,{label:"Day Range",value:t.firms.day_range,onChange:_=>e({...t,firms:{...t.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),b.jsx(va,{label:"Minimum Confidence",value:t.firms.confidence_min,onChange:_=>e({...t,firms:{...t.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),b.jsx(Be,{label:"Proximity (km)",value:t.firms.proximity_km,onChange:_=>e({...t,firms:{...t.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),b.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[b.jsx(Be,{label:"West",value:((p=t.firms.bbox)==null?void 0:p[0])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[0]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),b.jsx(Be,{label:"South",value:((g=t.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[1]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),b.jsx(Be,{label:"East",value:((m=t.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[2]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01}),b.jsx(Be,{label:"North",value:((y=t.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const S=[...t.firms.bbox||[0,0,0,0]];S[3]=_,e({...t,firms:{...t.firms,bbox:S}})},step:.01})]}),b.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function C0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(un,{text:ln.dashboard}),b.jsx(_t,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Run the web dashboard"}),t.enabled&&b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(dt,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),b.jsx(Be,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function M0e(){var E;const[t,e]=Z.useState(null),[r,n]=Z.useState(null),[i,a]=Z.useState("bot"),[o,s]=Z.useState(!0),[l,u]=Z.useState(!1),[c,h]=Z.useState(null),[f,d]=Z.useState(null),[p,g]=Z.useState(!1),[m,y]=Z.useState(!1),_=Z.useCallback(async()=>{try{const D=await fetch("/api/config");if(!D.ok)throw new Error("Failed to fetch config");const I=await D.json();e(I),n(JSON.parse(JSON.stringify(I))),y(!1),h(null)}catch(D){h(D instanceof Error?D.message:"Unknown error")}finally{s(!1)}},[]);Z.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),Z.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),h(null),d(null);try{const D=t[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>d(null),3e3)}catch(D){h(D instanceof Error?D.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{h("Restart failed")}},M=(D,I)=>{t&&e({...t,[D]:I})};if(o)return b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return b.jsx(c0e,{data:t.bot,onChange:D=>M("bot",D)});case"connection":return b.jsx(h0e,{data:t.connection,onChange:D=>M("connection",D)});case"response":return b.jsx(f0e,{data:t.response,onChange:D=>M("response",D)});case"history":return b.jsx(d0e,{data:t.history,onChange:D=>M("history",D)});case"memory":return b.jsx(v0e,{data:t.memory,onChange:D=>M("memory",D)});case"context":return b.jsx(p0e,{data:t.context,onChange:D=>M("context",D)});case"commands":return b.jsx(g0e,{data:t.commands,onChange:D=>M("commands",D)});case"llm":return b.jsx(m0e,{data:t.llm,onChange:D=>M("llm",D)});case"weather":return b.jsx(y0e,{data:t.weather,onChange:D=>M("weather",D)});case"meshmonitor":return b.jsx(_0e,{data:t.meshmonitor,onChange:D=>M("meshmonitor",D)});case"knowledge":return b.jsx(x0e,{data:t.knowledge,onChange:D=>M("knowledge",D)});case"mesh_sources":return b.jsx(b0e,{data:t.mesh_sources,onChange:D=>M("mesh_sources",D)});case"mesh_intelligence":return b.jsx(w0e,{data:t.mesh_intelligence,onChange:D=>M("mesh_intelligence",D)});case"environmental":return b.jsx(T0e,{data:t.environmental,onChange:D=>M("environmental",D)});case"dashboard":return b.jsx(C0e,{data:t.dashboard,onChange:D=>M("dashboard",D)});default:return null}},k=((E=Sz.find(D=>D.key===i))==null?void 0:E.label)||i;return b.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[b.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:Sz.map(({key:D,label:I,icon:z})=>b.jsxs("button",{onClick:()=>a(D),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===D?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[b.jsx(z,{size:16}),b.jsx("span",{children:I}),m&&i===D&&b.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},D))}),b.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx(n4,{size:20,className:"text-slate-500"}),b.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:k})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[m&&b.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[b.jsx(t4,{size:14}),"Discard"]}),b.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?b.jsx(e4,{size:14,className:"animate-spin"}):b.jsx(r4,{size:14}),"Save"]})]})]}),p&&b.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[b.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[b.jsx(_s,{size:16}),b.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),b.jsx("button",{onClick:C,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&b.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[b.jsx(B0,{size:16}),b.jsx("span",{className:"text-sm",children:c})]}),f&&b.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[b.jsx(rw,{size:16}),b.jsx("span",{className:"text-sm",children:f})]}),b.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:b.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}const bz={infra_offline:c$,infra_recovery:i4,battery_warning:Ix,battery_critical:Ix,battery_emergency:Ix,hf_blackout:x2,uhf_ducting:Xc,weather_warning:$d,weather_watch:$d,new_router:Xc,packet_flood:_s,sustained_high_util:_s,region_blackout:O0,default:ay};function A0e(t){return bz[t]||bz.default}function j8(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"watch":return{bg:"bg-yellow-500/10",border:"border-yellow-500",badge:"bg-yellow-500/20 text-yellow-400",iconColor:"text-yellow-500"};case"advisory":case"info":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function L0e(t){const e=typeof t=="number"?new Date(t*1e3):new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function P0e(t){return(typeof t=="number"?new Date(t*1e3):new Date(t)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function k0e(t){return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:`${Math.floor(t/86400)}d`}function D0e({alert:t,onAcknowledge:e}){var i;const r=j8(t.severity),n=A0e(t.type);return b.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:b.jsxs("div",{className:"flex items-start gap-3",children:[b.jsx(n,{size:20,className:r.iconColor}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=t.severity)==null?void 0:i.toUpperCase()}),b.jsx("span",{className:"text-xs text-slate-500",children:t.type})]}),b.jsx("div",{className:"text-sm text-slate-200",children:t.message}),b.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[b.jsxs("span",{className:"flex items-center gap-1",children:[b.jsx(oy,{size:12}),t.timestamp?L0e(t.timestamp):"Just now"]}),t.scope_value&&b.jsxs("span",{children:[t.scope_type,": ",t.scope_value]})]})]}),b.jsx("button",{onClick:()=>e(t),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function I0e({history:t,typeFilter:e,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","critical","warning","watch","info"];return b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[b.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(_2,{size:14,className:"text-slate-400"}),b.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),b.jsx("select",{value:e,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>b.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),b.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>b.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),b.jsx("div",{className:"overflow-x-auto",children:b.jsxs("table",{className:"w-full",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-border",children:[b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),b.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),b.jsx("tbody",{children:t.length>0?t.map((c,h)=>{const f=j8(c.severity);return b.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[b.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:P0e(c.timestamp)}),b.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),b.jsx("td",{className:"p-4",children:b.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${f.badge}`,children:c.severity})}),b.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),b.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?k0e(c.duration):"-"})]},c.id||h)}):b.jsx("tr",{children:b.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&b.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[b.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:b.jsx(YZ,{size:16})}),b.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:b.jsx(Rv,{size:16})})]})]})]})}function E0e({subscription:t}){const e=()=>{if(t.sub_type==="alerts")return"Real-time";const i=t.schedule_time||"0000",a=parseInt(i.slice(0,2)),o=i.slice(2),s=a>=12?"PM":"AM";let u=`${a%12||12}:${o} ${s}`;return t.sub_type==="weekly"&&t.schedule_day&&(u+=` ${t.schedule_day.charAt(0).toUpperCase()}${t.schedule_day.slice(1)}`),u},n=(()=>{switch(t.sub_type){case"alerts":return ay;case"daily":return oy;case"weekly":return oy;default:return ay}})();return b.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:b.jsx(n,{size:18,className:"text-blue-400"})}),b.jsxs("div",{className:"flex-1",children:[b.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[t.sub_type.charAt(0).toUpperCase()+t.sub_type.slice(1),t.scope_type!=="mesh"&&t.scope_value&&b.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",t.scope_type,": ",t.scope_value,")"]})]}),b.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[e()," • Node ",t.user_id]})]}),b.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function N0e(){const[t,e]=Z.useState([]),[r,n]=Z.useState([]),[i,a]=Z.useState([]),[o,s]=Z.useState(!0),[l,u]=Z.useState(null),[c,h]=Z.useState("all"),[f,d]=Z.useState("all"),[p,g]=Z.useState(1),[m,y]=Z.useState(1),_=20,[S,w]=Z.useState(new Set),{lastAlert:C}=S2();Z.useEffect(()=>{document.title="Alerts — MeshAI"},[]),Z.useEffect(()=>{Promise.all([a4().catch(()=>[]),Rk(_,0).catch(()=>({items:[],total:0})),p$().catch(()=>[])]).then(([k,E,D])=>{e(k),Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_))),a(D),s(!1)}).catch(k=>{u(k.message),s(!1)})},[]),Z.useEffect(()=>{C&&e(k=>k.some(D=>D.type===C.type&&D.message===C.message)?k:[C,...k])},[C]),Z.useEffect(()=>{const k=(p-1)*_;Rk(_,k,c,f).then(E=>{Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_)))}).catch(()=>{})},[p,c,f]);const M=Z.useCallback(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;w(D=>new Set([...D,E]))},[]),A=t.filter(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;return!S.has(E)});return o?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):l?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsxs("div",{className:"text-red-400",children:["Error: ",l]})}):b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(_s,{size:14}),"Active Alerts (",A.length,")"]}),A.length>0?b.jsx("div",{className:"space-y-3",children:A.map((k,E)=>b.jsx(D0e,{alert:k,onAcknowledge:M},`${k.type}-${k.timestamp}-${E}`))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[b.jsx(cd,{size:20,className:"text-green-500"}),b.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),b.jsxs("div",{children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(oy,{size:14}),"Alert History"]}),b.jsx(I0e,{history:r,typeFilter:c,severityFilter:f,onTypeFilterChange:k=>{h(k),g(1)},onSeverityFilterChange:k=>{d(k),g(1)},page:p,totalPages:m,onPageChange:g})]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[b.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[b.jsx(u$,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(k=>b.jsx(E0e,{subscription:k},k.id))}):b.jsxs("div",{className:"text-slate-500 py-4",children:[b.jsx("p",{children:"No active subscriptions."}),b.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",b.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}function ni({info:t,link:e,linkText:r="Learn more"}){const[n,i]=Z.useState(!1);return b.jsxs("div",{className:"relative inline-block",children:[b.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),b.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[t,e&&b.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",b.jsx(Yc,{size:10})]})]})]})]})}function Wa({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o=""}){const[s,l]=Z.useState(!1),u=n==="password";return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,o&&b.jsx(ni,{info:o})]}),b.jsxs("div",{className:"relative",children:[b.jsx("input",{type:u&&!s?"password":"text",value:e,onChange:c=>r(c.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),u&&b.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:s?b.jsx(KB,{size:16}):b.jsx(y2,{size:16})})]}),a&&b.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function yC({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,s&&b.jsx(ni,{info:s})]}),b.jsx("input",{type:"number",value:e,onChange:l=>r(Number(l.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&b.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function y0({label:t,checked:e,onChange:r,helper:n="",info:i=""}){return b.jsxs("div",{className:"flex items-center justify-between py-2",children:[b.jsxs("div",{children:[b.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[t,i&&b.jsx(ni,{info:i})]}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]}),b.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:b.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function V8({label:t,value:e,onChange:r,options:n,helper:i="",info:a=""}){return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&b.jsx(ni,{info:a})]}),b.jsx("select",{value:e,onChange:o=>r(o.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(o=>b.jsx("option",{value:o.value,children:o.label},o.value))}),i&&b.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function wz({label:t,value:e,onChange:r,helper:n="",info:i=""}){const[a,o]=Z.useState(""),s=()=>{a.trim()&&!e.includes(a.trim())&&(r([...e,a.trim()]),o(""))},l=u=>{r(e.filter((c,h)=>h!==u))};return b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&b.jsx(ni,{info:i})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("input",{type:"text",value:a,onChange:u=>o(u.target.value),onKeyDown:u=>u.key==="Enter"&&(u.preventDefault(),s()),className:"flex-1 px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent",placeholder:"Add item..."}),b.jsx("button",{type:"button",onClick:s,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm text-white transition-colors",children:b.jsx(Yd,{size:16})})]}),e.length>0&&b.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:e.map((u,c)=>b.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#1e2a3a] rounded text-sm text-slate-300",children:[u,b.jsx("button",{type:"button",onClick:()=>l(c),className:"text-slate-500 hover:text-red-400",children:b.jsx(B0,{size:14})})]},c))}),n&&b.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function R0e({channel:t,onChange:e,onDelete:r,onTest:n}){var h;const[i,a]=Z.useState(!1),[o,s]=Z.useState(!1),l=[{value:"mesh_broadcast",label:"Mesh Broadcast"},{value:"mesh_dm",label:"Mesh DM"},{value:"email",label:"Email"},{value:"webhook",label:"Webhook"}],u={mesh_broadcast:"Broadcast alerts to a mesh channel. All nodes on that channel receive the alert.",mesh_dm:"Send alerts as direct messages to specific nodes.",email:"Send alert emails via SMTP. Works with Gmail, Outlook, and any SMTP server.",webhook:"POST alert JSON to any URL. Works with Discord webhooks, ntfy.sh, Pushover, Slack, Home Assistant, or any service that accepts HTTP POST."},c=async()=>{s(!0),await n(),s(!1)};return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>a(!i),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[i?b.jsx(Nv,{size:16}):b.jsx(Rv,{size:16}),b.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),b.jsx("span",{className:"font-medium text-slate-200",children:t.id||"New Channel"}),b.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:((h=l.find(f=>f.value===t.type))==null?void 0:h.label)||t.type})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:f=>{f.stopPropagation(),c()},disabled:o||!t.id,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Send test alert",children:b.jsx(o$,{size:14})}),b.jsx("button",{onClick:f=>{f.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(z0,{size:14})})]})]}),i&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Wa,{label:"Channel ID",value:t.id,onChange:f=>e({...t,id:f}),helper:"Unique identifier for this channel",info:"Used to reference this channel in notification rules. Use lowercase with hyphens (e.g., 'mesh-main', 'email-admin')."}),b.jsx(V8,{label:"Type",value:t.type,onChange:f=>e({...t,type:f}),options:l,info:u[t.type]||"Select a channel type"})]}),b.jsx(y0,{label:"Enabled",checked:t.enabled,onChange:f=>e({...t,enabled:f}),helper:"Disable to temporarily stop alerts on this channel"}),t.type==="mesh_broadcast"&&b.jsx(yC,{label:"Channel Index",value:t.channel_index,onChange:f=>e({...t,channel_index:f}),min:0,max:7,helper:"Mesh channel number (0-7)",info:"The mesh channel to broadcast alerts on. Channel 0 is typically the default channel."}),t.type==="mesh_dm"&&b.jsx(wz,{label:"Node IDs",value:t.node_ids,onChange:f=>e({...t,node_ids:f}),helper:"Node IDs to receive DM alerts",info:"Node IDs that receive direct message alerts. Enter the full node ID (e.g., '!a1b2c3d4') for each recipient."}),t.type==="email"&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Wa,{label:"SMTP Host",value:t.smtp_host,onChange:f=>e({...t,smtp_host:f}),placeholder:"smtp.gmail.com",helper:"SMTP server hostname",info:"The SMTP server for sending emails. Gmail: smtp.gmail.com, Outlook: smtp.office365.com"}),b.jsx(yC,{label:"SMTP Port",value:t.smtp_port,onChange:f=>e({...t,smtp_port:f}),min:1,max:65535,helper:"587 (TLS) or 465 (SSL)",info:"SMTP port. Use 587 for TLS (recommended) or 465 for SSL."})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Wa,{label:"SMTP User",value:t.smtp_user,onChange:f=>e({...t,smtp_user:f}),placeholder:"you@gmail.com",helper:"Login username"}),b.jsx(Wa,{label:"SMTP Password",value:t.smtp_password,onChange:f=>e({...t,smtp_password:f}),type:"password",helper:"App password recommended",info:"Gmail users: use an App Password, not your regular password. Generate one at myaccount.google.com/apppasswords"})]}),b.jsx(y0,{label:"Use TLS",checked:t.smtp_tls,onChange:f=>e({...t,smtp_tls:f}),helper:"Encrypt SMTP connection",info:"Enable TLS encryption for the SMTP connection. Required for most modern email servers."}),b.jsx(Wa,{label:"From Address",value:t.from_address,onChange:f=>e({...t,from_address:f}),placeholder:"alerts@yourdomain.com",helper:"Sender email address",info:"The email address that appears as the sender. Some servers require this to match your login."}),b.jsx(wz,{label:"Recipients",value:t.recipients,onChange:f=>e({...t,recipients:f}),helper:"Email addresses to receive alerts",info:"List of email addresses that will receive alerts from this channel."})]}),t.type==="webhook"&&b.jsxs(b.Fragment,{children:[b.jsx(Wa,{label:"Webhook URL",value:t.url,onChange:f=>e({...t,url:f}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST endpoint for alerts",info:"POST alert JSON to any URL. Works with Discord webhooks, ntfy.sh, Pushover, Slack, Home Assistant, or any service that accepts HTTP POST."}),b.jsxs("div",{className:"space-y-1",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Headers (optional)",b.jsx(ni,{info:"Additional HTTP headers to send with the webhook request. Useful for authentication tokens or custom headers required by the receiving service."})]}),b.jsx("div",{className:"text-xs text-slate-600",children:"Custom headers can be configured in the YAML config file"})]})]})]})]})}function O0e({rule:t,categories:e,channels:r,onChange:n,onDelete:i}){var c,h,f,d;const[a,o]=Z.useState(!1),s=[{value:"info",label:"Info"},{value:"advisory",label:"Advisory"},{value:"watch",label:"Watch"},{value:"warning",label:"Warning"},{value:"critical",label:"Critical"},{value:"emergency",label:"Emergency"}],l=p=>{const g=t.categories||[];g.includes(p)?n({...t,categories:g.filter(m=>m!==p)}):n({...t,categories:[...g,p]})},u=p=>{const g=t.channel_ids||[];g.includes(p)?n({...t,channel_ids:g.filter(m=>m!==p)}):n({...t,channel_ids:[...g,p]})};return b.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>o(!a),children:[b.jsxs("div",{className:"flex items-center gap-3",children:[a?b.jsx(Nv,{size:16}):b.jsx(Rv,{size:16}),b.jsx("span",{className:"font-medium text-slate-200",children:t.name||"New Rule"}),b.jsxs("span",{className:"text-xs text-slate-500",children:[((c=t.categories)==null?void 0:c.length)||0," categories → ",((h=t.channel_ids)==null?void 0:h.length)||0," channels"]})]}),b.jsx("button",{onClick:p=>{p.stopPropagation(),i()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:b.jsx(z0,{size:14})})]}),a&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsx(Wa,{label:"Rule Name",value:t.name,onChange:p=>n({...t,name:p}),helper:"Human-readable name for this rule",info:"A descriptive name to identify this rule. Example: 'Emergency Alerts', 'Fire Notifications', 'Infrastructure Warnings'"}),b.jsx(V8,{label:"Minimum Severity",value:t.min_severity,onChange:p=>n({...t,min_severity:p}),options:s,helper:"Only alerts at or above this severity",info:"Only alerts at this severity or above will trigger this rule. 'warning' is recommended for most channels. Use 'info' to receive all alerts."}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",b.jsx(ni,{info:"Which alert types this rule applies to. Select none to match all categories. Alerts matching any selected category (AND meeting severity threshold) will trigger this rule."})]}),b.jsx("div",{className:"text-xs text-slate-500 mb-2",children:((f=t.categories)==null?void 0:f.length)===0?"All categories (none selected)":`${(d=t.categories)==null?void 0:d.length} selected`}),b.jsx("div",{className:"max-h-48 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:e.map(p=>{var g;return b.jsxs("label",{className:"flex items-start gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[b.jsx("input",{type:"checkbox",checked:((g=t.categories)==null?void 0:g.includes(p.id))||!1,onChange:()=>l(p.id),className:"mt-0.5 rounded border-slate-600 bg-[#0a0e17] text-accent focus:ring-accent"}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"text-sm text-slate-200",children:p.name}),b.jsx("div",{className:"text-xs text-slate-500",children:p.description})]})]},p.id)})})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Channels",b.jsx(ni,{info:"Which channels receive alerts matching this rule. Select at least one channel."})]}),r.length===0?b.jsx("div",{className:"text-xs text-slate-500 p-2 border border-[#1e2a3a] rounded-lg",children:"No channels configured. Add channels above first."}):b.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:r.map(p=>{var g;return b.jsxs("label",{className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[b.jsx("input",{type:"checkbox",checked:((g=t.channel_ids)==null?void 0:g.includes(p.id))||!1,onChange:()=>u(p.id),className:"rounded border-slate-600 bg-[#0a0e17] text-accent focus:ring-accent"}),b.jsx("span",{className:"text-sm text-slate-200",children:p.id}),b.jsxs("span",{className:"text-xs text-slate-500",children:["(",p.type,")"]})]},p.id)})})]}),b.jsx(y0,{label:"Override Quiet Hours",checked:t.override_quiet,onChange:p=>n({...t,override_quiet:p}),helper:"Send alerts even during quiet hours",info:"When enabled, this rule sends alerts even during quiet hours. Use for critical conditions like fires or infrastructure failures."})]})]})}function z0e(){const[t,e]=Z.useState(null),[r,n]=Z.useState(null),[i,a]=Z.useState([]),[o,s]=Z.useState(!0),[l,u]=Z.useState(!1),[c,h]=Z.useState(null),[f,d]=Z.useState(null),[p,g]=Z.useState(null),[m,y]=Z.useState(!1),_=Z.useCallback(async()=>{try{const[k,E]=await Promise.all([fetch("/api/config/notifications"),fetch("/api/notifications/categories")]);if(!k.ok)throw new Error("Failed to fetch notifications config");const D=await k.json(),I=await E.json();e(D),n(JSON.parse(JSON.stringify(D))),a(I),y(!1),h(null)}catch(k){h(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);Z.useEffect(()=>{document.title="Notifications — MeshAI",_()},[_]),Z.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),h(null),d(null);try{const k=await fetch("/api/config/notifications",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),E=await k.json();if(!k.ok)throw new Error(E.detail||"Save failed");d("Notifications config saved successfully"),n(JSON.parse(JSON.stringify(t))),y(!1),setTimeout(()=>d(null),3e3)}catch(k){h(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=()=>{if(!t)return;const k={id:"",type:"mesh_broadcast",enabled:!0,channel_index:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],url:"",headers:{}};e({...t,channels:[...t.channels||[],k]})},M=()=>{if(!t)return;const k={name:"",categories:[],min_severity:"warning",channel_ids:[],override_quiet:!1};e({...t,rules:[...t.rules||[],k]})},A=async k=>{try{const D=await(await fetch(`/api/notifications/channels/${k}/test`,{method:"POST"})).json();g(D),setTimeout(()=>g(null),5e3)}catch{g({success:!1,message:"Test failed"}),setTimeout(()=>g(null),5e3)}};return o?b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-slate-400",children:"Loading notifications config..."})}):t?b.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("div",{children:b.jsx("p",{className:"text-sm text-slate-500",children:"Configure where alerts get delivered and which conditions trigger them."})}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:_,className:"p-2 text-slate-400 hover:text-slate-200 hover:bg-bg-hover rounded transition-colors",title:"Refresh",children:b.jsx(e4,{size:18})}),b.jsxs("button",{onClick:w,disabled:!m,className:"flex items-center gap-2 px-3 py-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[b.jsx(t4,{size:16}),"Discard"]}),b.jsxs("button",{onClick:S,disabled:l||!m,className:"flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent/80 disabled:bg-slate-700 disabled:cursor-not-allowed rounded text-white transition-colors",children:[b.jsx(r4,{size:16}),l?"Saving...":"Save"]})]})]}),c&&b.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-500/10 text-red-400 border border-red-500/20",children:c}),f&&b.jsxs("div",{className:"p-3 rounded-lg text-sm bg-green-500/10 text-green-400 border border-green-500/20",children:[b.jsx(rw,{size:14,className:"inline mr-2"}),f]}),p&&b.jsxs("div",{className:`p-3 rounded-lg text-sm ${p.success?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:[p.success?b.jsx(rw,{size:14,className:"inline mr-2"}):b.jsx(B0,{size:14,className:"inline mr-2"}),p.message]}),b.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6 space-y-6",children:[b.jsx(y0,{label:"Enable Notifications",checked:t.enabled,onChange:k=>e({...t,enabled:k}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts will be delivered through any channel. The alert engine still runs and records alerts to history."}),t.enabled&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Channels",b.jsx(ni,{info:"Where alerts get delivered. Add channels for each destination you want to receive alerts."})]})}),b.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Where alerts get delivered. Add channels for each destination you want to receive alerts."}),(t.channels||[]).map((k,E)=>b.jsx(R0e,{channel:k,onChange:D=>{const I=[...t.channels||[]];I[E]=D,e({...t,channels:I})},onDelete:()=>{confirm(`Delete channel "${k.id||"New Channel"}"?`)&&e({...t,channels:(t.channels||[]).filter((D,I)=>I!==E)})},onTest:()=>A(k.id)},E)),b.jsxs("button",{onClick:C,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(Yd,{size:16})," Add Channel"]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Rules",b.jsx(ni,{info:"Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule."})]})}),b.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule."}),(t.rules||[]).map((k,E)=>b.jsx(O0e,{rule:k,categories:i,channels:t.channels||[],onChange:D=>{const I=[...t.rules||[]];I[E]=D,e({...t,rules:I})},onDelete:()=>{confirm(`Delete rule "${k.name||"New Rule"}"?`)&&e({...t,rules:(t.rules||[]).filter((D,I)=>I!==E)})}},E)),b.jsxs("button",{onClick:M,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[b.jsx(Yd,{size:16})," Add Rule"]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Quiet Hours",b.jsx(ni,{info:"Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through. Rules with 'Override Quiet Hours' enabled will also deliver during this time."})]}),b.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through."}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Wa,{label:"Start Time",value:t.quiet_hours_start||"22:00",onChange:k=>e({...t,quiet_hours_start:k}),placeholder:"22:00",helper:"When quiet hours begin",info:"Time in 24-hour format (HH:MM) when quiet hours start. Alerts below emergency severity will be held until quiet hours end."}),b.jsx(Wa,{label:"End Time",value:t.quiet_hours_end||"06:00",onChange:k=>e({...t,quiet_hours_end:k}),placeholder:"06:00",helper:"When quiet hours end",info:"Time in 24-hour format (HH:MM) when quiet hours end. Held alerts will be delivered at this time."})]})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Deduplication",b.jsx(ni,{info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered."})]}),b.jsx(yC,{label:"Dedup Window (seconds)",value:t.dedup_seconds||600,onChange:k=>e({...t,dedup_seconds:k}),min:0,max:86400,helper:"Don't re-send the same alert within this window",info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered. Default is 600 seconds (10 minutes)."})]})]})]})]}):b.jsx("div",{className:"flex items-center justify-center h-64",children:b.jsx("div",{className:"text-red-400",children:"Failed to load notifications config"})})}function B0e(){return b.jsx(k$,{children:b.jsx(E$,{children:b.jsxs(LZ,{children:[b.jsx(vl,{path:"/",element:b.jsx(B$,{})}),b.jsx(vl,{path:"/mesh",element:b.jsx(t0e,{})}),b.jsx(vl,{path:"/environment",element:b.jsx(o0e,{})}),b.jsx(vl,{path:"/config",element:b.jsx(M0e,{})}),b.jsx(vl,{path:"/alerts",element:b.jsx(N0e,{})}),b.jsx(vl,{path:"/notifications",element:b.jsx(z0e,{})})]})})})}ob.createRoot(document.getElementById("root")).render(b.jsx(Vc.StrictMode,{children:b.jsx(RZ,{children:b.jsx(B0e,{})})})); + */(function(t,e){(function(r,n){n(e)})(hU,function(r){var n="1.9.4";function i(v){var x,T,P,E;for(T=1,P=arguments.length;T"u"||!L||!L.Mixin)){v=b(v)?v:[v];for(var x=0;x0?Math.floor(v):Math.ceil(v)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(v){return this.clone()._add(H(v))},_add:function(v){return this.x+=v.x,this.y+=v.y,this},subtract:function(v){return this.clone()._subtract(H(v))},_subtract:function(v){return this.x-=v.x,this.y-=v.y,this},divideBy:function(v){return this.clone()._divideBy(v)},_divideBy:function(v){return this.x/=v,this.y/=v,this},multiplyBy:function(v){return this.clone()._multiplyBy(v)},_multiplyBy:function(v){return this.x*=v,this.y*=v,this},scaleBy:function(v){return new j(this.x*v.x,this.y*v.y)},unscaleBy:function(v){return new j(this.x/v.x,this.y/v.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=W(this.x),this.y=W(this.y),this},distanceTo:function(v){v=H(v);var x=v.x-this.x,T=v.y-this.y;return Math.sqrt(x*x+T*T)},equals:function(v){return v=H(v),v.x===this.x&&v.y===this.y},contains:function(v){return v=H(v),Math.abs(v.x)<=Math.abs(this.x)&&Math.abs(v.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function H(v,x,T){return v instanceof j?v:b(v)?new j(v[0],v[1]):v==null?v:typeof v=="object"&&"x"in v&&"y"in v?new j(v.x,v.y):new j(v,x,T)}function X(v,x){if(v)for(var T=x?[v,x]:v,P=0,E=T.length;P=this.min.x&&T.x<=this.max.x&&x.y>=this.min.y&&T.y<=this.max.y},intersects:function(v){v=K(v);var x=this.min,T=this.max,P=v.min,E=v.max,B=E.x>=x.x&&P.x<=T.x,$=E.y>=x.y&&P.y<=T.y;return B&&$},overlaps:function(v){v=K(v);var x=this.min,T=this.max,P=v.min,E=v.max,B=E.x>x.x&&P.xx.y&&P.y=x.lat&&E.lat<=T.lat&&P.lng>=x.lng&&E.lng<=T.lng},intersects:function(v){v=ie(v);var x=this._southWest,T=this._northEast,P=v.getSouthWest(),E=v.getNorthEast(),B=E.lat>=x.lat&&P.lat<=T.lat,$=E.lng>=x.lng&&P.lng<=T.lng;return B&&$},overlaps:function(v){v=ie(v);var x=this._southWest,T=this._northEast,P=v.getSouthWest(),E=v.getNorthEast(),B=E.lat>x.lat&&P.latx.lng&&P.lng1,J8=function(){var v=!1;try{var x=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("testPassiveEventSupport",h,x),window.removeEventListener("testPassiveEventSupport",h,x)}catch{}return v}(),eW=function(){return!!document.createElement("canvas").getContext}(),I_=!!(document.createElementNS&&tt("svg").createSVGRect),tW=!!I_&&function(){var v=document.createElement("div");return v.innerHTML="",(v.firstChild&&v.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),rW=!I_&&function(){try{var v=document.createElement("div");v.innerHTML='';var x=v.firstChild;return x.style.behavior="url(#default#VML)",x&&typeof x.adj=="object"}catch{return!1}}(),nW=navigator.platform.indexOf("Mac")===0,iW=navigator.platform.indexOf("Linux")===0;function Hi(v){return navigator.userAgent.toLowerCase().indexOf(v)>=0}var Re={ie:gr,ielt9:zr,edge:Fi,webkit:Gi,android:xu,android23:cL,androidStock:H8,opera:k_,chrome:hL,gecko:fL,safari:W8,phantom:dL,opera12:vL,win:U8,ie3d:pL,webkit3d:D_,gecko3d:gL,any3d:Z8,mobile:Bh,mobileWebkit:$8,mobileWebkit3d:Y8,msPointer:mL,pointer:yL,touch:X8,touchNative:_L,mobileOpera:q8,mobileGecko:K8,retina:Q8,passiveEvents:J8,canvas:eW,svg:I_,vml:rW,inlineSvg:tW,mac:nW,linux:iW},xL=Re.msPointer?"MSPointerDown":"pointerdown",bL=Re.msPointer?"MSPointerMove":"pointermove",SL=Re.msPointer?"MSPointerUp":"pointerup",wL=Re.msPointer?"MSPointerCancel":"pointercancel",N_={touchstart:xL,touchmove:bL,touchend:SL,touchcancel:wL},TL={touchstart:cW,touchmove:op,touchend:op,touchcancel:op},bu={},CL=!1;function aW(v,x,T){return x==="touchstart"&&uW(),TL[x]?(T=TL[x].bind(this,T),v.addEventListener(N_[x],T,!1),T):(console.warn("wrong event specified:",x),h)}function oW(v,x,T){if(!N_[x]){console.warn("wrong event specified:",x);return}v.removeEventListener(N_[x],T,!1)}function sW(v){bu[v.pointerId]=v}function lW(v){bu[v.pointerId]&&(bu[v.pointerId]=v)}function ML(v){delete bu[v.pointerId]}function uW(){CL||(document.addEventListener(xL,sW,!0),document.addEventListener(bL,lW,!0),document.addEventListener(SL,ML,!0),document.addEventListener(wL,ML,!0),CL=!0)}function op(v,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var T in bu)x.touches.push(bu[T]);x.changedTouches=[x],v(x)}}function cW(v,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),op(v,x)}function hW(v){var x={},T,P;for(P in v)T=v[P],x[P]=T&&T.bind?T.bind(v):T;return v=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var fW=200;function dW(v,x){v.addEventListener("dblclick",x);var T=0,P;function E(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var $=DL(B);if(!($.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!$.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-T<=fW?(P++,P===2&&x(hW(B))):P=1,T=Q}}}return v.addEventListener("click",E),{dblclick:x,simDblclick:E}}function vW(v,x){v.removeEventListener("dblclick",x.dblclick),v.removeEventListener("click",x.simDblclick)}var E_=up(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),jh=up(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),AL=jh==="webkitTransition"||jh==="OTransition"?jh+"End":"transitionend";function LL(v){return typeof v=="string"?document.getElementById(v):v}function Vh(v,x){var T=v.style[x]||v.currentStyle&&v.currentStyle[x];if((!T||T==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(v,null);T=P?P[x]:null}return T==="auto"?null:T}function ft(v,x,T){var P=document.createElement(v);return P.className=x||"",T&&T.appendChild(P),P}function It(v){var x=v.parentNode;x&&x.removeChild(v)}function sp(v){for(;v.firstChild;)v.removeChild(v.firstChild)}function Su(v){var x=v.parentNode;x&&x.lastChild!==v&&x.appendChild(v)}function wu(v){var x=v.parentNode;x&&x.firstChild!==v&&x.insertBefore(v,x.firstChild)}function R_(v,x){if(v.classList!==void 0)return v.classList.contains(x);var T=lp(v);return T.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(T)}function Je(v,x){if(v.classList!==void 0)for(var T=p(x),P=0,E=T.length;P0?2*window.devicePixelRatio:1;function NL(v){return Re.edge?v.wheelDeltaY/2:v.deltaY&&v.deltaMode===0?-v.deltaY/mW:v.deltaY&&v.deltaMode===1?-v.deltaY*20:v.deltaY&&v.deltaMode===2?-v.deltaY*60:v.deltaX||v.deltaZ?0:v.wheelDelta?(v.wheelDeltaY||v.wheelDelta)/2:v.detail&&Math.abs(v.detail)<32765?-v.detail*20:v.detail?v.detail/-32765*60:0}function $_(v,x){var T=x.relatedTarget;if(!T)return!0;try{for(;T&&T!==v;)T=T.parentNode}catch{return!1}return T!==v}var yW={__proto__:null,on:Ke,off:Tt,stopPropagation:Os,disableScrollPropagation:Z_,disableClickPropagation:Wh,preventDefault:Mr,stop:zs,getPropagationPath:DL,getMousePosition:IL,getWheelDelta:NL,isExternalTarget:$_,addListener:Ke,removeListener:Tt},EL=Z.extend({run:function(v,x,T,P){this.stop(),this._el=v,this._inProgress=!0,this._duration=T||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Rs(v),this._offset=x.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=I(this._animate,this),this._step()},_step:function(v){var x=+new Date-this._startTime,T=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(v):this},panInsideBounds:function(v,x){this._enforcingBounds=!0;var T=this.getCenter(),P=this._limitCenter(T,this._zoom,ie(v));return T.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(v,x){x=x||{};var T=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),E=this.project(this.getCenter()),B=this.project(v),$=this.getPixelBounds(),Q=K([$.min.add(T),$.max.subtract(P)]),te=Q.getSize();if(!Q.contains(B)){this._enforcingBounds=!0;var ae=B.subtract(Q.getCenter()),Ae=Q.extend(B).getSize().subtract(te);E.x+=ae.x<0?-Ae.x:Ae.x,E.y+=ae.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(E),x),this._enforcingBounds=!1}return this},invalidateSize:function(v){if(!this._loaded)return this;v=i({animate:!1,pan:!0},v===!0?{animate:!0}:v);var x=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var T=this.getSize(),P=x.divideBy(2).round(),E=T.divideBy(2).round(),B=P.subtract(E);return!B.x&&!B.y?this:(v.animate&&v.pan?this.panBy(B):(v.pan&&this._rawPanBy(B),this.fire("move"),v.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:x,newSize:T}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(v){if(v=this._locateOptions=i({timeout:1e4,watch:!1},v),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var x=o(this._handleGeolocationResponse,this),T=o(this._handleGeolocationError,this);return v.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,T,v):navigator.geolocation.getCurrentPosition(x,T,v),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(v){if(this._container._leaflet_id){var x=v.code,T=v.message||(x===1?"permission denied":x===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:x,message:"Geolocation error: "+T+"."})}},_handleGeolocationResponse:function(v){if(this._container._leaflet_id){var x=v.coords.latitude,T=v.coords.longitude,P=new ue(x,T),E=P.toBounds(v.coords.accuracy*2),B=this._locateOptions;if(B.setView){var $=this.getBoundsZoom(E);this.setView(P,B.maxZoom?Math.min($,B.maxZoom):$)}var Q={latlng:P,bounds:E,timestamp:v.timestamp};for(var te in v.coords)typeof v.coords[te]=="number"&&(Q[te]=v.coords[te]);this.fire("locationfound",Q)}},addHandler:function(v,x){if(!x)return this;var T=this[v]=new x(this);return this._handlers.push(T),this.options[v]&&T.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(),It(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var v;for(v in this._layers)this._layers[v].remove();for(v in this._panes)It(this._panes[v]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(v,x){var T="leaflet-pane"+(v?" leaflet-"+v.replace("Pane","")+"-pane":""),P=ft("div",T,x||this._mapPane);return v&&(this._panes[v]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var v=this.getPixelBounds(),x=this.unproject(v.getBottomLeft()),T=this.unproject(v.getTopRight());return new ne(x,T)},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(v,x,T){v=ie(v),T=H(T||[0,0]);var P=this.getZoom()||0,E=this.getMinZoom(),B=this.getMaxZoom(),$=v.getNorthWest(),Q=v.getSouthEast(),te=this.getSize().subtract(T),ae=K(this.project(Q,P),this.project($,P)).getSize(),Ae=Re.any3d?this.options.zoomSnap:1,He=te.x/ae.x,rt=te.y/ae.y,Xr=x?Math.max(He,rt):Math.min(He,rt);return P=this.getScaleZoom(Xr,P),Ae&&(P=Math.round(P/(Ae/100))*(Ae/100),P=x?Math.ceil(P/Ae)*Ae:Math.floor(P/Ae)*Ae),Math.max(E,Math.min(B,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(v,x){var T=this._getTopLeftPoint(v,x);return new X(T,T.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(v){return this.options.crs.getProjectedBounds(v===void 0?this.getZoom():v)},getPane:function(v){return typeof v=="string"?this._panes[v]:v},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(v,x){var T=this.options.crs;return x=x===void 0?this._zoom:x,T.scale(v)/T.scale(x)},getScaleZoom:function(v,x){var T=this.options.crs;x=x===void 0?this._zoom:x;var P=T.zoom(v*T.scale(x));return isNaN(P)?1/0:P},project:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.latLngToPoint(ve(v),x)},unproject:function(v,x){return x=x===void 0?this._zoom:x,this.options.crs.pointToLatLng(H(v),x)},layerPointToLatLng:function(v){var x=H(v).add(this.getPixelOrigin());return this.unproject(x)},latLngToLayerPoint:function(v){var x=this.project(ve(v))._round();return x._subtract(this.getPixelOrigin())},wrapLatLng:function(v){return this.options.crs.wrapLatLng(ve(v))},wrapLatLngBounds:function(v){return this.options.crs.wrapLatLngBounds(ie(v))},distance:function(v,x){return this.options.crs.distance(ve(v),ve(x))},containerPointToLayerPoint:function(v){return H(v).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(v){return H(v).add(this._getMapPanePos())},containerPointToLatLng:function(v){var x=this.containerPointToLayerPoint(H(v));return this.layerPointToLatLng(x)},latLngToContainerPoint:function(v){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ve(v)))},mouseEventToContainerPoint:function(v){return IL(v,this._container)},mouseEventToLayerPoint:function(v){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(v))},mouseEventToLatLng:function(v){return this.layerPointToLatLng(this.mouseEventToLayerPoint(v))},_initContainer:function(v){var x=this._container=LL(v);if(x){if(x._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ke(x,"scroll",this._onScroll,this),this._containerId=l(x)},_initLayout:function(){var v=this._container;this._fadeAnimated=this.options.fadeAnimation&&Re.any3d,Je(v,"leaflet-container"+(Re.touch?" leaflet-touch":"")+(Re.retina?" leaflet-retina":"")+(Re.ielt9?" leaflet-oldie":"")+(Re.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var x=Vh(v,"position");x!=="absolute"&&x!=="relative"&&x!=="fixed"&&x!=="sticky"&&(v.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var v=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Qt(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Je(v.markerPane,"leaflet-zoom-hide"),Je(v.shadowPane,"leaflet-zoom-hide"))},_resetView:function(v,x,T){Qt(this._mapPane,new j(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var E=this._zoom!==x;this._moveStart(E,T)._move(v,x)._moveEnd(E),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(v,x){return v&&this.fire("zoomstart"),x||this.fire("movestart"),this},_move:function(v,x,T,P){x===void 0&&(x=this._zoom);var E=this._zoom!==x;return this._zoom=x,this._lastCenter=v,this._pixelOrigin=this._getNewPixelOrigin(v),P?T&&T.pinch&&this.fire("zoom",T):((E||T&&T.pinch)&&this.fire("zoom",T),this.fire("move",T)),this},_moveEnd:function(v){return v&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(v){Qt(this._mapPane,this._getMapPanePos().subtract(v))},_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(v){this._targets={},this._targets[l(this._container)]=this;var x=v?Tt:Ke;x(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&x(window,"resize",this._onResize,this),Re.any3d&&this.options.transform3DLimit&&(v?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var v=this._getMapPanePos();Math.max(Math.abs(v.x),Math.abs(v.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(v,x){for(var T=[],P,E=x==="mouseout"||x==="mouseover",B=v.target||v.srcElement,$=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){$=!0;break}if(P&&P.listens(x,!0)&&(E&&!$_(B,v)||(T.push(P),E))||B===this._container)break;B=B.parentNode}return!T.length&&!$&&!E&&this.listens(x,!0)&&(T=[this]),T},_isClickDisabled:function(v){for(;v&&v!==this._container;){if(v._leaflet_disable_click)return!0;v=v.parentNode}},_handleDOMEvent:function(v){var x=v.target||v.srcElement;if(!(!this._loaded||x._leaflet_disable_events||v.type==="click"&&this._isClickDisabled(x))){var T=v.type;T==="mousedown"&&F_(x),this._fireDOMEvent(v,T)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(v,x,T){if(v.type==="click"){var P=i({},v);P.type="preclick",this._fireDOMEvent(P,P.type,T)}var E=this._findEventTargets(v,x);if(T){for(var B=[],$=0;$0?Math.round(v-x)/2:Math.max(0,Math.ceil(v))-Math.max(0,Math.floor(x))},_limitZoom:function(v){var x=this.getMinZoom(),T=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(v=Math.round(v/P)*P),Math.max(x,Math.min(T,v))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(v,x){var T=this._getCenterOffset(v)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(T)?!1:(this.panBy(T,x),!0)},_createAnimProxy:function(){var v=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(v),this.on("zoomanim",function(x){var T=E_,P=this._proxy.style[T];Es(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[T]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){It(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var v=this.getCenter(),x=this.getZoom();Es(this._proxy,this.project(v,x),this.getZoomScale(x,1))},_catchTransitionEnd:function(v){this._animatingZoom&&v.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(v,x,T){if(this._animatingZoom)return!0;if(T=T||{},!this._zoomAnimated||T.animate===!1||this._nothingToAnimate()||Math.abs(x-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(x),E=this._getCenterOffset(v)._divideBy(1-1/P);return T.animate!==!0&&!this.getSize().contains(E)?!1:(I(function(){this._moveStart(!0,T.noMoveStart||!1)._animateZoom(v,x,!0)},this),!0)},_animateZoom:function(v,x,T,P){this._mapPane&&(T&&(this._animatingZoom=!0,this._animateToCenter=v,this._animateToZoom=x,Je(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:v,zoom:x,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zt(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 _W(v,x){return new ut(v,x)}var gi=V.extend({options:{position:"topright"},initialize:function(v){g(this,v)},getPosition:function(){return this.options.position},setPosition:function(v){var x=this._map;return x&&x.removeControl(this),this.options.position=v,x&&x.addControl(this),this},getContainer:function(){return this._container},addTo:function(v){this.remove(),this._map=v;var x=this._container=this.onAdd(v),T=this.getPosition(),P=v._controlCorners[T];return Je(x,"leaflet-control"),T.indexOf("bottom")!==-1?P.insertBefore(x,P.firstChild):P.appendChild(x),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(It(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(v){this._map&&v&&v.screenX>0&&v.screenY>0&&this._map.getContainer().focus()}}),Uh=function(v){return new gi(v)};ut.include({addControl:function(v){return v.addTo(this),this},removeControl:function(v){return v.remove(),this},_initControlPos:function(){var v=this._controlCorners={},x="leaflet-",T=this._controlContainer=ft("div",x+"control-container",this._container);function P(E,B){var $=x+E+" "+x+B;v[E+B]=ft("div",$,T)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var v in this._controlCorners)It(this._controlCorners[v]);It(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var RL=gi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(v,x,T,P){return T1,this._baseLayersList.style.display=v?"":"none"),this._separator.style.display=x&&v?"":"none",this},_onLayerChange:function(v){this._handlingClick||this._update();var x=this._getLayer(l(v.target)),T=x.overlay?v.type==="add"?"overlayadd":"overlayremove":v.type==="add"?"baselayerchange":null;T&&this._map.fire(T,x)},_createRadioElement:function(v,x){var T='",P=document.createElement("div");return P.innerHTML=T,P.firstChild},_addItem:function(v){var x=document.createElement("label"),T=this._map.hasLayer(v.layer),P;v.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=T):P=this._createRadioElement("leaflet-base-layers_"+l(this),T),this._layerControlInputs.push(P),P.layerId=l(v.layer),Ke(P,"click",this._onInputClick,this);var E=document.createElement("span");E.innerHTML=" "+v.name;var B=document.createElement("span");x.appendChild(B),B.appendChild(P),B.appendChild(E);var $=v.overlay?this._overlaysList:this._baseLayersList;return $.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var v=this._layerControlInputs,x,T,P=[],E=[];this._handlingClick=!0;for(var B=v.length-1;B>=0;B--)x=v[B],T=this._getLayer(x.layerId).layer,x.checked?P.push(T):x.checked||E.push(T);for(B=0;B=0;E--)x=v[E],T=this._getLayer(x.layerId).layer,x.disabled=T.options.minZoom!==void 0&&PT.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var v=this._section;this._preventClick=!0,Ke(v,"click",Mr),this.expand();var x=this;setTimeout(function(){Tt(v,"click",Mr),x._preventClick=!1})}}),xW=function(v,x,T){return new RL(v,x,T)},Y_=gi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(v){var x="leaflet-control-zoom",T=ft("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",T,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",T,this._zoomOut),this._updateDisabled(),v.on("zoomend zoomlevelschange",this._updateDisabled,this),T},onRemove:function(v){v.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(v){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(v.shiftKey?3:1))},_createButton:function(v,x,T,P,E){var B=ft("a",T,P);return B.innerHTML=v,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Wh(B),Ke(B,"click",zs),Ke(B,"click",E,this),Ke(B,"click",this._refocusOnMap,this),B},_updateDisabled:function(){var v=this._map,x="leaflet-disabled";Zt(this._zoomInButton,x),Zt(this._zoomOutButton,x),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||v._zoom===v.getMinZoom())&&(Je(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||v._zoom===v.getMaxZoom())&&(Je(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ut.mergeOptions({zoomControl:!0}),ut.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Y_,this.addControl(this.zoomControl))});var bW=function(v){return new Y_(v)},OL=gi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(v){var x="leaflet-control-scale",T=ft("div",x),P=this.options;return this._addScales(P,x+"-line",T),v.on(P.updateWhenIdle?"moveend":"move",this._update,this),v.whenReady(this._update,this),T},onRemove:function(v){v.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(v,x,T){v.metric&&(this._mScale=ft("div",x,T)),v.imperial&&(this._iScale=ft("div",x,T))},_update:function(){var v=this._map,x=v.getSize().y/2,T=v.distance(v.containerPointToLatLng([0,x]),v.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(T)},_updateScales:function(v){this.options.metric&&v&&this._updateMetric(v),this.options.imperial&&v&&this._updateImperial(v)},_updateMetric:function(v){var x=this._getRoundNum(v),T=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,T,x/v)},_updateImperial:function(v){var x=v*3.2808399,T,P,E;x>5280?(T=x/5280,P=this._getRoundNum(T),this._updateScale(this._iScale,P+" mi",P/T)):(E=this._getRoundNum(x),this._updateScale(this._iScale,E+" ft",E/x))},_updateScale:function(v,x,T){v.style.width=Math.round(this.options.maxWidth*T)+"px",v.innerHTML=x},_getRoundNum:function(v){var x=Math.pow(10,(Math.floor(v)+"").length-1),T=v/x;return T=T>=10?10:T>=5?5:T>=3?3:T>=2?2:1,x*T}}),SW=function(v){return new OL(v)},wW='',X_=gi.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?wW+" ":"")+"Leaflet"},initialize:function(v){g(this,v),this._attributions={}},onAdd:function(v){v.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),Wh(this._container);for(var x in v._layers)v._layers[x].getAttribution&&this.addAttribution(v._layers[x].getAttribution());return this._update(),v.on("layeradd",this._addAttribution,this),this._container},onRemove:function(v){v.off("layeradd",this._addAttribution,this)},_addAttribution:function(v){v.layer.getAttribution&&(this.addAttribution(v.layer.getAttribution()),v.layer.once("remove",function(){this.removeAttribution(v.layer.getAttribution())},this))},setPrefix:function(v){return this.options.prefix=v,this._update(),this},addAttribution:function(v){return v?(this._attributions[v]||(this._attributions[v]=0),this._attributions[v]++,this._update(),this):this},removeAttribution:function(v){return v?(this._attributions[v]&&(this._attributions[v]--,this._update()),this):this},_update:function(){if(this._map){var v=[];for(var x in this._attributions)this._attributions[x]&&v.push(x);var T=[];this.options.prefix&&T.push(this.options.prefix),v.length&&T.push(v.join(", ")),this._container.innerHTML=T.join(' ')}}});ut.mergeOptions({attributionControl:!0}),ut.addInitHook(function(){this.options.attributionControl&&new X_().addTo(this)});var TW=function(v){return new X_(v)};gi.Layers=RL,gi.Zoom=Y_,gi.Scale=OL,gi.Attribution=X_,Uh.layers=xW,Uh.zoom=bW,Uh.scale=SW,Uh.attribution=TW;var Ui=V.extend({initialize:function(v){this._map=v},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}});Ui.addTo=function(v,x){return v.addHandler(x,this),this};var CW={Events:F},zL=Re.touch?"touchstart mousedown":"mousedown",wo=Z.extend({options:{clickTolerance:3},initialize:function(v,x,T,P){g(this,P),this._element=v,this._dragStartTarget=x||v,this._preventOutline=T},enable:function(){this._enabled||(Ke(this._dragStartTarget,zL,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,zL,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(v){if(this._enabled&&(this._moved=!1,!R_(this._element,"leaflet-zoom-anim"))){if(v.touches&&v.touches.length!==1){wo._dragging===this&&this.finishDrag();return}if(!(wo._dragging||v.shiftKey||v.which!==1&&v.button!==1&&!v.touches)&&(wo._dragging=this,this._preventOutline&&F_(this._element),B_(),Fh(),!this._moving)){this.fire("down");var x=v.touches?v.touches[0]:v,T=PL(this._element);this._startPoint=new j(x.clientX,x.clientY),this._startPos=Rs(this._element),this._parentScale=G_(T);var P=v.type==="mousedown";Ke(document,P?"mousemove":"touchmove",this._onMove,this),Ke(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(v){if(this._enabled){if(v.touches&&v.touches.length>1){this._moved=!0;return}var x=v.touches&&v.touches.length===1?v.touches[0]:v,T=new j(x.clientX,x.clientY)._subtract(this._startPoint);!T.x&&!T.y||Math.abs(T.x)+Math.abs(T.y)B&&($=Q,B=te);B>T&&(x[$]=1,K_(v,x,T,P,$),K_(v,x,T,$,E))}function PW(v,x){for(var T=[v[0]],P=1,E=0,B=v.length;Px&&(T.push(v[P]),E=P);return Ex.max.x&&(T|=2),v.yx.max.y&&(T|=8),T}function kW(v,x){var T=x.x-v.x,P=x.y-v.y;return T*T+P*P}function Zh(v,x,T,P){var E=x.x,B=x.y,$=T.x-E,Q=T.y-B,te=$*$+Q*Q,ae;return te>0&&(ae=((v.x-E)*$+(v.y-B)*Q)/te,ae>1?(E=T.x,B=T.y):ae>0&&(E+=$*ae,B+=Q*ae)),$=v.x-E,Q=v.y-B,P?$*$+Q*Q:new j(E,B)}function Fn(v){return!b(v[0])||typeof v[0][0]!="object"&&typeof v[0][0]<"u"}function WL(v){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(v)}function UL(v,x){var T,P,E,B,$,Q,te,ae;if(!v||v.length===0)throw new Error("latlngs not passed");Fn(v)||(console.warn("latlngs are not flat! Only the first ring will be used"),v=v[0]);var Ae=ve([0,0]),He=ie(v),rt=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());rt<1700&&(Ae=q_(v));var Xr=v.length,mr=[];for(T=0;TP){te=(B-P)/E,ae=[Q.x-te*(Q.x-$.x),Q.y-te*(Q.y-$.y)];break}var cn=x.unproject(H(ae));return ve([cn.lat+Ae.lat,cn.lng+Ae.lng])}var DW={__proto__:null,simplify:VL,pointToSegmentDistance:FL,closestPointOnSegment:AW,clipSegment:HL,_getEdgeIntersection:fp,_getBitCode:Bs,_sqClosestPointOnSegment:Zh,isFlat:Fn,_flat:WL,polylineCenter:UL},Q_={project:function(v){return new j(v.lng,v.lat)},unproject:function(v){return new ue(v.y,v.x)},bounds:new X([-180,-90],[180,90])},J_={R:6378137,R_MINOR:6356752314245179e-9,bounds:new X([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(v){var x=Math.PI/180,T=this.R,P=v.lat*x,E=this.R_MINOR/T,B=Math.sqrt(1-E*E),$=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-$)/(1+$),B/2);return P=-T*Math.log(Math.max(Q,1e-10)),new j(v.lng*x*T,P)},unproject:function(v){for(var x=180/Math.PI,T=this.R,P=this.R_MINOR/T,E=Math.sqrt(1-P*P),B=Math.exp(-v.y/T),$=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=E*Math.sin($),ae=Math.pow((1-ae)/(1+ae),E/2),te=Math.PI/2-2*Math.atan(B*ae)-$,$+=te;return new ue($*x,v.x*x/T)}},IW={__proto__:null,LonLat:Q_,Mercator:J_,SphericalMercator:ke},NW=i({},xe,{code:"EPSG:3395",projection:J_,transformation:function(){var v=.5/(Math.PI*J_.R);return Me(v,.5,-v,.5)}()}),ZL=i({},xe,{code:"EPSG:4326",projection:Q_,transformation:Me(1/180,1,-1/180,.5)}),EW=i({},Ge,{projection:Q_,transformation:Me(1,0,-1,0),scale:function(v){return Math.pow(2,v)},zoom:function(v){return Math.log(v)/Math.LN2},distance:function(v,x){var T=x.lng-v.lng,P=x.lat-v.lat;return Math.sqrt(T*T+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=NW,Ge.EPSG3857=ot,Ge.EPSG900913=Ye,Ge.EPSG4326=ZL,Ge.Simple=EW;var mi=Z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(v){return v.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(v){return v&&v.removeLayer(this),this},getPane:function(v){return this._map.getPane(v?this.options[v]||v:this.options.pane)},addInteractiveTarget:function(v){return this._map._targets[l(v)]=this,this},removeInteractiveTarget:function(v){return delete this._map._targets[l(v)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(v){var x=v.target;if(x.hasLayer(this)){if(this._map=x,this._zoomAnimated=x._zoomAnimated,this.getEvents){var T=this.getEvents();x.on(T,this),this.once("remove",function(){x.off(T,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ut.include({addLayer:function(v){if(!v._layerAdd)throw new Error("The provided object is not a Layer.");var x=l(v);return this._layers[x]?this:(this._layers[x]=v,v._mapToAdd=this,v.beforeAdd&&v.beforeAdd(this),this.whenReady(v._layerAdd,v),this)},removeLayer:function(v){var x=l(v);return this._layers[x]?(this._loaded&&v.onRemove(this),delete this._layers[x],this._loaded&&(this.fire("layerremove",{layer:v}),v.fire("remove")),v._map=v._mapToAdd=null,this):this},hasLayer:function(v){return l(v)in this._layers},eachLayer:function(v,x){for(var T in this._layers)v.call(x,this._layers[T]);return this},_addLayers:function(v){v=v?b(v)?v:[v]:[];for(var x=0,T=v.length;xthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&x[0]instanceof ue&&x[0].equals(x[T-1])&&x.pop(),x},_setLatLngs:function(v){Ia.prototype._setLatLngs.call(this,v),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var v=this._renderer._bounds,x=this.options.weight,T=new j(x,x);if(v=new X(v.min.subtract(T),v.max.add(T)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(v))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,E=this._rings.length,B;Pv.y!=E.y>v.y&&v.x<(E.x-P.x)*(v.y-P.y)/(E.y-P.y)+P.x&&(x=!x);return x||Ia.prototype._containsPoint.call(this,v,!0)}});function GW(v,x){return new Mu(v,x)}var Na=Da.extend({initialize:function(v,x){g(this,x),this._layers={},v&&this.addData(v)},addData:function(v){var x=b(v)?v:v.features,T,P,E;if(x){for(T=0,P=x.length;T0&&E.push(E[0].slice()),E}function Au(v,x){return v.feature?i({},v.feature,{geometry:x}):yp(x)}function yp(v){return v.type==="Feature"||v.type==="FeatureCollection"?v:{type:"Feature",properties:{},geometry:v}}var nx={toGeoJSON:function(v){return Au(this,{type:"Point",coordinates:rx(this.getLatLng(),v)})}};dp.include(nx),ex.include(nx),vp.include(nx),Ia.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),T=mp(this._latlngs,x?1:0,!1,v);return Au(this,{type:(x?"Multi":"")+"LineString",coordinates:T})}}),Mu.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),T=x&&!Fn(this._latlngs[0]),P=mp(this._latlngs,T?2:x?1:0,!0,v);return x||(P=[P]),Au(this,{type:(T?"Multi":"")+"Polygon",coordinates:P})}}),Tu.include({toMultiPoint:function(v){var x=[];return this.eachLayer(function(T){x.push(T.toGeoJSON(v).geometry.coordinates)}),Au(this,{type:"MultiPoint",coordinates:x})},toGeoJSON:function(v){var x=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(x==="MultiPoint")return this.toMultiPoint(v);var T=x==="GeometryCollection",P=[];return this.eachLayer(function(E){if(E.toGeoJSON){var B=E.toGeoJSON(v);if(T)P.push(B.geometry);else{var $=yp(B);$.type==="FeatureCollection"?P.push.apply(P,$.features):P.push($)}}}),T?Au(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function XL(v,x){return new Na(v,x)}var HW=XL,_p=mi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(v,x,T){this._url=v,this._bounds=ie(x),g(this,T)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Je(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){It(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(v){return this.options.opacity=v,this._image&&this._updateOpacity(),this},setStyle:function(v){return v.opacity&&this.setOpacity(v.opacity),this},bringToFront:function(){return this._map&&Su(this._image),this},bringToBack:function(){return this._map&&wu(this._image),this},setUrl:function(v){return this._url=v,this._image&&(this._image.src=v),this},setBounds:function(v){return this._bounds=ie(v),this._map&&this._reset(),this},getEvents:function(){var v={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(v.zoomanim=this._animateZoom),v},setZIndex:function(v){return this.options.zIndex=v,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var v=this._url.tagName==="IMG",x=this._image=v?this._url:ft("img");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onload=o(this.fire,this,"load"),x.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(x.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),v){this._url=x.src;return}x.src=this._url,x.alt=this.options.alt},_animateZoom:function(v){var x=this._map.getZoomScale(v.zoom),T=this._map._latLngBoundsToNewLayerBounds(this._bounds,v.zoom,v.center).min;Es(this._image,T,x)},_reset:function(){var v=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),T=x.getSize();Qt(v,x.min),v.style.width=T.x+"px",v.style.height=T.y+"px"},_updateOpacity:function(){Vn(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 v=this.options.errorOverlayUrl;v&&this._url!==v&&(this._url=v,this._image.src=v)},getCenter:function(){return this._bounds.getCenter()}}),WW=function(v,x,T){return new _p(v,x,T)},qL=_p.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var v=this._url.tagName==="VIDEO",x=this._image=v?this._url:ft("video");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onloadeddata=o(this.fire,this,"load"),v){for(var T=x.getElementsByTagName("source"),P=[],E=0;E0?P:[x.src];return}b(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(x.style,"objectFit")&&(x.style.objectFit="fill"),x.autoplay=!!this.options.autoplay,x.loop=!!this.options.loop,x.muted=!!this.options.muted,x.playsInline=!!this.options.playsInline;for(var B=0;BE?(x.height=E+"px",Je(v,B)):Zt(v,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center),T=this._getAnchor();Qt(this._container,x.add(T))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var v=this._map,x=parseInt(Vh(this._container,"marginBottom"),10)||0,T=this._container.offsetHeight+x,P=this._containerWidth,E=new j(this._containerLeft,-T-this._containerBottom);E._add(Rs(this._container));var B=v.layerPointToContainerPoint(E),$=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||$),te=H(this.options.autoPanPaddingBottomRight||$),ae=v.getSize(),Ae=0,He=0;B.x+P+te.x>ae.x&&(Ae=B.x+P-ae.x+te.x),B.x-Ae-Q.x<0&&(Ae=B.x-Q.x),B.y+T+te.y>ae.y&&(He=B.y+T-ae.y+te.y),B.y-He-Q.y<0&&(He=B.y-Q.y),(Ae||He)&&(this.options.keepInView&&(this._autopanning=!0),v.fire("autopanstart").panBy([Ae,He]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),$W=function(v,x){return new xp(v,x)};ut.mergeOptions({closePopupOnClick:!0}),ut.include({openPopup:function(v,x,T){return this._initOverlay(xp,v,x,T).openOn(this),this},closePopup:function(v){return v=arguments.length?v:this._popup,v&&v.close(),this}}),mi.include({bindPopup:function(v,x){return this._popup=this._initOverlay(xp,this._popup,v,x),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(v){return this._popup&&(this instanceof Da||(this._popup._source=this),this._popup._prepareOpen(v||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(v){return this._popup&&this._popup.setContent(v),this},getPopup:function(){return this._popup},_openPopup:function(v){if(!(!this._popup||!this._map)){zs(v);var x=v.layer||v.target;if(this._popup._source===x&&!(x instanceof To)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(v.latlng);return}this._popup._source=x,this.openPopup(v.latlng)}},_movePopup:function(v){this._popup.setLatLng(v.latlng)},_onKeyPress:function(v){v.originalEvent.keyCode===13&&this._openPopup(v)}});var bp=Zi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(v){Zi.prototype.onAdd.call(this,v),this.setOpacity(this.options.opacity),v.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(v){Zi.prototype.onRemove.call(this,v),v.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var v=Zi.prototype.getEvents.call(this);return this.options.permanent||(v.preclick=this.close),v},_initLayout:function(){var v="leaflet-tooltip",x=v+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(v){var x,T,P=this._map,E=this._container,B=P.latLngToContainerPoint(P.getCenter()),$=P.layerPointToContainerPoint(v),Q=this.options.direction,te=E.offsetWidth,ae=E.offsetHeight,Ae=H(this.options.offset),He=this._getAnchor();Q==="top"?(x=te/2,T=ae):Q==="bottom"?(x=te/2,T=0):Q==="center"?(x=te/2,T=ae/2):Q==="right"?(x=0,T=ae/2):Q==="left"?(x=te,T=ae/2):$.xthis.options.maxZoom||TP?this._retainParent(E,B,$,P):!1)},_retainChildren:function(v,x,T,P){for(var E=2*v;E<2*v+2;E++)for(var B=2*x;B<2*x+2;B++){var $=new j(E,B);$.z=T+1;var Q=this._tileCoordsToKey($),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);T+1this.options.maxZoom||this.options.minZoom!==void 0&&E1){this._setView(v,T);return}for(var He=E.min.y;He<=E.max.y;He++)for(var rt=E.min.x;rt<=E.max.x;rt++){var Xr=new j(rt,He);if(Xr.z=this._tileZoom,!!this._isValidTile(Xr)){var mr=this._tiles[this._tileCoordsToKey(Xr)];mr?mr.current=!0:$.push(Xr)}}if($.sort(function(cn,Pu){return cn.distanceTo(B)-Pu.distanceTo(B)}),$.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Gn=document.createDocumentFragment();for(rt=0;rt<$.length;rt++)this._addTile($[rt],Gn);this._level.el.appendChild(Gn)}}}},_isValidTile:function(v){var x=this._map.options.crs;if(!x.infinite){var T=this._globalTileRange;if(!x.wrapLng&&(v.xT.max.x)||!x.wrapLat&&(v.yT.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(v);return ie(this.options.bounds).overlaps(P)},_keyToBounds:function(v){return this._tileCoordsToBounds(this._keyToTileCoords(v))},_tileCoordsToNwSe:function(v){var x=this._map,T=this.getTileSize(),P=v.scaleBy(T),E=P.add(T),B=x.unproject(P,v.z),$=x.unproject(E,v.z);return[B,$]},_tileCoordsToBounds:function(v){var x=this._tileCoordsToNwSe(v),T=new ne(x[0],x[1]);return this.options.noWrap||(T=this._map.wrapLatLngBounds(T)),T},_tileCoordsToKey:function(v){return v.x+":"+v.y+":"+v.z},_keyToTileCoords:function(v){var x=v.split(":"),T=new j(+x[0],+x[1]);return T.z=+x[2],T},_removeTile:function(v){var x=this._tiles[v];x&&(It(x.el),delete this._tiles[v],this.fire("tileunload",{tile:x.el,coords:this._keyToTileCoords(v)}))},_initTile:function(v){Je(v,"leaflet-tile");var x=this.getTileSize();v.style.width=x.x+"px",v.style.height=x.y+"px",v.onselectstart=h,v.onmousemove=h,Re.ielt9&&this.options.opacity<1&&Vn(v,this.options.opacity)},_addTile:function(v,x){var T=this._getTilePos(v),P=this._tileCoordsToKey(v),E=this.createTile(this._wrapCoords(v),o(this._tileReady,this,v));this._initTile(E),this.createTile.length<2&&I(o(this._tileReady,this,v,null,E)),Qt(E,T),this._tiles[P]={el:E,coords:v,current:!0},x.appendChild(E),this.fire("tileloadstart",{tile:E,coords:v})},_tileReady:function(v,x,T){x&&this.fire("tileerror",{error:x,tile:T,coords:v});var P=this._tileCoordsToKey(v);T=this._tiles[P],T&&(T.loaded=+new Date,this._map._fadeAnimated?(Vn(T.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(T.active=!0,this._pruneTiles()),x||(Je(T.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:T.el,coords:v})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Re.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(v){return v.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(v){var x=new j(this._wrapX?c(v.x,this._wrapX):v.x,this._wrapY?c(v.y,this._wrapY):v.y);return x.z=v.z,x},_pxBoundsToTileRange:function(v){var x=this.getTileSize();return new X(v.min.unscaleBy(x).floor(),v.max.unscaleBy(x).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var v in this._tiles)if(!this._tiles[v].loaded)return!1;return!0}});function qW(v){return new Yh(v)}var Lu=Yh.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(v,x){this._url=v,x=g(this,x),x.detectRetina&&Re.retina&&x.maxZoom>0?(x.tileSize=Math.floor(x.tileSize/2),x.zoomReverse?(x.zoomOffset--,x.minZoom=Math.min(x.maxZoom,x.minZoom+1)):(x.zoomOffset++,x.maxZoom=Math.max(x.minZoom,x.maxZoom-1)),x.minZoom=Math.max(0,x.minZoom)):x.zoomReverse?x.minZoom=Math.min(x.maxZoom,x.minZoom):x.maxZoom=Math.max(x.minZoom,x.maxZoom),typeof x.subdomains=="string"&&(x.subdomains=x.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(v,x){return this._url===v&&x===void 0&&(x=!0),this._url=v,x||this.redraw(),this},createTile:function(v,x){var T=document.createElement("img");return Ke(T,"load",o(this._tileOnLoad,this,x,T)),Ke(T,"error",o(this._tileOnError,this,x,T)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(T.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(T.referrerPolicy=this.options.referrerPolicy),T.alt="",T.src=this.getTileUrl(v),T},getTileUrl:function(v){var x={r:Re.retina?"@2x":"",s:this._getSubdomain(v),x:v.x,y:v.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var T=this._globalTileRange.max.y-v.y;this.options.tms&&(x.y=T),x["-y"]=T}return _(this._url,i(x,this.options))},_tileOnLoad:function(v,x){Re.ielt9?setTimeout(o(v,this,null,x),0):v(null,x)},_tileOnError:function(v,x,T){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),v(T,x)},_onTileRemove:function(v){v.tile.onload=null},_getZoomForUrl:function(){var v=this._tileZoom,x=this.options.maxZoom,T=this.options.zoomReverse,P=this.options.zoomOffset;return T&&(v=x-v),v+P},_getSubdomain:function(v){var x=Math.abs(v.x+v.y)%this.options.subdomains.length;return this.options.subdomains[x]},_abortLoading:function(){var v,x;for(v in this._tiles)if(this._tiles[v].coords.z!==this._tileZoom&&(x=this._tiles[v].el,x.onload=h,x.onerror=h,!x.complete)){x.src=C;var T=this._tiles[v].coords;It(x),delete this._tiles[v],this.fire("tileabort",{tile:x,coords:T})}},_removeTile:function(v){var x=this._tiles[v];if(x)return x.el.setAttribute("src",C),Yh.prototype._removeTile.call(this,v)},_tileReady:function(v,x,T){if(!(!this._map||T&&T.getAttribute("src")===C))return Yh.prototype._tileReady.call(this,v,x,T)}});function JL(v,x){return new Lu(v,x)}var eP=Lu.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(v,x){this._url=v;var T=i({},this.defaultWmsParams);for(var P in x)P in this.options||(T[P]=x[P]);x=g(this,x);var E=x.detectRetina&&Re.retina?2:1,B=this.getTileSize();T.width=B.x*E,T.height=B.y*E,this.wmsParams=T},onAdd:function(v){this._crs=this.options.crs||v.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var x=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[x]=this._crs.code,Lu.prototype.onAdd.call(this,v)},getTileUrl:function(v){var x=this._tileCoordsToNwSe(v),T=this._crs,P=K(T.project(x[0]),T.project(x[1])),E=P.min,B=P.max,$=(this._wmsVersion>=1.3&&this._crs===ZL?[E.y,E.x,B.y,B.x]:[E.x,E.y,B.x,B.y]).join(","),Q=Lu.prototype.getTileUrl.call(this,v);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+$},setParams:function(v,x){return i(this.wmsParams,v),x||this.redraw(),this}});function KW(v,x){return new eP(v,x)}Lu.WMS=eP,JL.wms=KW;var Ea=mi.extend({options:{padding:.1},initialize:function(v){g(this,v),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Je(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 v={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(v.zoomanim=this._onAnimZoom),v},_onAnimZoom:function(v){this._updateTransform(v.center,v.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(v,x){var T=this._map.getZoomScale(x,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),E=this._map.project(this._center,x),B=P.multiplyBy(-T).add(E).subtract(this._map._getNewPixelOrigin(v,x));Re.any3d?Es(this._container,B,T):Qt(this._container,B)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var v in this._layers)this._layers[v]._reset()},_onZoomEnd:function(){for(var v in this._layers)this._layers[v]._project()},_updatePaths:function(){for(var v in this._layers)this._layers[v]._update()},_update:function(){var v=this.options.padding,x=this._map.getSize(),T=this._map.containerPointToLayerPoint(x.multiplyBy(-v)).round();this._bounds=new X(T,T.add(x.multiplyBy(1+v*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),tP=Ea.extend({options:{tolerance:0},getEvents:function(){var v=Ea.prototype.getEvents.call(this);return v.viewprereset=this._onViewPreReset,v},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ea.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var v=this._container=document.createElement("canvas");Ke(v,"mousemove",this._onMouseMove,this),Ke(v,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ke(v,"mouseout",this._handleMouseOut,this),v._leaflet_disable_events=!0,this._ctx=v.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,It(this._container),Tt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var v;this._redrawBounds=null;for(var x in this._layers)v=this._layers[x],v._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ea.prototype._update.call(this);var v=this._bounds,x=this._container,T=v.getSize(),P=Re.retina?2:1;Qt(x,v.min),x.width=P*T.x,x.height=P*T.y,x.style.width=T.x+"px",x.style.height=T.y+"px",Re.retina&&this._ctx.scale(2,2),this._ctx.translate(-v.min.x,-v.min.y),this.fire("update")}},_reset:function(){Ea.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(v){this._updateDashArray(v),this._layers[l(v)]=v;var x=v._order={layer:v,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=x),this._drawLast=x,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(v){this._requestRedraw(v)},_removePath:function(v){var x=v._order,T=x.next,P=x.prev;T?T.prev=P:this._drawLast=P,P?P.next=T:this._drawFirst=T,delete v._order,delete this._layers[l(v)],this._requestRedraw(v)},_updatePath:function(v){this._extendRedrawBounds(v),v._project(),v._update(),this._requestRedraw(v)},_updateStyle:function(v){this._updateDashArray(v),this._requestRedraw(v)},_updateDashArray:function(v){if(typeof v.options.dashArray=="string"){var x=v.options.dashArray.split(/[, ]+/),T=[],P,E;for(E=0;E')}}catch{}return function(v){return document.createElement("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),QW={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ea.prototype._update.call(this),this.fire("update"))},_initPath:function(v){var x=v._container=Xh("shape");Je(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",v._path=Xh("path"),x.appendChild(v._path),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){var x=v._container;this._container.appendChild(x),v.options.interactive&&v.addInteractiveTarget(x)},_removePath:function(v){var x=v._container;It(x),v.removeInteractiveTarget(x),delete this._layers[l(v)]},_updateStyle:function(v){var x=v._stroke,T=v._fill,P=v.options,E=v._container;E.stroked=!!P.stroke,E.filled=!!P.fill,P.stroke?(x||(x=v._stroke=Xh("stroke")),E.appendChild(x),x.weight=P.weight+"px",x.color=P.color,x.opacity=P.opacity,P.dashArray?x.dashStyle=b(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):x.dashStyle="",x.endcap=P.lineCap.replace("butt","flat"),x.joinstyle=P.lineJoin):x&&(E.removeChild(x),v._stroke=null),P.fill?(T||(T=v._fill=Xh("fill")),E.appendChild(T),T.color=P.fillColor||P.color,T.opacity=P.fillOpacity):T&&(E.removeChild(T),v._fill=null)},_updateCircle:function(v){var x=v._point.round(),T=Math.round(v._radius),P=Math.round(v._radiusY||T);this._setPath(v,v._empty()?"M0 0":"AL "+x.x+","+x.y+" "+T+","+P+" 0,"+65535*360)},_setPath:function(v,x){v._path.v=x},_bringToFront:function(v){Su(v._container)},_bringToBack:function(v){wu(v._container)}},Sp=Re.vml?Xh:tt,qh=Ea.extend({_initContainer:function(){this._container=Sp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Sp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){It(this._container),Tt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ea.prototype._update.call(this);var v=this._bounds,x=v.getSize(),T=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,T.setAttribute("width",x.x),T.setAttribute("height",x.y)),Qt(T,v.min),T.setAttribute("viewBox",[v.min.x,v.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(v){var x=v._path=Sp("path");v.options.className&&Je(x,v.options.className),v.options.interactive&&Je(x,"leaflet-interactive"),this._updateStyle(v),this._layers[l(v)]=v},_addPath:function(v){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(v._path),v.addInteractiveTarget(v._path)},_removePath:function(v){It(v._path),v.removeInteractiveTarget(v._path),delete this._layers[l(v)]},_updatePath:function(v){v._project(),v._update()},_updateStyle:function(v){var x=v._path,T=v.options;x&&(T.stroke?(x.setAttribute("stroke",T.color),x.setAttribute("stroke-opacity",T.opacity),x.setAttribute("stroke-width",T.weight),x.setAttribute("stroke-linecap",T.lineCap),x.setAttribute("stroke-linejoin",T.lineJoin),T.dashArray?x.setAttribute("stroke-dasharray",T.dashArray):x.removeAttribute("stroke-dasharray"),T.dashOffset?x.setAttribute("stroke-dashoffset",T.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),T.fill?(x.setAttribute("fill",T.fillColor||T.color),x.setAttribute("fill-opacity",T.fillOpacity),x.setAttribute("fill-rule",T.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(v,x){this._setPath(v,lt(v._parts,x))},_updateCircle:function(v){var x=v._point,T=Math.max(Math.round(v._radius),1),P=Math.max(Math.round(v._radiusY),1)||T,E="a"+T+","+P+" 0 1,0 ",B=v._empty()?"M0 0":"M"+(x.x-T)+","+x.y+E+T*2+",0 "+E+-T*2+",0 ";this._setPath(v,B)},_setPath:function(v,x){v._path.setAttribute("d",x)},_bringToFront:function(v){Su(v._path)},_bringToBack:function(v){wu(v._path)}});Re.vml&&qh.include(QW);function nP(v){return Re.svg||Re.vml?new qh(v):null}ut.include({getRenderer:function(v){var x=v.options.renderer||this._getPaneRenderer(v.options.pane)||this.options.renderer||this._renderer;return x||(x=this._renderer=this._createRenderer()),this.hasLayer(x)||this.addLayer(x),x},_getPaneRenderer:function(v){if(v==="overlayPane"||v===void 0)return!1;var x=this._paneRenderers[v];return x===void 0&&(x=this._createRenderer({pane:v}),this._paneRenderers[v]=x),x},_createRenderer:function(v){return this.options.preferCanvas&&rP(v)||nP(v)}});var iP=Mu.extend({initialize:function(v,x){Mu.prototype.initialize.call(this,this._boundsToLatLngs(v),x)},setBounds:function(v){return this.setLatLngs(this._boundsToLatLngs(v))},_boundsToLatLngs:function(v){return v=ie(v),[v.getSouthWest(),v.getNorthWest(),v.getNorthEast(),v.getSouthEast()]}});function JW(v,x){return new iP(v,x)}qh.create=Sp,qh.pointsToPath=lt,Na.geometryToLayer=pp,Na.coordsToLatLng=tx,Na.coordsToLatLngs=gp,Na.latLngToCoords=rx,Na.latLngsToCoords=mp,Na.getFeature=Au,Na.asFeature=yp,ut.mergeOptions({boxZoom:!0});var aP=Ui.extend({initialize:function(v){this._map=v,this._container=v._container,this._pane=v._panes.overlayPane,this._resetStateTimeout=0,v.on("unload",this._destroy,this)},addHooks:function(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Tt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){It(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(v){if(!v.shiftKey||v.which!==1&&v.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Fh(),B_(),this._startPoint=this._map.mouseEventToContainerPoint(v),Ke(document,{contextmenu:zs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(v){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Je(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(v);var x=new X(this._point,this._startPoint),T=x.getSize();Qt(this._box,x.min),this._box.style.width=T.x+"px",this._box.style.height=T.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),Gh(),j_(),Tt(document,{contextmenu:zs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(v){if(!(v.which!==1&&v.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var x=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(x).fire("boxzoomend",{boxZoomBounds:x})}},_onKeyDown:function(v){v.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ut.addInitHook("addHandler","boxZoom",aP),ut.mergeOptions({doubleClickZoom:!0});var oP=Ui.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(v){var x=this._map,T=x.getZoom(),P=x.options.zoomDelta,E=v.originalEvent.shiftKey?T-P:T+P;x.options.doubleClickZoom==="center"?x.setZoom(E):x.setZoomAround(v.containerPoint,E)}});ut.addInitHook("addHandler","doubleClickZoom",oP),ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var sP=Ui.extend({addHooks:function(){if(!this._draggable){var v=this._map;this._draggable=new wo(v._mapPane,v._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),v.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),v.on("zoomend",this._onZoomEnd,this),v.whenReady(this._onZoomEnd,this))}Je(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zt(this._map._container,"leaflet-grab"),Zt(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 v=this._map;if(v._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var x=ie(this._map.options.maxBounds);this._offsetLimit=K(this._map.latLngToContainerPoint(x.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(x.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;v.fire("movestart").fire("dragstart"),v.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(v){if(this._map.options.inertia){var x=this._lastTime=+new Date,T=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(T),this._times.push(x),this._prunePositions(x)}this._map.fire("move",v).fire("drag",v)},_prunePositions:function(v){for(;this._positions.length>1&&v-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var v=this._map.getSize().divideBy(2),x=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=x.subtract(v).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(v,x){return v-(v-x)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var v=this._draggable._newPos.subtract(this._draggable._startPos),x=this._offsetLimit;v.xx.max.x&&(v.x=this._viscousLimit(v.x,x.max.x)),v.y>x.max.y&&(v.y=this._viscousLimit(v.y,x.max.y)),this._draggable._newPos=this._draggable._startPos.add(v)}},_onPreDragWrap:function(){var v=this._worldWidth,x=Math.round(v/2),T=this._initialWorldOffset,P=this._draggable._newPos.x,E=(P-x+T)%v+x-T,B=(P+x+T)%v-x-T,$=Math.abs(E+T)0?B:-B))-x;this._delta=0,this._startTime=null,$&&(v.options.scrollWheelZoom==="center"?v.setZoom(x+$):v.setZoomAround(this._lastMousePos,x+$))}});ut.addInitHook("addHandler","scrollWheelZoom",uP);var eU=600;ut.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var cP=Ui.extend({addHooks:function(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Tt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(v){if(clearTimeout(this._holdTimeout),v.touches.length===1){var x=v.touches[0];this._startPos=this._newPos=new j(x.clientX,x.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ke(document,"touchend",Mr),Ke(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",x))},this),eU),Ke(document,"touchend touchcancel contextmenu",this._cancel,this),Ke(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function v(){Tt(document,"touchend",Mr),Tt(document,"touchend touchcancel",v)},_cancel:function(){clearTimeout(this._holdTimeout),Tt(document,"touchend touchcancel contextmenu",this._cancel,this),Tt(document,"touchmove",this._onMove,this)},_onMove:function(v){var x=v.touches[0];this._newPos=new j(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(v,x){var T=new MouseEvent(v,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});T._simulated=!0,x.target.dispatchEvent(T)}});ut.addInitHook("addHandler","tapHold",cP),ut.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var hP=Ui.extend({addHooks:function(){Je(this._map._container,"leaflet-touch-zoom"),Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zt(this._map._container,"leaflet-touch-zoom"),Tt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(v){var x=this._map;if(!(!v.touches||v.touches.length!==2||x._animatingZoom||this._zooming)){var T=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]);this._centerPoint=x.getSize()._divideBy(2),this._startLatLng=x.containerPointToLatLng(this._centerPoint),x.options.touchZoom!=="center"&&(this._pinchStartLatLng=x.containerPointToLatLng(T.add(P)._divideBy(2))),this._startDist=T.distanceTo(P),this._startZoom=x.getZoom(),this._moved=!1,this._zooming=!0,x._stop(),Ke(document,"touchmove",this._onTouchMove,this),Ke(document,"touchend touchcancel",this._onTouchEnd,this),Mr(v)}},_onTouchMove:function(v){if(!(!v.touches||v.touches.length!==2||!this._zooming)){var x=this._map,T=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]),E=T.distanceTo(P)/this._startDist;if(this._zoom=x.getScaleZoom(E,this._startZoom),!x.options.bounceAtZoomLimits&&(this._zoomx.getMaxZoom()&&E>1)&&(this._zoom=x._limitZoom(this._zoom)),x.options.touchZoom==="center"){if(this._center=this._startLatLng,E===1)return}else{var B=T._add(P)._divideBy(2)._subtract(this._centerPoint);if(E===1&&B.x===0&&B.y===0)return;this._center=x.unproject(x.project(this._pinchStartLatLng,this._zoom).subtract(B),this._zoom)}this._moved||(x._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var $=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I($,this,!0),Mr(v)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,z(this._animRequest),Tt(document,"touchmove",this._onTouchMove,this),Tt(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))}});ut.addInitHook("addHandler","touchZoom",hP),ut.BoxZoom=aP,ut.DoubleClickZoom=oP,ut.Drag=sP,ut.Keyboard=lP,ut.ScrollWheelZoom=uP,ut.TapHold=cP,ut.TouchZoom=hP,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=tP,r.Circle=ex,r.CircleMarker=vp,r.Class=V,r.Control=gi,r.DivIcon=QL,r.DivOverlay=Zi,r.DomEvent=yW,r.DomUtil=gW,r.Draggable=wo,r.Evented=Z,r.FeatureGroup=Da,r.GeoJSON=Na,r.GridLayer=Yh,r.Handler=Ui,r.Icon=Cu,r.ImageOverlay=_p,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=mi,r.LayerGroup=Tu,r.LineUtil=DW,r.Map=ut,r.Marker=dp,r.Mixin=CW,r.Path=To,r.Point=j,r.PolyUtil=MW,r.Polygon=Mu,r.Polyline=Ia,r.Popup=xp,r.PosAnimation=EL,r.Projection=IW,r.Rectangle=iP,r.Renderer=Ea,r.SVG=qh,r.SVGOverlay=KL,r.TileLayer=Lu,r.Tooltip=bp,r.Transformation=fe,r.Util=O,r.VideoOverlay=qL,r.bind=o,r.bounds=K,r.canvas=rP,r.circle=VW,r.circleMarker=jW,r.control=Uh,r.divIcon=XW,r.extend=i,r.featureGroup=OW,r.geoJSON=XL,r.geoJson=HW,r.gridLayer=qW,r.icon=zW,r.imageOverlay=WW,r.latLng=ve,r.latLngBounds=ie,r.layerGroup=RW,r.map=_W,r.marker=BW,r.point=H,r.polygon=GW,r.polyline=FW,r.popup=$W,r.rectangle=JW,r.setOptions=g,r.stamp=l,r.svg=nP,r.svgOverlay=ZW,r.tileLayer=JL,r.tooltip=YW,r.transformation=Me,r.version=n,r.videoOverlay=UW;var tU=window.L;r.noConflict=function(){return window.L=tU,this},window.L=r})})(gC,gC.exports);var _u=gC.exports;const R8=yC(_u);function ap(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function sL(t,e){return e==null?function(n,i){const a=U.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=U.useRef();a.current||(a.current=t(n,i));const o=U.useRef(n),{instance:s}=a.current;return U.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function O8(t,e){U.useEffect(function(){return(e.layerContainer??e.map).addLayer(t.instance),function(){var a;(a=e.layerContainer)==null||a.removeLayer(t.instance),e.map.removeLayer(t.instance)}},[e,t])}function bye(t){return function(r){const n=L_(),i=t(P_(r,n),n);return D8(n.map,r.attribution),oL(i.current,r.eventHandlers),O8(i.current,n),i}}function Sye(t,e){const r=U.useRef();U.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function wye(t){return function(r){const n=L_(),i=t(P_(r,n),n);return oL(i.current,r.eventHandlers),O8(i.current,n),Sye(i.current,r),i}}function z8(t,e){const r=sL(t),n=xye(r,e);return yye(n)}function B8(t,e){const r=sL(t,e),n=wye(r);return mye(n)}function Tye(t,e){const r=sL(t,e),n=bye(r);return _ye(n)}function Cye(t,e,r){const{opacity:n,zIndex:i}=e;n!=null&&n!==r.opacity&&t.setOpacity(n),i!=null&&i!==r.zIndex&&t.setZIndex(i)}function Mye(){return L_().map}const Aye=B8(function({center:e,children:r,...n},i){const a=new _u.CircleMarker(e,n);return ap(a,I8(i,{overlayContainer:a}))},vye);function mC(){return mC=Object.assign||function(t){for(var e=1;e(d==null?void 0:d.map)??null,[d]);const g=U.useCallback(y=>{if(y!==null&&d===null){const _=new _u.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(gye(_))}},[]);U.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Vc.createElement(E8,{value:d},n):o??null;return Vc.createElement("div",mC({},f,{ref:g}),m)}const Pye=U.forwardRef(Lye),kye=B8(function({positions:e,...r},n){const i=new _u.Polyline(e,r);return ap(i,I8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),Dye=z8(function(e,r){const n=new _u.Popup(e,r.overlayContainer);return ap(n,r)},function(e,r,{position:n},i){U.useEffect(function(){const{instance:o}=e;function s(u){u.popup===o&&(o.update(),i(!0))}function l(u){u.popup===o&&i(!1)}return r.map.on({popupopen:s,popupclose:l}),r.overlayContainer==null?(n!=null&&o.setLatLng(n),o.openOn(r.map)):r.overlayContainer.bindPopup(o),function(){var c;r.map.off({popupopen:s,popupclose:l}),(c=r.overlayContainer)==null||c.unbindPopup(),r.map.removeLayer(o)}},[e,r,i,n])}),Iye=Tye(function({url:e,...r},n){const i=new _u.TileLayer(e,P_(r,n));return ap(i,n)},function(e,r,n){Cye(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),Nye=z8(function(e,r){const n=new _u.Tooltip(e,r.overlayContainer);return ap(n,r)},function(e,r,{position:n},i){U.useEffect(function(){const o=r.overlayContainer;if(o==null)return;const{instance:s}=e,l=c=>{c.tooltip===s&&(n!=null&&s.setLatLng(n),s.update(),i(!0))},u=c=>{c.tooltip===s&&i(!1)};return o.on({tooltipopen:l,tooltipclose:u}),o.bindTooltip(s),function(){o.off({tooltipopen:l,tooltipclose:u}),o._map!=null&&o.unbindTooltip()}},[e,r,i,n])}),Eye="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=",Rye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Oye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete R8.Icon.Default.prototype._getIconUrl;R8.Icon.Default.mergeOptions({iconUrl:Eye,iconRetinaUrl:Rye,shadowUrl:Oye});const mz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],zye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Bye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function jye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Vye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Fye({bounds:t}){const e=Mye();return U.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function Gye({node:t}){const e=t.latitude!==null&&t.longitude!==null,r=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`:"Unknown";return S.jsxs("div",{className:"min-w-[200px]",children:[S.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),S.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),S.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[S.jsx("div",{className:"text-slate-500",children:"Role"}),S.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),S.jsx("div",{className:"text-slate-500",children:"Hardware"}),S.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),S.jsx("div",{className:"text-slate-500",children:"Battery"}),S.jsx("div",{className:"text-slate-700",children:r}),S.jsx("div",{className:"text-slate-500",children:"Last Heard"}),S.jsx("div",{className:"text-slate-700",children:Vye(t.last_heard)})]}),e&&S.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[S.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[S.jsx(Yc,{size:10}),"Google Maps"]}),S.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-600 hover:text-blue-800",children:[S.jsx(Yc,{size:10}),"OSM"]})]})]})}function Hye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=U.useMemo(()=>t.filter(h=>h.latitude!==null&&h.longitude!==null),[t]),a=t.length-i.length,o=U.useMemo(()=>new Map(i.map(h=>[h.node_num,h])),[i]),s=U.useMemo(()=>e.filter(h=>o.has(h.from_node)&&o.has(h.to_node)),[e,o]),l=U.useMemo(()=>{if(i.length===0)return null;const h=i.map(d=>d.latitude),f=i.map(d=>d.longitude);return[[Math.min(...h),Math.min(...f)],[Math.max(...h),Math.max(...f)]]},[i]),u=[43.6,-114.4],c=U.useMemo(()=>{const h=new Set;return r!==null&&e.forEach(f=>{f.from_node===r&&h.add(f.to_node),f.to_node===r&&h.add(f.from_node)}),h},[r,e]);return S.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[S.jsxs(Pye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[S.jsx(Iye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),S.jsx(Fye,{bounds:l}),s.map((h,f)=>{const d=o.get(h.from_node),p=o.get(h.to_node),g=r===null||h.from_node===r||h.to_node===r;return S.jsx(kye,{positions:[[d.latitude,d.longitude],[p.latitude,p.longitude]],color:Bye(h.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},f)}),i.map(h=>{const f=h.node_num===r,d=c.has(h.node_num),p=r===null||f||d,g=zye.includes(h.role),m=jye(h.latitude),y=mz[m%mz.length];return S.jsxs(Aye,{center:[h.latitude,h.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:f?"#ffffff":y,weight:f?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(f?null:h.node_num)},children:[S.jsx(Nye,{direction:"top",offset:[0,-8],children:S.jsx("span",{className:"font-mono text-xs",children:h.short_name})}),S.jsx(Dye,{children:S.jsx(Gye,{node:h})})]},h.node_num)})]}),S.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded px-3 py-2 text-xs text-slate-400 flex items-center gap-2",children:[S.jsx(JB,{size:12}),S.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&S.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const yz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Wye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function _z(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Uye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function Zye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function $ye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function Yye(t){if(!t)return"Unknown";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Xye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function qye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=U.useMemo(()=>{if(!t)return[];const h=new Map(r.map(d=>[d.node_num,d])),f=[];return e.forEach(d=>{if(d.from_node===t.node_num){const p=h.get(d.to_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}else if(d.to_node===t.node_num){const p=h.get(d.from_node);p&&f.push({node:p,snr:d.snr,quality:d.quality})}}),f.sort((d,p)=>p.snr-d.snr)},[t,e,r]);if(!t)return S.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border p-4 flex flex-col items-center justify-center h-[540px]",children:[S.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:S.jsx(Xc,{size:24,className:"text-slate-500"})}),S.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=Wye.includes(t.role),o=Zye(t.latitude),s=yz[o%yz.length],l=t.latitude!==null&&t.longitude!==null,u=t.battery_level!==null?t.battery_level>100||t.voltage&&t.voltage>4.1?"USB":`${t.battery_level.toFixed(0)}%`:"—",c=t.battery_level!==null&&(t.battery_level>100||t.voltage&&t.voltage>4.1);return S.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[S.jsxs("div",{className:"p-4 border-b border-border",children:[S.jsx("div",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono mb-2",style:{backgroundColor:`${s}20`,color:s},children:t.node_id_hex}),S.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),S.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),S.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),S.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),S.jsx("div",{className:"text-sm text-slate-300",children:$ye(o)})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),S.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&S.jsx(_2,{size:12,className:"text-amber-400"}),u]})]}),S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${Xye(t.last_heard)}`}),S.jsx("span",{className:"text-sm text-slate-300",children:Yye(t.last_heard)})]})]}),S.jsxs("div",{className:"col-span-2",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),S.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&S.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[S.jsxs("a",{href:`https://www.google.com/maps?q=${t.latitude},${t.longitude}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[S.jsx(Yc,{size:10}),"Google Maps"]}),S.jsxs("a",{href:`https://www.openstreetmap.org/?mlat=${t.latitude}&mlon=${t.longitude}&zoom=14`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300",children:[S.jsx(Yc,{size:10}),"OSM"]})]}),S.jsxs("div",{className:"flex-1 overflow-y-auto",children:[S.jsxs("div",{className:"px-4 py-2 text-xs text-slate-500 font-medium sticky top-0 bg-bg-card border-b border-border",children:["Neighbors (",i.length,")"]}),i.length>0?S.jsx("div",{className:"divide-y divide-border",children:i.map(h=>S.jsxs("button",{onClick:()=>n(h.node.node_num),className:"w-full px-4 py-2 text-left hover:bg-bg-hover transition-colors flex items-center gap-2",style:{borderLeftWidth:3,borderLeftColor:_z(h.snr)},children:[S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:h.node.short_name}),S.jsx("div",{className:"text-xs text-slate-500 truncate",children:h.node.long_name})]}),S.jsxs("div",{className:"text-right flex-shrink-0",children:[S.jsxs("div",{className:"text-xs font-mono",style:{color:_z(h.snr)},children:[h.snr.toFixed(1)," dB"]}),S.jsx("div",{className:"text-xs text-slate-500",children:Uye(h.snr)})]})]},h.node.node_num))}):S.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const xz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Kye(t){if(!t)return"bg-slate-500";const e=new Date(t),n=(new Date().getTime()-e.getTime())/36e5;return n<1?"bg-green-500":n<24?"bg-amber-500":"bg-slate-500"}function Qye(t){if(!t)return"—";const e=new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/6e4),a=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i}m ago`:a<24?`${a}h ago`:`${o}d ago`}function Jye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function bz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function e0e({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=U.useState(""),[a,o]=U.useState("short_name"),[s,l]=U.useState("asc"),[u,c]=U.useState("all"),h=U.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>xz.includes(g.role)):u==="online"&&(p=p.filter(g=>{if(!g.last_heard)return!1;const m=new Date(g.last_heard);return(new Date().getTime()-m.getTime())/36e5<1})),n){const g=n.toLowerCase();p=p.filter(m=>m.short_name.toLowerCase().includes(g)||m.long_name.toLowerCase().includes(g)||m.role.toLowerCase().includes(g)||bz(m.latitude).toLowerCase().includes(g))}return p.sort((g,m)=>{let y="",_="";switch(a){case"short_name":y=g.short_name.toLowerCase(),_=m.short_name.toLowerCase();break;case"role":y=g.role,_=m.role;break;case"battery_level":y=g.battery_level??-1,_=m.battery_level??-1;break;case"last_heard":y=g.last_heard?new Date(g.last_heard).getTime():0,_=m.last_heard?new Date(m.last_heard).getTime():0;break;case"hardware":y=g.hardware.toLowerCase(),_=m.hardware.toLowerCase();break}return y<_?s==="asc"?-1:1:y>_?s==="asc"?1:-1:0}),p},[t,n,a,s,u]),f=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},d=({field:p})=>a!==p?null:s==="asc"?S.jsx(qZ,{size:14,className:"inline ml-1"}):S.jsx(Rv,{size:14,className:"inline ml-1"});return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[S.jsxs("div",{className:"relative flex-1 max-w-xs",children:[S.jsx(n4,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),S.jsx("input",{type:"text",placeholder:"Search nodes...",value:n,onChange:p=>i(p.target.value),className:"w-full pl-9 pr-3 py-1.5 bg-bg-hover border border-border rounded text-sm text-slate-200 placeholder-slate-500 focus:outline-none focus:border-accent"})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx(y2,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>S.jsx("button",{onClick:()=>c(p),className:`px-2 py-1 text-xs rounded transition-colors ${u===p?"bg-accent text-white":"bg-bg-hover text-slate-400 hover:text-slate-200"}`,children:p==="all"?"All":p==="infra"?"Infra":"Online"},p))]}),S.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[h.length," of ",t.length," nodes"]})]}),S.jsxs("div",{className:"overflow-x-auto",children:[S.jsxs("table",{className:"w-full text-sm",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[S.jsx("th",{className:"w-8 px-3 py-2"}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("short_name"),children:["Name ",S.jsx(d,{field:"short_name"})]}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("role"),children:["Role ",S.jsx(d,{field:"role"})]}),S.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("battery_level"),children:["Battery ",S.jsx(d,{field:"battery_level"})]}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("last_heard"),children:["Last Heard ",S.jsx(d,{field:"last_heard"})]}),S.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>f("hardware"),children:["Hardware ",S.jsx(d,{field:"hardware"})]})]})}),S.jsx("tbody",{className:"divide-y divide-border",children:h.slice(0,100).map(p=>{const g=xz.includes(p.role),m=p.node_num===e;return S.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[S.jsx("td",{className:"px-3 py-2",children:S.jsx("div",{className:`w-2 h-2 rounded-full ${Kye(p.last_heard)}`})}),S.jsxs("td",{className:"px-3 py-2",children:[S.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),S.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),S.jsx("td",{className:"px-3 py-2",children:S.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-xs font-medium ${g?"bg-cyan-500/20 text-cyan-400":"bg-slate-500/20 text-slate-400"}`,children:p.role})}),S.jsx("td",{className:"px-3 py-2 text-slate-400",children:bz(p.latitude)}),S.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Jye(p)}),S.jsx("td",{className:"px-3 py-2 text-slate-400",children:Qye(p.last_heard)}),S.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),h.length>100&&S.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",h.length," nodes"]}),h.length===0&&S.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function t0e(){const[t,e]=U.useState([]),[r,n]=U.useState([]),[i,a]=U.useState([]),[o,s]=U.useState(null),[l,u]=U.useState("topo"),[c,h]=U.useState(!0),[f,d]=U.useState(null);U.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([f$(),d$(),M$()]).then(([m,y,_])=>{e(m),n(y),a(_),h(!1)}).catch(m=>{d(m.message),h(!1)})},[]);const p=U.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=U.useCallback(m=>{s(m)},[]);return c?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):f?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",f]})}):S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),S.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[S.jsxs("button",{onClick:()=>u("topo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="topo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[S.jsx(i$,{size:14}),"Topology"]}),S.jsxs("button",{onClick:()=>u("geo"),className:`flex items-center gap-2 px-3 py-1.5 rounded text-sm transition-colors ${l==="geo"?"bg-accent text-white":"text-slate-400 hover:text-slate-200"}`,children:[S.jsx(t$,{size:14}),"Geographic"]})]})]}),S.jsxs("div",{className:"flex gap-0",children:[S.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?S.jsx(dye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):S.jsx(Hye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),S.jsx(qye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),S.jsx(e0e,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function r0e({feed:t}){const e=()=>t.is_loaded?t.consecutive_errors>0?"bg-amber-500":"bg-green-500":"bg-red-500",r=()=>t.is_loaded?t.consecutive_errors>0?`${t.consecutive_errors} errors`:"Healthy":"Not loaded",n=i=>i?new Date(i*1e3).toLocaleTimeString():"Never";return S.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[S.jsxs("div",{className:"flex items-center justify-between mb-2",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),S.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),S.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),S.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[S.jsxs("div",{children:["Events: ",t.event_count]}),S.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&S.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function n0e({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:B0,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ys,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:uy,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:uy,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return S.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:S.jsxs("div",{className:"flex items-start gap-3",children:[S.jsx(n,{size:18,className:r.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[S.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),S.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),S.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&S.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),S.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[S.jsx("span",{className:"uppercase",children:t.source}),t.expires&&S.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function i0e({swpc:t}){var n,i;if(!t||!t.enabled)return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(Nk,{size:14}),"Solar/Geomagnetic Indices"]}),S.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=a=>a===void 0?"text-slate-400":a<=2?"text-green-500":a<=4?"text-amber-500":a<=6?"text-orange-500":"text-red-500",r=a=>a===void 0||a===0?"text-green-500":a<=2?"text-amber-500":a<=3?"text-orange-500":"text-red-500";return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(Nk,{size:14}),"Solar/Geomagnetic Indices"]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),S.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),S.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),S.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),S.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),S.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),S.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[S.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),S.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),S.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Radio Blackout / Solar Radiation / Geomagnetic Storm"})]}),t.active_warnings&&t.active_warnings.length>0&&S.jsxs("div",{className:"space-y-2",children:[S.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>S.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function a0e({ducting:t}){if(!t||!t.enabled)return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(Ek,{size:14}),"Tropospheric Ducting"]}),S.jsx("div",{className:"text-slate-500",children:"Data not available"})]});const e=n=>{switch(n){case"normal":return"text-green-500";case"super_refraction":return"text-amber-500";case"surface_duct":case"elevated_duct":return"text-blue-400";default:return"text-slate-400"}},r=n=>n?n.replace("_"," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown";return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(Ek,{size:14}),"Tropospheric Ducting"]}),S.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),S.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),S.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),S.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),S.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),S.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&S.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),S.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),S.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),S.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[S.jsx("div",{children:"dM/dz reference:"}),S.jsxs("div",{className:"mt-1 space-y-0.5",children:[S.jsx("div",{children:">79: Normal propagation"}),S.jsx("div",{children:"0–79: Super-refraction"}),S.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&S.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function o0e(){var D;const[t,e]=U.useState(null),[r,n]=U.useState([]),[i,a]=U.useState(null),[o,s]=U.useState(null),[l,u]=U.useState([]),[c,h]=U.useState(null),[f,d]=U.useState([]),[p,g]=U.useState([]),[m,y]=U.useState([]),[_,b]=U.useState([]),[w,C]=U.useState(0),[M,A]=U.useState(!0),[k,N]=U.useState(null);return U.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([s4().catch(()=>null),g$().catch(()=>[]),y$().catch(()=>null),_$().catch(()=>null),x$().catch(()=>[]),b$().catch(()=>null),S$().catch(()=>[]),w$().catch(()=>[]),T$().catch(()=>[]),C$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,V,G,F,Z,j,W,H])=>{e(I),n(z),a(O),s(V),u(G),h(F),d(Z||[]),g(j||[]),y(W||[]),b((H==null?void 0:H.hotspots)||[]),C((H==null?void 0:H.new_ignitions)||0),A(!1)}).catch(I=>{N(I.message),A(!1)})},[]),M?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):k?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",k]})}):t!=null&&t.enabled?S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),S.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(g2,{size:14}),"Feed Status"]}),S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(I=>S.jsx(r0e,{feed:I},I.source))})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[S.jsx(i0e,{swpc:i}),S.jsx(a0e,{ducting:o})]}),S.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(JZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?S.jsx("div",{className:"space-y-3",children:l.map(I=>S.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-slate-500/10 border-l-2 border-slate-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between mb-1",children:[S.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),S.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.severity==="warning"?"bg-red-500/20 text-red-400":I.severity==="watch"?"bg-amber-500/20 text-amber-400":"bg-slate-500/20 text-slate-400"}`,children:I.severity})]}),S.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[S.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&S.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(cd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No active wildfires in the area"})]})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(n$,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?S.jsx("div",{className:"text-slate-500 py-4",children:S.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?S.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>S.jsxs("div",{className:`p-3 rounded-lg ${I.danger_level>=4?"bg-red-500/10 border-l-2 border-red-500":I.danger_level>=3?"bg-amber-500/10 border-l-2 border-amber-500":I.danger_level>=2?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between mb-1",children:[S.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),S.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${I.danger_level>=4?"bg-red-500/20 text-red-400":I.danger_level>=3?"bg-amber-500/20 text-amber-400":I.danger_level>=2?"bg-yellow-500/20 text-yellow-400":"bg-green-500/20 text-green-400"}`,children:I.danger_name})]}),S.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&S.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((D=c.advisories[0])==null?void 0:D.center_link)&&S.jsx("a",{href:c.advisories[0].center_link,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:underline",children:"View full forecast"})]}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(cd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No avalanche advisories"})]})]})]}),f.length>0&&S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(QZ,{size:14}),"Stream Gauges (",f.length,")"]}),S.jsx("div",{className:"space-y-2",children:f.map(I=>{var z,O,V,G,F;return S.jsxs("div",{className:`p-3 rounded-lg ${I.severity==="warning"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-blue-500/10 border-l-2 border-blue-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),S.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(V=(O=I.properties)==null?void 0:O.value)==null?void 0:V.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),S.jsx("div",{className:"text-xs text-slate-500 mt-1",children:(F=I.properties)==null?void 0:F.parameter})]},I.event_id)})})]}),(p.length>0||m.length>0)&&S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(YZ,{size:14}),"Road Conditions"]}),p.length>0&&S.jsxs("div",{className:"mb-4",children:[S.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),S.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,V,G,F,Z,j,W,H;return S.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.roadClosure?"bg-red-500/10 border-l-2 border-red-500":((O=I.properties)==null?void 0:O.speedRatio)<.5?"bg-amber-500/10 border-l-2 border-amber-500":((V=I.properties)==null?void 0:V.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),S.jsx("span",{className:"text-sm font-mono text-slate-300",children:(F=I.properties)!=null&&F.roadClosure?"CLOSED":`${Math.round(((Z=I.properties)==null?void 0:Z.currentSpeed)||0)}mph`})]}),!((j=I.properties)!=null&&j.roadClosure)&&S.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[Math.round((((W=I.properties)==null?void 0:W.speedRatio)||1)*100),"% of free flow (",Math.round(((H=I.properties)==null?void 0:H.freeFlowSpeed)||0),"mph)"]})]},I.event_id)})})]}),m.length>0&&S.jsxs("div",{children:[S.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),S.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return S.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.is_closure?"bg-red-500/10 border-l-2 border-red-500":"bg-amber-500/10 border-l-2 border-amber-500"}`,children:[S.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&S.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),S.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),S.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(a$,{size:14}),"Satellite Hotspots (",_.length,")",w>0&&S.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[w," NEW"]})]}),S.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,V,G,F,Z;return S.jsxs("div",{className:`p-3 rounded-lg ${(z=I.properties)!=null&&z.new_ignition?"bg-red-500/10 border-l-2 border-red-500":I.severity==="watch"?"bg-amber-500/10 border-l-2 border-amber-500":"bg-orange-500/10 border-l-2 border-orange-500"}`,children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&S.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),S.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((V=I.properties)==null?void 0:V.frp)&&S.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),S.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[S.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((F=I.properties)==null?void 0:F.acq_time)&&S.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((Z=I.properties)==null?void 0:Z.near_fire)&&S.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(ys,{size:14}),"Active Events (",r.length,")"]}),r.length>0?S.jsx("div",{className:"space-y-3",children:r.map(I=>S.jsx(n0e,{event:I},I.event_id))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[S.jsx(cd,{size:16,className:"text-green-500"}),S.jsx("span",{children:"No active environmental events"})]})]})]}):S.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[S.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:S.jsx(Yd,{size:32,className:"text-slate-500"})}),S.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),S.jsx("p",{className:"text-slate-500 max-w-md",children:"Enable environmental feeds in config.yaml to see weather alerts, space weather indices, and tropospheric ducting data."})]})}function lL({label:t,value:e,onChange:r,helper:n,info:i,roleFilter:a,valueType:o="short_name"}){const[s,l]=U.useState([]),[u,c]=U.useState(!0),[h,f]=U.useState(""),[d,p]=U.useState(!1);U.useEffect(()=>{fetch("/api/nodes").then(w=>w.json()).then(w=>{l(w),c(!1)}).catch(()=>{l([]),c(!1)})},[]);const g=U.useMemo(()=>{let w=s;if(a&&(w=w.filter(C=>a==="ROUTER"||a==="infrastructure"?C.is_infrastructure||C.role==="ROUTER"||C.role==="ROUTER_CLIENT"||C.role==="REPEATER":C.role===a)),h.trim()){const C=h.toLowerCase();w=w.filter(M=>{var A,k,N,D;return((A=M.short_name)==null?void 0:A.toLowerCase().includes(C))||((k=M.long_name)==null?void 0:k.toLowerCase().includes(C))||((N=M.role)==null?void 0:N.toLowerCase().includes(C))||((D=M.node_id_hex)==null?void 0:D.toLowerCase().includes(C))})}return w.sort((C,M)=>(C.short_name||"").localeCompare(M.short_name||""))},[s,h,a]),m=w=>{switch(o){case"node_num":return String(w.node_num);case"node_id_hex":return w.node_id_hex;default:return w.short_name||String(w.node_num)}},y=w=>{const C=m(w);return e.includes(C)},_=w=>{const C=m(w);e.includes(C)?r(e.filter(M=>M!==C)):r([...e,C])},b=w=>{const C=[w.short_name];return w.long_name&&w.long_name!==w.short_name&&C.push(`— ${w.long_name}`),w.role&&C.push(`(${w.role})`),C.join(" ")};return!u&&s.length===0?S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),S.jsx("input",{type:"text",value:e.join(", "),onChange:w=>r(w.target.value.split(",").map(C=>C.trim()).filter(Boolean)),placeholder:"Enter node IDs separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]}):S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t}),e.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.map(w=>{const C=s.find(M=>m(M)===w);return S.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-accent/20 text-accent rounded text-sm",children:[C?C.short_name:w,S.jsx("button",{type:"button",onClick:()=>r(e.filter(M=>M!==w)),className:"hover:text-white",children:S.jsx(zv,{size:14})})]},w)})}),S.jsxs("div",{className:"relative",children:[S.jsxs("div",{className:"relative",children:[S.jsx(n4,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),S.jsx("input",{type:"text",value:h,onChange:w=>f(w.target.value),onFocus:()=>p(!0),placeholder:u?"Loading nodes...":"Search nodes...",className:"w-full pl-9 pr-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent"})]}),d&&!u&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>p(!1)}),S.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 max-h-64 overflow-y-auto bg-[#0a0e17] border border-[#1e2a3a] rounded-lg shadow-xl",children:g.length===0?S.jsx("div",{className:"p-3 text-sm text-slate-500 text-center",children:"No nodes found"}):g.map(w=>S.jsxs("button",{type:"button",onClick:()=>_(w),className:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[#1e2a3a] ${y(w)?"bg-accent/10":""}`,children:[S.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${y(w)?"bg-accent border-accent":"border-slate-600"}`,children:y(w)&&S.jsx($d,{size:12,className:"text-white"})}),S.jsx("span",{className:"text-slate-200",children:b(w)})]},w.node_num))})]})]}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function uL(t){const[e,r]=U.useState([]),[n,i]=U.useState(!0);U.useEffect(()=>{fetch("/api/channels").then(f=>f.json()).then(f=>{r(f),i(!1)}).catch(()=>{r([]),i(!1)})},[]);const a=f=>{const d=f.role==="PRIMARY"?"Primary":f.role==="SECONDARY"?"Secondary":"";return`${f.index}: ${f.name}${d?` (${d})`:""}`};if(!n&&e.length===0)return t.mode==="single"?S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t.label}),S.jsx("input",{type:"number",value:t.value,onChange:f=>t.onChange(Number(f.target.value)),min:t.includeDisabled?-1:0,max:7,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),t.helper&&S.jsx("p",{className:"text-xs text-slate-600",children:t.helper})]}):S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:t.label}),S.jsx("input",{type:"text",value:t.value.join(", "),onChange:f=>{const d=f.target.value.split(",").map(p=>parseInt(p.trim())).filter(p=>!isNaN(p));t.onChange(d)},placeholder:"Enter channel numbers separated by commas",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),t.helper&&S.jsx("p",{className:"text-xs text-slate-600",children:t.helper})]});if(t.mode==="single"){const{value:f,onChange:d,label:p,helper:g,includeDisabled:m}=t,y=e.filter(_=>_.enabled);return S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:p}),S.jsxs("select",{value:f,onChange:_=>d(Number(_.target.value)),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:[m&&S.jsx("option",{value:-1,children:"Disabled"}),y.map(_=>S.jsx("option",{value:_.index,children:a(_)},_.index))]}),g&&S.jsx("p",{className:"text-xs text-slate-600",children:g})]})}const{value:o,onChange:s,label:l,helper:u}=t,c=e.filter(f=>f.enabled),h=f=>{o.includes(f)?s(o.filter(d=>d!==f)):s([...o,f].sort((d,p)=>d-p))};return S.jsxs("div",{className:"space-y-1",children:[S.jsx("label",{className:"block text-xs text-slate-500 uppercase tracking-wide",children:l}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:[c.map(f=>S.jsxs("label",{onClick:()=>h(f.index),className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[S.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${o.includes(f.index)?"bg-accent border-accent":"border-slate-600"}`,children:o.includes(f.index)&&S.jsx($d,{size:12,className:"text-white"})}),S.jsx("span",{className:"text-sm text-slate-200",children:a(f)})]},f.index)),c.length===0&&S.jsx("div",{className:"text-sm text-slate-500 p-2",children:"No channels available"})]}),u&&S.jsx("p",{className:"text-xs text-slate-600",children:u})]})}const Sz=[{key:"bot",label:"Bot",icon:ZZ},{key:"connection",label:"Connection",icon:a4},{key:"response",label:"Response",icon:r$},{key:"history",label:"History",icon:KZ},{key:"memory",label:"Memory",icon:$Z},{key:"context",label:"Context",icon:m2},{key:"commands",label:"Commands",icon:s$},{key:"llm",label:"LLM",icon:qB},{key:"weather",label:"Weather",icon:Yd},{key:"meshmonitor",label:"MeshMonitor",icon:Xc},{key:"knowledge",label:"Knowledge",icon:UZ},{key:"mesh_sources",label:"Mesh Sources",icon:e$},{key:"mesh_intelligence",label:"Intelligence",icon:g2},{key:"environmental",label:"Environmental",icon:l$},{key:"dashboard",label:"Dashboard",icon:QB}],ln={bot:"Identity and behavior settings for the bot on the mesh network.",connection:"How MeshAI connects to your Meshtastic radio.",response:"Controls how quickly and how much the bot responds on the mesh.",history:"Conversation history storage and cleanup.",memory:"Short-term conversation memory management. Controls how the bot maintains context within a conversation.",context:"Passive channel monitoring. The bot listens to mesh channels and uses recent messages as context when responding.",commands:"Mesh commands available via the configured prefix. Toggle individual commands on or off.",llm:"AI model configuration. MeshAI uses an LLM to understand questions and generate responses.",weather:"Weather data for the !weather command. This is separate from NWS environmental alerts.",meshmonitor:"AIDA MeshMonitor integration. An additional data source for mesh network monitoring.",knowledge:"Knowledge base for answering questions from stored documents. Connects to Qdrant vector database or local SQLite.",mesh_sources:"Data sources for mesh network information. MeshAI can pull data from multiple sources simultaneously and merge them into a unified view.",mesh_intelligence:"Advanced mesh analysis: health scoring, region management, and automated alerting. The intelligence engine monitors your mesh and detects problems automatically.",environmental:"Live environmental data feeds for situational awareness. Each feed polls a public or authenticated API for real-time conditions affecting your area.",dashboard:"Web dashboard settings. You're looking at it right now."},s0e=[{name:"help",description:"Show available commands and usage"},{name:"health",description:"Mesh network health overview with status dots"},{name:"status",description:"Quick mesh status summary"},{name:"region",description:"List regions or get detailed region breakdown"},{name:"neighbors",description:"Show top infrastructure neighbors with signal quality"},{name:"ping",description:"Test bot responsiveness"},{name:"clear",description:"Clear your conversation history"},{name:"reset",description:"Reset conversation context"},{name:"sub",description:"Subscribe to scheduled reports or alerts"},{name:"unsub",description:"Remove a subscription"},{name:"mysubs",description:"List your active subscriptions"},{name:"alerts",description:"Active NWS weather alerts for mesh area"},{name:"solar",description:"Space weather and HF propagation conditions"},{name:"hf",description:"HF radio propagation (alias for !solar)"},{name:"fire",description:"Active wildfires near the mesh"},{name:"avy",description:"Avalanche advisories for configured zones"},{name:"hotspots",description:"NASA FIRMS satellite fire detections"},{name:"streams",description:"USGS stream gauge readings"},{name:"roads",description:"Road conditions and closures"},{name:"traffic",description:"Traffic flow on monitored corridors"}],l0e=[{value:"US-AL",label:"Alabama"},{value:"US-AK",label:"Alaska"},{value:"US-AZ",label:"Arizona"},{value:"US-AR",label:"Arkansas"},{value:"US-CA",label:"California"},{value:"US-CO",label:"Colorado"},{value:"US-CT",label:"Connecticut"},{value:"US-DE",label:"Delaware"},{value:"US-FL",label:"Florida"},{value:"US-GA",label:"Georgia"},{value:"US-HI",label:"Hawaii"},{value:"US-ID",label:"Idaho"},{value:"US-IL",label:"Illinois"},{value:"US-IN",label:"Indiana"},{value:"US-IA",label:"Iowa"},{value:"US-KS",label:"Kansas"},{value:"US-KY",label:"Kentucky"},{value:"US-LA",label:"Louisiana"},{value:"US-ME",label:"Maine"},{value:"US-MD",label:"Maryland"},{value:"US-MA",label:"Massachusetts"},{value:"US-MI",label:"Michigan"},{value:"US-MN",label:"Minnesota"},{value:"US-MS",label:"Mississippi"},{value:"US-MO",label:"Missouri"},{value:"US-MT",label:"Montana"},{value:"US-NE",label:"Nebraska"},{value:"US-NV",label:"Nevada"},{value:"US-NH",label:"New Hampshire"},{value:"US-NJ",label:"New Jersey"},{value:"US-NM",label:"New Mexico"},{value:"US-NY",label:"New York"},{value:"US-NC",label:"North Carolina"},{value:"US-ND",label:"North Dakota"},{value:"US-OH",label:"Ohio"},{value:"US-OK",label:"Oklahoma"},{value:"US-OR",label:"Oregon"},{value:"US-PA",label:"Pennsylvania"},{value:"US-RI",label:"Rhode Island"},{value:"US-SC",label:"South Carolina"},{value:"US-SD",label:"South Dakota"},{value:"US-TN",label:"Tennessee"},{value:"US-TX",label:"Texas"},{value:"US-UT",label:"Utah"},{value:"US-VT",label:"Vermont"},{value:"US-VA",label:"Virginia"},{value:"US-WA",label:"Washington"},{value:"US-WV",label:"West Virginia"},{value:"US-WI",label:"Wisconsin"},{value:"US-WY",label:"Wyoming"}];function Aa({info:t,link:e,linkText:r="Learn more"}){const[n,i]=U.useState(!1);return S.jsxs("div",{className:"relative inline-block",children:[S.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),S.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[t,e&&S.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",S.jsx(Yc,{size:10})]})]})]})]})}function un({text:t}){return S.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:t})}function dt({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=U.useState(!1),c=n==="password";return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,o&&S.jsx(Aa,{info:o,link:s})]}),S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:c&&!l?"password":"text",value:e,onChange:h=>r(h.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),c&&S.jsx("button",{type:"button",onClick:()=>u(!l),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:l?S.jsx(KB,{size:16}):S.jsx(m2,{size:16})})]}),a&&S.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function je({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,s&&S.jsx(Aa,{info:s,link:l})]}),S.jsx("input",{type:"number",value:e,onChange:u=>r(Number(u.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&S.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function _t({label:t,checked:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){return S.jsxs("div",{className:"flex items-center justify-between py-2",children:[S.jsxs("div",{children:[S.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[t,i&&S.jsx(Aa,{info:i,link:a})]}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]}),S.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function va({label:t,value:e,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&S.jsx(Aa,{info:a,link:o})]}),S.jsx("select",{value:e,onChange:s=>r(s.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(s=>S.jsx("option",{value:s.value,children:s.label},s.value))}),i&&S.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function u0e({label:t,value:e,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&S.jsx(Aa,{info:a,link:o})]}),S.jsx("textarea",{value:e,onChange:s=>r(s.target.value),rows:n,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent resize-y"}),i&&S.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function Ac({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=U.useState(e.join(", "));U.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&S.jsx(Aa,{info:i,link:a})]}),S.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"item1, item2, item3",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function c0e({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=U.useState(e.join(", "));U.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&S.jsx(Aa,{info:i,link:a})]}),S.jsx("input",{type:"text",value:o,onChange:u=>s(u.target.value),onBlur:l,placeholder:"0, 1, 2",className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function Fr({label:t,description:e,checked:r,onChange:n,threshold:i,onThresholdChange:a,thresholdLabel:o,thresholdMin:s,thresholdMax:l,thresholdStep:u=1,thresholdSuffix:c=""}){return S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{className:"flex-1",children:[S.jsx("span",{className:"text-sm text-slate-300",children:t}),S.jsx("p",{className:"text-xs text-slate-600",children:e})]}),S.jsx("button",{type:"button",onClick:()=>n(!r),className:`relative w-11 h-6 rounded-full transition-colors flex-shrink-0 ml-3 ${r?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${r?"translate-x-5":""}`})})]}),r&&i!==void 0&&a&&S.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[S.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),S.jsx("input",{type:"number",value:i,onChange:h=>a(Number(h.target.value)),min:s,max:l,step:u,className:"w-20 px-2 py-1 bg-[#0a0e17] border border-[#1e2a3a] rounded text-xs text-slate-200 font-mono"}),c&&S.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function h0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.bot}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Bot Name",value:t.name,onChange:r=>e({...t,name:r}),helper:"Name the bot responds to on the mesh",info:"When someone sends a message containing this name, the bot will respond. Also used as the sender name in broadcasts. Changing this requires a restart."}),S.jsx(dt,{label:"Owner",value:t.owner,onChange:r=>e({...t,owner:r}),helper:"Your callsign or identifier",info:"Identifies the bot operator. Shown in !help responses and used for admin-level commands."})]}),S.jsx(_t,{label:"Respond to DMs",checked:t.respond_to_dms,onChange:r=>e({...t,respond_to_dms:r}),helper:"Reply when someone sends a direct message",info:"When enabled, the bot responds to direct messages from any node. When disabled, the bot only responds to channel messages that mention its name."}),S.jsx(_t,{label:"Filter BBS Protocols",checked:t.filter_bbs_protocols,onChange:r=>e({...t,filter_bbs_protocols:r}),helper:"Ignore BBS bulletin board traffic",info:"Filters out automated BBS protocol messages (advBBS, MAIL*, BOARD*) so the bot doesn't try to respond to machine-to-machine traffic."})]})}function f0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.connection}),S.jsx(va,{label:"Connection Type",value:t.type,onChange:r=>e({...t,type:r}),options:[{value:"serial",label:"Serial (USB)"},{value:"tcp",label:"TCP (Network)"}],helper:"Serial for USB-connected radios, TCP for network or meshtasticd",info:"Serial: direct USB connection to a Meshtastic radio. TCP: connect over the network to a radio's IP or to meshtasticd running on another machine."}),t.type==="serial"?S.jsx(dt,{label:"Serial Port",value:t.serial_port,onChange:r=>e({...t,serial_port:r}),placeholder:"/dev/ttyUSB0",helper:"Device path for your USB radio",info:"Usually /dev/ttyUSB0 on Linux or /dev/ttyACM0. Check with 'ls /dev/tty*' after plugging in your radio."}):S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"TCP Host",value:t.tcp_host,onChange:r=>e({...t,tcp_host:r}),placeholder:"192.168.1.100",helper:"IP address or hostname of the radio/meshtasticd"}),S.jsx(je,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function d0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.response}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Delay Min (sec)",value:t.delay_min,onChange:r=>e({...t,delay_min:r}),min:0,step:.1,helper:"Minimum wait before responding",info:"Adds a random delay between min and max before the bot sends a response. Prevents the bot from appearing to respond instantly, which can feel unnatural on a radio network."}),S.jsx(je,{label:"Delay Max (sec)",value:t.delay_max,onChange:r=>e({...t,delay_max:r}),min:0,step:.1,helper:"Maximum wait before responding",info:"Also prevents collisions with other traffic by staggering transmissions."})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Max Length",value:t.max_length,onChange:r=>e({...t,max_length:r}),min:50,max:500,helper:"Maximum characters per response message",info:"Meshtastic packets have limited size. This caps how long each message chunk can be. The bot will split longer responses into multiple messages up to Max Messages."}),S.jsx(je,{label:"Max Messages",value:t.max_messages,onChange:r=>e({...t,max_messages:r}),min:1,max:10,helper:"Maximum chunks per response",info:"If a response is longer than Max Length, the bot splits it into this many chunks at most. Higher values = more complete answers but more airtime used."})]})]})}function v0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.history}),S.jsx(dt,{label:"Database Path",value:t.database,onChange:r=>e({...t,database:r}),helper:"SQLite file for storing conversation history",info:"Path to the SQLite database file. Created automatically if it doesn't exist. Stores all conversation history for context."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Max Messages Per User",value:t.max_messages_per_user,onChange:r=>e({...t,max_messages_per_user:r}),min:0,helper:"History limit per user (0 = unlimited)",info:"Limits how many messages are stored per user. Older messages are pruned when the limit is reached. Set to 0 for no limit."}),S.jsx(je,{label:"Conversation Timeout (sec)",value:t.conversation_timeout,onChange:r=>e({...t,conversation_timeout:r}),min:0,helper:"Seconds before context resets",info:"If a user doesn't message for this long, their next message starts a new conversation context. The bot won't remember the previous topic."})]}),S.jsx(_t,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r}),helper:"Automatically prune old conversations"}),t.auto_cleanup&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),S.jsx(je,{label:"Max Age (days)",value:t.max_age_days,onChange:r=>e({...t,max_age_days:r}),min:1,helper:"Delete conversations older than this"})]})]})}function p0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.memory}),S.jsx(_t,{label:"Enable Memory",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Keep conversation context between messages"}),t.enabled&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Window Size",value:t.window_size,onChange:r=>e({...t,window_size:r}),min:1,helper:"Recent message pairs kept in full",info:"The bot keeps this many recent exchanges (user message + bot response pairs) as full text in context. Older messages are summarized to save token space."}),S.jsx(je,{label:"Summarize Threshold",value:t.summarize_threshold,onChange:r=>e({...t,summarize_threshold:r}),min:1,helper:"Messages before older context is summarized",info:"When the conversation exceeds this many messages, older ones outside the window are compressed into a summary by the LLM."})]})]})}function g0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.context}),S.jsx(_t,{label:"Enable Passive Context",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Listen to channel traffic for context",info:"When enabled, the bot monitors mesh channels and includes recent messages in its context. This lets the bot reference things other people said on the channel."}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(uL,{label:"Observe Channels",value:t.observe_channels,onChange:r=>e({...t,observe_channels:r}),helper:"Channels to monitor (empty = all)",info:"Meshtastic channels to listen on. Leave empty to monitor all channels.",mode:"multi"}),S.jsx(lL,{label:"Ignore Nodes",value:t.ignore_nodes,onChange:r=>e({...t,ignore_nodes:r}),helper:"Nodes to exclude from context",info:"Messages from these nodes won't be included in passive context. Useful for filtering out noisy automated nodes."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0,helper:"Ignore messages older than this"}),S.jsx(je,{label:"Max Context Items",value:t.max_context_items,onChange:r=>e({...t,max_context_items:r}),min:1,helper:"Maximum recent messages to include"})]})]})]})}function m0e({data:t,onChange:e}){const r=new Set(t.disabled_commands.map(i=>i.toLowerCase())),n=i=>{const a=i.toLowerCase();r.has(a)?e({...t,disabled_commands:t.disabled_commands.filter(o=>o.toLowerCase()!==a)}):e({...t,disabled_commands:[...t.disabled_commands,i]})};return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.commands}),S.jsx(_t,{label:"Enable Commands",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Allow !commands on the mesh"}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"Command Prefix",value:t.prefix,onChange:i=>e({...t,prefix:i}),helper:"Character that triggers commands (e.g. ! for !help)",info:"Users type this character followed by the command name. Only single characters recommended."}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",S.jsx(Aa,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),S.jsx("div",{className:"grid gap-1",children:s0e.map(i=>{const a=!r.has(i.name.toLowerCase());return S.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),S.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),S.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 rounded-full bg-white transition-transform ${a?"translate-x-4":""}`})})]},i.name)})})]})]})]})}function y0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.llm}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(va,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google (Gemini)"}],helper:"LLM provider to use",info:"OpenAI: GPT models (gpt-4o, gpt-4o-mini). Anthropic: Claude models (claude-sonnet-4-20250514). Google: Gemini models. Can also point to compatible APIs like Ollama, LM Studio, or Open WebUI by changing the Base URL."}),S.jsx(dt,{label:"Model",value:t.model,onChange:r=>e({...t,model:r}),placeholder:"gpt-4o-mini",helper:"Specific model name",info:"The specific model to use. Common choices: gpt-4o-mini (fast, cheap), gpt-4o (better, costs more), claude-sonnet-4-20250514 (Anthropic equivalent). For local models via Ollama, use the model name you pulled (e.g. llama3.1)."})]}),S.jsx(dt,{label:"API Key",value:t.api_key,onChange:r=>e({...t,api_key:r}),type:"password",helper:"Supports ${ENV_VAR} syntax",info:"Your API key from the provider. You can also use ${ENV_VAR} syntax to read from an environment variable instead of storing the key in the config file."}),S.jsx(dt,{label:"Base URL",value:t.base_url,onChange:r=>e({...t,base_url:r}),placeholder:"https://api.openai.com/v1",helper:"API endpoint (change for local LLMs)",info:"Default API endpoint for the selected backend. Change this to point to a local LLM server (Ollama at http://localhost:11434/v1, Open WebUI, LM Studio, etc.) or a proxy."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),S.jsx(je,{label:"Max Response Tokens",value:t.max_response_tokens,onChange:r=>e({...t,max_response_tokens:r}),min:100,helper:"Token limit for LLM responses"})]}),S.jsx(_t,{label:"Use System Prompt",checked:t.use_system_prompt,onChange:r=>e({...t,use_system_prompt:r}),helper:"Enable custom system instructions"}),t.use_system_prompt&&S.jsx(u0e,{label:"System Prompt",value:t.system_prompt,onChange:r=>e({...t,system_prompt:r}),rows:6,helper:"Instructions that shape the bot's personality",info:"Instructions that shape the bot's personality and behavior. The bot always follows these instructions. MeshAI adds mesh health data and environmental context automatically — you don't need to include those here."}),S.jsx(_t,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),S.jsx(_t,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function _0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.weather}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(va,{label:"Primary Provider",value:t.primary,onChange:r=>e({...t,primary:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"}],helper:"Main weather data source"}),S.jsx(va,{label:"Fallback Provider",value:t.fallback,onChange:r=>e({...t,fallback:r}),options:[{value:"openmeteo",label:"Open-Meteo"},{value:"wttr",label:"wttr.in"},{value:"llm",label:"LLM"},{value:"none",label:"None"}],helper:"Backup if primary fails"})]}),S.jsx(dt,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function x0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.meshmonitor}),S.jsx(_t,{label:"Enable MeshMonitor",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Connect to AIDA MeshMonitor instance",info:"MeshMonitor by Yeraze provides node data, battery info, telemetry, and auto-responder patterns. MeshAI uses this as a data source and avoids duplicate responses."}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"URL",value:t.url,onChange:r=>e({...t,url:r}),placeholder:"http://192.168.1.100:8080",helper:"MeshMonitor API endpoint",info:"Full URL to your MeshMonitor instance. Usually runs on port 8080."}),S.jsx(_t,{label:"Inject Into Prompt",checked:t.inject_into_prompt,onChange:r=>e({...t,inject_into_prompt:r}),helper:"Tell LLM about MeshMonitor commands",info:"Adds MeshMonitor's auto-responder patterns to the LLM context so it knows what commands MeshMonitor handles."}),S.jsx(je,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),S.jsx(_t,{label:"Polite Mode",checked:t.polite_mode,onChange:r=>e({...t,polite_mode:r}),helper:"Reduce polling frequency",info:"Reduces polling frequency for shared instances to be a good neighbor."})]})]})}function b0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.knowledge}),S.jsx(_t,{label:"Enable Knowledge Base",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Answer questions from stored documents",info:"Uses RAG (Retrieval-Augmented Generation) to answer questions from a knowledge base. Supports Qdrant vector database or local SQLite with FTS5."}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(va,{label:"Backend",value:t.backend,onChange:r=>e({...t,backend:r}),options:[{value:"auto",label:"Auto (Qdrant -> SQLite)"},{value:"qdrant",label:"Qdrant"},{value:"sqlite",label:"SQLite"}],helper:"Knowledge storage backend",info:"Auto tries Qdrant first, falls back to SQLite. Qdrant provides hybrid search with dense+sparse embeddings. SQLite uses FTS5 keyword search."}),(t.backend==="qdrant"||t.backend==="auto")&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Qdrant Host",value:t.qdrant_host,onChange:r=>e({...t,qdrant_host:r}),helper:"Qdrant server hostname",info:"IP or hostname of your Qdrant vector database server."}),S.jsx(je,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r}),helper:"Default 6333"})]}),S.jsx(dt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r}),helper:"Qdrant collection name"}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"TEI Host",value:t.tei_host,onChange:r=>e({...t,tei_host:r}),helper:"Text Embeddings Inference host",info:"TEI service for generating dense embeddings. Uses BAAI/bge-m3 model."}),S.jsx(je,{label:"TEI Port",value:t.tei_port,onChange:r=>e({...t,tei_port:r}),helper:"Default 8090"})]}),S.jsx(_t,{label:"Use Sparse Embeddings",checked:t.use_sparse,onChange:r=>e({...t,use_sparse:r}),helper:"Enable hybrid search with sparse vectors",info:"Combines dense embeddings with sparse (keyword-based) embeddings using Reciprocal Rank Fusion for better search results."})]}),S.jsx(dt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r}),helper:"Local knowledge database file"}),S.jsx(je,{label:"Top K Results",value:t.top_k,onChange:r=>e({...t,top_k:r}),min:1,max:20,helper:"Number of documents to retrieve"})]})]})}function S0e({source:t,onChange:e,onDelete:r}){const[n,i]=U.useState(!1),a={meshview:"Web-based mesh monitoring tool. Enter the full URL of a MeshView instance. No API key typically required.",meshmonitor:"AIDA MeshMonitor API. Provides node data and network statistics. Requires API token.",mqtt:"Subscribe directly to a Meshtastic MQTT broker for real-time packet data. This is push-based (instant) vs the polling approach of MeshView/MeshMonitor."};return S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[n?S.jsx(Rv,{size:16}):S.jsx(Ov,{size:16}),S.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),S.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),S.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),S.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:S.jsx(j0,{size:14})})]}),n&&S.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Name",value:t.name,onChange:o=>e({...t,name:o}),helper:"Friendly name for this source"}),S.jsx(va,{label:"Type",value:t.type,onChange:o=>e({...t,type:o}),options:[{value:"meshview",label:"MeshView"},{value:"meshmonitor",label:"MeshMonitor"},{value:"mqtt",label:"MQTT Broker"}],info:a[t.type]||""})]}),t.type!=="mqtt"&&S.jsx(dt,{label:"URL",value:t.url,onChange:o=>e({...t,url:o}),helper:"Full URL including protocol"}),t.type==="meshmonitor"&&S.jsx(dt,{label:"API Token",value:t.api_token,onChange:o=>e({...t,api_token:o}),type:"password",helper:"Bearer token for authentication"}),t.type==="mqtt"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Host",value:t.host||"",onChange:o=>e({...t,host:o}),helper:"MQTT broker hostname"}),S.jsx(je,{label:"Port",value:t.port||1883,onChange:o=>e({...t,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Username",value:t.username||"",onChange:o=>e({...t,username:o})}),S.jsx(dt,{label:"Password",value:t.password||"",onChange:o=>e({...t,password:o}),type:"password"})]}),S.jsx(dt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:o=>e({...t,topic_root:o}),helper:"Base topic to subscribe to"}),S.jsx(_t,{label:"Use TLS",checked:t.use_tls||!1,onChange:o=>e({...t,use_tls:o}),helper:"Encrypt MQTT connection"})]}),S.jsx(je,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:o=>e({...t,refresh_interval:o}),min:10,helper:"Polling frequency"}),S.jsx(_t,{label:"Enabled",checked:t.enabled,onChange:o=>e({...t,enabled:o})}),S.jsx(_t,{label:"Polite Mode",checked:t.polite_mode,onChange:o=>e({...t,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function w0e({data:t,onChange:e}){const r=()=>{e([...t,{name:"New Source",type:"meshview",url:"",api_token:"",refresh_interval:30,polite_mode:!1,enabled:!0,host:"",port:1883,username:"",password:"",topic_root:"msh/US",use_tls:!1}])};return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.mesh_sources}),t.map((n,i)=>S.jsx(S0e,{source:n,onChange:a=>{const o=[...t];o[i]=a,e(o)},onDelete:()=>{confirm(`Delete source "${n.name}"?`)&&e(t.filter((a,o)=>o!==i))}},i)),S.jsxs("button",{onClick:r,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(Xd,{size:16})," Add Source"]})]})}function T0e({data:t,onChange:e}){const[r,n]=U.useState(null);return S.jsxs("div",{className:"space-y-6",children:[S.jsx(un,{text:ln.mesh_intelligence}),S.jsx(_t,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Activate health scoring and alerting"}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Locality Radius (miles)",value:t.locality_radius_miles,onChange:i=>e({...t,locality_radius_miles:i}),min:1,step:.5,helper:"Region assignment radius",info:"Nodes within this distance of a region anchor point are assigned to that region."}),S.jsx(je,{label:"Offline Threshold (hours)",value:t.offline_threshold_hours,onChange:i=>e({...t,offline_threshold_hours:i}),min:1,helper:"Time until node marked offline",info:"A node is considered offline after not being heard for this many hours."})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Packet Threshold",value:t.packet_threshold,onChange:i=>e({...t,packet_threshold:i}),min:0,helper:"Min packets per 24h to flag",info:"Minimum packets per 24 hours. Nodes below this are flagged as low activity."}),S.jsx(je,{label:"Battery Warning %",value:t.battery_warning_percent,onChange:i=>e({...t,battery_warning_percent:i}),min:1,max:100,helper:"Global battery warning level"})]}),S.jsx(lL,{label:"Critical Nodes",value:t.critical_nodes,onChange:i=>e({...t,critical_nodes:i}),helper:"Critical infrastructure nodes",info:"Nodes that get priority alerting when they go offline.",roleFilter:"infrastructure"}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(uL,{label:"Alert Channel",value:t.alert_channel,onChange:i=>e({...t,alert_channel:i}),helper:"Channel for broadcast alerts",info:"Meshtastic channel for broadcast alerts. Select Disabled to turn off channel broadcasting.",mode:"single",includeDisabled:!0}),S.jsx(je,{label:"Alert Cooldown (min)",value:t.alert_cooldown_minutes,onChange:i=>e({...t,alert_cooldown_minutes:i}),min:1,helper:"Min time between repeat alerts",info:"Minimum minutes between repeated alerts for the same condition. Uses scaling cooldown (12h, 24h, 48h)."})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",S.jsx(Aa,{info:"Regions group mesh nodes by geographic area. Each region has an anchor point (lat/lon) and nodes within the region radius are automatically assigned. Regions enable localized reports, alerts, and health scoring."})]}),t.regions.map((i,a)=>S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[r===a?S.jsx(Rv,{size:16}):S.jsx(Ov,{size:16}),S.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),S.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),S.jsx("button",{onClick:o=>{if(o.stopPropagation(),confirm(`Delete region "${i.name||"Unnamed Region"}"?`)){const s=t.regions.filter((l,u)=>u!==a);e({...t,regions:s})}},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:S.jsx(j0,{size:14})})]}),r===a&&S.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),S.jsx(dt,{label:"Local Name",value:i.local_name,onChange:o=>{const s=[...t.regions];s[a]={...i,local_name:o},e({...t,regions:s})}})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),S.jsx(je,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),S.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),S.jsx(Ac,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),S.jsx(Ac,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a)),S.jsxs("button",{onClick:()=>{const i={name:"",local_name:"",lat:0,lon:0,description:"",aliases:[],cities:[]};e({...t,regions:[...t.regions,i]}),n(t.regions.length)},className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(Xd,{size:16})," Add Region"]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",S.jsx(Aa,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),S.jsx(Fr,{label:"Infra Offline",description:"Alert when an infrastructure node (router/repeater) goes offline",checked:t.alert_rules.infra_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_offline:i}})}),S.jsx(Fr,{label:"Infra Recovery",description:"Alert when an offline infrastructure node comes back online",checked:t.alert_rules.infra_recovery,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_recovery:i}})}),S.jsx(Fr,{label:"New Router",description:"Alert when a new router/repeater appears on the mesh",checked:t.alert_rules.new_router,onChange:i=>e({...t,alert_rules:{...t.alert_rules,new_router:i}})}),S.jsx(Fr,{label:"Feeder Offline",description:"Alert when a data source (MeshView/MeshMonitor) stops responding",checked:t.alert_rules.feeder_offline,onChange:i=>e({...t,alert_rules:{...t.alert_rules,feeder_offline:i}})}),S.jsx(Fr,{label:"Single Gateway",description:"Alert when an infrastructure node has only one connection path",checked:t.alert_rules.infra_single_gateway,onChange:i=>e({...t,alert_rules:{...t.alert_rules,infra_single_gateway:i}})}),S.jsx(Fr,{label:"Region Blackout",description:"Alert when all infrastructure in a region goes offline",checked:t.alert_rules.region_total_blackout,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_total_blackout:i}})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),S.jsx(Fr,{label:"Battery Warning",description:"Alert when infra node battery drops below warning threshold",checked:t.alert_rules.battery_warning,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning:i}}),threshold:t.alert_rules.battery_warning_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_warning_threshold:i}}),thresholdLabel:"Below",thresholdMin:10,thresholdMax:90,thresholdSuffix:"%"}),S.jsx(Fr,{label:"Battery Critical",description:"Alert at critical battery level",checked:t.alert_rules.battery_critical,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical:i}}),threshold:t.alert_rules.battery_critical_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_critical_threshold:i}}),thresholdLabel:"Below",thresholdMin:5,thresholdMax:50,thresholdSuffix:"%"}),S.jsx(Fr,{label:"Battery Emergency",description:"Alert at emergency battery level",checked:t.alert_rules.battery_emergency,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency:i}}),threshold:t.alert_rules.battery_emergency_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_emergency_threshold:i}}),thresholdLabel:"Below",thresholdMin:1,thresholdMax:25,thresholdSuffix:"%"}),S.jsx(Fr,{label:"Battery Trend Declining",description:"Alert when battery shows a declining trend over 7 days",checked:t.alert_rules.battery_trend_declining,onChange:i=>e({...t,alert_rules:{...t.alert_rules,battery_trend_declining:i}})}),S.jsx(Fr,{label:"Power Source Change",description:"Alert when a node switches between battery and USB power",checked:t.alert_rules.power_source_change,onChange:i=>e({...t,alert_rules:{...t.alert_rules,power_source_change:i}})}),S.jsx(Fr,{label:"Solar Not Charging",description:"Alert when a solar-powered node isn't charging during daylight",checked:t.alert_rules.solar_not_charging,onChange:i=>e({...t,alert_rules:{...t.alert_rules,solar_not_charging:i}})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),S.jsx(Fr,{label:"High Utilization",description:"Alert when channel utilization stays high for extended periods",checked:t.alert_rules.sustained_high_util,onChange:i=>e({...t,alert_rules:{...t.alert_rules,sustained_high_util:i}}),threshold:t.alert_rules.high_util_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,high_util_threshold:i}}),thresholdLabel:"Above",thresholdMin:5,thresholdMax:50,thresholdSuffix:`% for ${t.alert_rules.high_util_hours}h`}),S.jsx(Fr,{label:"Packet Flood",description:"Alert when a single node sends excessive packets",checked:t.alert_rules.packet_flood,onChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood:i}}),threshold:t.alert_rules.packet_flood_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,packet_flood_threshold:i}}),thresholdLabel:"Over",thresholdMin:100,thresholdMax:2e3,thresholdSuffix:"pkts/24h"})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),S.jsx(Fr,{label:"Mesh Score Alert",description:"Alert when overall mesh health score drops below threshold",checked:t.alert_rules.mesh_score_alert,onChange:i=>e({...t,alert_rules:{...t.alert_rules,mesh_score_alert:i}}),threshold:t.alert_rules.mesh_score_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,mesh_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"}),S.jsx(Fr,{label:"Region Score Alert",description:"Alert when a region's health score drops below threshold",checked:t.alert_rules.region_score_alert,onChange:i=>e({...t,alert_rules:{...t.alert_rules,region_score_alert:i}}),threshold:t.alert_rules.region_score_threshold,onThresholdChange:i=>e({...t,alert_rules:{...t.alert_rules,region_score_threshold:i}}),thresholdLabel:"Below",thresholdMin:30,thresholdMax:90,thresholdSuffix:"/100"})]})]})]})]})}function C0e({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,h,f,d,p,g,m,y;return S.jsxs("div",{className:"space-y-6",children:[S.jsx(un,{text:ln.environmental}),S.jsx(_t,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:_=>e({...t,enabled:_}),helper:"Activate live data polling"}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(Ac,{label:"NWS Zones",value:t.nws_zones,onChange:_=>e({...t,nws_zones:_}),helper:"Zone IDs like IDZ016, IDZ030",info:"NWS forecast zones covering your mesh area. Find yours at https://www.weather.gov/pimar/PubZone",infoLink:"https://www.weather.gov/pimar/PubZone"}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),S.jsx(_t,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"User Agent",value:t.nws.user_agent,onChange:_=>e({...t,nws:{...t.nws,user_agent:_}}),placeholder:"(MeshAI, your@email.com)",helper:"Required format: (app_name, contact_email)",info:"Required by NWS. You make it up - just use the format (app_name, your_email). No signup needed."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),S.jsx(va,{label:"Min Severity",value:t.nws.severity_min,onChange:_=>e({...t,nws:{...t.nws,severity_min:_}}),options:[{value:"minor",label:"Minor"},{value:"moderate",label:"Moderate"},{value:"severe",label:"Severe"},{value:"extreme",label:"Extreme"}],helper:"Filter out lower severity alerts",info:"Minimum severity level to display. 'Moderate' filters out minor advisories. 'Severe' shows only serious warnings."})]})]})]}),S.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),S.jsx(_t,{label:"",checked:t.swpc.enabled,onChange:_=>e({...t,swpc:{...t.swpc,enabled:_}})})]})}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),S.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),S.jsx(_t,{label:"",checked:t.ducting.enabled,onChange:_=>e({...t,ducting:{...t.ducting,enabled:_}})})]}),t.ducting.enabled&&S.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[S.jsx(je,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),S.jsx(je,{label:"Latitude",value:t.ducting.latitude,onChange:_=>e({...t,ducting:{...t.ducting,latitude:_}}),step:.01,info:"Center point of your mesh coverage area. The ducting adapter checks atmospheric conditions at this location."}),S.jsx(je,{label:"Longitude",value:t.ducting.longitude,onChange:_=>e({...t,ducting:{...t.ducting,longitude:_}}),step:.01})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),S.jsx(_t,{label:"",checked:t.fires.enabled,onChange:_=>e({...t,fires:{...t.fires,enabled:_}})})]}),t.fires.enabled&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(je,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),S.jsx(va,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),options:l0e,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),S.jsx(_t,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&S.jsxs(S.Fragment,{children:[S.jsx(je,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),S.jsx(Ac,{label:"Center IDs",value:t.avalanche.center_ids,onChange:_=>e({...t,avalanche:{...t.avalanche,center_ids:_}}),helper:"e.g., SNFAC, IPAC, FAC",info:"Find your local center at https://avalanche.org/avalanche-centers/",infoLink:"https://avalanche.org/avalanche-centers/"}),S.jsx(c0e,{label:"Season Months",value:t.avalanche.season_months,onChange:_=>e({...t,avalanche:{...t.avalanche,season_months:_}}),helper:"e.g., 12, 1, 2, 3, 4",info:"Months when avalanche forecasts are active. Default Dec-Apr. Adjust for your region's season."})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),S.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),S.jsx(_t,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var b,w;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((b=t.usgs)==null?void 0:b.tick_seconds)||900,sites:((w=t.usgs)==null?void 0:w.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(je,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:_=>e({...t,usgs:{...t.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),S.jsx(Ac,{label:"Site IDs",value:t.usgs.sites,onChange:_=>e({...t,usgs:{...t.usgs,sites:_}}),helper:"USGS gauge site numbers",info:"Find site IDs at waterdata.usgs.gov/nwis",infoLink:"https://waterdata.usgs.gov/nwis"})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),S.jsx(_t,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var b,w,C;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((b=t.traffic)==null?void 0:b.tick_seconds)||300,api_key:((w=t.traffic)==null?void 0:w.api_key)||"",corridors:((C=t.traffic)==null?void 0:C.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"API Key",value:t.traffic.api_key,onChange:_=>e({...t,traffic:{...t.traffic,api_key:_}}),type:"password",helper:"Get key at developer.tomtom.com",infoLink:"https://developer.tomtom.com"}),S.jsx(je,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:_=>e({...t,traffic:{...t.traffic,tick_seconds:_}}),min:60}),S.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((_,b)=>S.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[S.jsx(dt,{label:"Name",value:_.name,onChange:w=>{const C=[...t.traffic.corridors];C[b]={..._,name:w},e({...t,traffic:{...t.traffic,corridors:C}})}}),S.jsx(je,{label:"Lat",value:_.lat,onChange:w=>{const C=[...t.traffic.corridors];C[b]={..._,lat:w},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),S.jsx(je,{label:"Lon",value:_.lon,onChange:w=>{const C=[...t.traffic.corridors];C[b]={..._,lon:w},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),S.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((w,C)=>C!==b)}}),className:"px-2 py-2 text-xs text-red-400 hover:text-red-300 border border-red-400/30 rounded",children:"Remove"})]},b)),S.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:[...t.traffic.corridors||[],{name:"",lat:0,lon:0}]}}),className:"text-xs text-accent hover:underline",children:"+ Add Corridor"})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),S.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),S.jsx(_t,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var b,w,C,M,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((b=t.roads511)==null?void 0:b.tick_seconds)||300,api_key:((w=t.roads511)==null?void 0:w.api_key)||"",base_url:((C=t.roads511)==null?void 0:C.base_url)||"",endpoints:((M=t.roads511)==null?void 0:M.endpoints)||["/get/event"],bbox:((A=t.roads511)==null?void 0:A.bbox)||[]}})}})]}),((s=t.roads511)==null?void 0:s.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"Base URL",value:t.roads511.base_url,onChange:_=>e({...t,roads511:{...t.roads511,base_url:_}}),placeholder:"https://511.yourstate.gov/api/v2",helper:"State 511 API endpoint"}),S.jsx(dt,{label:"API Key",value:t.roads511.api_key,onChange:_=>e({...t,roads511:{...t.roads511,api_key:_}}),type:"password",helper:"Leave empty if not required"}),S.jsx(je,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),S.jsx(Ac,{label:"Endpoints",value:t.roads511.endpoints,onChange:_=>e({...t,roads511:{...t.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),S.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[S.jsx(je,{label:"West",value:((l=t.roads511.bbox)==null?void 0:l[0])||0,onChange:_=>{const b=[...t.roads511.bbox||[0,0,0,0]];b[0]=_,e({...t,roads511:{...t.roads511,bbox:b}})},step:.01}),S.jsx(je,{label:"South",value:((u=t.roads511.bbox)==null?void 0:u[1])||0,onChange:_=>{const b=[...t.roads511.bbox||[0,0,0,0]];b[1]=_,e({...t,roads511:{...t.roads511,bbox:b}})},step:.01}),S.jsx(je,{label:"East",value:((c=t.roads511.bbox)==null?void 0:c[2])||0,onChange:_=>{const b=[...t.roads511.bbox||[0,0,0,0]];b[2]=_,e({...t,roads511:{...t.roads511,bbox:b}})},step:.01}),S.jsx(je,{label:"North",value:((h=t.roads511.bbox)==null?void 0:h[3])||0,onChange:_=>{const b=[...t.roads511.bbox||[0,0,0,0]];b[3]=_,e({...t,roads511:{...t.roads511,bbox:b}})},step:.01})]}),S.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsxs("div",{children:[S.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),S.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),S.jsx(_t,{label:"",checked:((f=t.firms)==null?void 0:f.enabled)||!1,onChange:_=>{var b,w,C,M,A,k,N;return e({...t,firms:{...t.firms,enabled:_,tick_seconds:((b=t.firms)==null?void 0:b.tick_seconds)||1800,map_key:((w=t.firms)==null?void 0:w.map_key)||"",source:((C=t.firms)==null?void 0:C.source)||"VIIRS_SNPP_NRT",bbox:((M=t.firms)==null?void 0:M.bbox)||[],day_range:((A=t.firms)==null?void 0:A.day_range)||1,confidence_min:((k=t.firms)==null?void 0:k.confidence_min)||"nominal",proximity_km:((N=t.firms)==null?void 0:N.proximity_km)||10}})}})]}),((d=t.firms)==null?void 0:d.enabled)&&S.jsxs(S.Fragment,{children:[S.jsx(dt,{label:"MAP Key",value:t.firms.map_key,onChange:_=>e({...t,firms:{...t.firms,map_key:_}}),type:"password",helper:"Get key at firms.modaps.eosdis.nasa.gov/api/area/",infoLink:"https://firms.modaps.eosdis.nasa.gov/api/area/"}),S.jsx(je,{label:"Tick Seconds",value:t.firms.tick_seconds,onChange:_=>e({...t,firms:{...t.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),S.jsx(va,{label:"Satellite Source",value:t.firms.source,onChange:_=>e({...t,firms:{...t.firms,source:_}}),options:[{value:"VIIRS_SNPP_NRT",label:"VIIRS SNPP (Near Real-Time)"},{value:"VIIRS_NOAA20_NRT",label:"VIIRS NOAA-20 (Near Real-Time)"},{value:"MODIS_NRT",label:"MODIS (Near Real-Time)"}]}),S.jsx(je,{label:"Day Range",value:t.firms.day_range,onChange:_=>e({...t,firms:{...t.firms,day_range:_}}),min:1,max:10,helper:"1-10 days of data"}),S.jsx(va,{label:"Minimum Confidence",value:t.firms.confidence_min,onChange:_=>e({...t,firms:{...t.firms,confidence_min:_}}),options:[{value:"low",label:"Low"},{value:"nominal",label:"Nominal"},{value:"high",label:"High"}]}),S.jsx(je,{label:"Proximity (km)",value:t.firms.proximity_km,onChange:_=>e({...t,firms:{...t.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),S.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[S.jsx(je,{label:"West",value:((p=t.firms.bbox)==null?void 0:p[0])||0,onChange:_=>{const b=[...t.firms.bbox||[0,0,0,0]];b[0]=_,e({...t,firms:{...t.firms,bbox:b}})},step:.01}),S.jsx(je,{label:"South",value:((g=t.firms.bbox)==null?void 0:g[1])||0,onChange:_=>{const b=[...t.firms.bbox||[0,0,0,0]];b[1]=_,e({...t,firms:{...t.firms,bbox:b}})},step:.01}),S.jsx(je,{label:"East",value:((m=t.firms.bbox)==null?void 0:m[2])||0,onChange:_=>{const b=[...t.firms.bbox||[0,0,0,0]];b[2]=_,e({...t,firms:{...t.firms,bbox:b}})},step:.01}),S.jsx(je,{label:"North",value:((y=t.firms.bbox)==null?void 0:y[3])||0,onChange:_=>{const b=[...t.firms.bbox||[0,0,0,0]];b[3]=_,e({...t,firms:{...t.firms,bbox:b}})},step:.01})]}),S.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function M0e({data:t,onChange:e}){return S.jsxs("div",{className:"space-y-4",children:[S.jsx(un,{text:ln.dashboard}),S.jsx(_t,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Run the web dashboard"}),t.enabled&&S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(dt,{label:"Host",value:t.host,onChange:r=>e({...t,host:r}),placeholder:"0.0.0.0",helper:"Network bind address",info:"0.0.0.0 = accessible from any device on the network. 127.0.0.1 = only accessible from this machine."}),S.jsx(je,{label:"Port",value:t.port,onChange:r=>e({...t,port:r}),min:1,max:65535,helper:"Dashboard URL port",info:"Port number for the web dashboard URL. You access the dashboard at http://your-ip:port"})]})]})}function A0e(){var N;const[t,e]=U.useState(null),[r,n]=U.useState(null),[i,a]=U.useState("bot"),[o,s]=U.useState(!0),[l,u]=U.useState(!1),[c,h]=U.useState(null),[f,d]=U.useState(null),[p,g]=U.useState(!1),[m,y]=U.useState(!1),_=U.useCallback(async()=>{try{const D=await fetch("/api/config");if(!D.ok)throw new Error("Failed to fetch config");const I=await D.json();e(I),n(JSON.parse(JSON.stringify(I))),y(!1),h(null)}catch(D){h(D instanceof Error?D.message:"Unknown error")}finally{s(!1)}},[]);U.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),U.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const b=async()=>{if(t){u(!0),h(null),d(null);try{const D=t[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}),z=await I.json();if(!I.ok)throw new Error(z.detail||"Save failed");d(`${i} saved successfully`),n(JSON.parse(JSON.stringify(t))),y(!1),z.restart_required&&g(!0),setTimeout(()=>d(null),3e3)}catch(D){h(D instanceof Error?D.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{h("Restart failed")}},M=(D,I)=>{t&&e({...t,[D]:I})};if(o)return S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return S.jsx(h0e,{data:t.bot,onChange:D=>M("bot",D)});case"connection":return S.jsx(f0e,{data:t.connection,onChange:D=>M("connection",D)});case"response":return S.jsx(d0e,{data:t.response,onChange:D=>M("response",D)});case"history":return S.jsx(v0e,{data:t.history,onChange:D=>M("history",D)});case"memory":return S.jsx(p0e,{data:t.memory,onChange:D=>M("memory",D)});case"context":return S.jsx(g0e,{data:t.context,onChange:D=>M("context",D)});case"commands":return S.jsx(m0e,{data:t.commands,onChange:D=>M("commands",D)});case"llm":return S.jsx(y0e,{data:t.llm,onChange:D=>M("llm",D)});case"weather":return S.jsx(_0e,{data:t.weather,onChange:D=>M("weather",D)});case"meshmonitor":return S.jsx(x0e,{data:t.meshmonitor,onChange:D=>M("meshmonitor",D)});case"knowledge":return S.jsx(b0e,{data:t.knowledge,onChange:D=>M("knowledge",D)});case"mesh_sources":return S.jsx(w0e,{data:t.mesh_sources,onChange:D=>M("mesh_sources",D)});case"mesh_intelligence":return S.jsx(T0e,{data:t.mesh_intelligence,onChange:D=>M("mesh_intelligence",D)});case"environmental":return S.jsx(C0e,{data:t.environmental,onChange:D=>M("environmental",D)});case"dashboard":return S.jsx(M0e,{data:t.dashboard,onChange:D=>M("dashboard",D)});default:return null}},k=((N=Sz.find(D=>D.key===i))==null?void 0:N.label)||i;return S.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[S.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:Sz.map(({key:D,label:I,icon:z})=>S.jsxs("button",{onClick:()=>a(D),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===D?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[S.jsx(z,{size:16}),S.jsx("span",{children:I}),m&&i===D&&S.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},D))}),S.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[S.jsxs("div",{className:"flex items-center justify-between mb-6",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx(i4,{size:20,className:"text-slate-500"}),S.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:k})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[m&&S.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-400 hover:text-slate-200 bg-bg-hover rounded transition-colors",children:[S.jsx(t4,{size:14}),"Discard"]}),S.jsxs("button",{onClick:b,disabled:l||!m,className:"flex items-center gap-1.5 px-4 py-1.5 text-sm bg-accent text-white rounded hover:bg-accent/80 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[l?S.jsx(e4,{size:14,className:"animate-spin"}):S.jsx(r4,{size:14}),"Save"]})]})]}),p&&S.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[S.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[S.jsx(ys,{size:16}),S.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),S.jsx("button",{onClick:C,className:"px-3 py-1 text-sm bg-amber-500 text-white rounded hover:bg-amber-600 transition-colors",children:"Restart Now"})]}),c&&S.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-red-500/10 border border-red-500/30 rounded-lg text-red-400",children:[S.jsx(zv,{size:16}),S.jsx("span",{className:"text-sm",children:c})]}),f&&S.jsxs("div",{className:"flex items-center gap-2 p-3 mb-4 bg-green-500/10 border border-green-500/30 rounded-lg text-green-400",children:[S.jsx($d,{size:16}),S.jsx("span",{className:"text-sm",children:f})]}),S.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:S.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}const wz={infra_offline:c$,infra_recovery:a4,battery_warning:Nx,battery_critical:Nx,battery_emergency:Nx,hf_blackout:_2,uhf_ducting:Xc,weather_warning:Yd,weather_watch:Yd,new_router:Xc,packet_flood:ys,sustained_high_util:ys,region_blackout:B0,default:sy};function L0e(t){return wz[t]||wz.default}function j8(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",badge:"bg-red-500/20 text-red-400",iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",badge:"bg-amber-500/20 text-amber-400",iconColor:"text-amber-500"};case"watch":return{bg:"bg-yellow-500/10",border:"border-yellow-500",badge:"bg-yellow-500/20 text-yellow-400",iconColor:"text-yellow-500"};case"advisory":case"info":default:return{bg:"bg-blue-500/10",border:"border-blue-500",badge:"bg-blue-500/20 text-blue-400",iconColor:"text-blue-500"}}}function P0e(t){const e=typeof t=="number"?new Date(t*1e3):new Date(t),n=new Date().getTime()-e.getTime(),i=Math.floor(n/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24);return i<60?"Just now":a<60?`${a}m ago`:o<24?`${o}h ago`:`${s}d ago`}function k0e(t){return(typeof t=="number"?new Date(t*1e3):new Date(t)).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}function D0e(t){return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:`${Math.floor(t/86400)}d`}function I0e({alert:t,onAcknowledge:e}){var i;const r=j8(t.severity),n=L0e(t.type);return S.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:S.jsxs("div",{className:"flex items-start gap-3",children:[S.jsx(n,{size:20,className:r.iconColor}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[S.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=t.severity)==null?void 0:i.toUpperCase()}),S.jsx("span",{className:"text-xs text-slate-500",children:t.type})]}),S.jsx("div",{className:"text-sm text-slate-200",children:t.message}),S.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[S.jsxs("span",{className:"flex items-center gap-1",children:[S.jsx(ly,{size:12}),t.timestamp?P0e(t.timestamp):"Just now"]}),t.scope_value&&S.jsxs("span",{children:[t.scope_type,": ",t.scope_value]})]})]}),S.jsx("button",{onClick:()=>e(t),className:"px-3 py-1 text-xs text-slate-400 hover:text-slate-200 border border-border rounded hover:bg-bg-hover transition-colors",children:"Acknowledge"})]})})}function N0e({history:t,typeFilter:e,severityFilter:r,onTypeFilterChange:n,onSeverityFilterChange:i,page:a,totalPages:o,onPageChange:s}){const l=["all","infra_offline","infra_recovery","battery_warning","battery_critical","hf_blackout","uhf_ducting","weather_warning","new_router","packet_flood"],u=["all","critical","warning","watch","info"];return S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[S.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(y2,{size:14,className:"text-slate-400"}),S.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),S.jsx("select",{value:e,onChange:c=>n(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:l.map(c=>S.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),S.jsx("select",{value:r,onChange:c=>i(c.target.value),className:"bg-bg border border-border rounded px-3 py-1.5 text-sm text-slate-200 focus:outline-none focus:border-blue-500",children:u.map(c=>S.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),S.jsx("div",{className:"overflow-x-auto",children:S.jsxs("table",{className:"w-full",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"border-b border-border",children:[S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),S.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),S.jsx("tbody",{children:t.length>0?t.map((c,h)=>{const f=j8(c.severity);return S.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[S.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:k0e(c.timestamp)}),S.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),S.jsx("td",{className:"p-4",children:S.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${f.badge}`,children:c.severity})}),S.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),S.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?D0e(c.duration):"-"})]},c.id||h)}):S.jsx("tr",{children:S.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&S.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[S.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:()=>s(a-1),disabled:a<=1,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:S.jsx(XZ,{size:16})}),S.jsx("button",{onClick:()=>s(a+1),disabled:a>=o,className:"p-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed",children:S.jsx(Ov,{size:16})})]})]})]})}function E0e({subscription:t,nodes:e}){const r=o=>{const s=e.find(l=>l.node_id_hex===o||String(l.node_num)===o||l.short_name===o);return s?s.long_name&&s.long_name!==s.short_name?`${s.short_name} (${s.long_name})`:s.short_name:o},n=()=>{if(t.sub_type==="alerts")return"Real-time";const o=t.schedule_time||"0000",s=parseInt(o.slice(0,2)),l=o.slice(2),u=s>=12?"PM":"AM";let h=`${s%12||12}:${l} ${u}`;return t.sub_type==="weekly"&&t.schedule_day&&(h+=` ${t.schedule_day.charAt(0).toUpperCase()}${t.schedule_day.slice(1)}`),h},a=(()=>{switch(t.sub_type){case"alerts":return sy;case"daily":return ly;case"weekly":return ly;default:return sy}})();return S.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:S.jsx(a,{size:18,className:"text-blue-400"})}),S.jsxs("div",{className:"flex-1",children:[S.jsxs("div",{className:"text-sm text-slate-200 font-medium",children:[t.sub_type.charAt(0).toUpperCase()+t.sub_type.slice(1),t.scope_type!=="mesh"&&t.scope_value&&S.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",t.scope_type,": ",t.scope_value,")"]})]}),S.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[n()," • ",r(t.user_id)]})]}),S.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function R0e(){const[t,e]=U.useState([]),[r,n]=U.useState([]),[i,a]=U.useState([]),[o,s]=U.useState([]),[l,u]=U.useState(!0),[c,h]=U.useState(null),[f,d]=U.useState("all"),[p,g]=U.useState("all"),[m,y]=U.useState(1),[_,b]=U.useState(1),w=20,[C,M]=U.useState(new Set),{lastAlert:A}=x2();U.useEffect(()=>{document.title="Alerts — MeshAI"},[]),U.useEffect(()=>{Promise.all([o4().catch(()=>[]),Ok(w,0).catch(()=>({items:[],total:0})),p$().catch(()=>[]),fetch("/api/nodes").then(D=>D.json()).catch(()=>[])]).then(([D,I,z,O])=>{e(D),Array.isArray(I)?(n(I),b(1)):(n(I.items||[]),b(Math.ceil((I.total||0)/w))),a(z),s(O),u(!1)}).catch(D=>{h(D.message),u(!1)})},[]),U.useEffect(()=>{A&&e(D=>D.some(z=>z.type===A.type&&z.message===A.message)?D:[A,...D])},[A]),U.useEffect(()=>{const D=(m-1)*w;Ok(w,D,f,p).then(I=>{Array.isArray(I)?(n(I),b(1)):(n(I.items||[]),b(Math.ceil((I.total||0)/w)))}).catch(()=>{})},[m,f,p]);const k=U.useCallback(D=>{const I=`${D.type}-${D.message}-${D.timestamp}`;M(z=>new Set([...z,I]))},[]),N=t.filter(D=>{const I=`${D.type}-${D.message}-${D.timestamp}`;return!C.has(I)});return l?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):c?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsxs("div",{className:"text-red-400",children:["Error: ",c]})}):S.jsxs("div",{className:"space-y-6",children:[S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(ys,{size:14}),"Active Alerts (",N.length,")"]}),N.length>0?S.jsx("div",{className:"space-y-3",children:N.map((D,I)=>S.jsx(I0e,{alert:D,onAcknowledge:k},`${D.type}-${D.timestamp}-${I}`))}):S.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[S.jsx(cd,{size:20,className:"text-green-500"}),S.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),S.jsxs("div",{children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(ly,{size:14}),"Alert History"]}),S.jsx(N0e,{history:r,typeFilter:f,severityFilter:p,onTypeFilterChange:D=>{d(D),y(1)},onSeverityFilterChange:D=>{g(D),y(1)},page:m,totalPages:_,onPageChange:y})]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[S.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[S.jsx(u$,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?S.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(D=>S.jsx(E0e,{subscription:D,nodes:o},D.id))}):S.jsxs("div",{className:"text-slate-500 py-4",children:[S.jsx("p",{children:"No active subscriptions."}),S.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",S.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}function ni({info:t,link:e,linkText:r="Learn more"}){const[n,i]=U.useState(!1);return S.jsxs("div",{className:"relative inline-block",children:[S.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),i(!n)},className:"ml-1.5 w-4 h-4 rounded-full bg-slate-700 hover:bg-slate-600 text-slate-400 hover:text-slate-200 inline-flex items-center justify-center text-xs transition-colors",title:"More info",children:"?"}),n&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),S.jsxs("div",{className:"absolute left-0 top-6 z-50 w-72 p-3 bg-[#1a2332] border border-[#2a3a4a] rounded-lg shadow-xl text-xs text-slate-300 leading-relaxed",children:[t,e&&S.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-1 text-accent hover:underline",onClick:a=>a.stopPropagation(),children:[r," ",S.jsx(Yc,{size:10})]})]})]})]})}function Wa({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o=""}){const[s,l]=U.useState(!1),u=n==="password";return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,o&&S.jsx(ni,{info:o})]}),S.jsxs("div",{className:"relative",children:[S.jsx("input",{type:u&&!s?"password":"text",value:e,onChange:c=>r(c.target.value),placeholder:i,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent placeholder-slate-600"}),u&&S.jsx("button",{type:"button",onClick:()=>l(!s),className:"absolute right-2 top-1/2 -translate-y-1/2 text-slate-500 hover:text-slate-300",children:s?S.jsx(KB,{size:16}):S.jsx(m2,{size:16})})]}),a&&S.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function V8({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,s&&S.jsx(ni,{info:s})]}),S.jsx("input",{type:"number",value:e,onChange:l=>r(Number(l.target.value)),min:n,max:i,step:a,className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent"}),o&&S.jsx("p",{className:"text-xs text-slate-600",children:o})]})}function x0({label:t,checked:e,onChange:r,helper:n="",info:i=""}){return S.jsxs("div",{className:"flex items-center justify-between py-2",children:[S.jsxs("div",{children:[S.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[t,i&&S.jsx(ni,{info:i})]}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]}),S.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:S.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function F8({label:t,value:e,onChange:r,options:n,helper:i="",info:a=""}){return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&S.jsx(ni,{info:a})]}),S.jsx("select",{value:e,onChange:o=>r(o.target.value),className:"w-full px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 focus:outline-none focus:border-accent",children:n.map(o=>S.jsx("option",{value:o.value,children:o.label},o.value))}),i&&S.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function O0e({label:t,value:e,onChange:r,helper:n="",info:i=""}){const[a,o]=U.useState(""),s=()=>{a.trim()&&!e.includes(a.trim())&&(r([...e,a.trim()]),o(""))},l=u=>{r(e.filter((c,h)=>h!==u))};return S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&S.jsx(ni,{info:i})]}),S.jsxs("div",{className:"flex gap-2",children:[S.jsx("input",{type:"text",value:a,onChange:u=>o(u.target.value),onKeyDown:u=>u.key==="Enter"&&(u.preventDefault(),s()),className:"flex-1 px-3 py-2 bg-[#0a0e17] border border-[#1e2a3a] rounded text-sm text-slate-200 font-mono focus:outline-none focus:border-accent",placeholder:"Add item..."}),S.jsx("button",{type:"button",onClick:s,className:"px-3 py-2 bg-accent hover:bg-accent/80 rounded text-sm text-white transition-colors",children:S.jsx(Xd,{size:16})})]}),e.length>0&&S.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:e.map((u,c)=>S.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-[#1e2a3a] rounded text-sm text-slate-300",children:[u,S.jsx("button",{type:"button",onClick:()=>l(c),className:"text-slate-500 hover:text-red-400",children:S.jsx(zv,{size:14})})]},c))}),n&&S.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function z0e({channel:t,onChange:e,onDelete:r,onTest:n}){var h;const[i,a]=U.useState(!1),[o,s]=U.useState(!1),l=[{value:"mesh_broadcast",label:"Mesh Broadcast"},{value:"mesh_dm",label:"Mesh DM"},{value:"email",label:"Email"},{value:"webhook",label:"Webhook"}],u={mesh_broadcast:"Broadcast alerts to a mesh channel. All nodes on that channel receive the alert.",mesh_dm:"Send alerts as direct messages to specific nodes.",email:"Send alert emails via SMTP. Works with Gmail, Outlook, and any SMTP server.",webhook:"POST alert JSON to any URL. Works with Discord webhooks, ntfy.sh, Pushover, Slack, Home Assistant, or any service that accepts HTTP POST."},c=async()=>{s(!0),await n(),s(!1)};return S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>a(!i),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[i?S.jsx(Rv,{size:16}):S.jsx(Ov,{size:16}),S.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),S.jsx("span",{className:"font-medium text-slate-200",children:t.id||"New Channel"}),S.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:((h=l.find(f=>f.value===t.type))==null?void 0:h.label)||t.type})]}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:f=>{f.stopPropagation(),c()},disabled:o||!t.id,className:"p-1.5 text-blue-400 hover:text-blue-300 hover:bg-blue-500/10 rounded disabled:opacity-50",title:"Send test alert",children:S.jsx(o$,{size:14})}),S.jsx("button",{onClick:f=>{f.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:S.jsx(j0,{size:14})})]})]}),i&&S.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(Wa,{label:"Channel ID",value:t.id,onChange:f=>e({...t,id:f}),helper:"Unique identifier for this channel",info:"Used to reference this channel in notification rules. Use lowercase with hyphens (e.g., 'mesh-main', 'email-admin')."}),S.jsx(F8,{label:"Type",value:t.type,onChange:f=>e({...t,type:f}),options:l,info:u[t.type]||"Select a channel type"})]}),S.jsx(x0,{label:"Enabled",checked:t.enabled,onChange:f=>e({...t,enabled:f}),helper:"Disable to temporarily stop alerts on this channel"}),t.type==="mesh_broadcast"&&S.jsx(uL,{label:"Broadcast Channel",value:t.channel_index,onChange:f=>e({...t,channel_index:f}),helper:"Channel for broadcast alerts",info:"The mesh channel to broadcast alerts on.",mode:"single"}),t.type==="mesh_dm"&&S.jsx(lL,{label:"Recipient Nodes",value:t.node_ids,onChange:f=>e({...t,node_ids:f}),helper:"Nodes to receive DM alerts",info:"Nodes that receive direct message alerts.",valueType:"node_id_hex"}),t.type==="email"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(Wa,{label:"SMTP Host",value:t.smtp_host,onChange:f=>e({...t,smtp_host:f}),placeholder:"smtp.gmail.com",helper:"SMTP server hostname",info:"The SMTP server for sending emails. Gmail: smtp.gmail.com, Outlook: smtp.office365.com"}),S.jsx(V8,{label:"SMTP Port",value:t.smtp_port,onChange:f=>e({...t,smtp_port:f}),min:1,max:65535,helper:"587 (TLS) or 465 (SSL)",info:"SMTP port. Use 587 for TLS (recommended) or 465 for SSL."})]}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(Wa,{label:"SMTP User",value:t.smtp_user,onChange:f=>e({...t,smtp_user:f}),placeholder:"you@gmail.com",helper:"Login username"}),S.jsx(Wa,{label:"SMTP Password",value:t.smtp_password,onChange:f=>e({...t,smtp_password:f}),type:"password",helper:"App password recommended",info:"Gmail users: use an App Password, not your regular password. Generate one at myaccount.google.com/apppasswords"})]}),S.jsx(x0,{label:"Use TLS",checked:t.smtp_tls,onChange:f=>e({...t,smtp_tls:f}),helper:"Encrypt SMTP connection",info:"Enable TLS encryption for the SMTP connection. Required for most modern email servers."}),S.jsx(Wa,{label:"From Address",value:t.from_address,onChange:f=>e({...t,from_address:f}),placeholder:"alerts@yourdomain.com",helper:"Sender email address",info:"The email address that appears as the sender. Some servers require this to match your login."}),S.jsx(O0e,{label:"Recipients",value:t.recipients,onChange:f=>e({...t,recipients:f}),helper:"Email addresses to receive alerts",info:"List of email addresses that will receive alerts from this channel."})]}),t.type==="webhook"&&S.jsxs(S.Fragment,{children:[S.jsx(Wa,{label:"Webhook URL",value:t.url,onChange:f=>e({...t,url:f}),placeholder:"https://discord.com/api/webhooks/...",helper:"POST endpoint for alerts",info:"POST alert JSON to any URL. Works with Discord webhooks, ntfy.sh, Pushover, Slack, Home Assistant, or any service that accepts HTTP POST."}),S.jsxs("div",{className:"space-y-1",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Headers (optional)",S.jsx(ni,{info:"Additional HTTP headers to send with the webhook request. Useful for authentication tokens or custom headers required by the receiving service."})]}),S.jsx("div",{className:"text-xs text-slate-600",children:"Custom headers can be configured in the YAML config file"})]})]})]})]})}function B0e({rule:t,categories:e,channels:r,onChange:n,onDelete:i}){var c,h,f,d;const[a,o]=U.useState(!1),s=[{value:"info",label:"Info"},{value:"advisory",label:"Advisory"},{value:"watch",label:"Watch"},{value:"warning",label:"Warning"},{value:"critical",label:"Critical"},{value:"emergency",label:"Emergency"}],l=p=>{const g=t.categories||[];g.includes(p)?n({...t,categories:g.filter(m=>m!==p)}):n({...t,categories:[...g,p]})},u=p=>{const g=t.channel_ids||[];g.includes(p)?n({...t,channel_ids:g.filter(m=>m!==p)}):n({...t,channel_ids:[...g,p]})};return S.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[S.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>o(!a),children:[S.jsxs("div",{className:"flex items-center gap-3",children:[a?S.jsx(Rv,{size:16}):S.jsx(Ov,{size:16}),S.jsx("span",{className:"font-medium text-slate-200",children:t.name||"New Rule"}),S.jsxs("span",{className:"text-xs text-slate-500",children:[((c=t.categories)==null?void 0:c.length)||0," categories → ",((h=t.channel_ids)==null?void 0:h.length)||0," channels"]})]}),S.jsx("button",{onClick:p=>{p.stopPropagation(),i()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:S.jsx(j0,{size:14})})]}),a&&S.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[S.jsx(Wa,{label:"Rule Name",value:t.name,onChange:p=>n({...t,name:p}),helper:"Human-readable name for this rule",info:"A descriptive name to identify this rule. Example: 'Emergency Alerts', 'Fire Notifications', 'Infrastructure Warnings'"}),S.jsx(F8,{label:"Minimum Severity",value:t.min_severity,onChange:p=>n({...t,min_severity:p}),options:s,helper:"Only alerts at or above this severity",info:"Only alerts at this severity or above will trigger this rule. 'warning' is recommended for most channels. Use 'info' to receive all alerts."}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Categories",S.jsx(ni,{info:"Which alert types this rule applies to. Select none to match all categories. Alerts matching any selected category (AND meeting severity threshold) will trigger this rule."})]}),S.jsx("div",{className:"text-xs text-slate-500 mb-2",children:((f=t.categories)==null?void 0:f.length)===0?"All categories (none selected)":`${(d=t.categories)==null?void 0:d.length} selected`}),S.jsx("div",{className:"max-h-48 overflow-y-auto border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:e.map(p=>{var g;return S.jsxs("label",{className:"flex items-start gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:((g=t.categories)==null?void 0:g.includes(p.id))||!1,onChange:()=>l(p.id),className:"mt-0.5 rounded border-slate-600 bg-[#0a0e17] text-accent focus:ring-accent"}),S.jsxs("div",{className:"flex-1 min-w-0",children:[S.jsx("div",{className:"text-sm text-slate-200",children:p.name}),S.jsx("div",{className:"text-xs text-slate-500",children:p.description})]})]},p.id)})})]}),S.jsxs("div",{className:"space-y-2",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Delivery Channels",S.jsx(ni,{info:"Which channels receive alerts matching this rule. Select at least one channel."})]}),r.length===0?S.jsx("div",{className:"text-xs text-slate-500 p-2 border border-[#1e2a3a] rounded-lg",children:"No channels configured. Add channels above first."}):S.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-2 space-y-1",children:r.map(p=>{var g;return S.jsxs("label",{className:"flex items-center gap-2 p-2 rounded hover:bg-[#0a0e17] cursor-pointer",children:[S.jsx("input",{type:"checkbox",checked:((g=t.channel_ids)==null?void 0:g.includes(p.id))||!1,onChange:()=>u(p.id),className:"rounded border-slate-600 bg-[#0a0e17] text-accent focus:ring-accent"}),S.jsx("span",{className:"text-sm text-slate-200",children:p.id}),S.jsxs("span",{className:"text-xs text-slate-500",children:["(",p.type,")"]})]},p.id)})})]}),S.jsx(x0,{label:"Override Quiet Hours",checked:t.override_quiet,onChange:p=>n({...t,override_quiet:p}),helper:"Send alerts even during quiet hours",info:"When enabled, this rule sends alerts even during quiet hours. Use for critical conditions like fires or infrastructure failures."})]})]})}function j0e(){const[t,e]=U.useState(null),[r,n]=U.useState(null),[i,a]=U.useState([]),[o,s]=U.useState(!0),[l,u]=U.useState(!1),[c,h]=U.useState(null),[f,d]=U.useState(null),[p,g]=U.useState(null),[m,y]=U.useState(!1),_=U.useCallback(async()=>{try{const[k,N]=await Promise.all([fetch("/api/config/notifications"),fetch("/api/notifications/categories")]);if(!k.ok)throw new Error("Failed to fetch notifications config");const D=await k.json(),I=await N.json();e(D),n(JSON.parse(JSON.stringify(D))),a(I),y(!1),h(null)}catch(k){h(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);U.useEffect(()=>{document.title="Notifications — MeshAI",_()},[_]),U.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const b=async()=>{if(t){u(!0),h(null),d(null);try{const k=await fetch("/api/config/notifications",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),N=await k.json();if(!k.ok)throw new Error(N.detail||"Save failed");d("Notifications config saved successfully"),n(JSON.parse(JSON.stringify(t))),y(!1),setTimeout(()=>d(null),3e3)}catch(k){h(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},w=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=()=>{if(!t)return;const k={id:"",type:"mesh_broadcast",enabled:!0,channel_index:0,node_ids:[],smtp_host:"",smtp_port:587,smtp_user:"",smtp_password:"",smtp_tls:!0,from_address:"",recipients:[],url:"",headers:{}};e({...t,channels:[...t.channels||[],k]})},M=()=>{if(!t)return;const k={name:"",categories:[],min_severity:"warning",channel_ids:[],override_quiet:!1};e({...t,rules:[...t.rules||[],k]})},A=async k=>{try{const D=await(await fetch(`/api/notifications/channels/${k}/test`,{method:"POST"})).json();g(D),setTimeout(()=>g(null),5e3)}catch{g({success:!1,message:"Test failed"}),setTimeout(()=>g(null),5e3)}};return o?S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-slate-400",children:"Loading notifications config..."})}):t?S.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[S.jsxs("div",{className:"flex items-center justify-between",children:[S.jsx("div",{children:S.jsx("p",{className:"text-sm text-slate-500",children:"Configure where alerts get delivered and which conditions trigger them."})}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:_,className:"p-2 text-slate-400 hover:text-slate-200 hover:bg-bg-hover rounded transition-colors",title:"Refresh",children:S.jsx(e4,{size:18})}),S.jsxs("button",{onClick:w,disabled:!m,className:"flex items-center gap-2 px-3 py-2 text-slate-400 hover:text-slate-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[S.jsx(t4,{size:16}),"Discard"]}),S.jsxs("button",{onClick:b,disabled:l||!m,className:"flex items-center gap-2 px-4 py-2 bg-accent hover:bg-accent/80 disabled:bg-slate-700 disabled:cursor-not-allowed rounded text-white transition-colors",children:[S.jsx(r4,{size:16}),l?"Saving...":"Save"]})]})]}),c&&S.jsx("div",{className:"p-3 rounded-lg text-sm bg-red-500/10 text-red-400 border border-red-500/20",children:c}),f&&S.jsxs("div",{className:"p-3 rounded-lg text-sm bg-green-500/10 text-green-400 border border-green-500/20",children:[S.jsx($d,{size:14,className:"inline mr-2"}),f]}),p&&S.jsxs("div",{className:`p-3 rounded-lg text-sm ${p.success?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:[p.success?S.jsx($d,{size:14,className:"inline mr-2"}):S.jsx(zv,{size:14,className:"inline mr-2"}),p.message]}),S.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6 space-y-6",children:[S.jsx(x0,{label:"Enable Notifications",checked:t.enabled,onChange:k=>e({...t,enabled:k}),helper:"Master switch for all notification delivery",info:"When disabled, no alerts will be delivered through any channel. The alert engine still runs and records alerts to history."}),t.enabled&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"space-y-3",children:[S.jsx("div",{className:"flex items-center justify-between",children:S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Channels",S.jsx(ni,{info:"Where alerts get delivered. Add channels for each destination you want to receive alerts."})]})}),S.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Where alerts get delivered. Add channels for each destination you want to receive alerts."}),(t.channels||[]).map((k,N)=>S.jsx(z0e,{channel:k,onChange:D=>{const I=[...t.channels||[]];I[N]=D,e({...t,channels:I})},onDelete:()=>{confirm(`Delete channel "${k.id||"New Channel"}"?`)&&e({...t,channels:(t.channels||[]).filter((D,I)=>I!==N)})},onTest:()=>A(k.id)},N)),S.jsxs("button",{onClick:C,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(Xd,{size:16})," Add Channel"]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsx("div",{className:"flex items-center justify-between",children:S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Rules",S.jsx(ni,{info:"Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule."})]})}),S.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule."}),(t.rules||[]).map((k,N)=>S.jsx(B0e,{rule:k,categories:i,channels:t.channels||[],onChange:D=>{const I=[...t.rules||[]];I[N]=D,e({...t,rules:I})},onDelete:()=>{confirm(`Delete rule "${k.name||"New Rule"}"?`)&&e({...t,rules:(t.rules||[]).filter((D,I)=>I!==N)})}},N)),S.jsxs("button",{onClick:M,className:"w-full py-2 border border-dashed border-[#1e2a3a] rounded-lg text-slate-500 hover:text-slate-300 hover:border-accent flex items-center justify-center gap-2 transition-colors",children:[S.jsx(Xd,{size:16})," Add Rule"]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Quiet Hours",S.jsx(ni,{info:"Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through. Rules with 'Override Quiet Hours' enabled will also deliver during this time."})]}),S.jsx("p",{className:"text-sm text-slate-500 -mt-1",children:"Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through."}),S.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[S.jsx(Wa,{label:"Start Time",value:t.quiet_hours_start||"22:00",onChange:k=>e({...t,quiet_hours_start:k}),placeholder:"22:00",helper:"When quiet hours begin",info:"Time in 24-hour format (HH:MM) when quiet hours start. Alerts below emergency severity will be held until quiet hours end."}),S.jsx(Wa,{label:"End Time",value:t.quiet_hours_end||"06:00",onChange:k=>e({...t,quiet_hours_end:k}),placeholder:"06:00",helper:"When quiet hours end",info:"Time in 24-hour format (HH:MM) when quiet hours end. Held alerts will be delivered at this time."})]})]}),S.jsxs("div",{className:"space-y-3",children:[S.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Deduplication",S.jsx(ni,{info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered."})]}),S.jsx(V8,{label:"Dedup Window (seconds)",value:t.dedup_seconds||600,onChange:k=>e({...t,dedup_seconds:k}),min:0,max:86400,helper:"Don't re-send the same alert within this window",info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered. Default is 600 seconds (10 minutes)."})]})]})]})]}):S.jsx("div",{className:"flex items-center justify-center h-64",children:S.jsx("div",{className:"text-red-400",children:"Failed to load notifications config"})})}function V0e(){return S.jsx(k$,{children:S.jsx(N$,{children:S.jsxs(PZ,{children:[S.jsx(dl,{path:"/",element:S.jsx(B$,{})}),S.jsx(dl,{path:"/mesh",element:S.jsx(t0e,{})}),S.jsx(dl,{path:"/environment",element:S.jsx(o0e,{})}),S.jsx(dl,{path:"/config",element:S.jsx(A0e,{})}),S.jsx(dl,{path:"/alerts",element:S.jsx(R0e,{})}),S.jsx(dl,{path:"/notifications",element:S.jsx(j0e,{})})]})})})}sS.createRoot(document.getElementById("root")).render(S.jsx(Vc.StrictMode,{children:S.jsx(OZ,{children:S.jsx(V0e,{})})})); diff --git a/meshai/dashboard/static/assets/index-D1Pqs_mG.css b/meshai/dashboard/static/assets/index-so1NV9Au.css similarity index 50% rename from meshai/dashboard/static/assets/index-D1Pqs_mG.css rename to meshai/dashboard/static/assets/index-so1NV9Au.css index 889d8cd..261a259 100644 --- a/meshai/dashboard/static/assets/index-D1Pqs_mG.css +++ b/meshai/dashboard/static/assets/index-so1NV9Au.css @@ -1 +1 @@ -.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-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}}*,: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:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";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:JetBrains Mono,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%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.z-0{z-index:0}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-4{margin-left:-1rem}.-mt-1{margin-top:-.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-4xl{max-width:56rem}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-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))}.translate-x-4{--tw-translate-x: 1rem;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-x-5{--tw-translate-x: 1.25rem;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 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-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,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}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.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-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.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}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-\[\#2a3a4a\]{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-red-400\/30{border-color:#f871714d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1a2332\]{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-500\/10{background-color:#f973161a}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 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)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.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}.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-5{padding-left:1.25rem;padding-right:1.25rem}.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-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.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-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.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)}.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)}.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-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)}.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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.animate-slide-in{animation:slide-in .3s ease-out}.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hover\:border-\[\#2a3a4a\]:hover{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#0a0e17\]:hover{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/10:hover{background-color:#3b82f61a}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-accent:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-700:disabled{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}@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))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.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))}} +.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}}*,: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:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";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:JetBrains Mono,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%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1{left:.25rem}.left-3{left:.75rem}.left-4{left:1rem}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-4{top:1rem}.top-6{top:1.5rem}.top-full{top:100%}.z-0{z-index:0}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.-my-4{margin-top:-1rem;margin-bottom:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-4{margin-left:-1rem}.-mt-1{margin-top:-.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[540px\]{height:540px}.h-\[60vh\]{height:60vh}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-screen{height:100vh}.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[220px\]{width:220px}.w-\[250px\]{width:250px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-4xl{max-width:56rem}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-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))}.translate-x-4{--tw-translate-x: 1rem;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-x-5{--tw-translate-x: 1.25rem;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 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-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,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}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.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-border>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 42 58 / var(--tw-divide-opacity, 1))}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.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}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#1e2a3a\]{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-\[\#2a3a4a\]{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.border-accent{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:rgb(30 42 58 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-500\/20{border-color:#22c55e33}.border-green-500\/30{border-color:#22c55e4d}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.border-red-400\/30{border-color:#f871714d}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-500{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-\[\#0a0e17\]{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-\[\#1a2332\]{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-\[\#1e2a3a\]{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-accent\/10{background-color:#3b82f61a}.bg-accent\/20{background-color:#3b82f633}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-bg{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.bg-bg-card{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-bg-card\/90{background-color:#111827e6}.bg-bg-hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.bg-cyan-500\/20{background-color:#06b6d433}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-orange-500\/10{background-color:#f973161a}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.bg-slate-500\/10{background-color:#64748b1a}.bg-slate-500\/20{background-color:#64748b33}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/10{background-color:#eab3081a}.bg-yellow-500\/20{background-color:#eab30833}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 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)}.to-blue-700{--tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position)}.fill-slate-100{fill:#f1f5f9}.fill-slate-400{fill:#94a3b8}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.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}.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-5{padding-left:1.25rem;padding-right:1.25rem}.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-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-4{padding-bottom:1rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:JetBrains Mono,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.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-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.placeholder-slate-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(100 116 139 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.placeholder-slate-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(71 85 105 / var(--tw-placeholder-opacity, 1))}.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)}.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)}.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-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)}.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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}body{background:#0a0e17;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0a0e17}::-webkit-scrollbar-thumb{background:#2d3a4d;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#3b4a5d}.font-mono{font-family:JetBrains Mono,monospace}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse-slow{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slide-in{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}.animate-slide-in{animation:slide-in .3s ease-out}.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hover\:border-\[\#2a3a4a\]:hover{--tw-border-opacity: 1;border-color:rgb(42 58 74 / var(--tw-border-opacity, 1))}.hover\:border-accent:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#0a0e17\]:hover{--tw-bg-opacity: 1;background-color:rgb(10 14 23 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#1e2a3a\]:hover{--tw-bg-opacity: 1;background-color:rgb(30 42 58 / var(--tw-bg-opacity, 1))}.hover\:bg-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(26 35 50 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/10:hover{background-color:#3b82f61a}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-slate-200:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-accent:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-accent:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-700:disabled{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}@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))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.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))}} diff --git a/meshai/dashboard/static/index.html b/meshai/dashboard/static/index.html index 19d3f03..1f0a262 100644 --- a/meshai/dashboard/static/index.html +++ b/meshai/dashboard/static/index.html @@ -8,8 +8,8 @@ - - + +