From c22cf47decc4a7fb946b84c728af94dde75a6758 Mon Sep 17 00:00:00 2001 From: K7ZVX Date: Wed, 13 May 2026 04:47:42 +0000 Subject: [PATCH] feat(dashboard): move notification config to Config page - Notifications tab in Config sidebar with Bell icon - Channels section: add/edit/delete channels (mesh broadcast, DM, email, webhook) - Test button sends test alert to channel - Rules section: create rules with category checkboxes fetched from API - Quiet hours configurable with start/end times - Dedup window to prevent alert spam - Full helper text and info buttons on every field - Category list fetched from /api/notifications/categories, not hardcoded - Added notifications and environmental to VALID_SECTIONS in config_routes.py Co-Authored-By: Claude Opus 4.5 --- dashboard-frontend/src/pages/Config.tsx | 609 +++++++++++++++++- meshai/dashboard/api/config_routes.py | 4 +- .../{index-Croiw0ta.js => index-CdB1XMAe.js} | 193 +++--- ...{index-CnMjjlvK.css => index-D0QU4dPJ.css} | 2 +- meshai/dashboard/static/index.html | 4 +- 5 files changed, 713 insertions(+), 99 deletions(-) rename meshai/dashboard/static/assets/{index-Croiw0ta.js => index-CdB1XMAe.js} (51%) rename meshai/dashboard/static/assets/{index-CnMjjlvK.css => index-D0QU4dPJ.css} (52%) diff --git a/dashboard-frontend/src/pages/Config.tsx b/dashboard-frontend/src/pages/Config.tsx index 9901c29..441e220 100644 --- a/dashboard-frontend/src/pages/Config.tsx +++ b/dashboard-frontend/src/pages/Config.tsx @@ -4,7 +4,7 @@ import { Terminal, Cpu, Cloud, Radio, BookOpen, Layers, Activity, Thermometer, LayoutDashboard, Save, RotateCcw, RefreshCw, Plus, Trash2, ChevronDown, ChevronRight, AlertTriangle, - Check, X, Eye as EyeIcon, EyeOff, ExternalLink + Check, X, Eye as EyeIcon, EyeOff, ExternalLink, Bell, Send } from 'lucide-react' // Types for config sections @@ -197,6 +197,47 @@ interface DashboardConfig { host: string } +interface NotificationChannelConfig { + id: string + type: string + enabled: boolean + channel_index: number + node_ids: string[] + smtp_host: string + smtp_port: number + smtp_user: string + smtp_password: string + smtp_tls: boolean + from_address: string + recipients: string[] + url: string + headers: Record +} + +interface NotificationRuleConfig { + name: string + categories: string[] + min_severity: string + channel_ids: string[] + override_quiet: boolean +} + +interface NotificationsConfig { + enabled: boolean + quiet_hours_start: string + quiet_hours_end: string + dedup_seconds: number + channels: NotificationChannelConfig[] + rules: NotificationRuleConfig[] +} + +interface AlertCategory { + id: string + name: string + description: string + default_severity: string +} + interface FullConfig { bot: BotConfig connection: ConnectionConfig @@ -213,6 +254,7 @@ interface FullConfig { mesh_intelligence: MeshIntelligenceConfig environmental: EnvironmentalConfig dashboard: DashboardConfig + notifications: NotificationsConfig } type SectionKey = keyof FullConfig @@ -232,6 +274,7 @@ const SECTIONS: { key: SectionKey; label: string; icon: typeof Settings }[] = [ { key: 'mesh_sources', label: 'Mesh Sources', icon: Layers }, { key: 'mesh_intelligence', label: 'Intelligence', icon: Activity }, { key: 'environmental', label: 'Environmental', icon: Thermometer }, + { key: 'notifications', label: 'Notifications', icon: Bell }, { key: 'dashboard', label: 'Dashboard', icon: LayoutDashboard }, ] @@ -251,6 +294,7 @@ const SECTION_DESCRIPTIONS: Record = { 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.', + notifications: 'Alert delivery system. Configure where alerts get sent (mesh, email, webhooks) and which conditions trigger them.', dashboard: "Web dashboard settings. You're looking at it right now.", } @@ -2135,6 +2179,568 @@ function EnvironmentalSection({ data, onChange }: { data: EnvironmentalConfig; o ) } +// Notification Channel Card Component +function NotificationChannelCard({ + channel, + onChange, + onDelete, + onTest, +}: { + channel: NotificationChannelConfig + onChange: (c: NotificationChannelConfig) => void + onDelete: () => void + onTest: () => void +}) { + const [expanded, setExpanded] = useState(false) + const [testing, setTesting] = useState(false) + + const typeOptions = [ + { value: 'mesh_broadcast', label: 'Mesh Broadcast' }, + { value: 'mesh_dm', label: 'Mesh DM' }, + { value: 'email', label: 'Email' }, + { value: 'webhook', label: 'Webhook' }, + ] + + const typeDescriptions: Record = { + 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.', + } + + const handleTest = async () => { + setTesting(true) + await onTest() + setTesting(false) + } + + return ( +
+
setExpanded(!expanded)} + > +
+ {expanded ? : } +
+ {channel.id || 'New Channel'} + + {typeOptions.find(t => t.value === channel.type)?.label || channel.type} + +
+
+ + +
+
+ {expanded && ( +
+
+ onChange({ ...channel, id: v })} + 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')." + /> + onChange({ ...channel, type: v })} + options={typeOptions} + info={typeDescriptions[channel.type] || 'Select a channel type'} + /> +
+ onChange({ ...channel, enabled: v })} + helper="Disable to temporarily stop alerts on this channel" + /> + + {/* Mesh Broadcast fields */} + {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." + /> + )} + + {/* Mesh DM fields */} + {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." + /> + )} + + {/* Email fields */} + {channel.type === 'email' && ( + <> +
+ onChange({ ...channel, smtp_host: v })} + placeholder="smtp.gmail.com" + helper="SMTP server hostname" + info="The SMTP server for sending emails. Gmail: smtp.gmail.com, Outlook: smtp.office365.com" + /> + onChange({ ...channel, smtp_port: v })} + min={1} + max={65535} + helper="587 (TLS) or 465 (SSL)" + info="SMTP port. Use 587 for TLS (recommended) or 465 for SSL." + /> +
+
+ onChange({ ...channel, smtp_user: v })} + placeholder="you@gmail.com" + helper="Login username" + /> + onChange({ ...channel, smtp_password: v })} + type="password" + helper="App password recommended" + info="SMTP server for sending alert emails. Gmail users: use an App Password, not your regular password. Generate one at myaccount.google.com/apppasswords" + /> +
+ onChange({ ...channel, smtp_tls: v })} + helper="Encrypt SMTP connection" + info="Enable TLS encryption for the SMTP connection. Required for most modern email servers." + /> + onChange({ ...channel, from_address: v })} + 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." + /> + onChange({ ...channel, recipients: v })} + helper="Email addresses to receive alerts" + info="List of email addresses that will receive alerts from this channel." + /> + + )} + + {/* Webhook fields */} + {channel.type === 'webhook' && ( + <> + onChange({ ...channel, url: v })} + 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." + /> +
+ +
+ Custom headers can be configured in the YAML config file +
+
+ + )} +
+ )} +
+ ) +} + +// Notification Rule Card Component +function NotificationRuleCard({ + rule, + categories, + channels, + onChange, + onDelete, +}: { + rule: NotificationRuleConfig + categories: AlertCategory[] + channels: NotificationChannelConfig[] + onChange: (r: NotificationRuleConfig) => void + onDelete: () => void +}) { + const [expanded, setExpanded] = useState(false) + + const severityOptions = [ + { value: 'info', label: 'Info' }, + { value: 'advisory', label: 'Advisory' }, + { value: 'watch', label: 'Watch' }, + { value: 'warning', label: 'Warning' }, + { value: 'critical', label: 'Critical' }, + { value: 'emergency', label: 'Emergency' }, + ] + + const toggleCategory = (catId: string) => { + const current = rule.categories || [] + if (current.includes(catId)) { + onChange({ ...rule, categories: current.filter(c => c !== catId) }) + } else { + onChange({ ...rule, categories: [...current, catId] }) + } + } + + const toggleChannel = (channelId: string) => { + const current = rule.channel_ids || [] + if (current.includes(channelId)) { + onChange({ ...rule, channel_ids: current.filter(c => c !== channelId) }) + } else { + onChange({ ...rule, channel_ids: [...current, channelId] }) + } + } + + return ( +
+
setExpanded(!expanded)} + > +
+ {expanded ? : } + {rule.name || 'New Rule'} + + {rule.categories?.length || 0} categories → {rule.channel_ids?.length || 0} channels + +
+ +
+ {expanded && ( +
+ onChange({ ...rule, name: v })} + helper="Human-readable name for this rule" + info="A descriptive name to identify this rule. Example: 'Emergency Alerts', 'Fire Notifications', 'Infrastructure Warnings'" + /> + + onChange({ ...rule, min_severity: v })} + options={severityOptions} + 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." + /> + +
+ +
+ {rule.categories?.length === 0 ? 'All categories (none selected)' : `${rule.categories?.length} selected`} +
+
+ {categories.map((cat) => ( + + ))} +
+
+ +
+ + {channels.length === 0 ? ( +
+ No channels configured. Add channels above first. +
+ ) : ( +
+ {channels.map((ch) => ( + + ))} +
+ )} +
+ + onChange({ ...rule, override_quiet: v })} + 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." + /> +
+ )} +
+ ) +} + +// Main Notifications Section Component +function NotificationsSection({ data, onChange }: { data: NotificationsConfig; onChange: (d: NotificationsConfig) => void }) { + const [categories, setCategories] = useState([]) + const [testResult, setTestResult] = useState<{ success: boolean; message: string } | null>(null) + + // Fetch categories on mount + useEffect(() => { + fetch('/api/notifications/categories') + .then(res => res.json()) + .then(setCategories) + .catch(() => setCategories([])) + }, []) + + const addChannel = () => { + const newChannel: NotificationChannelConfig = { + id: '', + type: 'mesh_broadcast', + enabled: true, + channel_index: 0, + node_ids: [], + smtp_host: '', + smtp_port: 587, + smtp_user: '', + smtp_password: '', + smtp_tls: true, + from_address: '', + recipients: [], + url: '', + headers: {}, + } + onChange({ ...data, channels: [...(data.channels || []), newChannel] }) + } + + const addRule = () => { + const newRule: NotificationRuleConfig = { + name: '', + categories: [], + min_severity: 'warning', + channel_ids: [], + override_quiet: false, + } + onChange({ ...data, rules: [...(data.rules || []), newRule] }) + } + + const testChannel = async (channelId: string) => { + try { + const res = await fetch(`/api/notifications/channels/${channelId}/test`, { method: 'POST' }) + const result = await res.json() + setTestResult(result) + setTimeout(() => setTestResult(null), 5000) + } catch { + setTestResult({ success: false, message: 'Test failed' }) + setTimeout(() => setTestResult(null), 5000) + } + } + + return ( +
+ + + onChange({ ...data, enabled: v })} + 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." + /> + + {testResult && ( +
+ {testResult.success ? : } + {testResult.message} +
+ )} + + {data.enabled && ( + <> + {/* Channels Section */} +
+
+ +
+

+ Where alerts get delivered. Add channels for each destination you want to receive alerts. +

+ {(data.channels || []).map((channel, i) => ( + { + const newChannels = [...(data.channels || [])] + newChannels[i] = c + onChange({ ...data, channels: newChannels }) + }} + onDelete={() => { + if (confirm(`Delete channel "${channel.id || 'New Channel'}"?`)) { + onChange({ ...data, channels: (data.channels || []).filter((_, j) => j !== i) }) + } + }} + onTest={() => testChannel(channel.id)} + /> + ))} + +
+ + {/* Rules Section */} +
+
+ +
+

+ Rules connect alert categories to delivery channels. When a condition matches a rule, the alert is sent to all channels in that rule. +

+ {(data.rules || []).map((rule, i) => ( + { + const newRules = [...(data.rules || [])] + newRules[i] = r + onChange({ ...data, rules: newRules }) + }} + onDelete={() => { + if (confirm(`Delete rule "${rule.name || 'New Rule'}"?`)) { + onChange({ ...data, rules: (data.rules || []).filter((_, j) => j !== i) }) + } + }} + /> + ))} + +
+ + {/* Quiet Hours Section */} +
+ +

+ Suppress non-emergency alerts during sleeping hours. Emergency and critical alerts always get through. +

+
+ onChange({ ...data, quiet_hours_start: v })} + 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." + /> + onChange({ ...data, quiet_hours_end: v })} + 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." + /> +
+
+ + {/* Dedup Section */} +
+ + onChange({ ...data, dedup_seconds: v })} + 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)." + /> +
+ + )} +
+ ) +} + function DashboardSection({ data, onChange }: { data: DashboardConfig; onChange: (d: DashboardConfig) => void }) { return (
@@ -2299,6 +2905,7 @@ export default function Config() { case 'mesh_sources': return updateSection('mesh_sources', d)} /> case 'mesh_intelligence': return updateSection('mesh_intelligence', d)} /> case 'environmental': return updateSection('environmental', d)} /> + case 'notifications': return updateSection('notifications', d)} /> case 'dashboard': return updateSection('dashboard', d)} /> default: return null } diff --git a/meshai/dashboard/api/config_routes.py b/meshai/dashboard/api/config_routes.py index aed1877..eac651a 100644 --- a/meshai/dashboard/api/config_routes.py +++ b/meshai/dashboard/api/config_routes.py @@ -26,7 +26,9 @@ RESTART_REQUIRED_SECTIONS = { } # Valid config section names -VALID_SECTIONS = { +VALID_SECTIONS = { + "notifications", + "environmental", "bot", "connection", "response", diff --git a/meshai/dashboard/static/assets/index-Croiw0ta.js b/meshai/dashboard/static/assets/index-CdB1XMAe.js similarity index 51% rename from meshai/dashboard/static/assets/index-Croiw0ta.js rename to meshai/dashboard/static/assets/index-CdB1XMAe.js index be90443..f0cb4c3 100644 --- a/meshai/dashboard/static/assets/index-Croiw0ta.js +++ b/meshai/dashboard/static/assets/index-CdB1XMAe.js @@ -1,4 +1,4 @@ -function QW(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 JW=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var v5={exports:{}},d0={},p5={exports:{}},at={};/** +function JW(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 eU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mz={exports:{}},g0={},yz={exports:{}},ot={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function QW(t,e){for(var r=0;r>>1,K=V[X];if(0>>1;Xi(ue,H))vei(Ge,ue)?(V[X]=Ge,V[ve]=H,X=ve):(V[X]=ue,V[ie]=H,X=ie);else if(vei(Ge,H))V[X]=Ge,V[ve]=H,X=ve;else break e}}return W}function i(V,W){var H=V.sortIndex-W.sortIndex;return H!==0?H:V.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,f=null,h=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(V){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=V)n(u),W.sortIndex=W.expirationTime,e(l,W);else break;W=r(u)}}function b(V){if(g=!1,S(V),!p)if(r(l)!==null)p=!0,F(C);else{var W=r(u);W!==null&&U(b,W.startTime-V)}}function C(V,W){p=!1,g&&(g=!1,y(D),D=-1),d=!0;var H=h;try{for(S(W),f=r(l);f!==null&&(!(f.expirationTime>W)||V&&!I());){var X=f.callback;if(typeof X=="function"){f.callback=null,h=f.priorityLevel;var K=X(f.expirationTime<=W);W=t.unstable_now(),typeof K=="function"?f.callback=K:f===r(l)&&n(l),S(W)}else n(l);f=r(l)}if(f!==null)var ne=!0;else{var ie=r(u);ie!==null&&U(b,ie.startTime-W),ne=!1}return ne}finally{f=null,h=H,d=!1}}var M=!1,A=null,D=-1,E=5,k=-1;function I(){return!(t.unstable_now()-kV||125X?(V.sortIndex=H,e(u,V),r(l)===null&&V===r(u)&&(g?(y(D),D=-1):g=!0,U(b,H-X))):(V.sortIndex=K,e(l,V),p||d||(p=!0,F(C))),V},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(V){var W=h;return function(){var H=h;h=W;try{return V.apply(this,arguments)}finally{h=H}}}})(A5);M5.exports=A5;var wU=M5.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 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 T(j){if(g=!1,S(j),!p)if(r(l)!==null)p=!0,F(C);else{var W=r(u);W!==null&&U(T,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(T,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(T,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}}}})(kz);Pz.exports=kz;var wU=Pz.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function QW(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),JS=Object.prototype.hasOwnProperty,TU=/^[: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]*$/,lP={},uP={};function CU(t){return JS.call(uP,t)?!0:JS.call(lP,t)?!1:TU.test(t)?uP[t]=!0:(lP[t]=!0,!1)}function MU(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 AU(t,e,r,n){if(e===null||typeof e>"u"||MU(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 vC=/[\-:]([a-z])/g;function pC(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(vC,pC);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(vC,pC);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(vC,pC);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 gC(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"),nb=Object.prototype.hasOwnProperty,CU=/^[: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]*$/,hP={},fP={};function MU(t){return nb.call(fP,t)?!0:nb.call(hP,t)?!1:CU.test(t)?fP[t]=!0:(hP[t]=!0,!1)}function AU(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 LU(t,e,r,n){if(e===null||typeof e>"u"||AU(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 cn(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 Er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Er[t]=new cn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Er[e]=new cn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Er[t]=new cn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Er[t]=new cn(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){Er[t]=new cn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Er[t]=new cn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Er[t]=new cn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Er[t]=new cn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Er[t]=new cn(t,5,!1,t.toLowerCase(),null,!1,!1)});var yC=/[\-:]([a-z])/g;function _C(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(yC,_C);Er[e]=new cn(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(yC,_C);Er[e]=new cn(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(yC,_C);Er[e]=new cn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Er[t]=new cn(t,1,!1,t.toLowerCase(),null,!1,!1)});Er.xlinkHref=new cn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Er[t]=new cn(t,1,!1,t.toLowerCase(),null,!0,!0)});function xC(t,e,r,n){var i=Er.hasOwnProperty(e)?Er[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{Q_=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Rh(t):""}function LU(t){switch(t.tag){case 5:return Rh(t.type);case 16:return Rh("Lazy");case 13:return Rh("Suspense");case 19:return Rh("SuspenseList");case 0:case 2:case 15:return t=J_(t.type,!1),t;case 11:return t=J_(t.type.render,!1),t;case 1:return t=J_(t.type,!0),t;default:return""}}function nw(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 lc:return"Fragment";case sc:return"Portal";case ew:return"Profiler";case mC:return"StrictMode";case tw:return"Suspense";case rw:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case D5:return(t.displayName||"Context")+".Consumer";case P5:return(t._context.displayName||"Context")+".Provider";case yC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case _C:return e=t.displayName||null,e!==null?e:nw(t.type)||"Memo";case No:e=t._payload,t=t._init;try{return nw(t(e))}catch{}}return null}function PU(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 nw(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 ps(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function I5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function DU(t){var e=I5(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 _p(t){t._valueTracker||(t._valueTracker=DU(t))}function E5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=I5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Pm(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 iw(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function fP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ps(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 N5(t,e){e=e.checked,e!=null&&gC(t,"checked",e,!1)}function aw(t,e){N5(t,e);var r=ps(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")?ow(t,e.type,r):e.hasOwnProperty("defaultValue")&&ow(t,e.type,ps(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function hP(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 ow(t,e,r){(e!=="number"||Pm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Oh=Array.isArray;function Mc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=xp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Md(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Qh={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},kU=["Webkit","ms","Moz","O"];Object.keys(Qh).forEach(function(t){kU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Qh[e]=Qh[t]})});function B5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Qh.hasOwnProperty(t)&&Qh[t]?(""+e).trim():e+"px"}function V5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=B5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var IU=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 uw(t,e){if(e){if(IU[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 cw(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 fw=null;function xC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var hw=null,Ac=null,Lc=null;function pP(t){if(t=Av(t)){if(typeof hw!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=y0(e),hw(t.stateNode,t.type,e))}}function j5(t){Ac?Lc?Lc.push(t):Lc=[t]:Ac=t}function F5(){if(Ac){var t=Ac,e=Lc;if(Lc=Ac=null,pP(t),e)for(t=0;t>>=0,t===0?32:31-(HU(t)/WU|0)|0}var Sp=64,wp=4194304;function zh(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 Em(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=zh(s):(a&=o,a!==0&&(n=zh(a)))}else o=r&~i,o!==0?n=zh(o):a!==0&&(n=zh(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 Cv(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Li(e),t[e]=r}function YU(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=ed),TP=" ",CP=!1;function sB(t,e){switch(t){case"keyup":return w7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lB(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var uc=!1;function T7(t,e){switch(t){case"compositionend":return lB(e);case"keypress":return e.which!==32?null:(CP=!0,TP);case"textInput":return t=e.data,t===TP&&CP?null:t;default:return null}}function C7(t,e){if(uc)return t==="compositionend"||!LC&&sB(t,e)?(t=aB(),Jg=CC=jo=null,uc=!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=PP(r)}}function hB(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?hB(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function dB(){for(var t=window,e=Pm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Pm(t.document)}return e}function PC(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 N7(t){var e=dB(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&hB(r.ownerDocument.documentElement,r)){if(n!==null&&PC(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=DP(r,a);var o=DP(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,cc=null,yw=null,rd=null,_w=!1;function kP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;_w||cc==null||cc!==Pm(n)||(n=cc,"selectionStart"in n&&PC(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}),rd&&Id(rd,n)||(rd=n,n=Om(yw,"onSelect"),0dc||(t.current=Cw[dc],Cw[dc]=null,dc--)}function Mt(t,e){dc++,Cw[dc]=t.current,t.current=e}var gs={},Yr=Cs(gs),mn=Cs(!1),Gl=gs;function jc(t,e){var r=t.type.contextTypes;if(!r)return gs;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 Bm(){Lt(mn),Lt(Yr)}function BP(t,e,r){if(Yr.current!==gs)throw Error(ce(168));Mt(Yr,e),Mt(mn,r)}function wB(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,PU(t)||"Unknown",i));return zt({},r,n)}function Vm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||gs,Gl=Yr.current,Mt(Yr,t),Mt(mn,mn.current),!0}function VP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=wB(t,e,Gl),n.__reactInternalMemoizedMergedChildContext=t,Lt(mn),Lt(Yr),Mt(Yr,t)):Lt(mn),Mt(mn,r)}var Ga=null,_0=!1,dx=!1;function bB(t){Ga===null?Ga=[t]:Ga.push(t)}function Z7(t){_0=!0,bB(t)}function Ms(){if(!dx&&Ga!==null){dx=!0;var t=0,e=xt;try{var r=Ga;for(xt=1;t>=o,i-=o,Wa=1<<32-Li(e)+i|r<D?(E=A,A=null):E=A.sibling;var k=h(y,A,S[D],b);if(k===null){A===null&&(A=E);break}t&&A&&k.alternate===null&&e(y,A),_=a(k,_,D),M===null?C=k:M.sibling=k,M=k,A=E}if(D===S.length)return r(y,A),Pt&&cl(y,D),C;if(A===null){for(;DD?(E=A,A=null):E=A.sibling;var I=h(y,A,k.value,b);if(I===null){A===null&&(A=E);break}t&&A&&I.alternate===null&&e(y,A),_=a(I,_,D),M===null?C=I:M.sibling=I,M=I,A=E}if(k.done)return r(y,A),Pt&&cl(y,D),C;if(A===null){for(;!k.done;D++,k=S.next())k=f(y,k.value,b),k!==null&&(_=a(k,_,D),M===null?C=k:M.sibling=k,M=k);return Pt&&cl(y,D),C}for(A=n(y,A);!k.done;D++,k=S.next())k=d(A,y,D,k.value,b),k!==null&&(t&&k.alternate!==null&&A.delete(k.key===null?D:k.key),_=a(k,_,D),M===null?C=k:M.sibling=k,M=k);return t&&A.forEach(function(z){return e(y,z)}),Pt&&cl(y,D),C}function m(y,_,S,b){if(typeof S=="object"&&S!==null&&S.type===lc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case yp:e:{for(var C=S.key,M=_;M!==null;){if(M.key===C){if(C=S.type,C===lc){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===No&&GP(C)===M.type){r(y,M.sibling),_=i(M,S.props),_.ref=eh(y,M,S),_.return=y,y=_;break e}r(y,M);break}else e(y,M);M=M.sibling}S.type===lc?(_=El(S.props.children,y.mode,b,S.key),_.return=y,y=_):(b=sm(S.type,S.key,S.props,null,y.mode,b),b.ref=eh(y,_,S),b.return=y,y=b)}return o(y);case sc: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}_=Sx(S,y.mode,b),_.return=y,y=_}return o(y);case No:return M=S._init,m(y,_,M(S._payload),b)}if(Oh(S))return p(y,_,S,b);if(Xf(S))return g(y,_,S,b);Pp(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,_),_=xx(S,y.mode,b),_.return=y,y=_),o(y)):r(y,_)}return m}var Gc=AB(!0),LB=AB(!1),Gm=Cs(null),Hm=null,gc=null,EC=null;function NC(){EC=gc=Hm=null}function RC(t){var e=Gm.current;Lt(Gm),t._currentValue=e}function Lw(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 Dc(t,e){Hm=t,EC=gc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(gn=!0),t.firstContext=null)}function oi(t){var e=t._currentValue;if(EC!==t)if(t={context:t,memoizedValue:e,next:null},gc===null){if(Hm===null)throw Error(ce(308));gc=t,Hm.dependencies={lanes:0,firstContext:t}}else gc=gc.next=t;return e}var bl=null;function OC(t){bl===null?bl=[t]:bl.push(t)}function PB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,OC(e)):(r.next=i.next,i.next=r),e.interleaved=r,oo(t,n)}function oo(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 Ro=!1;function zC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function DB(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 Ka(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ts(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,oo(t,r)}return i=n.interleaved,i===null?(e.next=e,OC(n)):(e.next=i.next,i.next=e),n.interleaved=e,oo(t,r)}function tm(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,wC(t,r)}}function HP(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 Wm(t,e,r,n){var i=t.updateQueue;Ro=!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 f=i.baseState;o=0,c=u=l=null,s=a;do{var h=s.lane,d=s.eventTime;if((n&h)===h){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(h=e,d=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(d,f,h);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,h=typeof p=="function"?p.call(d,f,h):p,h==null)break e;f=zt({},f,h);break e;case 2:Ro=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else d={eventTime:d,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(l=f),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);Ul|=o,t.lanes=o,t.memoizedState=f}}function WP(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=px.transition;px.transition={};try{t(!1),e()}finally{xt=r,px.transition=n}}function $B(){return si().memoizedState}function q7(t,e,r){var n=ns(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},YB(t))XB(e,r);else if(r=PB(t,e,r,n),r!==null){var i=tn();Pi(r,t,n,i),qB(r,e,n)}}function K7(t,e,r){var n=ns(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(YB(t))XB(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,Ni(s,o)){var l=e.interleaved;l===null?(i.next=i,OC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=PB(t,e,i,n),r!==null&&(i=tn(),Pi(r,t,n,i),qB(r,e,n))}}function YB(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function XB(t,e){nd=Zm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function qB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,wC(t,r)}}var $m={readContext:oi,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},Q7={readContext:oi,useCallback:function(t,e){return ra().memoizedState=[t,e===void 0?null:e],t},useContext:oi,useEffect:ZP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,nm(4194308,4,GB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return nm(4194308,4,t,e)},useInsertionEffect:function(t,e){return nm(4,2,t,e)},useMemo:function(t,e){var r=ra();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ra();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=q7.bind(null,Nt,t),[n.memoizedState,t]},useRef:function(t){var e=ra();return t={current:t},e.memoizedState=t},useState:UP,useDebugValue:UC,useDeferredValue:function(t){return ra().memoizedState=t},useTransition:function(){var t=UP(!1),e=t[0];return t=X7.bind(null,t[1]),ra().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Nt,i=ra();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),br===null)throw Error(ce(349));Wl&30||NB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,ZP(OB.bind(null,n,a,t),[t]),n.flags|=2048,jd(9,RB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=ra(),e=br.identifierPrefix;if(Pt){var r=Ua,n=Wa;r=(n&~(1<<32-Li(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bd++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{rx=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Rf(t):""}function PU(t){switch(t.tag){case 5:return Rf(t.type);case 16:return Rf("Lazy");case 13:return Rf("Suspense");case 19:return Rf("SuspenseList");case 0:case 2:case 15:return t=nx(t.type,!1),t;case 11:return t=nx(t.type.render,!1),t;case 1:return t=nx(t.type,!0),t;default:return""}}function sb(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 lc:return"Fragment";case sc:return"Portal";case ib:return"Profiler";case SC:return"StrictMode";case ab:return"Suspense";case ob:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Ez:return(t.displayName||"Context")+".Consumer";case Iz:return(t._context.displayName||"Context")+".Provider";case bC:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case wC:return e=t.displayName||null,e!==null?e:sb(t.type)||"Memo";case Ro:e=t._payload,t=t._init;try{return sb(t(e))}catch{}}return null}function kU(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 sb(e);case 8:return e===SC?"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 ps(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Rz(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function DU(t){var e=Rz(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 bp(t){t._valueTracker||(t._valueTracker=DU(t))}function Oz(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Rz(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Im(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 lb(t,e){var r=e.checked;return zt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function vP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ps(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 zz(t,e){e=e.checked,e!=null&&xC(t,"checked",e,!1)}function ub(t,e){zz(t,e);var r=ps(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")?cb(t,e.type,r):e.hasOwnProperty("defaultValue")&&cb(t,e.type,ps(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function pP(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 cb(t,e,r){(e!=="number"||Im(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Of=Array.isArray;function Mc(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=wp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Md(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Qf={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},IU=["Webkit","ms","Moz","O"];Object.keys(Qf).forEach(function(t){IU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Qf[e]=Qf[t]})});function Fz(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Qf.hasOwnProperty(t)&&Qf[t]?(""+e).trim():e+"px"}function Gz(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Fz(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var EU=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 db(t,e){if(e){if(EU[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 vb(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 pb=null;function TC(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gb=null,Ac=null,Lc=null;function yP(t){if(t=Lv(t)){if(typeof gb!="function")throw Error(ce(280));var e=t.stateNode;e&&(e=S0(e),gb(t.stateNode,t.type,e))}}function Hz(t){Ac?Lc?Lc.push(t):Lc=[t]:Ac=t}function Wz(){if(Ac){var t=Ac,e=Lc;if(Lc=Ac=null,yP(t),e)for(t=0;t>>=0,t===0?32:31-(WU(t)/UU|0)|0}var Tp=64,Cp=4194304;function zf(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 Om(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=zf(s):(a&=o,a!==0&&(n=zf(a)))}else o=r&~i,o!==0?n=zf(o):a!==0&&(n=zf(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 Mv(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ki(e),t[e]=r}function XU(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=ed),AP=" ",LP=!1;function cB(t,e){switch(t){case"keyup":return w7.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hB(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var uc=!1;function C7(t,e){switch(t){case"compositionend":return hB(e);case"keypress":return e.which!==32?null:(LP=!0,AP);case"textInput":return t=e.data,t===AP&&LP?null:t;default:return null}}function M7(t,e){if(uc)return t==="compositionend"||!IC&&cB(t,e)?(t=lB(),rm=PC=Fo=null,uc=!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=IP(r)}}function pB(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?pB(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gB(){for(var t=window,e=Im();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Im(t.document)}return e}function EC(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 R7(t){var e=gB(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&pB(r.ownerDocument.documentElement,r)){if(n!==null&&EC(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=EP(r,a);var o=EP(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,cc=null,bb=null,rd=null,wb=!1;function NP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;wb||cc==null||cc!==Im(n)||(n=cc,"selectionStart"in n&&EC(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}),rd&&Id(rd,n)||(rd=n,n=jm(bb,"onSelect"),0dc||(t.current=Pb[dc],Pb[dc]=null,dc--)}function Mt(t,e){dc++,Pb[dc]=t.current,t.current=e}var gs={},Xr=Cs(gs),yn=Cs(!1),Gl=gs;function Vc(t,e){var r=t.type.contextTypes;if(!r)return gs;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 _n(t){return t=t.childContextTypes,t!=null}function Fm(){Lt(yn),Lt(Xr)}function FP(t,e,r){if(Xr.current!==gs)throw Error(ce(168));Mt(Xr,e),Mt(yn,r)}function CB(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,kU(t)||"Unknown",i));return zt({},r,n)}function Gm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||gs,Gl=Xr.current,Mt(Xr,t),Mt(yn,yn.current),!0}function GP(t,e,r){var n=t.stateNode;if(!n)throw Error(ce(169));r?(t=CB(t,e,Gl),n.__reactInternalMemoizedMergedChildContext=t,Lt(yn),Lt(Xr),Mt(Xr,t)):Lt(yn),Mt(yn,r)}var Ha=null,b0=!1,mx=!1;function MB(t){Ha===null?Ha=[t]:Ha.push(t)}function $7(t){b0=!0,MB(t)}function Ms(){if(!mx&&Ha!==null){mx=!0;var t=0,e=xt;try{var r=Ha;for(xt=1;t>=o,i-=o,Ua=1<<32-ki(e)+i|r<k?(E=A,A=null):E=A.sibling;var D=f(y,A,S[k],T);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&&cl(y,k),C;if(A===null){for(;kk?(E=A,A=null):E=A.sibling;var I=f(y,A,D.value,T);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&&cl(y,k),C;if(A===null){for(;!D.done;k++,D=S.next())D=h(y,D.value,T),D!==null&&(_=a(D,_,k),M===null?C=D:M.sibling=D,M=D);return Pt&&cl(y,k),C}for(A=n(y,A);!D.done;k++,D=S.next())D=d(A,y,k,D.value,T),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&&cl(y,k),C}function m(y,_,S,T){if(typeof S=="object"&&S!==null&&S.type===lc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Sp:e:{for(var C=S.key,M=_;M!==null;){if(M.key===C){if(C=S.type,C===lc){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===Ro&&UP(C)===M.type){r(y,M.sibling),_=i(M,S.props),_.ref=Jh(y,M,S),_.return=y,y=_;break e}r(y,M);break}else e(y,M);M=M.sibling}S.type===lc?(_=El(S.props.children,y.mode,T,S.key),_.return=y,y=_):(T=cm(S.type,S.key,S.props,null,y.mode,T),T.ref=Jh(y,_,S),T.return=y,y=T)}return o(y);case sc: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}_=Mx(S,y.mode,T),_.return=y,y=_}return o(y);case Ro:return M=S._init,m(y,_,M(S._payload),T)}if(Of(S))return p(y,_,S,T);if(Yh(S))return g(y,_,S,T);Ip(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,_),_=Cx(S,y.mode,T),_.return=y,y=_),o(y)):r(y,_)}return m}var Gc=kB(!0),DB=kB(!1),Um=Cs(null),Zm=null,gc=null,zC=null;function BC(){zC=gc=Zm=null}function jC(t){var e=Um.current;Lt(Um),t._currentValue=e}function Ib(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 kc(t,e){Zm=t,zC=gc=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(mn=!0),t.firstContext=null)}function li(t){var e=t._currentValue;if(zC!==t)if(t={context:t,memoizedValue:e,next:null},gc===null){if(Zm===null)throw Error(ce(308));gc=t,Zm.dependencies={lanes:0,firstContext:t}}else gc=gc.next=t;return e}var wl=null;function VC(t){wl===null?wl=[t]:wl.push(t)}function IB(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,VC(e)):(r.next=i.next,i.next=r),e.interleaved=r,so(t,n)}function so(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 Oo=!1;function FC(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function EB(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 Qa(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ts(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ft&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,so(t,r)}return i=n.interleaved,i===null?(e.next=e,VC(n)):(e.next=i.next,i.next=e),n.interleaved=e,so(t,r)}function im(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,MC(t,r)}}function ZP(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 $m(t,e,r,n){var i=t.updateQueue;Oo=!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:Oo=!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);Ul|=o,t.lanes=o,t.memoizedState=h}}function $P(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=_x.transition;_x.transition={};try{t(!1),e()}finally{xt=r,_x.transition=n}}function qB(){return ui().memoizedState}function K7(t,e,r){var n=ns(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},KB(t))QB(e,r);else if(r=IB(t,e,r,n),r!==null){var i=an();Di(r,t,n,i),JB(r,e,n)}}function Q7(t,e,r){var n=ns(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(KB(t))QB(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,Oi(s,o)){var l=e.interleaved;l===null?(i.next=i,VC(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=IB(t,e,i,n),r!==null&&(i=an(),Di(r,t,n,i),JB(r,e,n))}}function KB(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function QB(t,e){nd=Xm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function JB(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,MC(t,r)}}var qm={readContext:li,useCallback:jr,useContext:jr,useEffect:jr,useImperativeHandle:jr,useInsertionEffect:jr,useLayoutEffect:jr,useMemo:jr,useReducer:jr,useRef:jr,useState:jr,useDebugValue:jr,useDeferredValue:jr,useTransition:jr,useMutableSource:jr,useSyncExternalStore:jr,useId:jr,unstable_isNewReconciler:!1},J7={readContext:li,useCallback:function(t,e){return ia().memoizedState=[t,e===void 0?null:e],t},useContext:li,useEffect:XP,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,om(4194308,4,UB.bind(null,e,t),r)},useLayoutEffect:function(t,e){return om(4194308,4,t,e)},useInsertionEffect:function(t,e){return om(4,2,t,e)},useMemo:function(t,e){var r=ia();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ia();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=K7.bind(null,Nt,t),[n.memoizedState,t]},useRef:function(t){var e=ia();return t={current:t},e.memoizedState=t},useState:YP,useDebugValue:XC,useDeferredValue:function(t){return ia().memoizedState=t},useTransition:function(){var t=YP(!1),e=t[0];return t=q7.bind(null,t[1]),ia().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Nt,i=ia();if(Pt){if(r===void 0)throw Error(ce(407));r=r()}else{if(r=e(),wr===null)throw Error(ce(349));Wl&30||zB(n,e,r)}i.memoizedState=r;var a={value:r,getSnapshot:e};return i.queue=a,XP(jB.bind(null,n,a,t),[t]),n.flags|=2048,Vd(9,BB.bind(null,n,a,r,e),void 0,null),r},useId:function(){var t=ia(),e=wr.identifierPrefix;if(Pt){var r=Za,n=Ua;r=(n&~(1<<32-ki(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bd++,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[ia]=e,t[Rd]=n,o3(t,e,!1,!1),e.stateNode=t;e:{switch(o=cw(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;iUc&&(e.flags|=128,n=!0,th(a,!1),e.lanes=4194304)}else{if(!n)if(t=Um(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),th(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>Uc&&r!==1073741824&&(e.flags|=128,n=!0,th(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):(Vr(e),null);case 22:case 23:return KC(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?bn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function o9(t,e){switch(kC(e),e.tag){case 1:return yn(e.type)&&Bm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hc(),Lt(mn),Lt(Yr),jC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return VC(e),null;case 13:if(Lt(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Fc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Et),null;case 4:return Hc(),null;case 10:return RC(e.type._context),null;case 22:case 23:return KC(),null;case 24:return null;default:return null}}var kp=!1,Wr=!1,s9=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function mc(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){jt(t,e,n)}else r.current=null}function zw(t,e,r){try{r()}catch(n){jt(t,e,n)}}var nD=!1;function l9(t,e){if(xw=Nm,t=dB(),PC(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,f=t,h=null;t:for(;;){for(var d;f!==r||i!==0&&f.nodeType!==3||(s=o+i),f!==a||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)h=f,f=d;for(;;){if(f===t)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(d=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=d}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Sw={focusedElem:t,selectionRange:r},Nm=!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(b){jt(e,e.return,b)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=nD,nD=!1,p}function id(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&&zw(e,r,a)}i=i.next}while(i!==n)}}function w0(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 Bw(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 u3(t){var e=t.alternate;e!==null&&(t.alternate=null,u3(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ia],delete e[Rd],delete e[Tw],delete e[W7],delete e[U7])),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 c3(t){return t.tag===5||t.tag===3||t.tag===4}function iD(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||c3(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 Vw(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=zm));else if(n!==4&&(t=t.child,t!==null))for(Vw(t,e,r),t=t.sibling;t!==null;)Vw(t,e,r),t=t.sibling}function jw(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(jw(t,e,r),t=t.sibling;t!==null;)jw(t,e,r),t=t.sibling}var Ar=null,Ti=!1;function bo(t,e,r){for(r=r.child;r!==null;)f3(t,e,r),r=r.sibling}function f3(t,e,r){if(va&&typeof va.onCommitFiberUnmount=="function")try{va.onCommitFiberUnmount(v0,r)}catch{}switch(r.tag){case 5:Wr||mc(r,e);case 6:var n=Ar,i=Ti;Ar=null,bo(t,e,r),Ar=n,Ti=i,Ar!==null&&(Ti?(t=Ar,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Ar.removeChild(r.stateNode));break;case 18:Ar!==null&&(Ti?(t=Ar,r=r.stateNode,t.nodeType===8?hx(t.parentNode,r):t.nodeType===1&&hx(t,r),Dd(t)):hx(Ar,r.stateNode));break;case 4:n=Ar,i=Ti,Ar=r.stateNode.containerInfo,Ti=!0,bo(t,e,r),Ar=n,Ti=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)&&zw(r,e,o),i=i.next}while(i!==n)}bo(t,e,r);break;case 1:if(!Wr&&(mc(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){jt(r,e,s)}bo(t,e,r);break;case 21:bo(t,e,r);break;case 22:r.mode&1?(Wr=(n=Wr)||r.memoizedState!==null,bo(t,e,r),Wr=n):bo(t,e,r);break;default:bo(t,e,r)}}function aD(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new s9),e.forEach(function(n){var i=m9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function mi(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*c9(n/1960))-n,10t?16:t,Fo===null)var n=!1;else{if(t=Fo,Fo=null,qm=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()-XC?Il(t,0):YC|=r),_n(t,e)}function _3(t,e){e===0&&(t.mode&1?(e=wp,wp<<=1,!(wp&130023424)&&(wp=4194304)):e=1);var r=tn();t=oo(t,e),t!==null&&(Cv(t,e,r),_n(t,r))}function g9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),_3(t,r)}function m9(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),_3(t,r)}var x3;x3=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,i9(t,e,r);gn=!!(t.flags&131072)}else gn=!1,Pt&&e.flags&1048576&&TB(e,Fm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;im(t,e),t=e.pendingProps;var i=jc(e,Yr.current);Dc(e,r),i=GC(null,e,n,t,i,r);var a=HC();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,Vm(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,zC(e),i.updater=S0,e.stateNode=i,i._reactInternals=e,Dw(e,n,t,r),e=Ew(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&DC(e),Kr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(im(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=_9(n),t=wi(n,t),i){case 0:e=Iw(null,e,n,t,r);break e;case 1:e=eD(null,e,n,t,r);break e;case 11:e=QP(null,e,n,t,r);break e;case 14:e=JP(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),Iw(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),eD(t,e,n,i,r);case 3:e:{if(n3(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,DB(t,e),Wm(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=Wc(Error(ce(423)),e),e=tD(t,e,n,r,i);break e}else if(n!==i){i=Wc(Error(ce(424)),e),e=tD(t,e,n,r,i);break e}else for(Ln=es(e.stateNode.containerInfo.firstChild),En=e,Pt=!0,Ci=null,r=LB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Fc(),n===i){e=so(t,e,r);break e}Kr(t,e,n,r)}e=e.child}return e;case 5:return kB(e),t===null&&Aw(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,ww(n,i)?o=null:a!==null&&ww(n,a)&&(e.flags|=32),r3(t,e),Kr(t,e,o,r),e.child;case 6:return t===null&&Aw(e),null;case 13:return i3(t,e,r);case 4:return BC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Gc(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),QP(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(Gm,n._currentValue),n._currentValue=o,a!==null)if(Ni(a.value,o)){if(a.children===i.children&&!mn.current){e=so(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=Ka(-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),Lw(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),Lw(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,Dc(e,r),i=oi(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),JP(t,e,n,i,r);case 15:return e3(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:wi(n,i),im(t,e),e.tag=1,yn(n)?(t=!0,Vm(e)):t=!1,Dc(e,r),KB(e,n,i),Dw(e,n,i,r),Ew(null,e,n,!0,t,r);case 19:return a3(t,e,r);case 22:return t3(t,e,r)}throw Error(ce(156,e.tag))};function S3(t,e){return Y5(t,e)}function y9(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 y9(t,e,r,n)}function JC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function _9(t){if(typeof t=="function")return JC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===yC)return 11;if(t===_C)return 14}return 2}function is(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 sm(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")JC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case lc:return El(r.children,i,a,e);case mC:o=8,i|=8;break;case ew:return t=ri(12,r,e,i|2),t.elementType=ew,t.lanes=a,t;case tw:return t=ri(13,r,e,i),t.elementType=tw,t.lanes=a,t;case rw:return t=ri(19,r,e,i),t.elementType=rw,t.lanes=a,t;case k5:return T0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case P5:o=10;break e;case D5:o=9;break e;case yC:o=11;break e;case _C:o=14;break e;case No: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 El(t,e,r,n){return t=ri(7,t,n,e),t.lanes=r,t}function T0(t,e,r,n){return t=ri(22,t,n,e),t.elementType=k5,t.lanes=r,t.stateNode={isHidden:!1},t}function xx(t,e,r){return t=ri(6,t,null,e),t.lanes=r,t}function Sx(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 x9(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=tx(0),this.expirationTimes=tx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function e2(t,e,r,n,i,a,o,s,l){return t=new x9(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 S9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C3)}catch(t){console.error(t)}}C3(),C5.exports=On;var M3=C5.exports,dD=M3;QS.createRoot=dD.createRoot,QS.hydrateRoot=dD.hydrateRoot;/** +`+a.stack}return{value:t,source:e,stack:i,digest:null}}function bx(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Rb(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var r9=typeof WeakMap=="function"?WeakMap:Map;function t3(t,e,r){r=Qa(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Qm||(Qm=!0,Ub=n),Rb(t,e)},r}function r3(t,e,r){r=Qa(-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(){Rb(t,e)}}var a=t.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Rb(t,e),typeof n!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function QP(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new r9;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=g9.bind(null,t,e,r),e.then(t,t))}function JP(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 ek(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=Qa(-1,1),e.tag=2,ts(r,e,1))),r.lanes|=1),t)}var n9=yo.ReactCurrentOwner,mn=!1;function en(t,e,r,n){e.child=t===null?DB(e,null,r,n):Gc(e,t.child,r,n)}function tk(t,e,r,n,i){r=r.render;var a=e.ref;return kc(e,i),n=ZC(t,e,r,n,a,i),r=$C(),t!==null&&!mn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,lo(t,e,i)):(Pt&&r&&NC(e),e.flags|=1,en(t,e,n,i),e.child)}function rk(t,e,r,n,i){if(t===null){var a=r.type;return typeof a=="function"&&!n2(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=a,n3(t,e,a,n,i)):(t=cm(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:Id,r(o,n)&&t.ref===e.ref)return lo(t,e,i)}return e.flags|=1,t=is(a,n),t.ref=e.ref,t.return=e,e.child=t}function n3(t,e,r,n,i){if(t!==null){var a=t.memoizedProps;if(Id(a,n)&&t.ref===e.ref)if(mn=!1,e.pendingProps=n=a,(t.lanes&i)!==0)t.flags&131072&&(mn=!0);else return e.lanes=t.lanes,lo(t,e,i)}return Ob(t,e,r,n,i)}function i3(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(yc,Tn),Tn|=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(yc,Tn),Tn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Mt(yc,Tn),Tn|=n}else a!==null?(n=a.baseLanes|r,e.memoizedState=null):n=r,Mt(yc,Tn),Tn|=n;return en(t,e,i,r),e.child}function a3(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Ob(t,e,r,n,i){var a=_n(r)?Gl:Xr.current;return a=Vc(e,a),kc(e,i),r=ZC(t,e,r,n,a,i),n=$C(),t!==null&&!mn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,lo(t,e,i)):(Pt&&n&&NC(e),e.flags|=1,en(t,e,r,i),e.child)}function nk(t,e,r,n,i){if(_n(r)){var a=!0;Gm(e)}else a=!1;if(kc(e,i),e.stateNode===null)sm(t,e),e3(e,r,n),Nb(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=li(u):(u=_n(r)?Gl:Xr.current,u=Vc(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)&&KP(e,o,n,u),Oo=!1;var f=e.memoizedState;o.state=f,$m(e,n,o,i),l=e.memoizedState,s!==n||f!==l||yn.current||Oo?(typeof c=="function"&&(Eb(e,r,c,n),l=e.memoizedState),(s=Oo||qP(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,EB(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:Ti(e.type,s),o.props=u,h=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=li(l):(l=_n(r)?Gl:Xr.current,l=Vc(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)&&KP(e,o,n,l),Oo=!1,f=e.memoizedState,o.state=f,$m(e,n,o,i);var p=e.memoizedState;s!==h||f!==p||yn.current||Oo?(typeof d=="function"&&(Eb(e,r,d,n),p=e.memoizedState),(u=Oo||qP(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 zb(t,e,r,n,a,i)}function zb(t,e,r,n,i,a){a3(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&GP(e,r,!1),lo(t,e,a);n=e.stateNode,n9.current=e;var s=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Gc(e,t.child,null,a),e.child=Gc(e,null,s,a)):en(t,e,s,a),e.memoizedState=n.state,i&&GP(e,r,!0),e.child}function o3(t){var e=t.stateNode;e.pendingContext?FP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&FP(t,e.context,!1),GC(t,e.containerInfo)}function ik(t,e,r,n,i){return Fc(),OC(i),e.flags|=256,en(t,e,r,n),e.child}var Bb={dehydrated:null,treeContext:null,retryLane:0};function jb(t){return{baseLanes:t,cachePool:null,transitions:null}}function s3(t,e,r){var n=e.pendingProps,i=Et.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(Et,i&1),t===null)return Db(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=A0(o,n,0,null),t=El(t,n,r,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=jb(r),e.memoizedState=Bb,t):qC(e,o));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return i9(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=is(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=is(s,a):(a=El(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?jb(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=t.childLanes&~r,e.memoizedState=Bb,n}return a=t.child,t=a.sibling,n=is(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 qC(t,e){return e=A0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ep(t,e,r,n){return n!==null&&OC(n),Gc(e,t.child,null,r),t=qC(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function i9(t,e,r,n,i,a,o){if(r)return e.flags&256?(e.flags&=-257,n=bx(Error(ce(422))),Ep(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(a=n.fallback,i=e.mode,n=A0({mode:"visible",children:n.children},i,0,null),a=El(a,i,o,null),a.flags|=2,n.return=e,a.return=e,n.sibling=a,e.child=n,e.mode&1&&Gc(e,t.child,null,o),e.child.memoizedState=jb(o),e.memoizedState=Bb,a);if(!(e.mode&1))return Ep(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=bx(a,n,void 0),Ep(t,e,o,n)}if(s=(o&t.childLanes)!==0,mn||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,so(t,i),Di(n,t,i,-1))}return r2(),n=bx(Error(ce(421))),Ep(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=m9.bind(null,t),i._reactRetry=e,null):(t=a.treeContext,Pn=es(i.nextSibling),Nn=e,Pt=!0,Ai=null,t!==null&&(Qn[Jn++]=Ua,Qn[Jn++]=Za,Qn[Jn++]=Hl,Ua=t.id,Za=t.overflow,Hl=e),e=qC(e,n.children),e.flags|=4096,e)}function ak(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ib(t.return,e,r)}function Tx(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 l3(t,e,r){var n=e.pendingProps,i=n.revealOrder,a=n.tail;if(en(t,e,n.children,r),n=Et.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&&ak(t,r,e);else if(t.tag===19)ak(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(Et,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&&Ym(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Tx(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&&Ym(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Tx(e,!0,r,null,a);break;case"together":Tx(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function sm(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function lo(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Ul|=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=is(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=is(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function a9(t,e,r){switch(e.tag){case 3:o3(e),Fc();break;case 5:NB(e);break;case 1:_n(e.type)&&Gm(e);break;case 4:GC(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Mt(Um,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Mt(Et,Et.current&1),e.flags|=128,null):r&e.child.childLanes?s3(t,e,r):(Mt(Et,Et.current&1),t=lo(t,e,r),t!==null?t.sibling:null);Mt(Et,Et.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return l3(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mt(Et,Et.current),n)break;return null;case 22:case 23:return e.lanes=0,i3(t,e,r)}return lo(t,e,r)}var u3,Vb,c3,h3;u3=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}};Vb=function(){};c3=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Tl(ma.current);var a=null;switch(r){case"input":i=lb(t,i),n=lb(t,n),a=[];break;case"select":i=zt({},i,{value:void 0}),n=zt({},n,{value:void 0}),a=[];break;case"textarea":i=hb(t,i),n=hb(t,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Vm)}db(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"&&(Cd.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"&&(Cd.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)}};h3=function(t,e,r,n){r!==n&&(e.flags|=4)};function ef(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 Vr(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 o9(t,e,r){var n=e.pendingProps;switch(RC(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(e),null;case 1:return _n(e.type)&&Fm(),Vr(e),null;case 3:return n=e.stateNode,Hc(),Lt(yn),Lt(Xr),WC(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Dp(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ai!==null&&(Yb(Ai),Ai=null))),Vb(t,e),Vr(e),null;case 5:HC(e);var i=Tl(zd.current);if(r=e.type,t!==null&&e.stateNode!=null)c3(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 Vr(e),null}if(t=Tl(ma.current),Dp(e)){n=e.stateNode,r=e.type;var a=e.memoizedProps;switch(n[oa]=e,n[Rd]=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[oa]=e,t[Rd]=n,u3(t,e,!1,!1),e.stateNode=t;e:{switch(o=vb(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;iUc&&(e.flags|=128,n=!0,ef(a,!1),e.lanes=4194304)}else{if(!n)if(t=Ym(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),ef(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Pt)return Vr(e),null}else 2*Yt()-a.renderingStartTime>Uc&&r!==1073741824&&(e.flags|=128,n=!0,ef(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):(Vr(e),null);case 22:case 23:return t2(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Tn&1073741824&&(Vr(e),e.subtreeFlags&6&&(e.flags|=8192)):Vr(e),null;case 24:return null;case 25:return null}throw Error(ce(156,e.tag))}function s9(t,e){switch(RC(e),e.tag){case 1:return _n(e.type)&&Fm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hc(),Lt(yn),Lt(Xr),WC(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return HC(e),null;case 13:if(Lt(Et),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ce(340));Fc()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Et),null;case 4:return Hc(),null;case 10:return jC(e.type._context),null;case 22:case 23:return t2(),null;case 24:return null;default:return null}}var Np=!1,Ur=!1,l9=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function mc(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 Fb(t,e,r){try{r()}catch(n){Vt(t,e,n)}}var ok=!1;function u9(t,e){if(Tb=zm,t=gB(),EC(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(Cb={focusedElem:t,selectionRange:r},zm=!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:Ti(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(T){Vt(e,e.return,T)}if(t=e.sibling,t!==null){t.return=e.return,Pe=t;break}Pe=e.return}return p=ok,ok=!1,p}function id(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&&Fb(e,r,a)}i=i.next}while(i!==n)}}function C0(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 Gb(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 f3(t){var e=t.alternate;e!==null&&(t.alternate=null,f3(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[oa],delete e[Rd],delete e[Lb],delete e[U7],delete e[Z7])),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 d3(t){return t.tag===5||t.tag===3||t.tag===4}function sk(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||d3(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 Hb(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=Vm));else if(n!==4&&(t=t.child,t!==null))for(Hb(t,e,r),t=t.sibling;t!==null;)Hb(t,e,r),t=t.sibling}function Wb(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(Wb(t,e,r),t=t.sibling;t!==null;)Wb(t,e,r),t=t.sibling}var Ar=null,Mi=!1;function To(t,e,r){for(r=r.child;r!==null;)v3(t,e,r),r=r.sibling}function v3(t,e,r){if(ga&&typeof ga.onCommitFiberUnmount=="function")try{ga.onCommitFiberUnmount(m0,r)}catch{}switch(r.tag){case 5:Ur||mc(r,e);case 6:var n=Ar,i=Mi;Ar=null,To(t,e,r),Ar=n,Mi=i,Ar!==null&&(Mi?(t=Ar,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Ar.removeChild(r.stateNode));break;case 18:Ar!==null&&(Mi?(t=Ar,r=r.stateNode,t.nodeType===8?gx(t.parentNode,r):t.nodeType===1&&gx(t,r),kd(t)):gx(Ar,r.stateNode));break;case 4:n=Ar,i=Mi,Ar=r.stateNode.containerInfo,Mi=!0,To(t,e,r),Ar=n,Mi=i;break;case 0:case 11:case 14:case 15:if(!Ur&&(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)&&Fb(r,e,o),i=i.next}while(i!==n)}To(t,e,r);break;case 1:if(!Ur&&(mc(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)}To(t,e,r);break;case 21:To(t,e,r);break;case 22:r.mode&1?(Ur=(n=Ur)||r.memoizedState!==null,To(t,e,r),Ur=n):To(t,e,r);break;default:To(t,e,r)}}function lk(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new l9),e.forEach(function(n){var i=y9.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function _i(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*h9(n/1960))-n,10t?16:t,Go===null)var n=!1;else{if(t=Go,Go=null,Jm=0,ft&6)throw Error(ce(331));var i=ft;for(ft|=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()-JC?Il(t,0):QC|=r),xn(t,e)}function b3(t,e){e===0&&(t.mode&1?(e=Cp,Cp<<=1,!(Cp&130023424)&&(Cp=4194304)):e=1);var r=an();t=so(t,e),t!==null&&(Mv(t,e,r),xn(t,r))}function m9(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),b3(t,r)}function y9(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),b3(t,r)}var w3;w3=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||yn.current)mn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return mn=!1,a9(t,e,r);mn=!!(t.flags&131072)}else mn=!1,Pt&&e.flags&1048576&&AB(e,Wm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;sm(t,e),t=e.pendingProps;var i=Vc(e,Xr.current);kc(e,r),i=ZC(null,e,n,t,i,r);var a=$C();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,_n(n)?(a=!0,Gm(e)):a=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,FC(e),i.updater=T0,e.stateNode=i,i._reactInternals=e,Nb(e,n,t,r),e=zb(null,e,n,!0,a,r)):(e.tag=0,Pt&&a&&NC(e),en(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(sm(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=x9(n),t=Ti(n,t),i){case 0:e=Ob(null,e,n,t,r);break e;case 1:e=nk(null,e,n,t,r);break e;case 11:e=tk(null,e,n,t,r);break e;case 14:e=rk(null,e,n,Ti(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:Ti(n,i),Ob(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),nk(t,e,n,i,r);case 3:e:{if(o3(e),t===null)throw Error(ce(387));n=e.pendingProps,a=e.memoizedState,i=a.element,EB(t,e),$m(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=Wc(Error(ce(423)),e),e=ik(t,e,n,r,i);break e}else if(n!==i){i=Wc(Error(ce(424)),e),e=ik(t,e,n,r,i);break e}else for(Pn=es(e.stateNode.containerInfo.firstChild),Nn=e,Pt=!0,Ai=null,r=DB(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Fc(),n===i){e=lo(t,e,r);break e}en(t,e,n,r)}e=e.child}return e;case 5:return NB(e),t===null&&Db(e),n=e.type,i=e.pendingProps,a=t!==null?t.memoizedProps:null,o=i.children,Mb(n,i)?o=null:a!==null&&Mb(n,a)&&(e.flags|=32),a3(t,e),en(t,e,o,r),e.child;case 6:return t===null&&Db(e),null;case 13:return s3(t,e,r);case 4:return GC(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Gc(e,null,n,r):en(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),tk(t,e,n,i,r);case 7:return en(t,e,e.pendingProps,r),e.child;case 8:return en(t,e,e.pendingProps.children,r),e.child;case 12:return en(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(Um,n._currentValue),n._currentValue=o,a!==null)if(Oi(a.value,o)){if(a.children===i.children&&!yn.current){e=lo(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=Qa(-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),Ib(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),Ib(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}en(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,kc(e,r),i=li(i),n=n(i),e.flags|=1,en(t,e,n,r),e.child;case 14:return n=e.type,i=Ti(n,e.pendingProps),i=Ti(n.type,i),rk(t,e,n,i,r);case 15:return n3(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Ti(n,i),sm(t,e),e.tag=1,_n(n)?(t=!0,Gm(e)):t=!1,kc(e,r),e3(e,n,i),Nb(e,n,i,r),zb(null,e,n,!0,t,r);case 19:return l3(t,e,r);case 22:return i3(t,e,r)}throw Error(ce(156,e.tag))};function T3(t,e){return Kz(t,e)}function _9(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 ni(t,e,r,n){return new _9(t,e,r,n)}function n2(t){return t=t.prototype,!(!t||!t.isReactComponent)}function x9(t){if(typeof t=="function")return n2(t)?1:0;if(t!=null){if(t=t.$$typeof,t===bC)return 11;if(t===wC)return 14}return 2}function is(t,e){var r=t.alternate;return r===null?(r=ni(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 cm(t,e,r,n,i,a){var o=2;if(n=t,typeof t=="function")n2(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case lc:return El(r.children,i,a,e);case SC:o=8,i|=8;break;case ib:return t=ni(12,r,e,i|2),t.elementType=ib,t.lanes=a,t;case ab:return t=ni(13,r,e,i),t.elementType=ab,t.lanes=a,t;case ob:return t=ni(19,r,e,i),t.elementType=ob,t.lanes=a,t;case Nz:return A0(r,i,a,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Iz:o=10;break e;case Ez:o=9;break e;case bC:o=11;break e;case wC:o=14;break e;case Ro:o=16,n=null;break e}throw Error(ce(130,t==null?t:typeof t,""))}return e=ni(o,r,e,i),e.elementType=t,e.type=n,e.lanes=a,e}function El(t,e,r,n){return t=ni(7,t,n,e),t.lanes=r,t}function A0(t,e,r,n){return t=ni(22,t,n,e),t.elementType=Nz,t.lanes=r,t.stateNode={isHidden:!1},t}function Cx(t,e,r){return t=ni(6,t,null,e),t.lanes=r,t}function Mx(t,e,r){return e=ni(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function S9(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=ax(0),this.expirationTimes=ax(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ax(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function i2(t,e,r,n,i,a,o,s,l){return t=new S9(t,e,r,s,l),e===1?(e=1,a===!0&&(e|=8)):e=0,a=ni(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},FC(a),t}function b9(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(L3)}catch(t){console.error(t)}}L3(),Lz.exports=zn;var P3=Lz.exports,gk=P3;rb.createRoot=gk.createRoot,rb.hydrateRoot=gk.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 Gd(){return Gd=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function i2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function A9(){return Math.random().toString(36).substr(2,8)}function pD(t,e){return{usr:t.state,key:t.key,idx:e}}function Uw(t,e,r,n){return r===void 0&&(r=null),Gd({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?vf(e):e,{state:r,key:e&&e.key||n||A9()})}function Jm(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 vf(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 L9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Go.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Gd({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=Go.Pop;let m=c(),y=m==null?null:m-u;u=m,l&&l({action:s,location:g.location,delta:y})}function h(m,y){s=Go.Push;let _=Uw(g.location,m,y);u=c()+1;let S=pD(_,u),b=g.createHref(_);try{o.pushState(S,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(b)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=Go.Replace;let _=Uw(g.location,m,y);u=c();let S=pD(_,u),b=g.createHref(_);o.replaceState(S,"",b),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:Jm(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(vD,f),l=m,()=>{i.removeEventListener(vD,f),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:h,replace:d,go(m){return o.go(m)}};return g}var gD;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(gD||(gD={}));function P9(t,e,r){return r===void 0&&(r="/"),D9(t,e,r)}function D9(t,e,r,n){let i=typeof e=="string"?vf(e):e,a=a2(i.pathname||"/",r);if(a==null)return null;let o=A3(t);k9(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=as([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+'".')),A3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:B9(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 L3(a.path))i(a,o,l)}),e}function L3(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=L3(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 k9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:V9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const I9=/^:[\w-]+$/,E9=3,N9=2,R9=1,O9=10,z9=-2,mD=t=>t==="*";function B9(t,e){let r=t.split("/"),n=r.length;return r.some(mD)&&(n+=z9),e&&(n+=N9),r.filter(i=>!mD(i)).reduce((i,a)=>i+(I9.test(a)?E9:a===""?R9:O9),n)}function V9(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 j9(t,e,r){let{routesMeta:n}=t,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:d}=c;if(h==="*"){let g=s[f]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return d&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:t}}function G9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),i2(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 H9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return i2(!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 a2(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 W9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U9=t=>W9.test(t);function Z9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?vf(t):t,a;if(r)if(U9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),i2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=yD(r.substring(1),"/"):a=yD(r,e)}else a=e;return{pathname:a,search:X9(n),hash:q9(i)}}function yD(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 bx(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 $9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function P3(t,e){let r=$9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function D3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=vf(t):(i=Gd({},t),nr(!i.pathname||!i.pathname.includes("?"),bx("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),bx("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),bx("#","search","hash",i)));let a=t===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=e.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?e[f]:"/"}let l=Z9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const as=t=>t.join("/").replace(/\/\/+/g,"/"),Y9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),X9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,q9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function K9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const k3=["post","put","patch","delete"];new Set(k3);const Q9=["get",...k3];new Set(Q9);/** + */function Gd(){return Gd=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function l2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function L9(){return Math.random().toString(36).substr(2,8)}function yk(t,e){return{usr:t.state,key:t.key,idx:e}}function Xb(t,e,r,n){return r===void 0&&(r=null),Gd({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?dh(e):e,{state:r,key:e&&e.key||n||L9()})}function ry(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 dh(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 P9(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Ho.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Gd({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){s=Ho.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=Ho.Push;let _=Xb(g.location,m,y);u=c()+1;let S=yk(_,u),T=g.createHref(_);try{o.pushState(S,"",T)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(T)}a&&l&&l({action:s,location:g.location,delta:1})}function d(m,y){s=Ho.Replace;let _=Xb(g.location,m,y);u=c();let S=yk(_,u),T=g.createHref(_);o.replaceState(S,"",T),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:ry(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(mk,h),l=m,()=>{i.removeEventListener(mk,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 _k;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(_k||(_k={}));function k9(t,e,r){return r===void 0&&(r="/"),D9(t,e,r)}function D9(t,e,r,n){let i=typeof e=="string"?dh(e):e,a=u2(i.pathname||"/",r);if(a==null)return null;let o=k3(t);I9(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=as([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+'".')),k3(a.children,e,c,u)),!(a.path==null&&!a.index)&&e.push({path:u,score:j9(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 D3(a.path))i(a,o,l)}),e}function D3(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=D3(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 I9(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:V9(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const E9=/^:[\w-]+$/,N9=3,R9=2,O9=1,z9=10,B9=-2,xk=t=>t==="*";function j9(t,e){let r=t.split("/"),n=r.length;return r.some(xk)&&(n+=B9),e&&(n+=R9),r.filter(i=>!xk(i)).reduce((i,a)=>i+(E9.test(a)?N9:a===""?O9:z9),n)}function V9(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 F9(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 H9(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),l2(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 W9(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return l2(!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 u2(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 U9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z9=t=>U9.test(t);function $9(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?dh(t):t,a;if(r)if(Z9(r))a=r;else{if(r.includes("//")){let o=r;r=r.replace(/\/\/+/g,"/"),l2(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+r))}r.startsWith("/")?a=Sk(r.substring(1),"/"):a=Sk(r,e)}else a=e;return{pathname:a,search:q9(n),hash:K9(i)}}function Sk(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 Ax(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 Y9(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function I3(t,e){let r=Y9(t);return e?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function E3(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=dh(t):(i=Gd({},t),nr(!i.pathname||!i.pathname.includes("?"),Ax("?","pathname","search",i)),nr(!i.pathname||!i.pathname.includes("#"),Ax("#","pathname","hash",i)),nr(!i.search||!i.search.includes("#"),Ax("#","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=$9(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const as=t=>t.join("/").replace(/\/\/+/g,"/"),X9=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),q9=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,K9=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Q9(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const N3=["post","put","patch","delete"];new Set(N3);const J9=["get",...N3];new Set(J9);/** * 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 Hd(){return Hd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),Y.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=D3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:as([e,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[e,n,o,a,t])}function R3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=Y.useContext(ou),{matches:i}=Y.useContext(su),{pathname:a}=Dv(),o=JSON.stringify(P3(i,n.v7_relativeSplatPath));return Y.useMemo(()=>D3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function rZ(t,e){return nZ(t,e)}function nZ(t,e,r,n){Pv()||nr(!1);let{navigator:i}=Y.useContext(ou),{matches:a}=Y.useContext(su),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Dv(),c;if(e){var f;let m=typeof e=="string"?vf(e):e;l==="/"||(f=m.pathname)!=null&&f.startsWith(l)||nr(!1),c=m}else c=u;let h=c.pathname||"/",d=h;if(l!=="/"){let m=l.replace(/^\//,"").split("/");d="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let p=P9(t,{pathname:d}),g=lZ(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:as([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:as([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?Y.createElement(P0.Provider,{value:{location:Hd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Go.Pop}},g):g}function iZ(){let t=hZ(),e=K9(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 Y.createElement(Y.Fragment,null,Y.createElement("h2",null,"Unexpected Application Error!"),Y.createElement("h3",{style:{fontStyle:"italic"}},e),r?Y.createElement("pre",{style:i},r):null,null)}const aZ=Y.createElement(iZ,null);class oZ extends Y.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?Y.createElement(su.Provider,{value:this.props.routeContext},Y.createElement(I3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function sZ(t){let{routeContext:e,match:r,children:n}=t,i=Y.useContext(o2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),Y.createElement(su.Provider,{value:e},n)}function lZ(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(f=>f.route.id&&(s==null?void 0:s[f.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,f,h)=>{let d,p=!1,g=null,m=null;r&&(d=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||aZ,l&&(u<0&&h===0?(vZ("route-fallback"),p=!0,m=null):u===h&&(p=!0,m=f.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,h+1)),_=()=>{let S;return d?S=g:p?S=m:f.route.Component?S=Y.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,Y.createElement(sZ,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?Y.createElement(oZ,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var O3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(O3||{}),z3=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}(z3||{});function uZ(t){let e=Y.useContext(o2);return e||nr(!1),e}function cZ(t){let e=Y.useContext(J9);return e||nr(!1),e}function fZ(t){let e=Y.useContext(su);return e||nr(!1),e}function B3(t){let e=fZ(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function hZ(){var t;let e=Y.useContext(I3),r=cZ(),n=B3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function dZ(){let{router:t}=uZ(O3.UseNavigateStable),e=B3(z3.UseNavigateStable),r=Y.useRef(!1);return E3(()=>{r.current=!0}),Y.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Hd({fromRouteId:e},a)))},[t,e])}const _D={};function vZ(t,e,r){_D[t]||(_D[t]=!0)}function pZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function rc(t){nr(!1)}function gZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Go.Pop,navigator:a,static:o=!1,future:s}=t;Pv()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=Y.useMemo(()=>({basename:l,navigator:a,static:o,future:Hd({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=vf(n));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:p="default"}=n,g=Y.useMemo(()=>{let m=a2(c,l);return m==null?null:{location:{pathname:m,search:f,hash:h,state:d,key:p},navigationType:i}},[l,c,f,h,d,p,i]);return g==null?null:Y.createElement(ou.Provider,{value:u},Y.createElement(P0.Provider,{children:r,value:g}))}function mZ(t){let{children:e,location:r}=t;return rZ(Zw(e),r)}new Promise(()=>{});function Zw(t,e){e===void 0&&(e=[]);let r=[];return Y.Children.forEach(t,(n,i)=>{if(!Y.isValidElement(n))return;let a=[...e,i];if(n.type===Y.Fragment){r.push.apply(r,Zw(n.props.children,a));return}n.type!==rc&&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=Zw(n.props.children,a)),r.push(o)}),r}/** + */function Hd(){return Hd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{s.current=!0}),$.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let h=E3(u,JSON.parse(o),a,c.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:as([e,h.pathname])),(c.replace?n.replace:n.push)(h,c.state,c)},[e,n,o,a,t])}function B3(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=$.useContext(ou),{matches:i}=$.useContext(su),{pathname:a}=Dv(),o=JSON.stringify(I3(i,n.v7_relativeSplatPath));return $.useMemo(()=>E3(t,JSON.parse(o),a,r==="path"),[t,o,a,r])}function nZ(t,e){return iZ(t,e)}function iZ(t,e,r,n){kv()||nr(!1);let{navigator:i}=$.useContext(ou),{matches:a}=$.useContext(su),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Dv(),c;if(e){var h;let m=typeof e=="string"?dh(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=k9(t,{pathname:d}),g=uZ(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:as([l,i.encodeLocation?i.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:as([l,i.encodeLocation?i.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),a,r,n);return e&&g?$.createElement(I0.Provider,{value:{location:Hd({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Ho.Pop}},g):g}function aZ(){let t=dZ(),e=Q9(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 $.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},e),r?$.createElement("pre",{style:i},r):null,null)}const oZ=$.createElement(aZ,null);class sZ extends $.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?$.createElement(su.Provider,{value:this.props.routeContext},$.createElement(R3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lZ(t){let{routeContext:e,match:r,children:n}=t,i=$.useContext(c2);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),$.createElement(su.Provider,{value:e},n)}function uZ(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||oZ,l&&(u<0&&f===0?(pZ("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=$.createElement(h.route.Component,null):h.route.element?S=h.route.element:S=c,$.createElement(lZ,{match:h,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:S})};return r&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?$.createElement(sZ,{location:r.location,revalidation:r.revalidation,component:g,error:d,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):_()},null)}var j3=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(j3||{}),V3=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}(V3||{});function cZ(t){let e=$.useContext(c2);return e||nr(!1),e}function hZ(t){let e=$.useContext(eZ);return e||nr(!1),e}function fZ(t){let e=$.useContext(su);return e||nr(!1),e}function F3(t){let e=fZ(),r=e.matches[e.matches.length-1];return r.route.id||nr(!1),r.route.id}function dZ(){var t;let e=$.useContext(R3),r=hZ(),n=F3();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function vZ(){let{router:t}=cZ(j3.UseNavigateStable),e=F3(V3.UseNavigateStable),r=$.useRef(!1);return O3(()=>{r.current=!0}),$.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Hd({fromRouteId:e},a)))},[t,e])}const bk={};function pZ(t,e,r){bk[t]||(bk[t]=!0)}function gZ(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function rc(t){nr(!1)}function mZ(t){let{basename:e="/",children:r=null,location:n,navigationType:i=Ho.Pop,navigator:a,static:o=!1,future:s}=t;kv()&&nr(!1);let l=e.replace(/^\/*/,"/"),u=$.useMemo(()=>({basename:l,navigator:a,static:o,future:Hd({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=dh(n));let{pathname:c="/",search:h="",hash:f="",state:d=null,key:p="default"}=n,g=$.useMemo(()=>{let m=u2(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:$.createElement(ou.Provider,{value:u},$.createElement(I0.Provider,{children:r,value:g}))}function yZ(t){let{children:e,location:r}=t;return nZ(qb(e),r)}new Promise(()=>{});function qb(t,e){e===void 0&&(e=[]);let r=[];return $.Children.forEach(t,(n,i)=>{if(!$.isValidElement(n))return;let a=[...e,i];if(n.type===$.Fragment){r.push.apply(r,qb(n.props.children,a));return}n.type!==rc&&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=qb(n.props.children,a)),r.push(o)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -64,12 +64,12 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function $w(){return $w=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function _Z(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function xZ(t,e){return t.button===0&&(!e||e==="_self")&&!_Z(t)}const SZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wZ="6";try{window.__reactRouterVersion=wZ}catch{}const bZ="startTransition",xD=pU[bZ];function TZ(t){let{basename:e,children:r,future:n,window:i}=t,a=Y.useRef();a.current==null&&(a.current=M9({window:i,v5Compat:!0}));let o=a.current,[s,l]=Y.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=Y.useCallback(f=>{u&&xD?xD(()=>l(f)):l(f)},[l,u]);return Y.useLayoutEffect(()=>o.listen(c),[o,c]),Y.useEffect(()=>pZ(n),[n]),Y.createElement(gZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const CZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,AZ=Y.forwardRef(function(e,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=e,h=yZ(e,SZ),{basename:d}=Y.useContext(ou),p,g=!1;if(typeof u=="string"&&MZ.test(u)&&(p=u,CZ))try{let S=new URL(window.location.href),b=u.startsWith("//")?new URL(S.protocol+u):new URL(u),C=a2(b.pathname,d);b.origin===S.origin&&C!=null?u=C+b.search+b.hash:g=!0}catch{}let m=eZ(u,{relative:i}),y=LZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function _(S){n&&n(S),S.defaultPrevented||y(S)}return Y.createElement("a",$w({},h,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var SD;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(SD||(SD={}));var wD;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(wD||(wD={}));function LZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=N3(),u=Dv(),c=R3(t,{relative:o});return Y.useCallback(f=>{if(xZ(f,r)){f.preventDefault();let h=n!==void 0?n:Jm(u)===Jm(c);l(t,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,t,a,o,s])}/** + */function Kb(){return Kb=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function xZ(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function SZ(t,e){return t.button===0&&(!e||e==="_self")&&!xZ(t)}const bZ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wZ="6";try{window.__reactRouterVersion=wZ}catch{}const TZ="startTransition",wk=gU[TZ];function CZ(t){let{basename:e,children:r,future:n,window:i}=t,a=$.useRef();a.current==null&&(a.current=A9({window:i,v5Compat:!0}));let o=a.current,[s,l]=$.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=$.useCallback(h=>{u&&wk?wk(()=>l(h)):l(h)},[l,u]);return $.useLayoutEffect(()=>o.listen(c),[o,c]),$.useEffect(()=>gZ(n),[n]),$.createElement(mZ,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const MZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AZ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,LZ=$.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=_Z(e,bZ),{basename:d}=$.useContext(ou),p,g=!1;if(typeof u=="string"&&AZ.test(u)&&(p=u,MZ))try{let S=new URL(window.location.href),T=u.startsWith("//")?new URL(S.protocol+u):new URL(u),C=u2(T.pathname,d);T.origin===S.origin&&C!=null?u=C+T.search+T.hash:g=!0}catch{}let m=tZ(u,{relative:i}),y=PZ(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:h});function _(S){n&&n(S),S.defaultPrevented||y(S)}return $.createElement("a",Kb({},f,{href:p||m,onClick:g||a?n:_,ref:r,target:l}))});var Tk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Tk||(Tk={}));var Ck;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Ck||(Ck={}));function PZ(t,e){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=e===void 0?{}:e,l=z3(),u=Dv(),c=B3(t,{relative:o});return $.useCallback(h=>{if(SZ(h,r)){h.preventDefault();let f=n!==void 0?n:ry(u)===ry(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 PZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),V3=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/** + */const kZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G3=(...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. @@ -79,267 +79,272 @@ 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 kZ=Y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>Y.createElement("svg",{ref:l,...DZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:V3("lucide",i),...s},[...o.map(([u,c])=>Y.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + */const IZ=$.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>$.createElement("svg",{ref:l,...DZ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:G3("lucide",i),...s},[...o.map(([u,c])=>$.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 Ve=(t,e)=>{const r=Y.forwardRef(({className:n,...i},a)=>Y.createElement(kZ,{ref:a,iconNode:e,className:V3(`lucide-${PZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/** + */const je=(t,e)=>{const r=$.forwardRef(({className:n,...i},a)=>$.createElement(IZ,{ref:a,iconNode:e,className:G3(`lucide-${kZ(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 s2=Ve("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 h2=je("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 Tx=Ve("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 Lx=je("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 ey=Ve("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 Wd=je("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 IZ=Ve("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 EZ=je("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 EZ=Ve("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 NZ=je("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 NZ=Ve("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 RZ=je("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 RZ=Ve("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 OZ=je("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 OZ=Ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const H3=je("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 l2=Ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const Iv=je("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 zZ=Ve("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const zZ=je("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 u2=Ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const Ev=je("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 BZ=Ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const BZ=je("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 D0=Ve("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 E0=je("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. * See the LICENSE file in the root directory of this source tree. - */const sd=Ve("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** + */const sd=je("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @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 ty=Ve("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + */const ny=je("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 Wd=Ve("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 Ud=je("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. * See the LICENSE file in the root directory of this source tree. - */const j3=Ve("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + */const W3=je("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @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=Ve("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 jZ=je("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 jZ=Ve("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 VZ=je("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. * See the LICENSE file in the root directory of this source tree. - */const Ud=Ve("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const Zd=je("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @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 FZ=Ve("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** + */const FZ=je("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** * @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 F3=Ve("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 U3=je("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 c2=Ve("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** + */const f2=je("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 GZ=Ve("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 GZ=je("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 ry=Ve("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 iy=je("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 HZ=Ve("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 HZ=je("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. * See the LICENSE file in the root directory of this source tree. - */const G3=Ve("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + */const Z3=je("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @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 H3=Ve("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + */const $3=je("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** * @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=Ve("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 WZ=je("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 UZ=Ve("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 UZ=je("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 ZZ=Ve("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** + */const ZZ=je("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 $Z=Ve("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 $Z=je("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 W3=Ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const ay=je("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. * See the LICENSE file in the root directory of this source tree. - */const Zc=Ve("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** + */const Zc=je("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** * @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=Ve("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + */const YZ=je("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @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=Ve("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + */const XZ=je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @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=Ve("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 qZ=je("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. * See the LICENSE file in the root directory of this source tree. - */const KZ=Ve("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** + */const KZ=je("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** * @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=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const QZ=je("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. * See the LICENSE file in the root directory of this source tree. - */const U3=Ve("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 JZ=je("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** * @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 bD=Ve("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 Y3=je("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 JZ=Ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** + */const Mk=je("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. * See the LICENSE file in the root directory of this source tree. - */const e$=Ve("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** + */const e$=je("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/** * @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 Z3=Ve("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 t$=je("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** * @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 ms=Ve("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 N0=je("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 t$=Ve("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + */const ms=je("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. * See the LICENSE file in the root directory of this source tree. - */const r$=Ve("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + */const r$=je("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @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 $3=Ve("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 n$=je("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** * @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 TD=Ve("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/** + */const X3=je("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. * See the LICENSE file in the root directory of this source tree. - */const Y3=Ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** + */const Ak=je("Wind",[["path",{d:"M17.7 7.7a2.5 2.5 0 1 1 1.8 4.3H2",key:"1k4u03"}],["path",{d:"M9.6 4.6A2 2 0 1 1 11 8H2",key:"b7d0fd"}],["path",{d:"M12.6 19.4A2 2 0 1 0 14 16H2",key:"1p5cb3"}]]);/** * @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 f2=Ve("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 CD(){return or("/api/status")}async function n$(){return or("/api/health")}async function i$(){return or("/api/nodes")}async function a$(){return or("/api/edges")}async function o$(){return or("/api/sources")}async function X3(){return or("/api/alerts/active")}async function MD(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 s$(){return or("/api/subscriptions")}async function q3(){return or("/api/env/status")}async function l$(){return or("/api/env/active")}async function u$(){return or("/api/env/propagation")}async function c$(){return or("/api/env/swpc")}async function f$(){return or("/api/env/ducting")}async function h$(){return or("/api/env/fires")}async function d$(){return or("/api/env/avalanche")}async function v$(){return or("/api/env/streams")}async function p$(){return or("/api/env/traffic")}async function g$(){return or("/api/env/roads")}async function m$(){return or("/api/env/hotspots")}async function y$(){return or("/api/regions")}function h2(){const[t,e]=Y.useState(!1),[r,n]=Y.useState(null),[i,a]=Y.useState(null),o=Y.useRef(null),s=Y.useRef(null),l=Y.useRef(1e3),u=Y.useCallback(()=>{var h;if(((h=o.current)==null?void 0:h.readyState)===WebSocket.OPEN)return;const f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/live`;try{const d=new WebSocket(f);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 Y.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const K3=Y.createContext(null);function _$(){const t=Y.useContext(K3);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}function x$(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:D0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:ry,iconColor:"text-blue-500"}}}function S$({toast:t,onDismiss:e,onNavigate:r}){const n=x$(t.alert.severity),i=n.icon;return Y.useEffect(()=>{const a=setTimeout(e,8e3);return()=>clearTimeout(a)},[e]),T.jsx("div",{className:`${n.bg} border ${n.border} rounded-lg shadow-lg overflow-hidden animate-slide-in cursor-pointer`,onClick:r,role:"alert",children:T.jsxs("div",{className:"flex items-start gap-3 p-4",children:[T.jsx("div",{className:`w-1 self-stretch -ml-4 -my-4 ${n.border.replace("border","bg")}`}),T.jsx(i,{size:18,className:n.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0 pr-2",children:[T.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())}),T.jsx("div",{className:"text-sm text-slate-300 line-clamp-2",children:t.alert.message})]}),T.jsx("button",{onClick:a=>{a.stopPropagation(),e()},className:"text-slate-400 hover:text-slate-200 transition-colors",children:T.jsx(Y3,{size:16})})]})})}function w$({children:t}){const[e,r]=Y.useState([]),n=N3(),i=Y.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=Y.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=Y.useCallback(()=>{n("/alerts")},[n]);return T.jsxs(K3.Provider,{value:{addToast:i},children:[t,T.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=>T.jsx("div",{className:"pointer-events-auto",children:T.jsx(S$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const Q3=[{path:"/",label:"Dashboard",icon:G3},{path:"/mesh",label:"Mesh",icon:Zc},{path:"/environment",label:"Environment",icon:Wd},{path:"/config",label:"Config",icon:U3},{path:"/alerts",label:"Alerts",icon:ey}];function b$(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 T$(t){const e=Q3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function C$({children:t}){var h;const e=Dv(),{connected:r,lastAlert:n}=h2(),{addToast:i}=_$(),[a,o]=Y.useState(null),[s,l]=Y.useState(null);Y.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=Y.useState(new Date);Y.useEffect(()=>{CD().then(o).catch(console.error);const d=setInterval(()=>{CD().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),Y.useEffect(()=>{const d=setInterval(()=>c(new Date),1e3);return()=>clearInterval(d)},[]);const f=u.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return T.jsxs("div",{className:"flex h-screen overflow-hidden bg-bg text-slate-200",children:[T.jsxs("aside",{className:"w-[220px] flex-shrink-0 bg-bg-card border-r border-border flex flex-col overflow-y-auto",children:[T.jsx("div",{className:"p-5 border-b border-border",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.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"}),T.jsxs("div",{children:[T.jsx("div",{className:"font-semibold text-lg",children:"MeshAI"}),T.jsxs("div",{className:"text-xs text-slate-500 font-mono",children:["v",(a==null?void 0:a.version)||"..."]})]})]})}),T.jsx("nav",{className:"flex-1 py-4",children:Q3.map(d=>{const p=e.pathname===d.path,g=d.icon;return T.jsxs(AZ,{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&&T.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500"}),T.jsx(g,{size:18}),d.label]},d.path)})}),T.jsxs("div",{className:"p-5 border-t border-border",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${a!=null&&a.connected?"bg-green-500":"bg-red-500"}`}),T.jsx("span",{className:"text-xs text-slate-400",children:a!=null&&a.connected?"Connected":"Disconnected"})]}),T.jsxs("div",{className:"text-xs text-slate-500 font-mono truncate",children:[(h=a==null?void 0:a.connection_type)==null?void 0:h.toUpperCase(),": ",a==null?void 0:a.connection_target]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:["Uptime: ",a?b$(a.uptime_seconds):"..."]})]})]}),T.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[T.jsxs("header",{className:"h-14 flex-shrink-0 border-b border-border bg-bg-card flex items-center justify-between px-6",children:[T.jsx("h1",{className:"text-lg font-semibold",children:T$(e.pathname)}),T.jsxs("div",{className:"flex items-center gap-6",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${r?"bg-green-500 animate-pulse-slow":"bg-slate-500"}`}),T.jsx("span",{className:"text-xs text-slate-400",children:r?"Live":"Offline"})]}),T.jsxs("div",{className:"text-sm font-mono text-slate-400",children:[f," MT"]})]})]}),T.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:t})]})]})}function M$({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 T.jsx("div",{className:"flex flex-col items-center",children:T.jsxs("svg",{width:"140",height:"140",viewBox:"0 0 100 100",children:[T.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"#1e2a3a",strokeWidth:"8"}),T.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"}),T.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)}),T.jsx("text",{x:"50",y:"62",textAnchor:"middle",className:"fill-slate-400 text-xs",style:{fontSize:"10px"},children:r})]})})}function Np({label:t,value:e}){const r=n=>n>=80?"bg-green-500":n>=60?"bg-amber-500":"bg-red-500";return T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-24 text-xs text-slate-400 truncate",children:t}),T.jsx("div",{className:"flex-1 h-2 bg-border rounded-full overflow-hidden",children:T.jsx("div",{className:`h-full ${r(e)} transition-all duration-300`,style:{width:`${e}%`}})}),T.jsx("div",{className:"w-12 text-right text-xs font-mono text-slate-300",children:e.toFixed(1)})]})}function A$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:D0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:ry,iconColor:"text-green-500"}}})(t.severity),n=r.icon;return T.jsxs("div",{className:`p-3 rounded-lg ${r.bg} border-l-2 ${r.border} flex items-start gap-3`,children:[T.jsx(n,{size:16,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200",children:t.message}),T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:t.timestamp||"Just now"})]})]})}function L$({source:t}){const e=()=>t.is_loaded?t.last_error?"bg-amber-500":"bg-green-500":"bg-red-500";return T.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-bg-hover",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200 truncate",children:t.name}),T.jsxs("div",{className:"text-xs text-slate-500",children:[t.node_count," nodes * ",t.type]})]})]})}function Rp({icon:t,label:e,value:r,subvalue:n}){return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-4",children:[T.jsxs("div",{className:"flex items-center gap-2 text-slate-400 mb-2",children:[T.jsx(t,{size:14}),T.jsx("span",{className:"text-xs",children:e})]}),T.jsx("div",{className:"font-mono text-xl text-slate-100",children:r}),n&&T.jsx("div",{className:"text-xs text-slate-500 mt-1",children:n})]})}function P$({propagation:t}){var o,s,l;if(!t)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"RF Propagation"}),T.jsx("div",{className:"text-slate-500",children:T.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 T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(f2,{size:14}),"RF Propagation"]}),T.jsxs("div",{className:"mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar/Geomagnetic"}),i?T.jsxs("div",{className:"space-y-1",children:[T.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))||"?"]}),T.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&&T.jsxs("div",{className:"text-xs text-amber-500",children:["R",e.r_scale," Radio Blackout"]})]}):T.jsx("div",{className:"text-sm text-slate-500",children:"No data"})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Tropospheric"}),a?T.jsxs("div",{className:"space-y-1",children:[T.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())}),T.jsxs("div",{className:"text-xs text-slate-400 font-mono",children:["dM/dz: ",r.min_gradient??"?"," M-units/km"]}),r.duct_thickness_m&&T.jsxs("div",{className:"text-xs text-slate-400",children:["Duct: ~",r.duct_thickness_m,"m thick"]})]}):T.jsx("div",{className:"text-sm text-slate-500",children:"No ducting data"})]})]})}function D$(){var g,m,y,_,S;const[t,e]=Y.useState(null),[r,n]=Y.useState([]),[i,a]=Y.useState([]),[o,s]=Y.useState(null),[l,u]=Y.useState(null),[c,f]=Y.useState(!0),[h,d]=Y.useState(null),{lastHealth:p}=h2();return Y.useEffect(()=>{Promise.all([n$(),o$(),X3(),q3(),u$().catch(()=>null)]).then(([b,C,M,A,D])=>{e(b),n(C),a(M),s(A),u(D),f(!1),document.title="Dashboard — MeshAI"}).catch(b=>{d(b.message),f(!1),document.title="Dashboard — MeshAI"})},[]),Y.useEffect(()=>{p&&e(p)},[p]),c?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading..."})}):h?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Mesh Health"}),t&&T.jsxs(T.Fragment,{children:[T.jsx(M$,{health:t}),T.jsxs("div",{className:"mt-6 space-y-3",children:[T.jsx(Np,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),T.jsx(Np,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),T.jsx(Np,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),T.jsx(Np,{label:"Power",value:((_=t.pillars)==null?void 0:_.power)??0})]})]})]}),T.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Active Alerts"}),i.length>0?T.jsx("div",{className:"space-y-3",children:i.map((b,C)=>T.jsx(A$,{alert:b},C))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(sd,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active alerts"})]})]}),T.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[T.jsx(Rp,{icon:Zc,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),T.jsx(Rp,{icon:j3,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"}),T.jsx(Rp,{icon:s2,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`}),T.jsx(Rp,{icon:H3,label:"Regions",value:(t==null?void 0:t.total_regions)||0,subvalue:`${(t==null?void 0:t.battery_warnings)||0} battery warnings`})]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:["Mesh Sources (",r.length,")"]}),r.length>0?T.jsx("div",{className:"space-y-2",children:r.map((b,C)=>T.jsx(L$,{source:b},C))}):T.jsx("div",{className:"text-slate-500 py-4",children:"No sources configured"})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsx("h2",{className:"text-sm font-medium text-slate-400 mb-4",children:"Environmental Feeds"}),o!=null&&o.enabled?T.jsxs("div",{className:"text-slate-400",children:[o.feeds.length," feeds active"]}):T.jsxs("div",{className:"text-slate-500",children:[T.jsx("p",{children:"Environmental feeds not enabled."}),T.jsx("p",{className:"text-xs mt-2",children:"Enable in config.yaml"})]})]}),T.jsx(P$,{propagation:l})]})}/*! ***************************************************************************** + */const d2=je("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 v2=je("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 Lk(){return or("/api/status")}async function i$(){return or("/api/health")}async function a$(){return or("/api/nodes")}async function o$(){return or("/api/edges")}async function s$(){return or("/api/sources")}async function q3(){return or("/api/alerts/active")}async function Pk(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 l$(){return or("/api/subscriptions")}async function K3(){return or("/api/env/status")}async function u$(){return or("/api/env/active")}async function c$(){return or("/api/env/propagation")}async function h$(){return or("/api/env/swpc")}async function f$(){return or("/api/env/ducting")}async function d$(){return or("/api/env/fires")}async function v$(){return or("/api/env/avalanche")}async function p$(){return or("/api/env/streams")}async function g$(){return or("/api/env/traffic")}async function m$(){return or("/api/env/roads")}async function y$(){return or("/api/env/hotspots")}async function _$(){return or("/api/regions")}function p2(){const[t,e]=$.useState(!1),[r,n]=$.useState(null),[i,a]=$.useState(null),o=$.useRef(null),s=$.useRef(null),l=$.useRef(1e3),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 $.useEffect(()=>(u(),()=>{s.current&&clearTimeout(s.current),o.current&&o.current.close()}),[u]),{connected:t,lastHealth:r,lastAlert:i}}const Q3=$.createContext(null);function x$(){const t=$.useContext(Q3);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}function S$(t){switch(t==null?void 0:t.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:E0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};default:return{bg:"bg-blue-500/10",border:"border-blue-500",icon:iy,iconColor:"text-blue-500"}}}function b$({toast:t,onDismiss:e,onNavigate:r}){const n=S$(t.alert.severity),i=n.icon;return $.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(d2,{size:16})})]})})}function w$({children:t}){const[e,r]=$.useState([]),n=z3(),i=$.useCallback(s=>{const l=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r(u=>[...u,{id:l,alert:s}])},[]),a=$.useCallback(s=>{r(l=>l.filter(u=>u.id!==s))},[]),o=$.useCallback(()=>{n("/alerts")},[n]);return b.jsxs(Q3.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(b$,{toast:s,onDismiss:()=>a(s.id),onNavigate:o})},s.id))})]})}const J3=[{path:"/",label:"Dashboard",icon:Z3},{path:"/mesh",label:"Mesh",icon:Zc},{path:"/environment",label:"Environment",icon:Ud},{path:"/config",label:"Config",icon:Y3},{path:"/alerts",label:"Alerts",icon:Wd}];function T$(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 C$(t){const e=J3.find(r=>r.path===t);return(e==null?void 0:e.label)||"Dashboard"}function M$({children:t}){var f;const e=Dv(),{connected:r,lastAlert:n}=p2(),{addToast:i}=x$(),[a,o]=$.useState(null),[s,l]=$.useState(null);$.useEffect(()=>{if(n){const d=`${n.type}-${n.message}-${n.timestamp}`;d!==s&&(l(d),i(n))}},[n,s,i]);const[u,c]=$.useState(new Date);$.useEffect(()=>{Lk().then(o).catch(console.error);const d=setInterval(()=>{Lk().then(o).catch(console.error)},3e4);return()=>clearInterval(d)},[]),$.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:J3.map(d=>{const p=e.pathname===d.path,g=d.icon;return b.jsxs(LZ,{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?T$(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:C$(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 A$({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 zp({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 L$({alert:t}){const r=(i=>{switch(i.toLowerCase()){case"critical":case"emergency":return{bg:"bg-red-500/10",border:"border-red-500",icon:E0,iconColor:"text-red-500"};case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};default:return{bg:"bg-green-500/10",border:"border-green-500",icon:iy,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 P$({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 Bp({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 k$({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(v2,{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 D$(){var g,m,y,_,S;const[t,e]=$.useState(null),[r,n]=$.useState([]),[i,a]=$.useState([]),[o,s]=$.useState(null),[l,u]=$.useState(null),[c,h]=$.useState(!0),[f,d]=$.useState(null),{lastHealth:p}=p2();return $.useEffect(()=>{Promise.all([i$(),s$(),q3(),K3(),c$().catch(()=>null)]).then(([T,C,M,A,k])=>{e(T),n(C),a(M),s(A),u(k),h(!1),document.title="Dashboard — MeshAI"}).catch(T=>{d(T.message),h(!1),document.title="Dashboard — MeshAI"})},[]),$.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(A$,{health:t}),b.jsxs("div",{className:"mt-6 space-y-3",children:[b.jsx(zp,{label:"Infrastructure",value:((g=t.pillars)==null?void 0:g.infrastructure)??0}),b.jsx(zp,{label:"Utilization",value:((m=t.pillars)==null?void 0:m.utilization)??0}),b.jsx(zp,{label:"Behavior",value:((y=t.pillars)==null?void 0:y.behavior)??0}),b.jsx(zp,{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((T,C)=>b.jsx(L$,{alert:T},C))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(sd,{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(Bp,{icon:Zc,label:"Nodes Online",value:(t==null?void 0:t.total_nodes)||0,subvalue:`${(t==null?void 0:t.unlocated_count)||0} unlocated`}),b.jsx(Bp,{icon:W3,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(Bp,{icon:h2,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(Bp,{icon:$3,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((T,C)=>b.jsx(P$,{source:T},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(k$,{propagation:l})]})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -352,8 +357,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 Yw=function(t,e){return Yw=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])},Yw(t,e)};function $(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Yw(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ld=function(){return ld=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):N$(navigator.userAgent,Ze);function N$(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 d2=12,J3="sans-serif",lo=d2+"px "+J3,R$=20,O$=100,z$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function B$(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 lY(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(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?DD(s,o):DD(o,s))}function u4(t){return t.nodeName.toUpperCase()==="CANVAS"}var uY=/([&<>"'])/g,cY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ur(t){return t==null?"":(t+"").replace(uY,function(e,r){return cY[r]})}var fY=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Mx=[],hY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function Jw(t,e,r,n){return r=r||{},n?kD(t,e,r):hY&&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):kD(t,e,r),r}function kD(t,e,r){if(Ze.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(u4(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Qw(Mx,t,n,i)){r.zrX=Mx[0],r.zrY=Mx[1];return}}r.zrX=r.zrY=0}function x2(t){return t||window.event}function $n(t,e,r){if(e=x2(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&&Jw(t,o,e,r)}else{Jw(t,e,e,r);var a=dY(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&fY.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function dY(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 eb(t,e,r,n){t.addEventListener(e,r,n)}function vY(t,e,r,n){t.removeEventListener(e,r,n)}var uo=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function ID(t){return t.which===2||t.which===3}var pY=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=ED(n)/ED(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=gY(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function hr(){return[1,0,0,1,0,0]}function Nv(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Rv(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 Ri(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 yo(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),f=Math.cos(r);return t[0]=i*f+s*c,t[1]=-i*c+s*f,t[2]=a*f+l*c,t[3]=-a*c+f*l,t[4]=f*(o-n[0])+c*(u-n[1])+n[0],t[5]=f*(u-n[1])-c*(o-n[0])+n[1],t}function O0(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 ui(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 c4(t){var e=hr();return Rv(e,t),e}const mY=Object.freeze(Object.defineProperty({__proto__:null,clone:c4,copy:Rv,create:hr,identity:Nv,invert:ui,mul:Di,rotate:yo,scale:O0,translate:Ri},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}(),Cl=Math.min,_c=Math.max,tb=Math.abs,ND=["x","y"],yY=["width","height"],Bs=new Te,Vs=new Te,js=new Te,Fs=new Te,Cn=f4(),Vh=Cn.minTv,rb=Cn.maxTv,hd=[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=Cl(e.x,this.x),n=Cl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=_c(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=_c(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=hr();return Ri(a,a,[-r.x,-r.y]),O0(a,a,[n,i]),Ri(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(_Y,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(xY,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,f=e.y+l,h=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||f>h||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}Bs.x=js.x=r.x,Bs.y=Fs.y=r.y,Vs.x=Fs.x=r.x+r.width,Vs.y=js.y=r.y+r.height,Bs.transform(n),Fs.transform(n),Vs.transform(n),js.transform(n),e.x=Cl(Bs.x,Vs.x,js.x,Fs.x),e.y=Cl(Bs.y,Vs.y,js.y,Fs.y);var l=_c(Bs.x,Vs.x,js.x,Fs.x),u=_c(Bs.y,Vs.y,js.y,Fs.y);e.width=l-e.x,e.height=u-e.y},t}(),_Y=new Ce(0,0,0,0),xY=new Ce(0,0,0,0);function RD(t,e,r,n,i,a,o,s){var l=tb(e-r),u=tb(n-t),c=Cl(l,u),f=ND[i],h=ND[1-i],d=yY[i];e=u||!Cn.bidirectional)&&(Vh[f]=-u,Vh[h]=0,Cn.useDir&&Cn.calcDirMTV())))}function f4(){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=_c(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;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Lx.copy(h.getBoundingRect()),h.transform&&Lx.applyTransform(h.transform),Lx.intersect(c)&&s.push(h))}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 CY(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?h4:!0}return!1}function OD(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=CY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==h4)){e.target=o;break}}}function v4(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var p4=32,ih=7;function MY(t){for(var e=0;t>=p4;)e|=t&1,t>>=1;return t+e}function zD(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 AY(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 Px(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 Dx(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 LY(t,e){var r=ih,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]=ih||A>=ih);if(D)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[b]=o[S];return}for(var A=r;;){var D=0,E=0,k=!1;do if(e(o[S],t[_])<0){if(t[b--]=t[_--],D++,E=0,--p===0){k=!0;break}}else if(t[b--]=o[S--],E++,D=0,--m===1){k=!0;break}while((D|E)=0;y--)t[M+y]=t[C+y];if(p===0){k=!0;break}}if(t[b--]=o[S--],--m===1){k=!0;break}if(E=m-Px(t[_],o,0,m,m-1,e),E!==0){for(b-=E,S-=E,m-=E,M=b+1,C=S+1,y=0;y=ih||E>=ih);if(k)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(b-=p,_-=p,M=b+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[b]=o[S]}else{if(m===0)throw new Error;for(C=b-(m-1),y=0;ys&&(l=s),BD(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,jh=2,nc=4,VD=!1;function kx(){VD||(VD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function jD(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var PY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=jD}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}(),sy;sy=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 dd={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-dd.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?dd.bounceIn(t*2)*.5:dd.bounceOut(t*2-1)*.5+.5}},zp=Math.pow,ss=Math.sqrt,ly=1e-8,g4=1e-4,FD=ss(3),Bp=1/3,aa=Ls(),Jn=Ls(),Ec=Ls();function Wo(t){return t>-ly&&tly||t<-ly}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 GD(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function uy(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,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(Wo(c)&&Wo(f))if(Wo(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=f*f-4*c*h;if(Wo(g)){var m=f/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 _=ss(g),S=c*s+1.5*o*(-f+_),b=c*s+1.5*o*(-f-_);S<0?S=-zp(-S,Bp):S=zp(S,Bp),b<0?b=-zp(-b,Bp):b=zp(b,Bp);var p=(-s-(S+b))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*c*s-3*o*f)/(2*ss(c*c*c)),M=Math.acos(C)/3,A=ss(c),D=Math.cos(M),p=(-s-2*A*D)/(3*o),y=(-s+A*(D+FD*Math.sin(M)))/(3*o),E=(-s+A*(D-FD*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 y4(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(Wo(o)){if(m4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Wo(c))i[0]=-a/(2*o);else if(c>0){var f=ss(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function ys(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,f=(c-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function _4(t,e,r,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,p,g,m,y;aa[0]=l,aa[1]=u;for(var _=0;_<1;_+=.05)Jn[0]=ur(t,r,i,o,_),Jn[1]=ur(e,n,a,s,_),m=os(aa,Jn),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Wo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=ss(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function x4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Yd(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 S4(t,e,r,n,i,a,o,s,l){var u,c=.005,f=1/0;aa[0]=o,aa[1]=s;for(var h=0;h<1;h+=.05){Jn[0]=Sr(t,r,i,h),Jn[1]=Sr(e,n,a,h);var d=os(aa,Jn);d=0&&d=1?1:uy(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var NY=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:dd[e]||S2(e)},t}(),w4=function(){function t(e){this.value=e}return t}(),RY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new w4(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}(),Yc=function(){function t(e){this._list=new RY,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 w4(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}(),HD={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 ki(t){return t=Math.round(t),t<0?0:t>255?255:t}function OY(t){return t=Math.round(t),t<0?0:t>360?360:t}function Xd(t){return t<0?0:t>1?1:t}function um(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?ki(parseFloat(e)/100*255):ki(parseInt(e,10))}function Qa(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Xd(parseFloat(e)/100):Xd(parseFloat(e))}function Ix(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 Uo(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 ib(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var b4=new Yc(20),Vp=null;function Du(t,e){Vp&&ib(Vp,e),Vp=b4.put(t,Vp||e.slice())}function Zr(t,e){if(t){e=e||[];var r=b4.get(t);if(r)return ib(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in HD)return ib(e,HD[n]),Du(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),Du(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),Du(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=Qa(u.pop());case"rgb":if(u.length>=3)return Zn(e,um(u[0]),um(u[1]),um(u[2]),u.length===3?c:Qa(u[3])),Du(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]=Qa(u[3]),ab(u,e),Du(t,e),e;case"hsl":if(u.length!==3){Zn(e,0,0,0,1);return}return ab(u,e),Du(t,e),e;default:return}}Zn(e,0,0,0,1)}}function ab(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Qa(t[1]),i=Qa(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Zn(e,ki(Ix(o,a,r+1/3)*255),ki(Ix(o,a,r)*255),ki(Ix(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function zY(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,f=((a-r)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:r===a?l=1/3+c-h:n===a&&(l=2/3+f-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 cy(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 ii(r,r.length===4?"rgba":"rgb")}}function BY(t){var e=Zr(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function vd(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]=ki(Uo(o[0],s[0],l)),r[1]=ki(Uo(o[1],s[1],l)),r[2]=ki(Uo(o[2],s[2],l)),r[3]=Xd(Uo(o[3],s[3],l)),r}}var VY=vd;function w2(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=ii([ki(Uo(o[0],s[0],l)),ki(Uo(o[1],s[1],l)),ki(Uo(o[2],s[2],l)),Xd(Uo(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var jY=w2;function Ja(t,e,r,n){var i=Zr(t);if(t)return i=zY(i),e!=null&&(i[0]=OY(me(e)?e(i[0]):e)),r!=null&&(i[1]=Qa(me(r)?r(i[1]):r)),n!=null&&(i[2]=Qa(me(n)?n(i[2]):n)),ii(ab(i),"rgba")}function qd(t,e){var r=Zr(t);if(r&&e!=null)return r[3]=Xd(e),ii(r,"rgba")}function ii(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 Kd(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 FY(){return ii([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var WD=new Yc(100);function fy(t){if(se(t)){var e=WD.get(t);return e||(e=cy(t,-.1),WD.put(t,e)),e}else if(kv(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:cy(n.color,-.1)}}),r}return t}const GY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:vd,fastMapToColor:VY,lerp:w2,lift:cy,liftColor:fy,lum:Kd,mapToColor:jY,modifyAlpha:qd,modifyHSL:Ja,parse:Zr,parseCssFloat:Qa,parseCssInt:um,random:FY,stringify:ii,toHex:BY},Symbol.toStringTag,{value:"Module"}));var hy=Math.round;function Qd(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 UD=1e-4;function Zo(t){return t-UD}function jp(t){return hy(t*1e3)/1e3}function ob(t){return hy(t*1e4)/1e4}function HY(t){return"matrix("+jp(t[0])+","+jp(t[1])+","+jp(t[2])+","+jp(t[3])+","+ob(t[4])+","+ob(t[5])+")"}var WY={left:"start",right:"end",center:"middle",middle:"middle"};function UY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function ZY(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function $Y(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 T4(t){return t&&!!t.image}function YY(t){return t&&!!t.svgElement}function b2(t){return T4(t)||YY(t)}function C4(t){return t.type==="linear"}function M4(t){return t.type==="radial"}function A4(t){return t&&(t.type==="linear"||t.type==="radial")}function z0(t){return"url(#"+t+")"}function L4(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 P4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*ud,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("+hy(o*ud)+"deg, "+hy(s*ud)+"deg)"),l.join(" ")}var XY=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}}(),sb=Array.prototype.slice;function ja(t,e,r){return(e-t)*r+t}function Ex(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=$D,l=r;if(Er(r)){var u=JY(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!kr(r))s=Gp;else if(se(r))if(!isNaN(+r))s=Gp;else{var c=Zr(r);c&&(l=c,s=Fh)}else if(kv(r)){var f=J({},l);f.colorStops=re(r.colorStops,function(d){return{offset:d.offset,color:Zr(d.color)}}),C4(r)?s=lb:M4(r)&&(s=ub),l=f}a===0?this.valType=s:(s!==this.valType||s===$D)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:r,percent:0};return n&&(h.easing=n,h.easingFunc=me(n)?n:dd[n]||S2(n)),i.push(h),h},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=Hp(i),u=YD(i),c=0;c=0&&!(o[c].percent<=r);c--);c=h(c,s-2)}else{for(c=f;cr);c++);c=h(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:h((r-d.percent)/m,1);p.easingFunc&&(y=p.easingFunc(y));var _=n?this._additiveValue:u?ah:e[l];if((Hp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:p.rawValue;else if(Hp(a))a===fm?Ex(_,d[i],p[i],y):qY(_,d[i],p[i],y);else if(YD(a)){var S=d[i],b=p[i],C=a===lb;e[l]={type:C?"linear":"radial",x:ja(S.x,b.x,y),y:ja(S.y,b.y,y),colorStops:re(S.colorStops,function(A,D){var E=b.colorStops[D];return{offset:ja(A.offset,E.offset,y),color:cm(Ex([],A.color,E.color,y))}}),global:b.global},C?(e[l].x2=ja(S.x2,b.x2,y),e[l].y2=ja(S.y2,b.y2,y)):e[l].r=ja(S.r,b.r,y)}else if(u)Ex(_,d[i],p[i],y),n||(e[l]=cm(_));else{var M=ja(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===Gp?e[n]=e[n]+i:r===Fh?(Zr(e[n],ah),Fp(ah,ah,i,1),e[n]=cm(ah)):r===fm?Fp(e[n],e[n],i,1):r===D4&&ZD(e[n],e[n],i,1)},t}(),T2=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){I0("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,pd(u),i),this._trackKeys.push(s)}l.addKeyframe(e,pd(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 xc(){return new Date().getTime()}var tX=function(t){$(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=xc()-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&&(sy(n),!r._paused&&r.update())}sy(n)},e.prototype.start=function(){this._running||(this._time=xc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=xc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=xc()-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 T2(r,n.loop);return this.addAnimator(i),i},e}(hi),rX=300,Nx=Ze.domSupported,Rx=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}}(),XD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},qD=!1;function cb(t){var e=t.pointerType;return e==="pen"||e==="touch"}function nX(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 Ox(t){t&&(t.zrByTouch=!0)}function iX(t,e){return $n(t.dom,new aX(t,e),!0)}function k4(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 aX=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}(),xi={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;k4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){qD=!0,t=$n(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){qD||(t=$n(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=$n(this.dom,t),Ox(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),xi.mousemove.call(this,t),xi.mousedown.call(this,t)},touchmove:function(t){t=$n(this.dom,t),Ox(t),this.handler.processGesture(t,"change"),xi.mousemove.call(this,t)},touchend:function(t){t=$n(this.dom,t),Ox(t),this.handler.processGesture(t,"end"),xi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentJD||t<-JD}var Hs=[],ku=[],Bx=hr(),Vx=Math.abs,Xa=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 Gs(this.rotation)||Gs(this.x)||Gs(this.y)||Gs(this.scaleX-1)||Gs(this.scaleY-1)||Gs(this.skewX)||Gs(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(QD(n),this.invTransform=null);return}n=n||hr(),r?this.getLocalTransform(n):QD(n),e&&(r?Di(n,e,n):Rv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Hs);var n=Hs[0]<0?-1:1,i=Hs[1]<0?-1:1,a=((Hs[0]-n)*r+n)/Hs[0]||0,o=((Hs[1]-i)*r+i)/Hs[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||hr(),ui(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||hr(),Di(ku,e.invTransform,r),r=ku);var n=this.originX,i=this.originY;(n||i)&&(Bx[4]=n,Bx[5]=i,Di(ku,r,Bx),ku[4]-=n,ku[5]-=i,r=ku),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&&Vx(e[0]-1)>1e-10&&Vx(e[3]-1)>1e-10?Math.sqrt(Vx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){vy(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,f=e.y,h=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-h*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]=h*o,u&&yo(r,r,u),r[4]+=n+c,r[5]+=i+f,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}(),xa=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function vy(t,e){for(var r=0;r=ek)){t=t||lo;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?jx=ek:i>2&&jx++,e}}var jx=0,ek=5;function E4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=cX(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function ya(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 tk(t,e,r,n){var i=ya(ma(e),t),a=Ov(e),o=Xc(0,i,r),s=Nl(0,a,n),l=new Ce(o,s,i,a);return l}function B0(t,e,r,n){var i=((t||"")+"").split(` -`),a=i.length;if(a===1)return tk(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 py(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",f="top";if(n instanceof Array)l+=Oi(n[0],r.width),u+=Oi(n[1],r.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="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,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=f,t}var Fx="__zr_normal__",Gx=xa.concat(["ignore"]),fX=li(xa,function(t,e){return t[e]=!0,t},{ignore:!1}),Iu={},hX=new Ce(0,0,0,0),Up=[],V0=function(){function t(e){this.id=g2(),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,f=n.autoOverflowArea,h=void 0;if((f||c)&&(h=hX,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Iu,n,h):py(Iu,n,h),a.x=Iu.x,a.y=Iu.y,o=Iu.align,s=Iu.verticalAlign;var d=n.origin;if(d&&n.rotation!=null){var p=void 0,g=void 0;d==="center"?(p=h.width*.5,g=h.height*.5):(p=Oi(d[0],h.width),g=Oi(d[1],h.height)),u=!0,a.originX=-a.x+p+(i?0:h.x),a.originY=-a.y+g+(i?0:h.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(f){var _=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);a.getLocalTransform(Up),ui(Up,Up),Ce.copy(_,h),_.applyTransform(Up)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,b=void 0,C=void 0,M=void 0;S&&this.canBeInsideText()?(b=n.insideFill,C=n.insideStroke,(b==null||b==="auto")&&(b=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(b),M=!0)):(b=n.outsideFill,C=n.outsideStroke,(b==null||b==="auto")&&(b=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(b),M=!0)),b=b||"#000",(b!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=b,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()?vb:db},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,ii(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(we(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(Fx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===Fx,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){I0("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 f=this._textContent,h=this._textGuide;return f&&f.useState(e,r,n,c),h&&h.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,h),m&&m.useStates(e,r,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&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 h=0;h0||i.force&&!o.length){var D=void 0,E=void 0,k=void 0;if(s){E={},h&&(D={});for(var b=0;b=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):R$(navigator.userAgent,Ze);function R$(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 g2=12,e4="sans-serif",uo=g2+"px "+e4,O$=20,z$=100,B$="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function j$(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 uY(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?Ek(s,o):Ek(o,s))}function c4(t){return t.nodeName.toUpperCase()==="CANVAS"}var cY=/([&<>"'])/g,hY={"&":"&","<":"<",">":">",'"':""","'":"'"};function Zr(t){return t==null?"":(t+"").replace(cY,function(e,r){return hY[r]})}var fY=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kx=[],dY=Ze.browser.firefox&&+Ze.browser.version.split(".")[0]<39;function nw(t,e,r,n){return r=r||{},n?Nk(t,e,r):dY&&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):Nk(t,e,r),r}function Nk(t,e,r){if(Ze.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(c4(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(rw(kx,t,n,i)){r.zrX=kx[0],r.zrY=kx[1];return}}r.zrX=r.zrY=0}function w2(t){return t||window.event}function Yn(t,e,r){if(e=w2(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&&nw(t,o,e,r)}else{nw(t,e,e,r);var a=vY(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&fY.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function vY(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 iw(t,e,r,n){t.addEventListener(e,r,n)}function pY(t,e,r,n){t.removeEventListener(e,r,n)}var co=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Rk(t){return t.which===2||t.which===3}var gY=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=Ok(n)/Ok(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=mY(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 zv(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Bv(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 Ii(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 zi(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 _o(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 V0(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 hi(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 h4(t){var e=fr();return Bv(e,t),e}const yY=Object.freeze(Object.defineProperty({__proto__:null,clone:h4,copy:Bv,create:fr,identity:zv,invert:hi,mul:Ii,rotate:_o,scale:V0,translate:zi},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}(),Cl=Math.min,_c=Math.max,aw=Math.abs,zk=["x","y"],_Y=["width","height"],Bs=new Te,js=new Te,Vs=new Te,Fs=new Te,Mn=f4(),jf=Mn.minTv,ow=Mn.maxTv,fd=[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=Cl(e.x,this.x),n=Cl(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=_c(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=_c(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 zi(a,a,[-r.x,-r.y]),V0(a,a,[n,i]),zi(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(xY,e.x,e.y,e.width,e.height)),r instanceof t||(r=t.set(SY,r.x,r.y,r.width,r.height));var s=!!n;Mn.reset(i,s);var l=Mn.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}Bs.x=Vs.x=r.x,Bs.y=Fs.y=r.y,js.x=Fs.x=r.x+r.width,js.y=Vs.y=r.y+r.height,Bs.transform(n),Fs.transform(n),js.transform(n),Vs.transform(n),e.x=Cl(Bs.x,js.x,Vs.x,Fs.x),e.y=Cl(Bs.y,js.y,Vs.y,Fs.y);var l=_c(Bs.x,js.x,Vs.x,Fs.x),u=_c(Bs.y,js.y,Vs.y,Fs.y);e.width=l-e.x,e.height=u-e.y},t}(),xY=new Ce(0,0,0,0),SY=new Ce(0,0,0,0);function Bk(t,e,r,n,i,a,o,s){var l=aw(e-r),u=aw(n-t),c=Cl(l,u),h=zk[i],f=zk[1-i],d=_Y[i];e=u||!Mn.bidirectional)&&(jf[h]=-u,jf[f]=0,Mn.useDir&&Mn.calcDirMTV())))}function f4(){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=_c(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)&&(Ix.copy(f.getBoundingRect()),f.transform&&Ix.applyTransform(f.transform),Ix.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 MY(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?d4:!0}return!1}function jk(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=MY(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==d4)){e.target=o;break}}}function p4(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}var g4=32,nf=7;function AY(t){for(var e=0;t>=g4;)e|=t&1,t>>=1;return t+e}function Vk(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 LY(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 Ex(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 Nx(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 PY(t,e){var r=nf,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]=nf||A>=nf);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[T]=o[S];return}for(var A=r;;){var k=0,E=0,D=!1;do if(e(o[S],t[_])<0){if(t[T--]=t[_--],k++,E=0,--p===0){D=!0;break}}else if(t[T--]=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[T--]=o[S--],--m===1){D=!0;break}if(E=m-Ex(t[_],o,0,m,m-1,e),E!==0){for(T-=E,S-=E,m-=E,M=T+1,C=S+1,y=0;y=nf||E>=nf);if(D)break;A<0&&(A=0),A+=2}if(r=A,r<1&&(r=1),m===1){for(T-=p,_-=p,M=T+1,C=_+1,y=p-1;y>=0;y--)t[M+y]=t[C+y];t[T]=o[S]}else{if(m===0)throw new Error;for(C=T-(m-1),y=0;ys&&(l=s),Fk(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 An=1,Vf=2,nc=4,Gk=!1;function Rx(){Gk||(Gk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Hk(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var kY=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Hk}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}(),cy;cy=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 dd={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-dd.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?dd.bounceIn(t*2)*.5:dd.bounceOut(t*2-1)*.5+.5}},Vp=Math.pow,ss=Math.sqrt,hy=1e-8,m4=1e-4,Wk=ss(3),Fp=1/3,sa=Ls(),ei=Ls(),Ec=Ls();function Uo(t){return t>-hy&&thy||t<-hy}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 Uk(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function fy(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(Uo(c)&&Uo(h))if(Uo(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(Uo(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 _=ss(g),S=c*s+1.5*o*(-h+_),T=c*s+1.5*o*(-h-_);S<0?S=-Vp(-S,Fp):S=Vp(S,Fp),T<0?T=-Vp(-T,Fp):T=Vp(T,Fp);var p=(-s-(S+T))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var C=(2*c*s-3*o*h)/(2*ss(c*c*c)),M=Math.acos(C)/3,A=ss(c),k=Math.cos(M),p=(-s-2*A*k)/(3*o),y=(-s+A*(k+Wk*Math.sin(M)))/(3*o),E=(-s+A*(k-Wk*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 _4(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(Uo(o)){if(y4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Uo(c))i[0]=-a/(2*o);else if(c>0){var h=ss(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 ys(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 x4(t,e,r,n,i,a,o,s,l,u,c){var h,f=.005,d=1/0,p,g,m,y;sa[0]=l,sa[1]=u;for(var _=0;_<1;_+=.05)ei[0]=ur(t,r,i,o,_),ei[1]=ur(e,n,a,s,_),m=os(sa,ei),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Uo(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=ss(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 S4(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Xd(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 b4(t,e,r,n,i,a,o,s,l){var u,c=.005,h=1/0;sa[0]=o,sa[1]=s;for(var f=0;f<1;f+=.05){ei[0]=Sr(t,r,i,f),ei[1]=Sr(e,n,a,f);var d=os(sa,ei);d=0&&d=1?1:fy(0,n,a,1,l,s)&&ur(0,i,o,1,s[0])}}}var RY=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:dd[e]||T2(e)},t}(),w4=function(){function t(e){this.value=e}return t}(),OY=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new w4(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}(),Yc=function(){function t(e){this._list=new OY,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 w4(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}(),Zk={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 Ei(t){return t=Math.round(t),t<0?0:t>255?255:t}function zY(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 fm(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Ei(parseFloat(e)/100*255):Ei(parseInt(e,10))}function Ja(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?qd(parseFloat(e)/100):qd(parseFloat(e))}function Ox(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 Zo(t,e,r){return t+(e-t)*r}function $n(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function lw(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var T4=new Yc(20),Gp=null;function ku(t,e){Gp&&lw(Gp,e),Gp=T4.put(t,Gp||e.slice())}function $r(t,e){if(t){e=e||[];var r=T4.get(t);if(r)return lw(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in Zk)return lw(e,Zk[n]),ku(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)){$n(e,0,0,0,1);return}return $n(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),ku(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){$n(e,0,0,0,1);return}return $n(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),ku(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?$n(e,+u[0],+u[1],+u[2],1):$n(e,0,0,0,1);c=Ja(u.pop());case"rgb":if(u.length>=3)return $n(e,fm(u[0]),fm(u[1]),fm(u[2]),u.length===3?c:Ja(u[3])),ku(t,e),e;$n(e,0,0,0,1);return;case"hsla":if(u.length!==4){$n(e,0,0,0,1);return}return u[3]=Ja(u[3]),uw(u,e),ku(t,e),e;case"hsl":if(u.length!==3){$n(e,0,0,0,1);return}return uw(u,e),ku(t,e),e;default:return}}$n(e,0,0,0,1)}}function uw(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Ja(t[1]),i=Ja(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],$n(e,Ei(Ox(o,a,r+1/3)*255),Ei(Ox(o,a,r)*255),Ei(Ox(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function BY(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 dy(t,e){var r=$r(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 oi(r,r.length===4?"rgba":"rgb")}}function jY(t){var e=$r(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function vd(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]=Ei(Zo(o[0],s[0],l)),r[1]=Ei(Zo(o[1],s[1],l)),r[2]=Ei(Zo(o[2],s[2],l)),r[3]=qd(Zo(o[3],s[3],l)),r}}var VY=vd;function C2(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=$r(e[i]),s=$r(e[a]),l=n-i,u=oi([Ei(Zo(o[0],s[0],l)),Ei(Zo(o[1],s[1],l)),Ei(Zo(o[2],s[2],l)),qd(Zo(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}var FY=C2;function eo(t,e,r,n){var i=$r(t);if(t)return i=BY(i),e!=null&&(i[0]=zY(me(e)?e(i[0]):e)),r!=null&&(i[1]=Ja(me(r)?r(i[1]):r)),n!=null&&(i[2]=Ja(me(n)?n(i[2]):n)),oi(uw(i),"rgba")}function Kd(t,e){var r=$r(t);if(r&&e!=null)return r[3]=qd(e),oi(r,"rgba")}function oi(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 Qd(t,e){var r=$r(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}function GY(){return oi([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var $k=new Yc(100);function vy(t){if(se(t)){var e=$k.get(t);return e||(e=dy(t,-.1),$k.put(t,e)),e}else if(Nv(t)){var r=J({},t);return r.colorStops=re(t.colorStops,function(n){return{offset:n.offset,color:dy(n.color,-.1)}}),r}return t}const HY=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:vd,fastMapToColor:VY,lerp:C2,lift:dy,liftColor:vy,lum:Qd,mapToColor:FY,modifyAlpha:Kd,modifyHSL:eo,parse:$r,parseCssFloat:Ja,parseCssInt:fm,random:GY,stringify:oi,toHex:jY},Symbol.toStringTag,{value:"Module"}));var py=Math.round;function Jd(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=$r(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var Yk=1e-4;function $o(t){return t-Yk}function Hp(t){return py(t*1e3)/1e3}function cw(t){return py(t*1e4)/1e4}function WY(t){return"matrix("+Hp(t[0])+","+Hp(t[1])+","+Hp(t[2])+","+Hp(t[3])+","+cw(t[4])+","+cw(t[5])+")"}var UY={left:"start",right:"end",center:"middle",middle:"middle"};function ZY(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function $Y(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function YY(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 C4(t){return t&&!!t.image}function XY(t){return t&&!!t.svgElement}function M2(t){return C4(t)||XY(t)}function M4(t){return t.type==="linear"}function A4(t){return t.type==="radial"}function L4(t){return t&&(t.type==="linear"||t.type==="radial")}function F0(t){return"url(#"+t+")"}function P4(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 k4(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*ud,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("+py(o*ud)+"deg, "+py(s*ud)+"deg)"),l.join(" ")}var qY=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}}(),hw=Array.prototype.slice;function Fa(t,e,r){return(e-t)*r+t}function zx(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=qk,l=r;if(Nr(r)){var u=eX(r);s=u,(u===1&&!qe(r[0])||u===2&&!qe(r[0][0]))&&(o=!0)}else if(qe(r)&&!Ir(r))s=Up;else if(se(r))if(!isNaN(+r))s=Up;else{var c=$r(r);c&&(l=c,s=Ff)}else if(Nv(r)){var h=J({},l);h.colorStops=re(r.colorStops,function(d){return{offset:d.offset,color:$r(d.color)}}),M4(r)?s=fw:A4(r)&&(s=dw),l=h}a===0?this.valType=s:(s!==this.valType||s===qk)&&(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:dd[n]||T2(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=Zp(i),u=Kk(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?af:e[l];if((Zp(a)||u)&&!_&&(_=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:p.rawValue;else if(Zp(a))a===vm?zx(_,d[i],p[i],y):KY(_,d[i],p[i],y);else if(Kk(a)){var S=d[i],T=p[i],C=a===fw;e[l]={type:C?"linear":"radial",x:Fa(S.x,T.x,y),y:Fa(S.y,T.y,y),colorStops:re(S.colorStops,function(A,k){var E=T.colorStops[k];return{offset:Fa(A.offset,E.offset,y),color:dm(zx([],A.color,E.color,y))}}),global:T.global},C?(e[l].x2=Fa(S.x2,T.x2,y),e[l].y2=Fa(S.y2,T.y2,y)):e[l].r=Fa(S.r,T.r,y)}else if(u)zx(_,d[i],p[i],y),n||(e[l]=dm(_));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===Up?e[n]=e[n]+i:r===Ff?($r(e[n],af),Wp(af,af,i,1),e[n]=dm(af)):r===vm?Wp(e[n],e[n],i,1):r===D4&&Xk(e[n],e[n],i,1)},t}(),A2=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){O0("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,pd(u),i),this._trackKeys.push(s)}l.addKeyframe(e,pd(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 xc(){return new Date().getTime()}var rX=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=xc()-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&&(cy(n),!r._paused&&r.update())}cy(n)},e.prototype.start=function(){this._running||(this._time=xc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=xc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=xc()-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 A2(r,n.loop);return this.addAnimator(i),i},e}(vi),nX=300,Bx=Ze.domSupported,jx=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}}(),Qk={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Jk=!1;function vw(t){var e=t.pointerType;return e==="pen"||e==="touch"}function iX(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 Vx(t){t&&(t.zrByTouch=!0)}function aX(t,e){return Yn(t.dom,new oX(t,e),!0)}function I4(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 oX=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=Yn(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Yn(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=Yn(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Yn(this.dom,t);var e=t.toElement||t.relatedTarget;I4(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Jk=!0,t=Yn(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Jk||(t=Yn(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Yn(this.dom,t),Vx(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),bi.mousemove.call(this,t),bi.mousedown.call(this,t)},touchmove:function(t){t=Yn(this.dom,t),Vx(t),this.handler.processGesture(t,"change"),bi.mousemove.call(this,t)},touchend:function(t){t=Yn(this.dom,t),Vx(t),this.handler.processGesture(t,"end"),bi.mouseup.call(this,t),+new Date-+this.__lastTouchMomentrD||t<-rD}var Hs=[],Du=[],Gx=fr(),Hx=Math.abs,qa=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 Gs(this.rotation)||Gs(this.x)||Gs(this.y)||Gs(this.scaleX-1)||Gs(this.scaleY-1)||Gs(this.skewX)||Gs(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(tD(n),this.invTransform=null);return}n=n||fr(),r?this.getLocalTransform(n):tD(n),e&&(r?Ii(n,e,n):Bv(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Hs);var n=Hs[0]<0?-1:1,i=Hs[1]<0?-1:1,a=((Hs[0]-n)*r+n)/Hs[0]||0,o=((Hs[1]-i)*r+i)/Hs[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||fr(),hi(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(),Ii(Du,e.invTransform,r),r=Du);var n=this.originX,i=this.originY;(n||i)&&(Gx[4]=n,Gx[5]=i,Ii(Du,r,Gx),Du[4]-=n,Du[5]-=i,r=Du),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&&Hx(e[0]-1)>1e-10&&Hx(e[3]-1)>1e-10?Math.sqrt(Hx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){my(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&&_o(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 my(t,e){for(var r=0;r=nD)){t=t||uo;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?Wx=nD:i>2&&Wx++,e}}var Wx=0,nD=5;function N4(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=hX(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function xa(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 iD(t,e,r,n){var i=xa(_a(e),t),a=jv(e),o=Xc(0,i,r),s=Nl(0,a,n),l=new Ce(o,s,i,a);return l}function G0(t,e,r,n){var i=((t||"")+"").split(` +`),a=i.length;if(a===1)return iD(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 yy(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+=Bi(n[0],r.width),u+=Bi(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 Ux="__zr_normal__",Zx=ba.concat(["ignore"]),fX=ci(ba,function(t,e){return t[e]=!0,t},{ignore:!1}),Iu={},dX=new Ce(0,0,0,0),Yp=[],H0=function(){function t(e){this.id=_2(),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=dX,n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Iu,n,f):yy(Iu,n,f),a.x=Iu.x,a.y=Iu.y,o=Iu.align,s=Iu.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=Bi(d[0],f.width),g=Bi(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(Yp),hi(Yp,Yp),Ce.copy(_,f),_.applyTransform(Yp)}else y.overflowRect=null;var S=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,T=void 0,C=void 0,M=void 0;S&&this.canBeInsideText()?(T=n.insideFill,C=n.insideStroke,(T==null||T==="auto")&&(T=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(T),M=!0)):(T=n.outsideFill,C=n.outsideStroke,(T==null||T==="auto")&&(T=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(T),M=!0)),T=T||"#000",(T!==y.fill||C!==y.stroke||M!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=T,y.stroke=C,y.autoStroke=M,y.align=o,y.verticalAlign=s,r.setDefaultTextStyle(y)),r.__dirty|=An,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()?yw:mw},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&$r(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,oi(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(Ux,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===Ux,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){O0("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&=~An),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&=~An)}},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 T=0;T=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&&(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=MX;function MX(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 gy(t,e,r)}function gy(t,e,r){return se(t)?CX(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),B4),t=(+t).toFixed(e),r?t:+t}function Dn(t){return t.sort(function(e,r){return e-r}),t}function Mi(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 V4(t)}function V4(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 C2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(la(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function AX(t,e,r){if(!t[e])return 0;var n=j4(t,r);return n[e]||0}function j4(t,e){var r=li(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=li(o,function(d,p){return d+p},0),l=re(i,function(d,p){return d-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return re(o,function(d){return d/n})}function LX(t,e){var r=Math.max(Mi(t),Mi(e)),n=t+e;return r>B4?n:Ht(n,r)}var mb=9007199254740991;function M2(t){var e=Math.PI*2;return(t%e+e)%e}function qc(t){return t>-rk&&t=10&&e++,e}function A2(t,e){var r=j0(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 vm(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 yb(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 Ux(t){t.option=t.parentModel=t.ecModel=null}var YX=".",Ws="___EC__COMPONENT__CONTAINER___",K4="___EC__EXTENDED_CLASS___";function ua(t){var e={main:"",sub:""};if(t){var r=t.split(YX);e.main=r[0]||"",e.sub=r[1]||""}return e}function XX(t){Nr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function qX(t){return!!(t&&t[K4])}function k2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return KX(n)?i=function(a){$(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[K4]=!0,i.extend=this.extend,i.superCall=eq,i.superApply=tq,i.superClass=n,i}}function KX(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function Q4(t,e){t.extend=e.extend}var QX=Math.round(Math.random()*10);function JX(t){var e=["__\0is_clz",QX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function eq(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 rq=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],nq=ql(rq),iq=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return nq(this,e,r)},t}(),xb=new Yc(50);function aq(t){if(typeof t=="string"){var e=xb.get(t);return e&&e.image}else return t}function I2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=xb.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!G0(e)&&a.pending.push(o)):(e=Sn.loadImage(t,ok,ok),e.__zrImageSrc=t,xb.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function ok(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=ya(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 tV(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=ya(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?sq(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=ya(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function sq(t,e,r){for(var n=0,i=0,a=t.length;im&&d){var S=Math.floor(m/h);p=p||y.length>S,y=y.slice(0,S),_=y.length*h}if(i&&c&&g!=null)for(var b=eV(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},M=0;Mp&&$x(a,o.substring(p,m),e,d),$x(a,g[2],e,d,g[1]),p=Zx.lastIndex}pf){var W=a.lines.length;z>0?(E.tokens=E.tokens.slice(0,z),A(E,I,k),a.lines=a.lines.slice(0,D+1)):a.lines=a.lines.slice(0,D),a.isTruncated=a.isTruncated||a.lines.length0&&p+n.accumWidth>n.width&&(c=e.split(` -`),u=!0),n.accumWidth=p}else{var g=rV(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,f=g.linesWidths,c=g.lines}}c||(c=e.split(` -`));for(var m=ma(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var dq=li(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function vq(t){return hq(t)?!!dq[t]:!0}function rV(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=ma(e),h=0;hr: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 lk(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(uk,Xc(r,o,i),Nl(n,s,a),o,s),Ce.intersect(e,uk,null,ck);var l=ck.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Xc(l.x,l.width,i,!0),t.baseY=Nl(l.y,l.height,a,!0)}}var uk=new Ce(0,0,0,0),ck={outIntersectRect:{},clamp:!0};function E2(t){return t!=null?t+="":t=""}function pq(t){var e=E2(t.text),r=t.font,n=ya(ma(r),e),i=Ov(r);return Sb(t,n,i,null)}function Sb(t,e,r,n){var i=new Ce(Xc(t.x||0,e,t.textAlign),Nl(t.y||0,r,t.textBaseline),e,r),a=n??(nV(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function nV(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var wb="__zr_style_"+Math.round(Math.random()*10),Rl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},H0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Rl[wb]=!0;var fk=["z","z2","invisible"],gq=["invisible"],ci=function(t){$(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(Zp[0]=Kx(i)*r+t,Zp[1]=qx(i)*n+e,$p[0]=Kx(a)*r+t,$p[1]=qx(a)*n+e,u(s,Zp,$p),c(l,Zp,$p),i=i%Us,i<0&&(i=i+Us),a=a%Us,a<0&&(a=a+Us),i>a&&!o?a+=Us:ii&&(Yp[0]=Kx(d)*r+t,Yp[1]=qx(d)*n+e,u(s,Yp,s),c(l,Yp,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Zs=[],$s=[],$i=[],To=[],Yi=[],Xi=[],Qx=Math.min,Jx=Math.max,Ys=Math.cos,Xs=Math.sin,Na=Math.abs,bb=Math.PI,Io=bb*2,e1=typeof Float32Array<"u",oh=[];function t1(t){var e=Math.round(t/bb*1e8)/1e8;return e%2*bb}function U0(t,e){var r=t1(t[0]);r<0&&(r+=Io);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Io?i=r+Io:e&&r-i>=Io?i=r-Io:!e&&r>i?i=r+(Io-t1(r-i)):e&&r0&&(this._ux=Na(n/dy/e)||0,this._uy=Na(n/dy/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=Na(e-this._xi),i=Na(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(),oh[0]=i,oh[1]=a,U0(oh,o),i=oh[0],a=oh[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=Ys(a)*n+e,this._yi=Xs(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)&&e1&&(this.data=new Float32Array(r));for(var n=0;n0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(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(){$i[0]=$i[1]=Yi[0]=Yi[1]=Number.MAX_VALUE,To[0]=To[1]=Xi[0]=Xi[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Na(S)>i||h===r-1)&&(g=Math.sqrt(_*_+S*S),a=m,o=y);break}case mt.C:{var b=e[h++],C=e[h++],m=e[h++],y=e[h++],M=e[h++],A=e[h++];g=DY(a,o,b,C,m,y,M,A,10),a=M,o=A;break}case mt.Q:{var b=e[h++],C=e[h++],m=e[h++],y=e[h++];g=IY(a,o,b,C,m,y,10),a=m,o=y;break}case mt.A:var D=e[h++],E=e[h++],k=e[h++],I=e[h++],z=e[h++],O=e[h++],j=O+z;h+=1,p&&(s=Ys(z)*k+D,l=Xs(z)*I+E),g=Jx(k,I)*Qx(Io,Math.abs(O)),a=Ys(j)*k+D,o=Xs(j)*I+E;break;case mt.R:{s=a=e[h++],l=o=e[h++];var G=e[h++],F=e[h++];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[f++]=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,f,h,d=r<1,p,g,m=0,y=0,_,S=0,b,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M0&&(e.lineTo(b,C),S=0),A){case mt.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case mt.L:{f=n[M++],h=n[M++];var E=Na(f-u),k=Na(h-c);if(E>i||k>a){if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;e.lineTo(u*(1-z)+f*z,c*(1-z)+h*z);break e}m+=I}e.lineTo(f,h),u=f,c=h,S=0}else{var O=E*E+k*k;O>S&&(b=f,C=h,S=O)}break}case mt.C:{var j=n[M++],G=n[M++],F=n[M++],U=n[M++],V=n[M++],W=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;ys(u,j,F,V,z,Zs),ys(c,G,U,W,z,$s),e.bezierCurveTo(Zs[1],$s[1],Zs[2],$s[2],Zs[3],$s[3]);break e}m+=I}e.bezierCurveTo(j,G,F,U,V,W),u=V,c=W;break}case mt.Q:{var j=n[M++],G=n[M++],F=n[M++],U=n[M++];if(d){var I=p[y++];if(m+I>_){var z=(_-m)/I;Yd(u,j,F,z,Zs),Yd(c,G,U,z,$s),e.quadraticCurveTo(Zs[1],$s[1],Zs[2],$s[2]);break e}m+=I}e.quadraticCurveTo(j,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=Na(K-ne)>.001,De=ie+ue,he=!1;if(d){var I=p[y++];m+I>_&&(De=ie+ue*(_-m)/I,he=!0),m+=I}if(ge&&e.ellipse?e.ellipse(H,X,K,ne,ve,ie,De,Ge):e.arc(H,X,xe,ie,De,Ge),he)break e;D&&(s=Ys(ie)*K+H,l=Xs(ie)*ne+X),u=Ys(De)*K+H,c=Xs(De)*ne+X;break;case mt.R:s=u=n[M],l=c=n[M+1],f=n[M++],h=n[M++];var Me=n[M++],ot=n[M++];if(d){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(f,h),e.lineTo(f+Qx(Ye,Me),h),Ye-=Me,Ye>0&&e.lineTo(f+Me,h+Qx(Ye,ot)),Ye-=ot,Ye>0&&e.lineTo(f+Jx(Me-Ye,0),h+ot),Ye-=Me,Ye>0&&e.lineTo(f,h+Jx(ot-Ye,0));break e}m+=I}e.rect(f,h,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 Oo(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+f&&c>n+f&&c>a+f&&c>s+f||ct+f&&u>r+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||c+ui&&(i+=sh);var h=Math.atan2(l,s);return h<0&&(h+=sh),h>=n&&h<=i||h+sh>=n&&h+sh<=i}function Fa(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var Co=wa.CMD,qs=Math.PI*2,bq=1e-4;function Tq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&Cq(),d=ur(e,n,a,s,Xn[0]),h>1&&(p=ur(e,n,a,s,Xn[1]))),h===2?me&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=Sr(e,n,a,u),h=0;hr||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 f=n;n=i,i=f}n<0&&(n+=qs,i+=qs);for(var h=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+=Fa(l,u,c,f,n,i))),m&&(l=a[p],u=a[p+1],c=l,f=u),g){case Co.M:c=a[p++],f=a[p++],l=c,u=f;break;case Co.L:if(r){if(Oo(l,u,a[p],a[p+1],e,n,i))return!0}else s+=Fa(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Co.C:if(r){if(Sq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Mq(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 Co.Q:if(r){if(iV(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Aq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Co.A:var y=a[p++],_=a[p++],S=a[p++],b=a[p++],C=a[p++],M=a[p++];p+=1;var A=!!(1-a[p++]);h=Math.cos(C)*S+y,d=Math.sin(C)*b+_,m?(c=h,f=d):s+=Fa(l,u,h,d,n,i);var D=(n-y)*b/S+y;if(r){if(wq(y,_,b,C,C+M,A,e,D,i))return!0}else s+=Lq(y,_,b,C,C+M,A,D,i);l=Math.cos(C+M)*S+y,u=Math.sin(C+M)*b+_;break;case Co.R:c=l=a[p++],f=u=a[p++];var E=a[p++],k=a[p++];if(h=c+E,d=f+k,r){if(Oo(c,f,h,f,e,n,i)||Oo(h,f,h,d,e,n,i)||Oo(h,d,c,d,e,n,i)||Oo(c,d,c,f,e,n,i))return!0}else s+=Fa(h,f,h,d,n,i),s+=Fa(c,d,c,f,n,i);break;case Co.Z:if(r){if(Oo(l,u,c,f,e,n,i))return!0}else s+=Fa(l,u,c,f,n,i);l=c,u=f;break}}return!r&&!Tq(u,f)&&(s+=Fa(l,u,c,f,n,i)||0),s!==0}function Pq(t,e,r){return aV(t,0,!1,e,r)}function Dq(t,e,r,n){return aV(t,e,!0,r,n)}var my=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Rl),kq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},H0.style)},r1=xa.concat(["invisible","culling","z","z2","zlevel","parent"]),Ue=function(t){$(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?db:n>.2?uX:vb}else if(r)return vb}return db},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Kd(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&nc)&&(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)),Dq(s,l/u,r,n)))return!0}if(this.hasFill())return Pq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=nc,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&nc)},e.prototype.createStyle=function(r){return Ev(my,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={},f=$e(u),h=0;hi&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),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 Z0(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 oV(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 zq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),Bq={},Be=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new zq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=oV(Bq,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?Oq(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 gk={fill:"#000"},mk=2,qi={},Vq={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},H0.style)},Xe=function(t){$(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=gk,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&&(j=M[O],j.align==="right");)this._placeToken(j,r,D,y,z,"right",S),E-=j.width,z-=j.width,O--;for(I+=(c-(I-m)-(_-z)-E)/2;k<=O;)j=M[k],this._placeToken(j,r,D,y,I+j.width/2,"center",S),I+=j.width,k++;y+=D}},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,f=a+i/2;c==="top"?f=a+r.height/2:c==="bottom"&&(f=a+i-r.height/2);var h=!r.isLineHolder&&n1(u);h&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,f-r.height/2,r.width,r.height);var d=!!u.backgroundColor,p=r.textPadding;p&&(o=bk(o,s,p),f-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(Kc),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,S=0,b=!1,C=wk("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=Sk("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(S=mk,b=!0,y.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=f,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||lo,m.opacity=xn(u.opacity,n.opacity,1),_k(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(Sb(m,r.contentWidth,r.contentHeight,b?0:null))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,c=r.borderColor,f=l&&l.image,h=l&&!f,d=r.borderRadius,p=this,g,m;if(h||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(h){var _=g.style;_.fill=l||null,_.fillOpacity=pe(r.fillOpacity,1)}else if(f){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 b=(g||m).style;b.shadowBlur=r.shadowBlur||0,b.shadowColor=r.shadowColor||"transparent",b.shadowOffsetX=r.shadowOffsetX||0,b.shadowOffsetY=r.shadowOffsetY||0,b.opacity=xn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return lV(r)&&(n=[r.fontStyle,r.fontWeight,sV(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&Pn(n)||r.textFont||r.font},e}(ci),jq={left:!0,right:1,center:1},Fq={top:1,bottom:1,middle:1},yk=["fontStyle","fontWeight","fontSize","fontFamily"];function sV(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?d2+"px":t+"px"}function _k(t,e){for(var r=0;r=0,a=!1;if(t instanceof Ue){var o=uV(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Eu(s)||Eu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Eu(u.fill)&&Eu(s)?(a=!0,n=J({},n),u=J({},u),u.fill=fy(s)):!Eu(u.stroke)&&Eu(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=fy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??yf)}return n}function Yq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Hq)}return r}function Xq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:Zq(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 i1(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return $q(this,t,e,r);if(t==="blur")return Xq(this,t,r);if(t==="select")return Yq(this,t,r)}return r}function Kl(t){t.stateProxy=i1;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=i1),r&&(r.stateProxy=i1)}function Lk(t,e){!gV(t,e)&&!t.__highByOuter&&_o(t,cV)}function Pk(t,e){!gV(t,e)&&!t.__highByOuter&&_o(t,fV)}function co(t,e){t.__highByOuter|=1<<(e||0),_o(t,cV)}function fo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&_o(t,fV)}function dV(t){_o(t,z2)}function B2(t){_o(t,hV)}function vV(t){_o(t,Wq)}function pV(t){_o(t,Uq)}function gV(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function mV(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=N2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){hV(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function Mb(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function us(t,e,r){Al(t,!0),_o(t,Kl),Lb(t,e,r)}function tK(t){Al(t,!1)}function bt(t,e,r,n){n?tK(t):us(t,e,r)}function Lb(t,e,r){var n=Le(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var kk=["emphasis","blur","select"],rK={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=a1(p),s*=a1(p));var g=(i===a?-1:1)*a1((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,m=g*o*d/s,y=g*-s*h/o,_=(t+r)/2+qp(f)*m-Xp(f)*y,S=(e+n)/2+Xp(f)*m+qp(f)*y,b=Rk([1,0],[(h-m)/o,(d-y)/s]),C=[(h-m)/o,(d-y)/s],M=[(-1*h-m)/o,(-1*d-y)/s],A=Rk(C,M);if(Db(C,M)<=-1&&(A=lh),Db(C,M)>=1&&(A=0),A<0){var D=Math.round(A/lh*1e6)/1e6;A=lh*2+D%2*lh}c.addData(u,_,S,o,s,b,A,f,a)}var lK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,uK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function cK(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(lK);if(!l)return e;for(var u=0;uj*j+G*G&&(D=k,E=I),{cx:D,cy:E,x0:-c,y0:-f,x1:D*(i/C-1),y1:E*(i/C-1)}}function mK(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 yK(t,e){var r,n=Gh(e.r,0),i=Gh(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,f=e.cy,h=!!e.clockwise,d=zk(u-l),p=d>o1&&d%o1;if(p>_i&&(d=p),!(n>_i))t.moveTo(c,f);else if(d>o1-_i)t.moveTo(c+n*Ru(l),f+n*Ks(l)),t.arc(c,f,n,l,u,!h),i>_i&&(t.moveTo(c+i*Ru(u),f+i*Ks(u)),t.arc(c,f,i,u,l,h));else{var g=void 0,m=void 0,y=void 0,_=void 0,S=void 0,b=void 0,C=void 0,M=void 0,A=void 0,D=void 0,E=void 0,k=void 0,I=void 0,z=void 0,O=void 0,j=void 0,G=n*Ru(l),F=n*Ks(l),U=i*Ru(u),V=i*Ks(u),W=d>_i;if(W){var H=e.cornerRadius;H&&(r=mK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=zk(n-i)/2;if(S=Ki(X,y),b=Ki(X,_),C=Ki(X,g),M=Ki(X,m),E=A=Gh(S,b),k=D=Gh(C,M),(A>_i||D>_i)&&(I=n*Ru(u),z=n*Ks(u),O=i*Ru(l),j=i*Ks(l),d_i){var ge=Ki(y,E),De=Ki(_,E),he=Kp(O,j,G,F,n,ge,h),Me=Kp(I,z,U,V,n,De,h);t.moveTo(c+he.cx+he.x0,f+he.cy+he.y0),E0&&t.arc(c+he.cx,f+he.cy,ge,jr(he.y0,he.x0),jr(he.y1,he.x1),!h),t.arc(c,f,n,jr(he.cy+he.y1,he.cx+he.x1),jr(Me.cy+Me.y1,Me.cx+Me.x1),!h),De>0&&t.arc(c+Me.cx,f+Me.cy,De,jr(Me.y1,Me.x1),jr(Me.y0,Me.x0),!h))}else t.moveTo(c+G,f+F),t.arc(c,f,n,l,u,!h);if(!(i>_i)||!W)t.lineTo(c+U,f+V);else if(k>_i){var ge=Ki(g,k),De=Ki(m,k),he=Kp(U,V,I,z,i,-De,h),Me=Kp(G,F,O,j,i,-ge,h);t.lineTo(c+he.cx+he.x0,f+he.cy+he.y0),k0&&t.arc(c+he.cx,f+he.cy,De,jr(he.y0,he.x0),jr(he.y1,he.x1),!h),t.arc(c,f,i,jr(he.cy+he.y1,he.cx+he.x1),jr(Me.cy+Me.y1,Me.cx+Me.x1),h),ge>0&&t.arc(c+Me.cx,f+Me.cy,ge,jr(Me.y1,Me.x1),jr(Me.y0,Me.x0),!h))}else t.lineTo(c+U,f+V),t.arc(c,f,i,u,l,h)}t.closePath()}}}var _K=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){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new _K},e.prototype.buildPath=function(r,n){yK(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 xK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),_f=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new xK},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);_f.prototype.type="ring";function SK(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=t.length;h=2){if(n){var a=SK(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,f=i.length;sJs[1]){if(a=!1,_r.negativeSize||n)return a;var l=Qp(Js[0]-Qs[1]),u=Qp(Qs[0]-Js[1]);s1(l,u)>eg.len()&&(l=u||!_r.bidirectional)&&(Te.scale(Jp,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 f=c.duration,h=c.delay,d=c.easing,p={duration:f,delay:h||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){G2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){G2("enter",t,e,r,n,i,a)}function Rc(t){if(!t.__zr)return!0;for(var e=0;ela(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function jk(t){return!t.isGroup}function EK(t){return t.shape!=null}function Fv(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){jk(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return EK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(jk(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 U2(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 IV(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 wf(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)):Qc(t.replace("path://",""),n,r,"center")}function Hh(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=l1(d,p,c,f)/h;return!(m<0||m>1)}function l1(t,e,r,n){return t*n-r*e}function NK(t){return t<=1e-6&&t>=-1e-6}function Ql(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]),Fk(t,Ct,"x","width",3,1,i&&i[0]||0),Fk(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function Fk(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]:la(s)>1e-8?(l-o)*e[i]/s:0):t[r]-=e[i]}function xo(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){fe(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 Ib(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Ps(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function q0(t,e,r){RV(t,e,r,-1/0)}function RV(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 Ne(Ne({},t,!0),e,!0)}const ZK={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:". "}}}},$K={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 wy="ZH",X2="EN",Oc=X2,mm={},q2={},FV=Ze.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Oc).toUpperCase();return t.indexOf(wy)>-1?wy:Oc}():Oc;function K2(t,e){t=t.toUpperCase(),q2[t]=new We(e),mm[t]=e}function YK(t){if(se(t)){var e=mm[t.toUpperCase()]||{};return t===wy||t===X2?ye(e):Ne(ye(e),ye(mm[Oc]),!1)}else return Ne(ye(t),ye(mm[Oc]),!1)}function Nb(t){return q2[t]}function XK(){return q2[Oc]}K2(X2,ZK);K2(wy,$K);var Rb=null;function qK(t){Rb||(Rb=t)}function Xt(){return Rb}var Q2=1e3,J2=Q2*60,yd=J2*60,ti=yd*24,Zk=ti*365,KK={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})/},ym={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},QK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",rg="{yyyy}-{MM}-{dd}",$k={year:"{yyyy}",month:"{yyyy}-{MM}",day:rg,hour:rg+" "+ym.hour,minute:rg+" "+ym.minute,second:rg+" "+ym.second,millisecond:QK},Tn=["year","month","day","hour","minute","second","millisecond"],JK=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function eQ(t){return!se(t)&&!me(t)?tQ(t):t}function tQ(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=we(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=ym[n]:KK[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 _d(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 rQ(t){return t===_d(t)}function nQ(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Gv(t,e,r,n){var i=Aa(t),a=i[GV(r)](),o=i[eM(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[tM(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[rM(r)](),f=(c-1)%12+1,h=i[nM(r)](),d=i[iM(r)](),p=i[aM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Nb(n||FV)||XK(),_=y.getModel("time"),S=_.get("month"),b=_.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,b[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(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Jr(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Jr(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Jr(p,3)).replace(/{S}/g,p+"")}function iQ(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=bc(t.value,i);a=r[c][c][0]}}return Gv(new Date(t.value),a,i,n)}function bc(t,e){var r=Aa(t),n=r[eM(e)]()+1,i=r[tM(e)](),a=r[rM(e)](),o=r[nM(e)](),s=r[iM(e)](),l=r[aM(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,p=d&&n===1;return p?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function by(t,e,r){switch(e){case"year":t[HV(r)](0);case"month":t[WV(r)](1);case"day":t[UV(r)](0);case"hour":t[ZV(r)](0);case"minute":t[$V(r)](0);case"second":t[YV(r)](0)}return t}function GV(t){return t?"getUTCFullYear":"getFullYear"}function eM(t){return t?"getUTCMonth":"getMonth"}function tM(t){return t?"getUTCDate":"getDate"}function rM(t){return t?"getUTCHours":"getHours"}function nM(t){return t?"getUTCMinutes":"getMinutes"}function iM(t){return t?"getUTCSeconds":"getSeconds"}function aM(t){return t?"getUTCMilliseconds":"getMilliseconds"}function aQ(t){return t?"setUTCFullYear":"setFullYear"}function HV(t){return t?"setUTCMonth":"setMonth"}function WV(t){return t?"setUTCDate":"setDate"}function UV(t){return t?"setUTCHours":"setHours"}function ZV(t){return t?"setUTCMinutes":"setMinutes"}function $V(t){return t?"setUTCSeconds":"setSeconds"}function YV(t){return t?"setUTCMilliseconds":"setMilliseconds"}function oQ(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 oM(t){if(!L2(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 sM(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 Cf=Iv;function Ob(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?Aa(t):t;if(isNaN(+l)){if(s)return"-"}else return Gv(l,n,r)}if(e==="ordinal")return ny(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=Sa(t);return a(u)?oM(u):ny(t)?i(t):typeof t=="boolean"?t+"":"-"}var Yk=["a","b","c","d","e","f","g"],f1=function(t,e){return"{"+t+(e??"")+"}"};function lM(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 lQ(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd -yyyy`);var n=Aa(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"](),f=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(f,3)),t}function uQ(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function eu(t,e){return e=e||"transparent",se(t)?t:we(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Ty(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var _m={},h1={},Mf=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(_m),this._normalMasterList=n(h1);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"){_m[e]=r;return}h1[e]=r},t.get=function(e){return h1[e]||_m[e]},t}();function cQ(t){return!!_m[t]}var zb={coord:1,coord2:2};function fQ(t){qV.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var qV=de();function hQ(t){var e=t.getShallow("coord",!0),r=zb.coord;if(e==null){var n=qV.get(t.type);n&&n.getCoord2&&(r=zb.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var oa={none:0,dataCoordSys:1,boxCoordSys:2};function KV(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=oa.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=oa.dataCoordSys,a||(i=oa.none)):n==="box"&&(i=oa.boxCoordSys,!a&&!cQ(r)&&(i=oa.none))}return{coordSysType:r,kind:i}}function Hv(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=KV(e),o=a.kind,s=a.coordSysType;if(i&&o!==oa.dataCoordSys&&(o=oa.dataCoordSys,s=r),o===oa.none||s!==r)return!1;var l=n(r,e);return l?(o===oa.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var QV=function(t,e){var r=e.getReferringComponents(t,Dt).models[0];return r&&r.coordinateSystem},xm=R,JV=["left","right","top","bottom","width","height"],Ll=[["width","left","right"],["height","top","bottom"]];function uM(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(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),d,p;if(t==="horizontal"){var g=c.width+(h?-h.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+(h?-h.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 zl=uM;Ie(uM,"vertical");Ie(uM,"horizontal");function ej(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 dQ(t,e){var r=sr(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Wh.point)a=r.refPoint,i=wt(n,{width:e.getWidth(),height:e.getHeight()});else{var o=t.get("center"),s=ee(o)?o:[o,o];i=wt(n,r.refContainer),a=r.boxCoordFrom===zb.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function tj(t,e){var r=dQ(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 wt(t,e,r){r=Cf(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),f=r[2]+r[0],h=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-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-h),isNaN(o)&&(o=i-l-c-f),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-h;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-c/2-r[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-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 rj(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 f;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 mf(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return ej(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);Q4(je,We);F0(je);WK(je);UK(je,gQ);function gQ(t){var e=[];return R(je.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return ua(r).main}),t!=="dataset"&&Ee(e,"dataset")<=0&&e.unshift("dataset"),e}var q={color:{},darkColor:{},size:{}},Vt=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(Vt,{primary:Vt.neutral80,secondary:Vt.neutral70,tertiary:Vt.neutral60,quaternary:Vt.neutral50,disabled:Vt.neutral20,border:Vt.neutral30,borderTint:Vt.neutral20,borderShade:Vt.neutral40,background:Vt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Vt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Vt.neutral70,axisLineTint:Vt.neutral40,axisTick:Vt.neutral70,axisTickMinor:Vt.neutral60,axisLabel:Vt.neutral70,axisSplitLine:Vt.neutral15,axisMinorSplitLine:Vt.neutral05});for(var el in Vt)if(Vt.hasOwnProperty(el)){var Xk=Vt[el];el==="theme"?q.darkColor.theme=Vt.theme.slice():el==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":el.indexOf("accent")===0?q.darkColor[el]=Ja(Xk,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):q.darkColor[el]=Ja(Xk,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 ij="";typeof navigator<"u"&&(ij=navigator.platform||"");var Ou="rgba(0, 0, 0, 0.2)",aj=q.color.theme[0],mQ=Ja(aj,null,null,.9);const yQ={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[mQ,aj],aria:{decal:{decals:[{color:Ou,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ou,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ou,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ou,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ou,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ou,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ij.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 oj=de(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Bn="original",Cr="arrayRows",Vn="objectRows",Bi="keyedColumns",fs="typedArray",sj="unknown",Ei="column",hu="row",Lr={Must:1,Might:2,Not:3},lj=Fe();function _Q(t){lj(t).datasetMap=de()}function uj(t,e,r){var n={},i=fM(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=lj(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,c,f;t=t.slice(),R(t,function(g,m){var y=we(g)?g:t[m]={name:g};y.type==="ordinal"&&c==null&&(c=m,f=p(y)),n[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});R(t,function(g,m){var y=g.name,_=p(g);if(c==null){var S=h.valueWayDim;d(n[y],S,_),d(o,S,_),h.valueWayDim+=_}else if(c===m)d(n[y],0,_),d(a,0,_);else{var S=h.categoryWayDim;d(n[y],S,_),d(o,S,_),h.categoryWayDim+=_}});function d(g,m,y){for(var _=0;_e)return t[n];return t[r-1]}function hj(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:TQ(n,o);if(c=c||r,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function CQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var ng,uh,Kk,Qk="\0_ec_inner",MQ=1,dM=function(t){$(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=tI(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,tI(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"?Kk(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;_Q(this),R(r,function(f,h){f!=null&&(je.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?ye(f):Ne(i[h],f,!0))}),u&&u.each(function(f,h){je.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),je.topologicalTravel(s,je.getAllClassMainTypes(),c,this);function c(f){var h=wQ(this,f,pt(r[f])),d=a.get(f),p=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=$4(d,h,p);FX(g,f,je),i[f]=null,a.set(f,null),o.set(f,0);var m=[],y=[],_=0,S;R(g,function(b,C){var M=b.existing,A=b.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var D=f==="series",E=je.getClass(f,b.keyInfo.subType,!D);if(!E)return;if(f==="tooltip"){if(S)return;S=!0}if(M&&M.constructor===E)M.name=b.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var k=J({componentIndex:C},b.keyInfo);M=new E(A,this,this,k),J(M,k),b.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[f]=m,a.set(f,y),o.set(f,_),f==="series"&&ng(this)}this._seriesIndices||ng(this)},e.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(je.hasClass(i)){for(var a=pt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Jd(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[Qk],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 RQ(t,e){return t.join(",")===e.join(",")}var yi=R,av=we,rI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function d1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=rI.length;r0?r[o-1].seriesModel:null)}),WQ(r)}})}function WQ(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,f){var h=o.get(e.stackedDimension,f);if(isNaN(h))return i;var d,p;s?p=o.getRawIndex(f):d=o.get(e.stackedByDimension,f);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"&&h>=0&&_>0||l==="samesign"&&h<=0&&_<0){h=LX(h,_),g=_;break}}}return n[0]=h,n[1]=g,n})})}var J0=function(){function t(e){this.data=e.data||(e.sourceFormat===Bi?{}:[]),this.sourceFormat=e.sourceFormat||sj,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=S)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};uI=(e={},e[Cr+"_"+Ei]={pure:!0,appendData:a},e[Cr+"_"+hu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Vn]={pure:!0,appendData:a},e[Bi]={pure:!0,appendData:function(o){var s=this._data;R(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},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 ef(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function dI(t){var e,r;return we(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function xd(t){return new QQ(t)}var QQ=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 f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=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(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},eJ=function(){function t(e,r){if(!qe(r)){var n="";it(n)}this._opFn=bj[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}(),Tj=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}(),tJ=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 rJ(t,e){return t==="eq"||t==="ne"?new tJ(t==="eq",e):fe(bj,t)?new eJ(t,e):null}var nJ=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 hs(e,r)},t}();function iJ(t,e){var r=new nJ,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 S="";fe(l,y)&&it(S),l[y]=_}});else for(var c=0;c65535?hJ:dJ}function Bu(){return[1/0,-1/0]}function vJ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function gI(t,e,r,n,i){var a=Aj[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=f&&_<=h||isNaN(_))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var m=d[i[0]],S=d[i[1]],b=e[i[1]][0],C=e[i[1]][1],y=0;y=f&&_<=h||isNaN(_))&&(M>=b&&M<=C||isNaN(M))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y=f&&_<=h||isNaN(_))&&(l[u++]=A)}else for(var y=0;ye[k][1])&&(D=!1)}D&&(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,f,h,d=new(zu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=f,h=b)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,d=c+m)}var S=this.getRawIndex(f),b=this.getRawIndex(d);fc-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=y),h[d++]=_}return a._count=d,a._indices=h,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=f)}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 hs(r[a],this._dimensions[a])}g1={arrayRows:e,objectRows:function(r,n,i,a){return hs(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return hs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),Lj=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(ag(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 f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=pe(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=pe(f.sourceHeader,h.sourceHeader),g=pe(f.dimensions,h.dimensions),m=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=m?[jb(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=[jb(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&&yI(a)}var o,s=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&yI(f),s.push(c),l.push(u._getVersionSign())}),n?o=cJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[UQ(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=AX;function AX(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 _y(t,e,r)}function _y(t,e,r){return se(t)?MX(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),j4),t=(+t).toFixed(e),r?t:+t}function Dn(t){return t.sort(function(e,r){return e-r}),t}function Li(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 V4(t)}function V4(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 L2(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(ca(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function LX(t,e,r){if(!t[e])return 0;var n=F4(t,r);return n[e]||0}function F4(t,e){var r=ci(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=ci(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 PX(t,e){var r=Math.max(Li(t),Li(e)),n=t+e;return r>j4?n:Ht(n,r)}var Sw=9007199254740991;function P2(t){var e=Math.PI*2;return(t%e+e)%e}function qc(t){return t>-aD&&t=10&&e++,e}function k2(t,e){var r=W0(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 mm(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 bw(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 Xx(t){t.option=t.parentModel=t.ecModel=null}var XX=".",Ws="___EC__COMPONENT__CONTAINER___",Q4="___EC__EXTENDED_CLASS___";function ha(t){var e={main:"",sub:""};if(t){var r=t.split(XX);e.main=r[0]||"",e.sub=r[1]||""}return e}function qX(t){Rr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function KX(t){return!!(t&&t[Q4])}function N2(t,e){t.$constructor=t,t.extend=function(r){var n=this,i;return QX(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)},x2(i,this)),J(i.prototype,r),i[Q4]=!0,i.extend=this.extend,i.superCall=tq,i.superApply=rq,i.superClass=n,i}}function QX(t){return me(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function J4(t,e){t.extend=e.extend}var JX=Math.round(Math.random()*10);function eq(t){var e=["__\0is_clz",JX++].join("_");t.prototype[e]=!0,t.isInstance=function(r){return!!(r&&r[e])}}function tq(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 nq=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],iq=ql(nq),aq=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return iq(this,e,r)},t}(),Tw=new Yc(50);function oq(t){if(typeof t=="string"){var e=Tw.get(t);return e&&e.image}else return t}function R2(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=Tw.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!Z0(e)&&a.pending.push(o)):(e=bn.loadImage(t,uD,uD),e.__zrImageSrc=t,Tw.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function uD(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=xa(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 rj(t,e,r){var n=r.containerWidth,i=r.contentWidth,a=r.fontMeasureInfo;if(!n){t.textLine="",t.isTruncated=!1;return}var o=xa(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?lq(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=xa(a,e)}e===""&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}function lq(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 T=tj(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},M=0;Mp&&Kx(a,o.substring(p,m),e,d),Kx(a,g[2],e,d,g[1]),p=qx.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=nj(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=_a(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var vq=ci(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function pq(t){return dq(t)?!!vq[t]:!0}function nj(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=_a(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 hD(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(fD,Xc(r,o,i),Nl(n,s,a),o,s),Ce.intersect(e,fD,null,dD);var l=dD.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=Xc(l.x,l.width,i,!0),t.baseY=Nl(l.y,l.height,a,!0)}}var fD=new Ce(0,0,0,0),dD={outIntersectRect:{},clamp:!0};function O2(t){return t!=null?t+="":t=""}function gq(t){var e=O2(t.text),r=t.font,n=xa(_a(r),e),i=jv(r);return Cw(t,n,i,null)}function Cw(t,e,r,n){var i=new Ce(Xc(t.x||0,e,t.textAlign),Nl(t.y||0,r,t.textBaseline),e,r),a=n??(ij(t)?t.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function ij(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var Mw="__zr_style_"+Math.round(Math.random()*10),Rl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},$0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Rl[Mw]=!0;var vD=["z","z2","invisible"],mq=["invisible"],fi=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(Xp[0]=t1(i)*r+t,Xp[1]=e1(i)*n+e,qp[0]=t1(a)*r+t,qp[1]=e1(a)*n+e,u(s,Xp,qp),c(l,Xp,qp),i=i%Us,i<0&&(i=i+Us),a=a%Us,a<0&&(a=a+Us),i>a&&!o?a+=Us:ii&&(Kp[0]=t1(d)*r+t,Kp[1]=e1(d)*n+e,u(s,Kp,s),c(l,Kp,l))}var yt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Zs=[],$s=[],Xi=[],Co=[],qi=[],Ki=[],r1=Math.min,n1=Math.max,Ys=Math.cos,Xs=Math.sin,Ra=Math.abs,Aw=Math.PI,Eo=Aw*2,i1=typeof Float32Array<"u",of=[];function a1(t){var e=Math.round(t/Aw*1e8)/1e8;return e%2*Aw}function X0(t,e){var r=a1(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-a1(r-i)):e&&r0&&(this._ux=Ra(n/gy/e)||0,this._uy=Ra(n/gy/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(yt.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(yt.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(yt.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(yt.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(),of[0]=i,of[1]=a,X0(of,o),i=of[0],a=of[1];var s=a-i;return this.addData(yt.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Ys(a)*n+e,this._yi=Xs(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(yt.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(yt.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)&&i1&&(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(){Xi[0]=Xi[1]=qi[0]=qi[1]=Number.MAX_VALUE,Co[0]=Co[1]=Ki[0]=Ki[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 yt.C:{var T=e[f++],C=e[f++],m=e[f++],y=e[f++],M=e[f++],A=e[f++];g=DY(a,o,T,C,m,y,M,A,10),a=M,o=A;break}case yt.Q:{var T=e[f++],C=e[f++],m=e[f++],y=e[f++];g=EY(a,o,T,C,m,y,10),a=m,o=y;break}case yt.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=Ys(z)*D+k,l=Xs(z)*I+E),g=n1(D,I)*r1(Eo,Math.abs(O)),a=Ys(V)*D+k,o=Xs(V)*I+E;break;case yt.R:{s=a=e[f++],l=o=e[f++];var G=e[f++],F=e[f++];g=G*2+F*2;break}case yt.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,T,C;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,_=r*g,!_)))e:for(var M=0;M0&&(e.lineTo(T,C),S=0),A){case yt.M:s=u=n[M++],l=c=n[M++],e.moveTo(u,c);break;case yt.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&&(T=h,C=f,S=O)}break}case yt.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;ys(u,V,F,j,z,Zs),ys(c,G,U,W,z,$s),e.bezierCurveTo(Zs[1],$s[1],Zs[2],$s[2],Zs[3],$s[3]);break e}m+=I}e.bezierCurveTo(V,G,F,U,j,W),u=j,c=W;break}case yt.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;Xd(u,V,F,z,Zs),Xd(c,G,U,z,$s),e.quadraticCurveTo(Zs[1],$s[1],Zs[2],$s[2]);break e}m+=I}e.quadraticCurveTo(V,G,F,U),u=F,c=U;break}case yt.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=Ys(ie)*K+H,l=Xs(ie)*ne+X),u=Ys(ke)*K+H,c=Xs(ke)*ne+X;break;case yt.R:s=u=n[M],l=c=n[M+1],h=n[M++],f=n[M++];var Me=n[M++],st=n[M++];if(d){var I=p[y++];if(m+I>_){var Ye=_-m;e.moveTo(h,f),e.lineTo(h+r1(Ye,Me),f),Ye-=Me,Ye>0&&e.lineTo(h+Me,f+r1(Ye,st)),Ye-=st,Ye>0&&e.lineTo(h+n1(Me-Ye,0),f+st),Ye-=Me,Ye>0&&e.lineTo(h,f+n1(st-Ye,0));break e}m+=I}e.rect(h,f,Me,st);break;case yt.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=yt,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function zo(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+=sf);var f=Math.atan2(l,s);return f<0&&(f+=sf),f>=n&&f<=i||f+sf>=n&&f+sf<=i}function Ga(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var Mo=Ta.CMD,qs=Math.PI*2,Tq=1e-4;function Cq(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&Mq(),d=ur(e,n,a,s,qn[0]),f>1&&(p=ur(e,n,a,s,qn[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);tn[0]=-l,tn[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>=tn[0]+t&&o<=tn[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=tn[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 Mo.M:c=a[p++],h=a[p++],l=c,u=h;break;case Mo.L:if(r){if(zo(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 Mo.C:if(r){if(bq(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Aq(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 Mo.Q:if(r){if(aj(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=Lq(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Mo.A:var y=a[p++],_=a[p++],S=a[p++],T=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)*T+_,m?(c=f,h=d):s+=Ga(l,u,f,d,n,i);var k=(n-y)*T/S+y;if(r){if(wq(y,_,T,C,C+M,A,e,k,i))return!0}else s+=Pq(y,_,T,C,C+M,A,k,i);l=Math.cos(C+M)*S+y,u=Math.sin(C+M)*T+_;break;case Mo.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(zo(c,h,f,h,e,n,i)||zo(f,h,f,d,e,n,i)||zo(f,d,c,d,e,n,i)||zo(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 Mo.Z:if(r){if(zo(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&&!Cq(u,h)&&(s+=Ga(l,u,c,h,n,i)||0),s!==0}function kq(t,e,r){return oj(t,0,!1,e,r)}function Dq(t,e,r,n){return oj(t,e,!0,r,n)}var xy=Se({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Rl),Iq={style:Se({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},$0.style)},o1=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?mw:n>.2?cX:yw}else if(r)return yw}return mw},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(se(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=Qd(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&nc)&&(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)),Dq(s,l/u,r,n)))return!0}if(this.hasFill())return kq(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=nc,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&nc)},e.prototype.createStyle=function(r){return Ov(xy,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 q0(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=En(n,s,!0)),Sc(a*2)===Sc(o*2)&&(t.y1=t.y2=En(a,s,!0))),t}}function sj(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=En(n,s,!0),t.y=En(i,s,!0),t.width=Math.max(En(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(En(i+o,s,!1)-t.y,o===0?0:1)),t}}function En(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 Bq=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),jq={},Be=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Bq},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=sj(jq,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?zq(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 _D={fill:"#000"},xD=2,Qi={},Vq={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},$0.style)},Xe=function(t){Y(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=_D,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&&s1(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=MD(o,s,p),h-=r.height/2-p[0]-r.innerHeight/2);var g=this._getOrCreateChild(Kc),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,_=!1,S=0,T=!1,C=CD("fill"in u?u.fill:"fill"in n?n.fill:(_=!0,y.fill)),M=TD("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||_)?(S=xD,T=!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||uo,m.opacity=Sn(u.opacity,n.opacity,1),bD(m,u),M&&(m.lineWidth=Sn(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(Cw(m,r.contentWidth,r.contentHeight,T?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 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 T=(g||m).style;T.shadowBlur=r.shadowBlur||0,T.shadowColor=r.shadowColor||"transparent",T.shadowOffsetX=r.shadowOffsetX||0,T.shadowOffsetY=r.shadowOffsetY||0,T.opacity=Sn(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return uj(r)&&(n=[r.fontStyle,r.fontWeight,lj(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&kn(n)||r.textFont||r.font},e}(fi),Fq={left:!0,right:1,center:1},Gq={top:1,bottom:1,middle:1},SD=["fontStyle","fontWeight","fontSize","fontFamily"];function lj(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?g2+"px":t+"px"}function bD(t,e){for(var r=0;r=0,a=!1;if(t instanceof Ue){var o=cj(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Eu(s)||Eu(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=J({},n),u=J({},u),u.fill=s):!Eu(u.fill)&&Eu(s)?(a=!0,n=J({},n),u=J({},u),u.fill=vy(s)):!Eu(u.stroke)&&Eu(l)&&(a||(n=J({},n),u=J({},u)),u.stroke=vy(l)),n.style=u}}if(n&&n.z2==null){a||(n=J({},n));var c=t.z2EmphasisLift;n.z2=t.z2+(c??mh)}return n}function Xq(t,e,r){if(r&&r.z2==null){r=J({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??Wq)}return r}function qq(t,e,r){var n=Ee(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:$q(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 l1(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return Yq(this,t,e,r);if(t==="blur")return qq(this,t,r);if(t==="select")return Xq(this,t,r)}return r}function Kl(t){t.stateProxy=l1;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=l1),r&&(r.stateProxy=l1)}function DD(t,e){!mj(t,e)&&!t.__highByOuter&&xo(t,hj)}function ID(t,e){!mj(t,e)&&!t.__highByOuter&&xo(t,fj)}function ho(t,e){t.__highByOuter|=1<<(e||0),xo(t,hj)}function fo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&xo(t,fj)}function vj(t){xo(t,V2)}function F2(t){xo(t,dj)}function pj(t){xo(t,Uq)}function gj(t){xo(t,Zq)}function mj(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function yj(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=z2(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){dj(u)}),s&&r.push(a)),o.isBlured=!1}),R(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function kw(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 us(t,e,r){Al(t,!0),xo(t,Kl),Iw(t,e,r)}function rK(t){Al(t,!1)}function wt(t,e,r,n){n?rK(t):us(t,e,r)}function Iw(t,e,r){var n=Le(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var ND=["emphasis","blur","select"],nK={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ir(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=u1(p),s*=u1(p));var g=(i===a?-1:1)*u1((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+Jp(h)*m-Qp(h)*y,S=(e+n)/2+Qp(h)*m+Jp(h)*y,T=BD([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=BD(C,M);if(Nw(C,M)<=-1&&(A=lf),Nw(C,M)>=1&&(A=0),A<0){var k=Math.round(A/lf*1e6)/1e6;A=lf*2+k%2*lf}c.addData(u,_,S,o,s,T,A,h,a)}var uK=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,cK=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function hK(t){var e=new Ta;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=Ta.CMD,l=t.match(uK);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 yK(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 _K(t,e){var r,n=Gf(e.r,0),i=Gf(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=VD(u-l),p=d>c1&&d%c1;if(p>Si&&(d=p),!(n>Si))t.moveTo(c,h);else if(d>c1-Si)t.moveTo(c+n*Ru(l),h+n*Ks(l)),t.arc(c,h,n,l,u,!f),i>Si&&(t.moveTo(c+i*Ru(u),h+i*Ks(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,T=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*Ru(l),F=n*Ks(l),U=i*Ru(u),j=i*Ks(u),W=d>Si;if(W){var H=e.cornerRadius;H&&(r=yK(H),g=r[0],m=r[1],y=r[2],_=r[3]);var X=VD(n-i)/2;if(S=Ji(X,y),T=Ji(X,_),C=Ji(X,g),M=Ji(X,m),E=A=Gf(S,T),D=k=Gf(C,M),(A>Si||k>Si)&&(I=n*Ru(u),z=n*Ks(u),O=i*Ru(l),V=i*Ks(l),dSi){var ge=Ji(y,E),ke=Ji(_,E),fe=eg(O,V,G,F,n,ge,f),Me=eg(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,Fr(fe.y0,fe.x0),Fr(fe.y1,fe.x1),!f),t.arc(c,h,n,Fr(fe.cy+fe.y1,fe.cx+fe.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),!f),ke>0&&t.arc(c+Me.cx,h+Me.cy,ke,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!f))}else t.moveTo(c+G,h+F),t.arc(c,h,n,l,u,!f);if(!(i>Si)||!W)t.lineTo(c+U,h+j);else if(D>Si){var ge=Ji(g,D),ke=Ji(m,D),fe=eg(U,j,I,z,i,-ke,f),Me=eg(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,Fr(fe.y0,fe.x0),Fr(fe.y1,fe.x1),!f),t.arc(c,h,i,Fr(fe.cy+fe.y1,fe.cx+fe.x1),Fr(Me.cy+Me.y1,Me.cx+Me.x1),f),ge>0&&t.arc(c+Me.cx,h+Me.cy,ge,Fr(Me.y1,Me.x1),Fr(Me.y0,Me.x0),!f))}else t.lineTo(c+U,h+j),t.arc(c,h,i,u,l,f)}t.closePath()}}}var xK=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}(),Or=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new xK},e.prototype.buildPath=function(r,n){_K(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Ue);Or.prototype.type="sector";var SK=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),yh=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new SK},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);yh.prototype.type="ring";function bK(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=bK(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;sJs[1]){if(a=!1,_r.negativeSize||n)return a;var l=tg(Js[0]-Qs[1]),u=tg(Qs[0]-Js[1]);h1(l,u)>ng.len()&&(l=u||!_r.bidirectional)&&(Te.scale(rg,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){U2("update",t,e,r,n,i,a)}function St(t,e,r,n,i,a){U2("enter",t,e,r,n,i,a)}function Rc(t){if(!t.__zr)return!0;for(var e=0;eca(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function HD(t){return!t.isGroup}function NK(t){return t.shape!=null}function Wv(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){HD(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return NK(o)&&(s.shape=ye(o.shape)),s}var a=n(t);e.traverse(function(o){if(HD(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 Y2(t,e){return re(t,function(r){var n=r[0];n=Gt(n,e.x),n=Rn(n,e.x+e.width);var i=r[1];return i=Gt(i,e.y),i=Rn(i,e.y+e.height),[n,i]})}function Ej(t,e){var r=Gt(t.x,e.x),n=Rn(t.x+t.width,e.x+e.width),i=Gt(t.y,e.y),a=Rn(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 Sh(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)):Qc(t.replace("path://",""),n,r,"center")}function Hf(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=f1(d,p,c,h)/f;return!(m<0||m>1)}function f1(t,e,r,n){return t*n-r*e}function RK(t){return t<=1e-6&&t>=-1e-6}function Ql(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]),WD(t,Ct,"x","width",3,1,i&&i[0]||0),WD(t,Ct,"y","height",0,2,i&&i[1]||0)),t}var Ct=[0,0,0,0];function WD(t,e,r,n,i,a,o){var s=e[a]+e[i],l=t[n];t[n]+=s,o=Gt(0,Rn(o,l)),t[n]=0?-e[i]:e[a]>=0?l+e[a]:ca(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:Se({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function Ow(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function Ps(t,e){if(t)if(ee(t))for(var r=0;re&&(e=o),oe&&(r=e=0),{min:r,max:e}}function e_(t,e,r){Oj(t,e,r,-1/0)}function Oj(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 ks(t,e){return Ne(Ne({},t,!0),e,!0)}const $K={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:". "}}}},YK={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 Cy="ZH",Q2="EN",Oc=Q2,xm={},J2={},Gj=Ze.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Oc).toUpperCase();return t.indexOf(Cy)>-1?Cy:Oc}():Oc;function eM(t,e){t=t.toUpperCase(),J2[t]=new We(e),xm[t]=e}function XK(t){if(se(t)){var e=xm[t.toUpperCase()]||{};return t===Cy||t===Q2?ye(e):Ne(ye(e),ye(xm[Oc]),!1)}else return Ne(ye(t),ye(xm[Oc]),!1)}function Bw(t){return J2[t]}function qK(){return J2[Oc]}eM(Q2,$K);eM(Cy,YK);var jw=null;function KK(t){jw||(jw=t)}function Xt(){return jw}var tM=1e3,rM=tM*60,yd=rM*60,ri=yd*24,XD=ri*365,QK={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})/},Sm={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},JK="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",ag="{yyyy}-{MM}-{dd}",qD={year:"{yyyy}",month:"{yyyy}-{MM}",day:ag,hour:ag+" "+Sm.hour,minute:ag+" "+Sm.minute,second:ag+" "+Sm.second,millisecond:JK},Cn=["year","month","day","hour","minute","second","millisecond"],eQ=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function tQ(t){return!se(t)&&!me(t)?rQ(t):t}function rQ(t){t=t||{};var e={},r=!0;return R(Cn,function(n){r&&(r=t[n]==null)}),R(Cn,function(n,i){var a=t[n];e[n]={};for(var o=null,s=i;s>=0;s--){var l=Cn[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=Sm[n]:QK[l].test(o)||(o=e[l][l][0]+" "+o),c=[o],r&&(c[1]="{primary|"+o+"}")),e[n][l]=c}}),e}function rn(t,e){return t+="","0000".substr(0,e-t.length)+t}function _d(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 nQ(t){return t===_d(t)}function iQ(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Uv(t,e,r,n){var i=La(t),a=i[Hj(r)](),o=i[nM(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[iM(r)](),u=i["get"+(r?"UTC":"")+"Day"](),c=i[aM(r)](),h=(c-1)%12+1,f=i[oM(r)](),d=i[sM(r)](),p=i[lM(r)](),g=c>=12?"pm":"am",m=g.toUpperCase(),y=n instanceof We?n:Bw(n||Gj)||qK(),_=y.getModel("time"),S=_.get("month"),T=_.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,rn(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,S[o-1]).replace(/{MMM}/g,T[o-1]).replace(/{MM}/g,rn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,rn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,M[u]).replace(/{e}/g,u+"").replace(/{HH}/g,rn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,rn(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,rn(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,rn(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,rn(p,3)).replace(/{S}/g,p+"")}function aQ(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=wc(t.value,i);a=r[c][c][0]}}return Uv(new Date(t.value),a,i,n)}function wc(t,e){var r=La(t),n=r[nM(e)]()+1,i=r[iM(e)](),a=r[aM(e)](),o=r[oM(e)](),s=r[sM(e)](),l=r[lM(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 My(t,e,r){switch(e){case"year":t[Wj(r)](0);case"month":t[Uj(r)](1);case"day":t[Zj(r)](0);case"hour":t[$j(r)](0);case"minute":t[Yj(r)](0);case"second":t[Xj(r)](0)}return t}function Hj(t){return t?"getUTCFullYear":"getFullYear"}function nM(t){return t?"getUTCMonth":"getMonth"}function iM(t){return t?"getUTCDate":"getDate"}function aM(t){return t?"getUTCHours":"getHours"}function oM(t){return t?"getUTCMinutes":"getMinutes"}function sM(t){return t?"getUTCSeconds":"getSeconds"}function lM(t){return t?"getUTCMilliseconds":"getMilliseconds"}function oQ(t){return t?"setUTCFullYear":"setFullYear"}function Wj(t){return t?"setUTCMonth":"setMonth"}function Uj(t){return t?"setUTCDate":"setDate"}function Zj(t){return t?"setUTCHours":"setHours"}function $j(t){return t?"setUTCMinutes":"setMinutes"}function Yj(t){return t?"setUTCSeconds":"setSeconds"}function Xj(t){return t?"setUTCMilliseconds":"setMilliseconds"}function sQ(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 uM(t){if(!D2(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 cM(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 Th=Rv;function Vw(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&kn(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 Uv(l,n,r)}if(e==="ordinal")return oy(t)?i(t):qe(t)&&a(t)?t+"":"-";var u=wa(t);return a(u)?uM(u):oy(t)?i(t):typeof t=="boolean"?t+"":"-"}var KD=["a","b","c","d","e","f","g"],p1=function(t,e){return"{"+t+(e??"")+"}"};function hM(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 uQ(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",rn(o,2)).replace("M",o).replace("yyyy",a).replace("yy",rn(a%100+"",2)).replace("dd",rn(s,2)).replace("d",s).replace("hh",rn(l,2)).replace("h",l).replace("mm",rn(u,2)).replace("m",u).replace("ss",rn(c,2)).replace("s",c).replace("SSS",rn(h,3)),t}function cQ(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}function eu(t,e){return e=e||"transparent",se(t)?t:be(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Ay(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var bm={},g1={},Ch=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,r){this._nonSeriesBoxMasterList=n(bm),this._normalMasterList=n(g1);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"){bm[e]=r;return}g1[e]=r},t.get=function(e){return g1[e]||bm[e]},t}();function hQ(t){return!!bm[t]}var Fw={coord:1,coord2:2};function fQ(t){Kj.set(t.fullType,{getCoord2:void 0}).getCoord2=t.getCoord2}var Kj=de();function dQ(t){var e=t.getShallow("coord",!0),r=Fw.coord;if(e==null){var n=Kj.get(t.type);n&&n.getCoord2&&(r=Fw.coord2,e=n.getCoord2(t))}return{coord:e,from:r}}var la={none:0,dataCoordSys:1,boxCoordSys:2};function Qj(t,e){var r=t.getShallow("coordinateSystem"),n=t.getShallow("coordinateSystemUsage",!0),i=la.none;if(r){var a=t.mainType==="series";n==null&&(n=a?"data":"box"),n==="data"?(i=la.dataCoordSys,a||(i=la.none)):n==="box"&&(i=la.boxCoordSys,!a&&!hQ(r)&&(i=la.none))}return{coordSysType:r,kind:i}}function Zv(t){var e=t.targetModel,r=t.coordSysType,n=t.coordSysProvider,i=t.isDefaultDataCoordSys;t.allowNotFound;var a=Qj(e),o=a.kind,s=a.coordSysType;if(i&&o!==la.dataCoordSys&&(o=la.dataCoordSys,s=r),o===la.none||s!==r)return!1;var l=n(r,e);return l?(o===la.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var Jj=function(t,e){var r=e.getReferringComponents(t,kt).models[0];return r&&r.coordinateSystem},wm=R,eV=["left","right","top","bottom","width","height"],Ll=[["width","left","right"],["height","top","bottom"]];function fM(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 zl=fM;Ie(fM,"vertical");Ie(fM,"horizontal");function tV(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 vQ(t,e){var r=sr(t,e,{enableLayoutOnlyByCenter:!0}),n=t.getBoxLayoutParams(),i,a;if(r.type===Wf.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===Fw.coord2?r.refPoint:[oe(s[0],i.width)+i.x,oe(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function rV(t,e){var r=vQ(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=Th(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 nV(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 gh(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){return tV(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);J4(Ve,We);U0(Ve);UK(Ve);ZK(Ve,mQ);function mQ(t){var e=[];return R(Ve.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=re(e,function(r){return ha(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 el in jt)if(jt.hasOwnProperty(el)){var QD=jt[el];el==="theme"?q.darkColor.theme=jt.theme.slice():el==="highlight"?q.darkColor.highlight="rgba(255,231,130,0.4)":el.indexOf("accent")===0?q.darkColor[el]=eo(QD,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):q.darkColor[el]=eo(QD,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 aV="";typeof navigator<"u"&&(aV=navigator.platform||"");var Ou="rgba(0, 0, 0, 0.2)",oV=q.color.theme[0],yQ=eo(oV,null,null,.9);const _Q={darkMode:"auto",colorBy:"series",color:q.color.theme,gradientColor:[yQ,oV],aria:{decal:{decals:[{color:Ou,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ou,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ou,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ou,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ou,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ou,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:aV.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 sV=de(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),jn="original",Cr="arrayRows",Vn="objectRows",Vi="keyedColumns",hs="typedArray",lV="unknown",Ri="column",fu="row",Lr={Must:1,Might:2,Not:3},uV=Fe();function xQ(t){uV(t).datasetMap=de()}function cV(t,e,r){var n={},i=vM(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=uV(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 dV(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:CQ(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 MQ(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var og,uf,eI,tI="\0_ec_inner",AQ=1,gM=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=iI(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,iI(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"?eI(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;xQ(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=wQ(this,h,gt(r[h])),d=a.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=Y4(d,f,p);GX(g,h,Ve),i[h]=null,a.set(h,null),o.set(h,0);var m=[],y=[],_=0,S;R(g,function(T,C){var M=T.existing,A=T.newOption;if(!A)M&&(M.mergeOption({},this),M.optionUpdated({},!1));else{var k=h==="series",E=Ve.getClass(h,T.keyInfo.subType,!k);if(!E)return;if(h==="tooltip"){if(S)return;S=!0}if(M&&M.constructor===E)M.name=T.keyInfo.name,M.mergeOption(A,this),M.optionUpdated(A,!1);else{var D=J({componentIndex:C},T.keyInfo);M=new E(A,this,this,D),J(M,D),T.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"&&og(this)}this._seriesIndices||og(this)},e.prototype.getOption=function(){var r=ye(this.option);return R(r,function(n,i){if(Ve.hasClass(i)){for(var a=gt(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!ev(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[tI],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 OQ(t,e){return t.join(",")===e.join(",")}var xi=R,ov=be,aI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function m1(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=aI.length;r0?r[o-1].seriesModel:null)}),UQ(r)}})}function UQ(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=PX(f,_),g=_;break}}}return n[0]=f,n[1]=g,n})})}var n_=function(){function t(e){this.data=e.data||(e.sourceFormat===Vi?{}:[]),this.sourceFormat=e.sourceFormat||lV,this.seriesLayoutBy=e.seriesLayoutBy||Ri,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};fI=(e={},e[Cr+"_"+Ri]={pure:!0,appendData:a},e[Cr+"_"+fu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Vn]={pure:!0,appendData:a},e[Vi]={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[jn]={appendData:a},e[hs]={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 eh(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function gI(t){var e,r;return be(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function xd(t){return new JQ(t)}var JQ=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}},tJ=function(){function t(e,r){if(!qe(r)){var n="";at(n)}this._opFn=TV[e],this._rvalFloat=wa(r)}return t.prototype.evaluate=function(e){return qe(e)?this._opFn(e,this._rvalFloat):this._opFn(wa(e),this._rvalFloat)},t}(),CV=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:wa(e),i=qe(r)?r:wa(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}(),rJ=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=wa(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=wa(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function nJ(t,e){return t==="eq"||t==="ne"?new rJ(t==="eq",e):he(TV,t)?new tJ(t,e):null}var iJ=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 fs(e,r)},t}();function aJ(t,e){var r=new iJ,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==Ri&&at(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)&&at(S),l[y]=_}});else for(var c=0;c65535?dJ:vJ}function Bu(){return[1/0,-1/0]}function pJ(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function _I(t,e,r,n,i){var a=LV[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]],T=e[i[1]][0],C=e[i[1]][1],y=0;y=h&&_<=f||isNaN(_))&&(M>=T&&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(zu(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=h,f=T)}I>0&&Is&&(g=s-c);for(var m=0;mp&&(p=_,d=c+m)}var S=this.getRawIndex(h),T=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 fs(r[a],this._dimensions[a])}x1={arrayRows:e,objectRows:function(r,n,i,a){return fs(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return fs(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),PV=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(lg(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=sn(s)?hs:jn,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?[Ww(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=[Ww(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&&SI(a)}var o,s=[],l=[];return R(e,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&SI(h),s.push(c),l.push(u._getVersionSign())}),n?o=hJ(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[ZQ(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=Ij(i);a>=e&&(e=a+ +(n&&(!a||Gb(i)&&!i.noHeader)))}),e}return 0}function yJ(t,e,r,n){var i=e.noHeader,a=xJ(Ij(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(fe(u,l)){var c=new Tj(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,_=kj(g)(y?J(J({},t),{valueFormatter:y}):t,g,m>0?a.html:0,n);_!=null&&o.push(_)});var f=t.renderMode==="richText"?o.join(a.richText):Hb(n,o.join(""),i?r:a.html);if(i)return f;var h=Ob(e.header,"ordinal",t.useUTC),d=Dj(n,t.renderMode).nameStyle,p=Pj(n);return t.renderMode==="richText"?Ej(t,h,d)+a.richText+f:Hb(n,'
'+Ur(h)+"
"+f,r)}function _J(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(b){return b=ee(b)?b:[b],re(b,function(C,M){return Ob(C,ee(d)?d[M]:d,u)})};if(!(a&&o)){var f=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||q.color.secondary,i),h=a?"":Ob(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=Dj(n,i),_=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":f)+(a?"":Ej(t,h,_))+(o?"":bJ(t,p,g,m,S)):Hb(n,(s?"":f)+(a?"":SJ(h,!s,_))+(o?"":wJ(p,g,m,S)),r)}}function _I(t,e,r,n,i,a){if(t){var o=kj(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function xJ(t){return{html:gJ[t],richText:mJ[t]}}function Hb(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=Pj(t);return'
'+e+n+"
"}function SJ(t,e,r){var n=e?"margin-left:2px":"";return''+Ur(t)+""}function wJ(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 Ej(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function bJ(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 Nj(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return eu(n)}function Rj(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var m1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=G4()}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=XV({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 Oj(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=Nj(e,r),c,f,h,d;if(o>1||l&&!o){var p=TJ(s,e,r,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=ef(i,r,a[0]),f=g.type}else d=c=l?s[0]:s;var m=P2(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:f,dataIndex:r})].concat(h||[])})}function TJ(t,e,r,n,i){var a=e.getData(),o=li(t,function(f,h,d){var p=a.getDimensionInfo(d);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(f){c(ef(a,r,f),f)}):R(t,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Kt("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Mo=Fe();function og(t,e){return t.getName(e)||t.getId(e)}var Sm="__universalTransitionEnabled",ft=function(t){$(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=xd({count:MJ,reset:AJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Mo(this).sourceManager=new Lj(this);a.prepareSource();var o=this.getInitialData(r,i);SI(o,this),this.dataTask.context.data=o,Mo(this).dataBeforeProcessed=o,xI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=iv(this),a=i?fu(r):{},o=this.subType;je.hasClass(o)&&(o+="Series"),Ne(r,n.getTheme().get(this.subType)),Ne(r,this.getDefaultOption()),Yl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&ba(r,a,i)},e.prototype.mergeOption=function(r,n){r=Ne(this.option,r,!0),this.fillDataTextStyle(r.data);var i=iv(this);i&&ba(this.option,r,i);var a=Mo(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);SI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Mo(this).dataBeforeProcessed=o,xI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!nn(r))for(var n=["show"],i=0;i=0&&h<0)&&(f=_,h=y,d=0),y===h&&(c[d++]=g))}),c.length=d,c},e.prototype.formatTooltip=function(r,n,i){return Oj({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=hM.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[og(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Sm])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"){we(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(r,n)}},e.registerClass=function(r){return je.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}(je);Bt(ft,e_);Bt(ft,hM);Q4(ft,je);function xI(t){var e=t.name;P2(t)||(t.name=CJ(t)||e)}function CJ(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 MJ(t){return t.model.getRawData().count()}function AJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),LJ}function LJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function SI(t,e){R($c(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(PJ,e))})}function PJ(t,e){var r=Wb(t);return r&&r.setOutputEnd((e||this).count()),e}function Wb(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=Tf("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}();k2(gt);F0(gt);function Af(){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 zj=Fe(),DJ=Af(),st=function(){function t(){this.group=new _e,this.uid=Tf("viewChart"),this.renderTask=xd({plan:kJ,reset:IJ}),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&&bI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&bI(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){Ps(this.group,e)},t.markUpdateMethod=function(e,r){zj(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function wI(t,e,r){t&&tv(t)&&(e==="emphasis"?co:fo)(t,r)}function bI(t,e,r){var n=Xl(t,e),i=e&&e.highlightKey!=null?iK(e.highlightKey):null;n!=null?R(pt(n),function(a){wI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){wI(a,r,i)})}k2(st);F0(st);function kJ(t){return DJ(t.model)}function IJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&zj(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),EJ[l]}var EJ={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)}}},Cy="\0__throttleOriginMethod",TI="\0__throttleRate",CI="\0__throttleType";function r_(t,e,r){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var h=function(){for(var d=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function Lf(t,e,r,n){var i=t[e];if(i){var a=i[Cy]||i,o=i[CI],s=i[TI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=r_(a,r,n==="debounce"),i[Cy]=a,i[CI]=n,i[TI]=r}return i}}function ov(t,e){var r=t[e];r&&r[Cy]&&(r.clear&&r.clear(),t[e]=r[Cy])}var MI=Fe(),AI={itemStyle:ql(jV,!0),lineStyle:ql(VV,!0)},NJ={lineStyle:"stroke",itemStyle:"fill"};function Bj(t,e){var r=t.visualStyleMapper||AI[e];return r||(console.warn("Unknown style type '"+e+"'."),AI.itemStyle)}function Vj(t,e){var r=t.visualDrawType||NJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var RJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=Bj(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=Vj(t,n),u=o[l],c=me(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=h,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||me(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||me(o.stroke)?h: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)}}}},fh=new We,OJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=Bj(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){fh.option=l[n];var u=i(fh),c=o.ensureUniqueItemVisual(s,"style");J(c,u),fh.option.decal&&(o.setItemVisual(s,"decal",fh.option.decal),fh.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},zJ={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)),MI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=MI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=Vj(r,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();h[l]=r.getColorFromPalette(d,o,p)}})}})}},sg=Math.PI;function BJ(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 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 Vv({shape:{startAngle:-sg/2,endAngle:-sg/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:sg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:sg*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 jj=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),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(m){m.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.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(f){var h=f.uid,d=s.set(h,o&&o.get(h)||xd({plan:HJ,reset:WJ,count:ZJ}));d.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||xd({reset:VJ});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,f=!0,h=!1,d="";Nr(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,R(n.getSeries(),p));function p(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(h=!0,xd({reset:jJ,onDirty:GJ})));y.context={model:g,overallProgress:f},y.agent=o,y.__block=f,a._pipe(g,y)}h&&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:$J(e)}),e.uid=Tf("stageHandler"),r&&(e.visualType=r),e},t}();function VJ(t){t.overallReset(t.ecModel,t.api,t.payload)}function jJ(t){return t.overallProgress&&FJ}function FJ(){this.agent.dirty(),this.getDownstream().dirty()}function GJ(){this.agent&&this.agent.dirty()}function HJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function WJ(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 Fj(n)}):UJ}var UJ=Fj(0);function Fj(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-h.length){var p=u.slice(0,d);p!=="data"&&(r.mainType=p,r[h.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(f,h,d,p){return f[d]==null||h[p||d]===f[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Ub=["symbol","symbolSize","symbolRotate","symbolOffset"],PI=Ub.concat(["symbolKeepAspect"]),qJ={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&&Dl(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function Zb(t,e,r){for(var n=e.type==="radial"?fee(t,e,r):cee(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 _M(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&dee(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 vee=new wa(!0);function Ly(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function DI(t){return typeof t=="string"&&t!=="none"}function Py(t){var e=t.fill;return e!=null&&e!=="none"}function kI(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 II(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 $b(t,e,r){var n=I2(e.image,e.__image,r);if(G0(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)*ud),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function pee(t,e,r,n){var i,a=Ly(r),o=Py(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||vee,f=e.__dirty;if(!n){var h=r.fill,d=r.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,m=o&&!!h.image,y=a&&!!d.image,_=void 0,S=void 0,b=void 0,C=void 0,M=void 0;(p||g)&&(M=e.getBoundingRect()),p&&(_=f?Zb(t,h,M):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(S=f?Zb(t,d,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(b=f||!e.__canvasFillPattern?$b(t,h,e):e.__canvasFillPattern,e.__canvasFillPattern=b),y&&(C=f||!e.__canvasStrokePattern?$b(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),p?t.fillStyle=_:m&&(b?t.fillStyle=b: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 D,E;t.setLineDash&&r.lineDash&&(i=_M(e),D=i[0],E=i[1]);var k=!0;(u||f&nc)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),k=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),k&&c.rebuildPath(t,l?s:1),D&&(t.setLineDash(D),t.lineDashOffset=E),n||(r.strokeFirst?(a&&II(t,r),o&&kI(t,r)):(o&&kI(t,r),a&&II(t,r))),D&&t.setLineDash([])}function gee(t,e,r){var n=e.__image=I2(r.image,e.__image,e,e.onload);if(!(!n||!G0(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,f=o-u,h=s-c;t.drawImage(n,u,c,f,h,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function mee(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||lo,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=_M(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Ly(r)&&t.strokeText(i,r.x,r.y),Py(r)&&t.fillText(i,r.x,r.y)):(Py(r)&&t.fillText(i,r.x,r.y),Ly(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var EI=["shadowBlur","shadowOffsetX","shadowOffsetY"],NI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function $j(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)?Rl.opacity:o}(n||e.blend!==r.blend)&&(a||(pn(t,i),a=!0),t.globalCompositeOperation=e.blend||Rl.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(we(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[er]=!0,Gu(this),!this._model||n){var l=new kQ(this._api),u=this._theme,c=this._model=new dM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},Kb);var f={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:f},this[er]=!1,this.getZr().wakeUp();else{try{al(this),Oa.update.call(this,null,f)}catch(h){throw this[yr]=null,this[er]=!1,h}this._ssr||this._zr.flush(),this[yr]=null,this[er]=!1,ju.call(this,a),Fu.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,Gu(this);try{this._updateTheme(r),i.setTheme(this._theme),al(this),Oa.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,ju.call(this,a),Fu.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=hF[r]),r&&(r=ye(r),r&&pj(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(Ey[i]){var l=s,u=s,c=-s,f=-s,h=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Bl,function(S,b){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),f=o(M.bottom,f),h.push({dom:C,left:M.left,top:M.top})}}),l*=d,u*=d,c*=d,f*=d;var p=c-l,g=f-u,m=Sn.createCanvas(),y=pb(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(h,function(S){var b=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 Be({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(h,function(S){var b=new pr({style:{x:S.left*d-l,y:S.top*d-u,image:S.dom}});y.add(b)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return fg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return fg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return fg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Nc(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 f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=Nc(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?yM(s,l,n):Wv(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(Hee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Pl(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 f=u.componentType,h=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=u.seriesIndex);var d=f&&h!=null&&s.getComponent(f,h),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(Xb,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),QJ(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&&X4(this.getDom(),bM,"");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 Bl[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,Gu(this);try{i&&al(this),Oa.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,ju.call(this,a),Fu.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(we(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!Qb[r]){var i=Qb[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=Yb[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(we(n)||(n={silent:!!n}),!!ky[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;b1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),ju.call(this,i),Fu.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(){al=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),S1(f,!0),S1(f,!1),h.plan()},S1=function(f,h){for(var d=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,m=h?f._componentsMap:f._chartsMap,y=f._zr,_=f._api,S=0;Sh.get("hoverLayerThreshold")&&!Ze.node&&!Ze.worker&&h.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=f._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(_){_.states.emphasis&&(_.states.emphasis.hoverLayer=!0)})}})}function s(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function l(f,h){if(!f.preventAutoZ){var d=Jl(f);h.eachRendered(function(p){return q0(p,d.z,d.zlevel),!0})}}function u(f,h){h.eachRendered(function(d){if(!Rc(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(f,h){var d=f.getModel("stateAnimation"),p=f.isAnimationEnabled(),g=d.get("duration"),m=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Rc(y))return;if(y instanceof Ue&&aK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var S=y.getTextContent(),b=y.getTextGuideLine();S&&(S.stateTransition=m),b&&(b.stateTransition=m)}y.__dirty&&a(y)}})}$I=function(f){return new(function(h){$(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){co(p,g),Hn(f)},d.prototype.leaveEmphasis=function(p,g){fo(p,g),Hn(f)},d.prototype.enterBlur=function(p){dV(p),Hn(f)},d.prototype.leaveBlur=function(p){B2(p),Hn(f)},d.prototype.enterSelect=function(p){vV(p),Hn(f)},d.prototype.leaveSelect=function(p){pV(p),Hn(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},d.prototype.getMainProcessVersion=function(){return f[ug]},d}(dj))(f)},fF=function(f){function h(d,p){for(var g=0;g=0)){XI.push(r);var a=jj.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function PM(t,e){Qb[t]=e}function Jee(t){e4({createCanvas:t})}function yF(t,e,r){var n=Jj("registerMap");n&&n(t,e,r)}function ete(t){var e=Jj("getMap");return e&&e(t)}var _F=uJ;ks(SM,RJ);ks(n_,OJ);ks(n_,zJ);ks(SM,qJ);ks(n_,KJ);ks(iF,Cee);MM(pj);AM(Iee,HQ);PM("default",BJ);Vi({type:Ol,event:Ol,update:Ol},Rt);Vi({type:pm,event:pm,update:pm},Rt);Vi({type:yy,event:O2,update:yy,action:Rt,refineEvent:DM,publishNonRefinedEvent:!0});Vi({type:Cb,event:O2,update:Cb,action:Rt,refineEvent:DM,publishNonRefinedEvent:!0});Vi({type:_y,event:O2,update:_y,action:Rt,refineEvent:DM,publishNonRefinedEvent:!0});function DM(t,e,r,n){return{eventContent:{selected:eK(r),isFromClick:e.isFromClick||!1}}}CM("default",{});CM("dark",Wj);var tte={},qI=[],rte={registerPreprocessor:MM,registerProcessor:AM,registerPostInit:vF,registerPostUpdate:pF,registerUpdateLifecycle:i_,registerAction:Vi,registerCoordinateSystem:gF,registerLayout:mF,registerVisual:ks,registerTransform:_F,registerLoading:PM,registerMap:yF,registerImpl:Mee,PRIORITY:aF,ComponentModel:je,ComponentView:gt,SeriesModel:ft,ChartView:st,registerComponentModel:function(t){je.registerClass(t)},registerComponentView:function(t){gt.registerClass(t)},registerSeriesModel:function(t){ft.registerClass(t)},registerChartView:function(t){st.registerClass(t)},registerCustomSeries:function(t,e){tF(t,e)},registerSubTypeDefaulter:function(t,e){je.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){R4(t,e)}};function Oe(t){if(ee(t)){R(t,function(e){Oe(e)});return}Ee(qI,t)>=0||(qI.push(t),me(t)&&(t={install:t}),t.install(rte))}function dh(t){return t==null?0:t.length||1}function KI(t){return t}var ho=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||KI,this._newKeyGetter=i||KI,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&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d1)for(var s=0;s30}var vh=we,Ao=re,lte=typeof Int32Array>"u"?Array:Int32Array,ute="e\0\0",QI=-1,cte=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],fte=["_approximateExtent"],JI,dg,ph,gh,M1,mh,A1,$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;SF(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():vh(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,vh(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){vh(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;Tb(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:Ao(this.dimensions,this._getDimInfo,this),this.hostModel)),M1(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(N0(arguments)))})},t.internalField=function(){JI=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 lte(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function hte(t,e){return Df(t,e).dimensions}function Df(t,e){vM(t)||(t=pM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=de(),a=[],o=vte(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&TF(o),l=n===t.dimensionsDefine,u=l?bF(t):wF(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var f=de(c),h=new Mj(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function vte(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return R(e,function(a){var o;we(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function pte(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 gte=function(){function t(e){this.coordSysDims=[],this.axisMap=de(),this.categoryAxisMap=de(),this.coordSysName=e}return t}();function mte(t){var e=t.get("coordinateSystem"),r=new gte(e),n=yte[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var yte={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Dt).models[0],a=t.getReferringComponents("yAxis",Dt).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),Hu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Hu(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Dt).models[0];e.coordSysDims=["single"],r.set("single",i),Hu(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Dt).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),Hu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Hu(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),Hu(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,r,n){var i=t.getReferringComponents("matrix",Dt).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 Hu(t){return t.get("type")==="category"}function CF(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;_te(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,c,f,h;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){f="__\0ecstackresult_"+t.id,h="__\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:f,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(h,p),y.storeDimIndex=s.ensureCalculationDimension(f,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:h,stackResultDimension:f}}function _te(t){return!SF(t.schema)}function vo(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function kM(t,e){return vo(t,e)?t.getCalculationInfo("stackResultDimension"):e}function xte(t,e){var r=t.get("coordinateSystem"),n=Mf.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=Ny(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function Ste(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 Pa(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=pM(t)):(i=n.getSource(),a=i.sourceFormat===Bn);var o=mte(e),s=xte(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(uj,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=Df(i,c),h=Ste(f.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),p=CF(e,{schema:f,store:d}),g=new $r(f,e);g.setCalculationInfo(p);var m=h!=null&&wte(i)?function(y,_,S,b){return b===h?S:this.defaultDimValueGetter(y,_,S,b)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function wte(t){if(t.sourceFormat===Bn){var e=bte(t.data||[]);return!ee(gf(e))}}function bte(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=uv(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return Cte(l,t),a}function L1(t){var e=Math.pow(10,j0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function uv(t){return Mi(t)+2}function eE(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Cte(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),eE(t,0,e),eE(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function IM(t,e){return t>=e[0]&&t<=e[1]}var Mte=function(){function t(){this.normalize=tE,this.scale=rE}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=tE,this.scale=rE)},t}();function tE(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function rE(t,e){return t*(e[1]-e[0])+e[0]}function eT(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 Is=function(){function t(e){this._calculator=new Mte,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}();F0(Is);var Ate=0,cv=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Ate,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,Lte);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 Lte(t){return we(t)&&t.value!=null?t.value:t+""}var rf=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new cv({})),ee(i)&&(i=new cv({categories:re(i,function(a){return we(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 IM(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}(Is);Is.registerClass(rf);var Lo=Ht,po=function(t){$(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 IM(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=uv(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&&(f=Lo(f+h*n,o))}if(l.length>0&&f===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:Lo(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 PF(t){var e=kte(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]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*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")||(NF(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:EM(a),stackId:AF(n)})}),DF(r)}function DF(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 f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);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),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),R(a,function(y){var _=y.maxWidth,S=y.minWidth;if(y.width){var b=y.width;_&&(b=Math.min(b,_)),S&&(b=Math.max(b,S)),y.width=b,f-=b+c*b,h--}else{var b=d;_&&_b&&(b=S),b!==d&&(y.width=b,f-=b+c*b,h--)}}),d=(f-u)/(h+(h-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 Ite(t,e,r){if(t&&e){var n=t[EM(e)];return n}}function kF(t,e){var r=LF(t,e),n=PF(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=AF(i),u=n[EM(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function IF(t){return{seriesType:t,plan:Af(),reset:function(e){if(EF(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"),f=vo(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=Ete(i,a),p=NF(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,b){for(var C=S.count,M=p&&ca(C*3),A=p&&l&&ca(C*3),D=p&&ca(C),E=n.master.getRect(),k=h?E.width:E.height,I,z=b.getStore(),O=0;(I=S.next())!=null;){var j=z.get(f?m:o,I),G=z.get(s,I),F=d,U=void 0;f&&(U=+j-z.get(o,I));var V=void 0,W=void 0,H=void 0,X=void 0;if(h){var K=n.dataToPoint([j,G]);if(f){var ne=n.dataToPoint([U,G]);F=ne[0]}V=F,W=K[1]+_,H=K[0]-F,X=y,Math.abs(H)0?r:1:r))}var Nte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=vg.length,s=Math.min(Nte(vg,this._approxInterval,0,o),o-1);this._interval=vg[s][1],this._intervalPrecision=uv(this._interval),this._minLevelUnit=vg[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+Aa(r)},e.prototype.contain=function(r){return IM(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}(po),vg=[["second",Q2],["minute",J2],["hour",yd],["quarter-day",yd*6],["half-day",yd*12],["day",ti*1.2],["half-week",ti*3.5],["week",ti*7],["month",ti*31],["quarter",ti*95],["half-year",Zk/2],["year",Zk]];function RF(t,e,r,n){return by(new Date(e),t,n).getTime()===by(new Date(r),t,n).getTime()}function Rte(t,e){return t/=ti,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Ote(t){var e=30*ti;return t/=e,t>6?6:t>3?3:t>2?2:1}function zte(t){return t/=yd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function nE(t,e){return t/=e?J2:Q2,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Bte(t){return A2(t,!0)}function Vte(t,e,r){var n=Math.max(0,Ee(Tn,e)-1);return by(new Date(t),Tn[n],r).getTime()}function jte(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 Fte(t,e,r,n,i,a){var o=1e4,s=JK,l=0;function u(O,j,G,F,U,V,W){for(var H=jte(U,O),X=j,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,j,G){var F=[],U=!j.length;if(!RF(_d(O),n[0],n[1],r)){U&&(j=[{value:Vte(n[0],O,r)},{value:n[1]}]);for(var V=0;V=n[0]&&W<=n[1]&&u(X,W,H,K,ne,ie,F),O==="year"&&G.length>1&&V===0&&G.unshift({value:G[0].value-X})}}for(var V=0;V=n[0]&&b<=n[1]&&d++)}var C=i/e;if(d>C*1.5&&p>C/1.5||(f.push(_),d>C||t===s[g]))break}h=[]}}}for(var M=et(re(f,function(O){return et(O,function(j){return j.value>=n[0]&&j.value<=n[1]&&!j.notAdd})}),function(O){return O.length>0}),A=[],D=M.length-1,g=0;g0;)a*=10;var s=[rT(Hte(n[0]/a)*a),rT(Gte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=uv(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=gg(r)/gg(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=gg(r)/gg(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),pg(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}(po);function mg(t,e){return rT(t,Mi(e))}Is.registerClass(OF);var Wte=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 h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},t.prototype.modifyDataMinMax=function(e,r){this[Zte[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Ute[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Ute={min:"_determinedMin",max:"_determinedMax"},Zte={min:"_dataMin",max:"_dataMax"};function zF(t,e,r){var n=t.rawExtentInfo;return n||(n=new Wte(t,e,r),t.rawExtentInfo=n,n)}function yg(t,e){return e==null?null:kr(e)?NaN:t.parse(e)}function BF(t,e){var r=t.type,n=zF(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=LF("bar",o),l=!1;if(R(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=PF(s),c=$te(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function $te(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Ite(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,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}function tu(t,e){var r=e,n=BF(t,r),i=n.extent,a=r.get("splitNumber");t instanceof OF&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setBreaksFromOption(jF(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 Uv(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new rf({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new NM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Is.getClass(e)||po)}}function Yte(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function kf(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=eQ(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(Ry(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(Ry(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function Ry(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function RM(t){var e=t.get("interval");return e??"auto"}function VF(t){return t.type==="category"&&RM(t.getLabelModel())===0}function Oy(t,e){var r={};return R(t.mapDimensionsAll(e),function(n){r[kM(t,n)]=!0}),$e(r)}function Xte(t,e,r){e&&R(Oy(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function nf(t){return t==="middle"||t==="center"}function fv(t){return t.getShallow("show")}function jF(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!qte(t.axis)?void 0:e}function qte(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var If=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function Kte(t){return Pa(null,t)}var Qte={isDimensionStacked:vo,enableDataStack:CF,getStackedDimension:kM};function Jte(t,e){var r=e;e instanceof We||(r=new We(e));var n=Uv(r);return n.setExtent(t[0],t[1]),tu(n,r),n}function ere(t){Bt(t,If)}function tre(t,e){return e=e||{},vt(t,null,null,e.state!=="normal")}const rre=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:hte,createList:Kte,createScale:Jte,createSymbol:Ut,createTextStyle:tre,dataStack:Qte,enableHoverEmphasis:us,getECData:Le,getLayoutRect:wt,mixinAxisModelCommonMethods:ere},Symbol.toStringTag,{value:"Module"}));var nre=1e-8;function iE(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return are(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"?aE(s.exterior,i,a,r):R(s.points,function(l){aE(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 nT(t,e){return t=sre(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 oE(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new oE(l[0],l.slice(1)))});break;case"LineString":a.push(new sE([i.coordinates]));break;case"MultiLineString":a.push(new sE(i.coordinates))}var s=new GF(n[e||"name"],a,n.cp);return s.properties=n,s})}const lre=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:mb,asc:Dn,getPercentWithPrecision:AX,getPixelPrecision:C2,getPrecision:Mi,getPrecisionSafe:V4,isNumeric:L2,isRadianAroundZero:qc,linearMap:nt,nice:A2,numericToNumber:Sa,parseDate:Aa,parsePercent:oe,quantile:vm,quantity:F4,quantityExponent:j0,reformIntervals:yb,remRadian:M2,round:Ht},Symbol.toStringTag,{value:"Module"})),ure=Object.freeze(Object.defineProperty({__proto__:null,format:Gv,parse:Aa,roundTime:by},Symbol.toStringTag,{value:"Module"})),cre=Object.freeze(Object.defineProperty({__proto__:null,Arc:Vv,BezierCurve:xf,BoundingRect:Ce,Circle:La,CompoundPath:jv,Ellipse:Bv,Group:_e,Image:pr,IncrementalDisplayable:AV,Line:Wt,LinearGradient:uu,Polygon:Or,Polyline:Tr,RadialGradient:F2,Rect:Be,Ring:_f,Sector:Rr,Text:Xe,clipPointsByRect:U2,clipRectByRect:IV,createIcon:wf,extendPath:DV,extendShape:PV,getShapeClass:rv,getTransform:cs,initProps:St,makeImage:H2,makePath:Qc,mergePath:An,registerShape:di,resizePath:W2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),fre=Object.freeze(Object.defineProperty({__proto__:null,addCommas:oM,capitalFirst:uQ,encodeHTML:Ur,formatTime:lQ,formatTpl:lM,getTextRect:oQ,getTooltipMarker:XV,normalizeCssArray:Cf,toCamelCase:sM,truncateText:oq},Symbol.toStringTag,{value:"Module"})),hre=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:we,isString:se,map:re,merge:Ne,reduce:li},Symbol.toStringTag,{value:"Module"}));var dre=Fe(),Sd=Fe(),zi={estimate:1,determine:2};function zy(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function WF(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 vre(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=kf(t),i=t.scale.getExtent(),a=WF(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"?gre(t,e):yre(t)}function pre(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=WF(t,n);return{ticks:et(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?mre(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function gre(t,e){var r=t.getLabelModel(),n=UF(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function UF(t,e,r){var n=xre(t),i=RM(e),a=r.kind===zi.estimate;if(!a){var o=$F(n,i);if(o)return o}var s,l;me(i)?s=qF(t,i):(l=i==="auto"?Sre(t,r):i,s=XF(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return iT(n,i,u),!0}):iT(n,i,u),u}function mre(t,e){var r=_re(t),n=RM(e),i=$F(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=qF(t,n,!0);else if(n==="auto"){var s=UF(t,t.getLabelModel(),zy(zi.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=XF(t,o,!0);return iT(r,n,{ticks:a,tickCategoryInterval:o})}function yre(t){var e=t.scale.getTicks(),r=kf(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 _re=ZF("axisTick"),xre=ZF("axisLabel");function ZF(t){return function(r){return Sd(r)[t]||(Sd(r)[t]={list:[]})}}function $F(t,e){for(var r=0;rc&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],h=t.dataToCoord(f+1)-t.dataToCoord(f),d=Math.abs(h*Math.cos(a)),p=Math.abs(h*Math.sin(a)),g=0,m=0;f<=s[1];f+=u){var y=0,_=0,S=B0(i({value:f}),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 b=g/d,C=m/p;isNaN(b)&&(b=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(b,C)));if(r===zi.estimate)return e.out.noPxChangeTryDetermine.push(le(bre,null,t,M,l)),M;var A=YF(t,M,l);return A??M}function bre(t,e,r){return YF(t,e,r)==null}function YF(t,e,r){var n=dre(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 Tre(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 XF(t,e,r){var n=kf(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 f=VF(t),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&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 qF(t,e,r){var n=t.scale,i=kf(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 lE=[0,1],vi=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 C2(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(),uE(n,i.count())),nt(e,lE,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),uE(n,i.count()));var a=nt(e,n,lE,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=pre(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 Cre(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||zy(zi.determine),vre(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||zy(zi.determine),wre(this,e)},t}();function uE(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Cre(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 f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0],onBand:!0}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1],onBand:!0});function h(d,p){return d=Ht(d),p=Ht(p),f?d>p:di&&(i+=yh);var d=Math.atan2(s,o);if(d<0&&(d+=yh),d>=n&&d<=i||d+yh>=n&&d+yh<=i)return l[0]=c,l[1]=f,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,Ai.fromArray(t[0]),yt.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(fa,Ai,yt),Te.sub(sa,Ft,yt);var r=fa.len(),n=sa.len();if(!(r<.001||n<.001)){fa.scale(1/r),sa.scale(1/n);var i=fa.dot(sa),a=Math.cos(e);if(a1&&Te.copy(en,Ft),en.toArray(t[1])}}}}function Rre(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Ai.fromArray(t[0]),yt.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(fa,yt,Ai),Te.sub(sa,Ft,yt);var n=fa.len(),i=sa.len();if(!(n<.001||i<.001)){fa.scale(1/n),sa.scale(1/i);var a=fa.dot(e),o=Math.cos(r);if(a=l)Te.copy(en,Ft);else{en.scaleAndAdd(sa,s/Math.tan(Math.PI/2-c));var f=Ft.x!==yt.x?(en.x-yt.x)/(Ft.x-yt.x):(en.y-yt.y)/(Ft.y-yt.y);if(isNaN(f))return;f<0?Te.copy(en,yt):f>1&&Te.copy(en,Ft)}en.toArray(t[1])}}}}function k1(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 Ore(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=Za(n[0],n[1]),a=Za(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=fd([],n[1],n[0],o/i),l=fd([],n[1],n[2],o/a),u=fd([],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){b(k*E,0,a);var I=k+A;I<0&&C(-I*E,1)}else C(-A*E,1)}}function b(A,D,E){A!==0&&(c=!0);for(var k=D;k0)for(var I=0;I0;I--){var G=E[I-1]*j;b(-G,I,a)}}}function M(A){var D=A<0?-1:1;A=Math.abs(A);for(var E=Math.ceil(A/(a-1)),k=0;k0?b(E,0,k+1):b(-E,a-k-1,a),A-=E,A<=0)return}return c}function Vre(t){for(var e=0;e=0&&n.attr(a.oldLayoutSelect),Ee(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Qe(n,u,r,l)}else if(n.attr(u),!bf(n).valueAnimation){var f=pe(n.style.opacity,1);n.style.opacity=0,St(n,{style:{opacity:f}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};_g(d,u,xg),_g(d,n.states.select,xg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};_g(p,u,xg),_g(p,n.states.emphasis,xg)}BV(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Gre(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}(),N1=Fe();function Wre(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=N1(r).labelManager;i||(i=N1(r).labelManager=new Hre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=N1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var R1=Math.sin,O1=Math.cos,nG=Math.PI,sl=Math.PI*2,Ure=180/nG,iG=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,f=Math.abs(u),h=Zo(f-sl)||(c?u>=sl:-u>=sl),d=u>0?u%sl:u%sl+sl,p=!1;h?p=!0:Zo(f)?p=!1:p=d>=nG==!!c;var g=e+n*O1(o),m=r+i*R1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Ure);if(h){var _=1/this._p,S=(c?1:-1)*(sl-_);this._add("A",n,i,y,1,+c,e+n*O1(o+S),r+i*R1(o+S)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var b=e+n*O1(s),C=r+i*R1(s);this._add("A",n,i,y,+p,+c,b,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=[],f=this._p,h=1;h"}function ene(t){return""}function VM(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 Jre(o,s)+(o!=="style"?Ur(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+ene(o)}return n(t)}function tne(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 f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function uT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function pE(t,e,r,n){return fr("svg","root",{width:t,height:e,xmlns:aG,"xmlns:xlink":oG,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var rne=0;function lG(){return rne++}var gE={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"},hl="transform-origin";function nne(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new iG;return i.reset(L4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function ine(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[hl]=r+"px "+n+"px")}var ane={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function uG(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function one(t,e,r){var n=t.shape.paths,i={},a,o;if(R(n,function(l){var u=uT(r.zrId);u.animation=!0,o_(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=$e(c),d=h.length;if(d){o=h[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 f){var _=f[y].animation;_.indexOf(o)>=0&&(a=_)}}}),!!a){e.d=!1;var s=uG(i,r);return a.replace(o,s)}}function mE(t){return se(t)?gE[t]?"cubic-bezier("+gE[t]+")":S2(t)?t:"":""}function o_(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof jv){var s=one(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=uG(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-"+lG();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function sne(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};yE(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=fy(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),yE(n,e,r)}}function yE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+lG(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var hv=Math.round;function cG(t){return t&&se(t.src)}function fG(t){return t&&me(t.toDataURL)}function jM(t,e,r,n){qre(function(i,a){var o=i==="fill"||i==="stroke";o&&A4(a)?dG(e,t,i,n):o&&b2(a)?vG(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),vne(r,t,n)}function FM(t,e){var r=O4(e);r&&(r.each(function(n,i){n!=null&&(t[(vE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[vE+"silent"]="true"))}function _E(t){return Zo(t[0]-1)&&Zo(t[1])&&Zo(t[2])&&Zo(t[3]-1)}function lne(t){return Zo(t[4])&&Zo(t[5])}function GM(t,e,r){if(e&&!(lne(e)&&_E(e))){var n=1e4;t.transform=_E(e)?"translate("+hv(e[4]*n)/n+" "+hv(e[5]*n)/n+")":HY(e)}}function xE(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(h,m),Nr(d,m)}else if(h==null||d==null){var y=function(k,I){if(k){var z=k.elm,O=h||I.width,j=d||I.height;k.tag==="pattern"&&(u?(j=1,O/=a.width):c&&(O=1,j/=a.height)),k.attrs.width=O,k.attrs.height=j,z&&(z.setAttribute("width",O),z.setAttribute("height",j))}},_=I2(p,null,t,function(k){l||y(M,k),y(f,k)});_&&_.width&&_.height&&(h=h||_.width,d=d||_.height)}f=fr("image","img",{href:p,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=ye(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var S,b;l?S=b=1:u?(b=1,S=o.width/a.width):c?(S=1,b=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),b!=null&&!isNaN(b)&&(o.height=b);var C=P4(i);C&&(o.patternTransform=C);var M=fr("pattern","",o,[f]),A=VM(M),D=n.patternCache,E=D[A];E||(E=n.zrId+"-p"+n.patternIdx++,D[A]=E,o.id=E,M=n.defs[E]=fr("pattern",E,o,[f])),e[r]=z0(E)}}function pne(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]=fr("clipPath",a,o,[hG(t,r)])}e["clip-path"]=z0(a)}function bE(t){return document.createTextNode(t)}function _l(t,e,r){t.insertBefore(e,r)}function TE(t,e){t.removeChild(e)}function CE(t,e){t.appendChild(e)}function pG(t){return t.parentNode}function gG(t){return t.nextSibling}function z1(t,e){t.textContent=e}var ME=58,gne=120,mne=fr("","");function cT(t){return t===void 0}function na(t){return t!==void 0}function yne(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 Zh(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function dv(t){var e,r=t.children,n=t.tag;if(na(n)){var i=t.elm=sG(n);if(HM(mne,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,mG(t,p,r,i,l)):Gy(t,e,n,a))}function ic(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(HM(t,e),cT(e.text)?na(n)&&na(i)?n!==i&&_ne(r,n,i):na(i)?(na(t.text)&&z1(r,""),mG(r,null,i,0,i.length-1)):na(n)?Gy(r,n,0,n.length-1):na(t.text)&&z1(r,""):t.text!==e.text&&(na(n)&&Gy(r,n,0,n.length-1),z1(r,e.text)))}function xne(t,e){if(Zh(t,e))ic(t,e);else{var r=t.elm,n=pG(r);dv(e),n!==null&&(_l(n,e.elm,gG(r)),Gy(n,[t],0,0))}return e}var Sne=0,wne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=AE(),this.configLayer=AE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+Sne++,this._oldVNode=pE(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=sG("svg");HM(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",xne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return wE(e,uT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=uT(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=bne(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=fr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=re($e(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(fr("defs","defs",{},u)),e.animation){var c=tne(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=fr("style","stl",{},[],c);o.push(f)}}return pE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},VM(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&&!(h&&l&&h[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 f=this.__startIndex;f15)break}}j.prevElClipPaths&&y.restore()};if(_)if(_.length===0)D=m.__endIndex;else for(var k=d.dpr,I=0;I<_.length;++I){var z=_[I];y.save(),y.beginPath(),y.rect(z.x*k,z.y*k,z.width*k,z.height*k),y.clip(),E(z),y.restore()}else y.save(),E(),y.restore();m.__drawIndex=D,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?Sg:0),this._needsManuallyCompositing),c.__builtin__||I0("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(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__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}(ft);function af(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=ef(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 Zv=function(t){$(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=kne,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(){co(this.childAt(0))},e.prototype.downplay=function(){fo(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,f=a&&a.disableAnimation;if(c){var h=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,u,h)}else{var d=this.childAt(0);d.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};f?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(!f){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)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,c,f,h,d,p,g,m,y;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=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(),f=_.getModel(["select","itemStyle"]).getItemStyle(),c=_.getModel(["blur","itemStyle"]).getItemStyle(),h=S.get("focus"),d=S.get("blurScope"),p=S.get("disabled"),g=ar(_),m=S.getShallow("scale"),y=_.getShallow("cursor")}var b=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(b||0)*Math.PI/180||0);var C=du(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 D=s.style;s.useStyle(J({image:D.image,x:D.x,y:D.y,width:D.width,height:D.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"),k=this._z2;E!=null?k==null&&(this._z2=s.z2,s.z2+=E):k!=null&&(s.z2=k,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):af(r,G)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var O=s.ensureState("emphasis");O.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var j=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;O.scaleX=this._sizeX*j,O.scaleY=this._sizeY*j,this.setSymbolScale(1),bt(this,h,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&&_s(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();_s(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Pf(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function kne(t,e){this.parent.drift(t,e)}function V1(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 DE(t){return t!=null&&!we(t)&&(t={isIgnore:t}),t||{}}function kE(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 $v=function(){function t(e){this.group=new _e,this._SymbolCtor=e||Zv}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=DE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=kE(e),u={disableAnimation:s},c=r.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(V1(e,h,f,r)){var d=new o(e,f,l,u);d.setPosition(h),e.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),p=c(f);if(!V1(e,p,f,r)){n.remove(d);return}var g=e.getItemVisual(f,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(e,f,l,u),d.setPosition(p);else{d.updateData(e,f,l,u);var y={x:p[0],y:p[1]};s?d.attr(y):Qe(d,y,i)}n.add(d),e.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},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=kE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=DE(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 xG(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 Ene(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 Nne(t,e,r,n,i,a,o,s){for(var l=Ene(t,e),u=[],c=[],f=[],h=[],d=[],p=[],g=[],m=_G(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S=i||g<0)break;if(Vl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),f=y,h=_;else{var S=y-u,b=_-c;if(S*S+b*b<.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||Vl(M,A))d=y,p=_;else{k=M-u,I=A-c;var j=y-u,G=M-y,F=_-c,U=A-_,V=void 0,W=void 0;if(s==="x"){V=Math.abs(j),W=Math.abs(G);var H=k>0?1:-1;d=y-H*V*o,p=_,z=y+H*W*o,O=_}else if(s==="y"){V=Math.abs(F),W=Math.abs(U);var X=I>0?1:-1;d=y,p=_-X*V*o,z=y,O=_+X*W*o}else V=Math.sqrt(j*j+F*F),W=Math.sqrt(G*G+U*U),E=W/(W+V),d=y-k*o*(1-E),p=_-I*o*(1-E),z=y+k*o*E,O=_+I*o*E,z=Po(z,Do(M,y)),O=Po(O,Do(A,_)),z=Do(z,Po(M,y)),O=Do(O,Po(A,_)),k=z-y,I=O-_,d=y-k*V/W,p=_-I*V/W,d=Po(d,Do(u,y)),p=Po(p,Do(c,_)),d=Do(d,Po(u,y)),p=Do(p,Po(c,_)),k=y-d,I=_-p,z=y+k*W/V,O=_+I*W/V}t.bezierCurveTo(f,h,d,p,y,_),f=z,h=O}else t.lineTo(y,_)}u=y,c=_,g+=a}return m}var SG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),Rne=function(t){$(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 SG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Vl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var b=u?(p-l)*S+l:(d-s)*S+s;return u?[r,b]:[b,r]}s=d,l=p;break;case o.C:d=a[f++],p=a[f++],g=a[f++],m=a[f++],y=a[f++],_=a[f++];var C=u?uy(s,d,g,y,r,c):uy(l,p,m,_,r,c);if(C>0)for(var M=0;M=0){var b=u?ur(l,p,m,_,A):ur(s,d,g,y,A);return u?[r,b]:[b,r]}}s=y,l=_;break}}},e}(Ue),One=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(SG),wG=function(t){$(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 One},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&&Vl(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 Vne(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,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=Bne(u,i==="x"?r.getWidth():r.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,m=h[d-1].coord+p,y=m-g;if(y<.001)return"transparent";R(h,function(S){S.offset=(S.coord-g)/y}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var _=new uu(0,0,0,0,h,!0);return _[i]=g,_[i+"2"]=m,_}}}function jne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Fne(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 Fne(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 Gne(t,e){return isNaN(t)||isNaN(e)}function Hne(t){for(var e=t.length/2;e>0&&Gne(t[e*2-2],t[e*2-1]);e--);return e-1}function OE(t,e){return[t[e*2],t[e*2+1]]}function Wne(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 CG(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,bt(p,F,U,V);var H=RE(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=RE(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:X,connectNulls:A}),ir(g,r,"areaStyle"),Le(g).seriesIndex=r.seriesIndex,bt(g,F,U,V)}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=k,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=Xl(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],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=r.get("zlevel")||0,d=r.get("z")||0;u=new Zv(o,s),u.x=c,u.y=f,u.setZ(h,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,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=Xl(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;xy(this._polyline,r),n&&xy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new Rne({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 wG({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 f=u.get("animationDelay")||0,h=me(f)?f(null):f;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 b=i,C=n.pointToCoord(m);a?(y=b.startAngle,_=b.endAngle,S=-C[1]/180*Math.PI):(y=b.r0,_=b.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 D=me(f)?f(p):c*A+h,E=g.getSymbolPath(),k=E.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:D}),k&&k.animateFrom({style:{opacity:0}},{duration:300,delay:D}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if(CG(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=Hne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?yG(o,d):af(o,f)},enableTextSetter:!0},Une(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 f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),_=m.inverse,S=n.shape,b=_?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",D=Wne(f,b,A),E=D.range,k=E[1]-E[0],I=void 0;if(k>=1){if(k>1&&!d){var z=OE(f,E[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=h.getRawValue(E[0]))}else{var z=c.getPointOn(b,A);z&&u.attr({x:z[0]+C,y:z[1]+M});var O=h.getRawValue(E[0]),j=h.getRawValue(E[1]);o&&(I=q4(i,p,O,j,D.t))}a.lastFrameIndex=E[0]}else{var G=r===1||a.lastFrameIndex>0?E[0]:0,z=OE(f,G);o&&(I=h.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var F=bf(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,f=r.hostModel,h=Nne(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,m=h.stackedOnNext;if(o&&(p=ko(h.stackedOnCurrent,h.current,i,o,l),d=ko(h.current,null,i,o,l),m=ko(h.stackedOnNext,h.next,i,o,l),g=ko(h.next,null,i,o,l)),NE(d,g)>3e3||c&&NE(p,m)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=h.current,u.shape.points=d;var y={shape:{points:g}};h.current!==d&&(y.shape.__points=h.next),u.stopAnimation(),Qe(u,y,f),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Qe(c,{shape:{stackedOnPoints:m}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var _=[],S=h.status,b=0;be&&(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(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);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=$ne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,Yne))}}}}}function Xne(t){t.registerChartView(Zne),t.registerSeriesModel(Dne),t.registerLayout(Xv("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,MG("line"))}var vv=function(t){$(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 Pa(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(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.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]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var _=void 0,S=void 0,b=1,C=0;Cm){S=(M+_)/2;break}C===1&&(b=A-p[0].tickValue)}S==null&&(_?_&&(S=p[p.length-1].coord):S=p[0].coord),s[d]=h.toGlobalCoord(S)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=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}(ft);ft.registerClass(vv);var qne=function(t){$(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 Pa(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(vv.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}(vv),Kne=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}(),Hy=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new Kne},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,f=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}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){eo(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=F1(e.x,t.x),s=G1(e.x+e.width,i),l=F1(e.y,t.y),u=G1(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},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=G1(e.r,t.r),a=F1(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}},BE={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,f=i?"height":"width";c[f]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?Hy:Rr,c=new u({shape:n,z2:1});c.name="item";var f=AG(i);if(c.calculateTextPosition=Qne(f,{isRoundCap:u===Hy}),a){var h=c.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Qe:St)(c,{shape:p},a)}return c}};function rie(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 VE(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 jE(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 aie(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function AG(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 GE(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var c=t.shape,f=ha(n.getModel("itemStyle"),c,!0);J(c,f),t.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var h=n.getShallow("cursor");h&&t.attr("cursor",h);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:af(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,Jne(t,m==="outside"?d:m,AG(o),n.get(["label","rotate"]))}zV(g,p,a.getRawValue(r),function(_){return yG(e,_)});var y=n.getModel(["emphasis"]);bt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),aie(i)&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function oie(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 sie=function(){function t(){}return t}(),HE=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new sie},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 lie(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,f=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 LG(t,e,r){if(xs(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 uie(t,e,r){var n=t.type==="polar"?Rr:Be;return new n({shape:LG(e,r,t),silent:!0,z2:0})}function cie(t){t.registerChartView(tie),t.registerSeriesModel(qne),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(kF,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,IF("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,MG("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 ZE=Math.PI*2,Cg=Math.PI/180;function fie(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=tj(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,h=-n.get("startAngle")*Cg,d=n.get("endAngle"),p=n.get("padAngle")*Cg;d=d==="auto"?h-ZE:-d*Cg;var g=n.get("minAngle")*Cg,m=g+p,y=0;i.each(a,function(U){!isNaN(U)&&y++});var _=i.getSum(a),S=Math.PI/(_||y)*2,b=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var D=b?1:-1,E=[h,d],k=D*p/2;U0(E,!b),h=E[0],d=E[1];var I=PG(n);I.startAngle=h,I.endAngle=d,I.clockwise=b,I.cx=s,I.cy=l,I.r=u,I.r0=c;var z=Math.abs(d-h),O=z,j=0,G=h;if(i.setLayout({viewRect:f,r:u}),i.each(a,function(U,V){var W;if(isNaN(U)){i.setItemLayout(V,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,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+D*W/2,K=X):(X=G+k,K=H-k),i.setItemLayout(V,{angle:W,startAngle:X,endAngle:K,clockwise:b,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>=b.maxY){var M=S.label.x-e-S.len2*i,A=n+S.len,D=Math.abs(M)t.unconstrainedWidth?null:h:null;n.setStyle("width",d)}kG(a,n)}}}function kG(t,e){YE.rect=t,tG(YE,e,vie)}var vie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},YE={};function H1(t){return t.position==="center"}function pie(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*hie,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=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),D=A.shape,E=A.getTextContent(),k=A.getTextGuideLine(),I=e.getItemModel(M),z=I.getModel("label"),O=z.get("position")||I.get(["emphasis","label","position"]),j=z.get("distanceToLabelLine"),G=z.get("alignTo"),F=oe(z.get("edgeDistance"),u),U=z.get("bleedMargin");U==null&&(U=Math.min(u,h)>200?10:2);var V=I.getModel("labelLine"),W=V.get("length");W=oe(W,u);var H=V.get("length2");if(H=oe(H,u),Math.abs(D.endAngle-D.startAngle)0?"right":"left":K>0?"left":"right"}var tt=Math.PI,lt=0,kt=z.get("rotate");if(qe(kt))lt=kt*(tt/180);else if(O==="center")lt=0;else if(kt==="radial"||kt===!0){var gr=K<0?-X+tt:-X;lt=gr}else if(kt==="tangential"&&O!=="outside"&&O!=="outer"){var zr=Math.atan2(K,ne);zr<0&&(zr=tt*2+zr);var ji=ne>0;ji&&(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 yu=E.states.select;yu&&(yu.x+=E.x,yu.y+=E.y)}else{var Fi=new Ce(0,0,0,0);kG(Fi,E),r.push({label:E,labelLine:k,position:O,len:W,len2:H,minTurnAngle:V.get("minTurnAngle"),maxSurfaceAngle:V.get("maxSurfaceAngle"),surfaceNormal:new Te(K,ne),linePoints:ve,textAlign:Ge,labelDistance:j,labelAlignTo:G,edgeDistance:F,bleedMargin:U,rect:Fi,unconstrainedWidth:Fi.width,labelStyleWidth:E.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&die(r,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(st);function Nf(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Df(n,e).dimensions,a=new $r(i,t);return a.initData(n,r),a}var Rf=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}(),yie=Fe(),IG=function(t){$(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 Rf(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 Nf(this,{coordDimensions:["value"],encodeDefaulter:Ie(cM,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=yie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=j4(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){Yl(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}(ft);fQ({fullType:IG.type,getCoord2:function(t){return t.getShallow("center")}});function _ie(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 xie(t){t.registerChartView(mie),t.registerSeriesModel(IG),Zj("pie",t.registerAction),t.registerLayout(Ie(fie,"pie")),t.registerProcessor(Ef("pie")),t.registerProcessor(_ie("pie"))}var Sie=function(t){$(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 Pa(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}(ft),EG=4,wie=function(){function t(){}return t}(),bie=function(t){$(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 wie},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,f=a[c]-s/2,h=a[c+1]-l/2;if(r>=f&&n>=h&&r<=f+s&&n<=h+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,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Cie=function(t){$(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=Xv("").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 Tie:new $v,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),NG={left:0,right:0,top:0,bottom:0},Wy=["25%","25%"],Mie=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=fu(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&ba(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&ba(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:NG,outerBoundsContain:"all",outerBoundsClampWidth:Wy[0],outerBoundsClampHeight:Wy[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},e}(je),hT=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Dt).models[0]},e.type="cartesian2dAxis",e}(je);Bt(hT,If);var RG={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"}},Aie=Ne({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},RG),WM=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}}},RG),Lie=Ne({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},WM),Pie=Se({logBase:10},WM);const OG={category:Aie,value:WM,time:Lie,log:Pie};var Die={value:1,category:1,time:1,log:1},dT=null;function kie(t){dT||(dT=t)}function qv(){return dT}function of(t,e,r,n){R(Die,function(i,a){var o=Ne(Ne({},OG[a],!0),n,!0),s=function(l){$(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,f){var h=iv(this),d=h?fu(c):{},p=f.getTheme();Ne(c,p.get(a+"Axis")),Ne(c,this.getDefaultOption()),c.type=XE(c),h&&ba(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=cv.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=qv();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",XE)}function XE(t){return t.type||(t.data?"category":"value")}var Iie=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}(),vT=["x","y"];function qE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Eie=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=vT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!qE(r)||!qE(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,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,d];this._invTransform=ui([],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}(Iie),zG=function(t){$(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}(vi),s_="expandAxisBreak",BG="collapseAxisBreak",VG="toggleAxisBreak",UM="axisbreakchanged",Nie={type:s_,event:UM,update:"update",refineEvent:ZM},Rie={type:BG,event:UM,update:"update",refineEvent:ZM},Oie={type:VG,event:UM,update:"update",refineEvent:ZM};function ZM(t,e,r,n){var i=[];return R(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function zie(t){t.registerAction(Nie,e),t.registerAction(Rie,e),t.registerAction(Oie,e);function e(r,n){var i=[],a=Nc(n,r);function o(s,l){R(a[s],function(u){var c=u.updateAxisBreaks(r);R(c.breaks,function(f){var h;i.push(Se((h={},h[l]=u.componentIndex,h),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:i}}}var $o=Math.PI,Bie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Vie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],sf=Fe(),jG=Fe(),FG=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 jie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=$M(t.axisName)&&nf(t.nameLocation);R(n,function(p){var g=Ta(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?ui(_h,m.transform):Nv(_h),g.transform&&Di(_h,_h,g.transform),Ce.copy(Mg,g.localRect),Mg.applyTransform(_h),s?s.union(Mg):Ce.copy(s=new Ce(0,0,0,0),Mg))}});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 f=i.getExtent(),h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1])-h;s.union(new Ce(h,0,d,1))}a.stOccupiedRect=s,a.labelInfoList=o}var _h=hr(),Mg=new Ce(0,0,0,0),GG=function(t,e,r,n,i,a){if(nf(t.nameLocation)){var o=a.stOccupiedRect;o&&HG(Bre({},o,a.transGroup.transform),n,i)}else WG(a.labelInfoList,a.dirVec,n,i)};function HG(t,e,r){var n=new Te;a_(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&aT(e,n)}function WG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):qc(i-$o)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<$o?a=n>0?"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}(),Fie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Gie={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],f=[l[1],0],h=c[0]>f[0];u&&(Ot(c,c,u),Ot(f,f,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())qv().buildAxisBreakLine(n,i,a,p);else{var g=new Wt(J({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},p));Jc(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 _=du(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],b=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]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(C,M){if(m[M]!=="none"&&m[M]!=null){var A=Ut(m[M],-S/2,-b/2,S,b,d.stroke,!0),D=C.r+C.offset,E=h?f:c;A.attr({rotation:C.rotate,x:E[0]+D*Math.cos(t.rotation),y:E[1]-D*Math.sin(t.rotation),silent:!0,z2:11}),i.add(A)}})}}},axisTickLabelEstimate:function(t,e,r,n,i,a,o,s){var l=QE(e,i,s);l&&KE(t,e,r,n,i,a,o,zi.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=QE(e,i,s);l&&KE(t,e,r,n,i,a,o,zi.determine);var u=Zie(t,i,a,n);Uie(t,e.labelLayoutList,u),$ie(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($M(u)){var c=t.nameLocation,f=t.nameDirection,h=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+f*d,y.y=f);var _=hr();y.transform(yo(_,_,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*$o/180);var b,C;nf(c)?b=rn.innerTextLayout(t.rotation,S??t.rotation,f):(b=Hie(t.rotation,c,S||0,p),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(b.rotation)),!isFinite(C)&&(C=null)));var M=h.getFont(),A=n.get("nameTruncate",!0)||{},D=A.ellipsis,E=wr(t.raw.nameTruncateMaxWidth,A.maxWidth,C),k=s.nameMarginLevel||0,I=new Xe({x:m.x,y:m.y,rotation:b.rotation,silent:rn.isLabelSilent(n),style:vt(h,{text:u,font:M,overflow:"truncate",width:E,ellipsis:D,fill:h.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:h.get("align")||b.textAlign,verticalAlign:h.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(xo({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=Ta({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:nf(c)?Bie[k]:Vie[k]});if(l.nameLocation=c,i.add(I),I.decomposeTransform(),t.shouldNameMoveOverlap&&O){var j=r.ensureRecord(n);r.resolveAxisNameOverlap(t,r,n,O,y,j)}}}};function KE(t,e,r,n,i,a,o,s){ZG(e)||Yie(t,e,i,s,n,o);var l=e.labelLayoutList;Xie(t,n,l,a),Qie(n,t.rotation,l);var u=t.optionHideOverlap;Wie(n,l,u),u&&rG(et(l,function(c){return c&&!c.label.ignore})),jie(t,r,n,l)}function Hie(t,e,r,n){var i=M2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return qc(i-$o/2)?(o=l?"bottom":"top",a="center"):qc(i-$o*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<$o*1.5&&i>$o/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Wie(t,e,r){if(VF(t.axis))return;function n(s,l,u){var c=Ta(e[l]),f=Ta(e[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){$h(c.label);return}if(f.suggestIgnore){$h(f.label);return}var h=.1;if(!r){var d=[0,0,0,0];c=oT({marginForce:d},c),f=oT({marginForce:d},f)}a_(c,f,null,{touchThreshold:h})&&$h(s?f.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 Uie(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=L1(d),p=u[1]-d*o;else{var m=t.getTicks().length-1;m>o&&(d=L1(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 eN=[[3,1],[0,2]],rae=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vT,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=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],p=d.model,g=d.scale;Jb(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(tu(g,p),Jb(g)&&(s=d))}c.length&&(s||(s=c.pop(),tu(s.scale,s.model)),R(c,function(m){$G(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){tN(n,"y",o,a)}),R(n.y,function(o){tN(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=sr(e,r),a=this._rect=wt(e.getBoxLayoutParams(),i.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(gT(o,a),!n){var u=aae(a,s,o,l,r),c=void 0;if(l)mT?(mT(this._axesList,a),gT(o,a)):c=iN(a.clone(),"axisLabel",null,a,o,u,i);else{var f=oae(e,a,i),h=f.outerBoundsRect,d=f.parsedOuterBoundsContain,p=f.outerBoundsClamp;h&&(c=iN(h,d,p,a,o,u,i))}YG(a,o,zi.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]}we(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0})==null;return Ql(n,s,!0,!0,r),gT(i,n),l;function u(h){R(i[ke[h]],function(d){if(fv(d.model)){var p=a.ensureRecord(d.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!kr(d)&&d>1e-4&&(h/=d),h}}function aae(t,e,r,n,i){var a=new FG(sae);return R(r,function(o){return R(o,function(s){if(fv(s.model)){var l=!n;s.axisBuilder=eae(t,e,s.model,i,a,l)}})}),a}function YG(t,e,r,n,i,a){var o=r===zi.determine;R(e,function(u){return R(u,function(c){fv(c.model)&&(tae(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[ke[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(f){fv(f.model)&&((n==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function oae(t,e,r){var n,i=t.get("outerBoundsMode",!0);i==="same"?n=e.clone():(i==null||i==="auto")&&(n=wt(t.get("outerBounds",!0)||NG,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[gy(pe(t.get("outerBoundsClampWidth",!0),Wy[0]),e.width),gy(pe(t.get("outerBoundsClampHeight",!0),Wy[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var sae=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";GG(t,e,r,n,i,a),nf(t.nameLocation)||R(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&WG(s.labelInfoList,s.dirVec,n,i)})};function lae(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return uae(r,t,e),r.seriesInvolved&&fae(r,t),r}function uae(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=pv(s.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",n);if(R(s.getAxes(),Ie(g,!1,null)),s.getTooltipAxes&&n&&f.get("show")){var h=f.get("trigger")==="axis",d=f.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(f.get(["axisPointer","axis"]));(h||d)&&R(p.baseAxes,Ie(g,d?"cross":!0,h)),d&&R(p.otherAxes,Ie(g,"cross",!1))}function g(m,y,_){var S=_.model.getModel("axisPointer",i),b=S.get("show");if(!(!b||b==="auto"&&!m&&!yT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?cae(_,f,i,e,m,y):S;var C=S.get("snap"),M=S.get("triggerEmphasis"),A=pv(_.model),D=y||C||_.type==="category",E=t.axesInfo[A]={key:A,axis:_,coordSys:s,axisPointerModel:S,triggerTooltip:y,triggerEmphasis:M,involveSeries:D,snap:C,useHandle:yT(S),seriesModels:[],linkGroup:null};u[A]=E,t.seriesInvolved=t.seriesInvolved||D;var k=hae(a,_);if(k!=null){var I=o[k]||(o[k]={axesInfo:{}});I.axesInfo[A]=E,I.mapper=a[k].mapper,E.linkGroup=I}}}})}function cae(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(h){l[h]=ye(o.get(h))}),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 f=l.lineStyle=o.get("crossStyle");f&&Se(u,f.textStyle)}}return t.model.getModel("axisPointer",new We(l,r,n))}function fae(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[pv(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 hae(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function dae(t){var e=YM(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=yT(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 xae=Fe();function sN(t,e,r,n){if(t instanceof zG){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?e6(r,o,u,n):Sae(t,e,r,n,o,l):r}function e6(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 Sae(t,e,r,n,i,a){var o=xae(t);o.items||(o.items=[]);var s=o.items,l=lN(s,e,r,n,i,a,1),u=lN(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||f&&h>f/2-n?e6(r,i,f,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function lN(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:f,nameTextStyle:g,triggerEvent:h},!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(_,If.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}},xh.axisLine),axisLabel:Ag(xh.axisLabel,!1),axisTick:Ag(xh.axisTick,!1),splitLine:Ag(xh.splitLine,!0),splitArea:Ag(xh.splitArea,!0),indicator:[]},e}(je),Dae=function(t){$(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"),f=s.get("show"),h=l.get("color"),d=u.get("color"),p=ee(h)?h:[h],g=ee(d)?d:[d],m=[],y=[];function _(G,F,U){var V=U%F.length;return G[V]=G[V]||[],V}if(a==="circle")for(var S=i[0].getTicksCoords(),b=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 f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(r){if(!(fN(this._zr,"globalPan")||Sh(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)&&(uo(a.event),a.__ecRoamConsumed=!0,hN(r,n,i,a,o))},e}(hi);function Sh(t){return t.__ecRoamConsumed}var Bae=Fe();function l_(t){var e=Bae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function wh(t,e,r,n){for(var i=l_(t),a=i.roam,o=a[e]=a[e]||[],s=0;s=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=o6(c,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new _e,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.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:f,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=Z1[s];if(c&&fe(Z1,s)){l=c.call(this,e,r);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=gN[s];if(d&&fe(gN,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 Kc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Wn(r,n),wn(e,n,this._defsUsePending,!1,!1),Gae(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(){Z1={g:function(e,r){var n=new _e;return Wn(r,n),wn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new Be;return Wn(r,n),wn(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 La;return Wn(r,n),wn(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),wn(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 Bv;return Wn(r,n),wn(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=_N(n));var a=new Or({shape:{points:i||[]},silent:!0});return Wn(r,a),wn(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=_N(n));var a=new Tr({shape:{points:i||[]},silent:!0});return Wn(r,a),wn(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new pr;return Wn(r,n),wn(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),wn(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),wn(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=wV(n);return Wn(r,i),wn(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),gN={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 uu(e,r,n,i);return mN(t,a),yN(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 F2(e,r,n);return mN(t,i),yN(t,i),i}};function mN(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function yN(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={};a6(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]*=Qa(s),o=ii(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 _N(t){for(var e=c_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=c_(o);switch(i=i||hr(),s){case"translate":Ri(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":O0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":yo(i,i,-parseFloat(l[0])*$1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*$1);Di(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*$1);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 SN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function a6(t,e,r){var n=t.getAttribute("style");if(n){SN.lastIndex=0;for(var i;(i=SN.exec(n))!=null;){var a=i[1],o=fe(Zy,a)?Zy[a]:null;o&&(e[o]=i[2]);var s=fe($y,a)?$y[a]:null;s&&(r[s]=i[2])}}}function Yae(t,e,r){for(var n=0;n0,_={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};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 f(d){for(var p=[],g=!u&&l&&l.project,m=0;m=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;vr(e,ar(n),{labelFetcher:h,labelDataIndex:f,defaultText:r},d);var p=e.getTextContent();if(p&&(s6(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 MN(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 AN(t,e,r,n,i){t.data||xo({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function LN(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return bt(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&nK(e,i,r),o}function PN(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}(ft);function voe(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 b=t.getBoxLayoutParams();b.aspect=g,S=wt(b,p),S=rj(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function yoe(t,e){R(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var _oe=function(){function t(){this.dimensions=u6}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 ST(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=EN,u.resize(o,r)}),e.eachSeries(function(o){Hv({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Dt).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 ST(s,s,J({nameMap:E0(l),api:r,ecModel:e},i(o[0])));u.zoomLimit=wr.apply(null,re(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=EN,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,yoe(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 Coe(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){Aoe(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=Loe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Moe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function NN(t){return arguments.length?t:koe}function Yh(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Aoe(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 Loe(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,f=s.hierNode.modifier;s=Y1(s),a=X1(a),s&&a;){i=Y1(i),o=X1(o),i.hierNode.ancestor=t;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(Doe(Poe(s,t,r),t,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!Y1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!X1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function Y1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function X1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Poe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Doe(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 koe(t,e){return t.parentNode===e.parentNode?1:2}var Ioe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Eoe=function(t){$(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 Ioe},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,f=1-c,h=oe(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,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||(b=b-Math.PI));var A=C?"left":"right",D=s.getModel("label"),E=D.get("rotate"),k=E*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:D.get("position")||A,rotation:E==null?-b:k,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?$c(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Le(r).focus=O),Roe(i,o,c,r,p,d,g,n),r.__edge&&(r.onHoverStateChange=function(j){if(j!=="blur"){var G=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);G&&G.hoverState===zv||xy(r.__edge,j)}})}function Roe(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),f=t.getOrient(),h=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 xf({shape:wT(c,f,h,i,i)})),Qe(g,{shape:wT(c,f,h,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 p6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function rA(t,e){var r=p6(t);return Ee(r,e)>=0}function f_(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 Woe=function(t){$(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=tA.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=r.expandAndCollapse,c=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.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=f_(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}(ft);function Uoe(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 Zoe(t,e){t.eachSeriesByType("tree",function(r){$oe(r,e)})}function $oe(t,e){var r=sr(t,e).refContainer,n=wt(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=NN(function(b,C){return(b.parentNode===C.parentNode?1:2)/b.depth})):(a=n.width,o=n.height,s=NN());var l=t.getData().tree.root,u=l.children[0];if(u){Toe(l),Uoe(u,Coe,s),l.hierNode.modifier=-u.hierNode.prelim,Ch(u,Moe);var c=u,f=u,h=u;Ch(u,function(b){var C=b.getLayout().x;Cf.getLayout().x&&(f=b),b.depth>h.depth&&(h=b)});var d=c===f?1:s(c,f)/2,p=d-c.getLayout().x,g=0,m=0,y=0,_=0;if(i==="radial")g=a/(f.getLayout().x+d+p),m=o/(h.depth-1||1),Ch(u,function(b){y=(b.getLayout().x+p)*g,_=(b.depth-1)*m;var C=Yh(y,_);b.setLayout({x:C.x,y:C.y,rawX:y,rawY:_},!0)});else{var S=t.getOrient();S==="RL"||S==="LR"?(m=o/(f.getLayout().x+d+p),g=a/(h.depth-1||1),Ch(u,function(b){_=(b.getLayout().x+p)*m,y=S==="LR"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:y,y:_},!0)})):(S==="TB"||S==="BT")&&(g=a/(f.getLayout().x+d+p),m=o/(h.depth-1||1),Ch(u,function(b){y=(b.getLayout().x+p)*g,_=S==="TB"?(b.depth-1)*m:o-(b.depth-1)*m,b.setLayout({x:y,y:_},!0)}))}}}function Yoe(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 Xoe(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=u_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function qoe(t){t.registerChartView(Noe),t.registerSeriesModel(Woe),t.registerLayout(Zoe),t.registerVisual(Yoe),Xoe(t)}var VN=["treemapZoomToNode","treemapRender","treemapMove"];function Koe(t){for(var e=0;e1;)a=a.parentNode;var o=Vb(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Qoe=function(t){$(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};m6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=Joe(a,n);var l=re(a||[],function(f){return new We(f,s,n)},this),u=tA.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}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=f_(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(){g6(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}(ft);function m6(t){var e=0;R(t.children,function(n){m6(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 Joe(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 ese=8,jN=8,q1=5,tse=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"]),f=sr(e,r).refContainer,h={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=wt(h,f);this._prepare(n,d,u),this._renderContent(e,d,p,s,l,u,c,i),Q0(o,h,f)}},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+ese*2,r.emptyItemWidth);r.totalWidth+=s+jN,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,f=e.get(["breadcrumb","height"]),h=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;h>n.width&&(h-=_-c,_=c,S=null);var b=new Or({shape:{points:rse(u,0,_,f,g===d.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:vt(o,{text:S})}),textConfig:{position:"inside"},z2:yf*1e4,onclick:Ie(l,y)});b.disableLabelAnimation=!0,b.getTextContent().ensureState("emphasis").style=vt(s,{text:S}),b.ensureState("emphasis").style=p,bt(b,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(b),nse(b,e,y),u+=_+jN}},t.prototype.remove=function(){this.group.removeAll()},t}();function rse(t,e,r,n,i,a){var o=[[i?t:t-q1,e],[t+r,e],[t+r,e+n],[i?t:t-q1,e+n]];return!a&&o.splice(2,0,[t+r+q1,e+n/2]),!i&&o.push([t,e+n/2]),o}function nse(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&&f_(r,e)}}var ise=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;iGN||Math.abs(r.dy)>GN)){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 f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var m=hr();Ri(m,m,[-n,-i]),O0(m,m,[p,p]),Ri(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&&Ty(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 tse(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(rA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Mh(),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 Mh(){return{nodeGroup:[],background:[],content:[]}}function cse(t,e,r,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=t.getData(),h=o.getModel();if(f.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,b=c.upperHeight,C=S&&S.length,M=h.getModel("itemStyle"),A=h.getModel(["emphasis","itemStyle"]),D=h.getModel(["blur","itemStyle"]),E=h.getModel(["select","itemStyle"]),k=M.get("borderRadius")||0,I=ue("nodeGroup",bT);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),Yy(I).nodeWidth=d,Yy(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",FN,u,sse);z&&H(I,z,C&&c.upperLabelHeight);var O=h.getModel("emphasis"),j=O.get("focus"),G=O.get("blurScope"),F=O.get("disabled"),U=j==="ancestor"?o.getAncestorsIndices():j==="descendant"?o.getDescendantIndices():j;if(C)tv(I)&&Al(I,!1),z&&(Al(z,!F),f.setItemGraphicEl(o.dataIndex,z),Lb(z,U,G));else{var V=ue("content",FN,u,lse);V&&X(I,V),z.disableMorphing=!0,z&&tv(z)&&Al(z,!1),Al(I,!F),f.setItemGraphicEl(o.dataIndex,I);var W=h.getShallow("cursor");W&&V.attr("cursor",W),Lb(I,U,G)}return I;function H(xe,ge,De){var he=Le(ge);if(he.dataIndex=o.dataIndex,he.seriesIndex=t.seriesIndex,ge.setShape({x:0,y:0,width:d,height:p,r:k}),m)K(ge);else{ge.invisible=!1;var Me=o.getVisual("style"),ot=Me.stroke,Ye=UN(M);Ye.fill=ot;var tt=vl(A);tt.fill=A.get("borderColor");var lt=vl(D);lt.fill=D.get("borderColor");var kt=vl(E);if(kt.fill=E.get("borderColor"),De){var gr=d-2*g;ne(ge,ot,Me.opacity,{x:g,y:0,width:gr,height:b})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=tt,ge.ensureState("blur").style=lt,ge.ensureState("select").style=kt,Kl(ge)}xe.add(ge)}function X(xe,ge){var De=Le(ge);De.dataIndex=o.dataIndex,De.seriesIndex=t.seriesIndex;var he=Math.max(d-2*g,0),Me=Math.max(p-2*g,0);if(ge.culling=!0,ge.setShape({x:g,y:g,width:he,height:Me,r:k}),m)K(ge);else{ge.invisible=!1;var ot=o.getVisual("style"),Ye=ot.fill,tt=UN(M);tt.fill=Ye,tt.decal=ot.decal;var lt=vl(A),kt=vl(D),gr=vl(E);ne(ge,Ye,ot.opacity,null),ge.setStyle(tt),ge.ensureState("emphasis").style=lt,ge.ensureState("blur").style=kt,ge.ensureState("select").style=gr,Kl(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,De,he){var Me=h.getModel(he?WN:HN),ot=rr(h.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(h,he?WN:HN),{defaultText:Ye?ot:null,inheritColor:ge,defaultOpacity:De,labelFetcher:t,labelDataIndex:o.dataIndex});var tt=xe.getTextContent();if(tt){var lt=tt.style,kt=Iv(lt.padding||0);he&&(xe.setTextConfig({layoutRect:he}),tt.disableLabelLayout=!0),tt.beforeUpdate=function(){var zr=Math.max((he?he.width:xe.shape.width)-kt[1]-kt[3],0),ji=Math.max((he?he.height:xe.shape.height)-kt[0]-kt[2],0);(lt.width!==zr||lt.height!==ji)&&tt.setStyle({width:zr,height:ji})},lt.truncateMinChar=2,lt.lineOverflow="truncate",ie(lt,he,c);var gr=tt.getState("emphasis");ie(gr?gr.style:null,he,c)}}function ie(xe,ge,De){var he=xe?xe.text:null;if(!ge&&De.isLeafRoot&&he!=null){var Me=t.get("drillDownIcon",!0);xe.text=Me?Me+" "+he:he}}function ue(xe,ge,De,he){var Me=_!=null&&r[xe][_],ot=i[xe];return Me?(r[xe][_]=null,ve(ot,Me)):m||(Me=new ge,Me instanceof ci&&(Me.z2=fse(De,he)),Ge(ot,Me)),e[xe][y]=Me}function ve(xe,ge){var De=xe[y]={};ge instanceof bT?(De.oldX=ge.x,De.oldY=ge.y):De.oldShape=J({},ge.shape)}function Ge(xe,ge){var De=xe[y]={},he=o.parentNode,Me=ge instanceof _e;if(he&&(!n||n.direction==="drillDown")){var ot=0,Ye=0,tt=i.background[he.getRawIndex()];!n&&tt&&tt.oldShape&&(ot=tt.oldShape.width,Ye=tt.oldShape.height),Me?(De.oldX=0,De.oldY=Ye):De.oldShape={x:ot,y:Ye,width:0,height:0}}De.fadein=!Me}}function fse(t,e){return t*ose+e}var mv=R,hse=we,Xy=-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=pse[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(K1(i),dse(i)):r==="category"?i.categories?vse(i):K1(i,!0):(Nr(r!=="linear"||i.dataExtent),K1(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){we(e)?R(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=ee(e)?[]:we(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&&mv(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(hse(e)){var r=[];mv(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 K1(t,e){var r=t.visual,n=[];we(r)?mv(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]),y6(t,n)}function Pg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:TT([0,1])}}function ZN(t){var e=this.option.visual;return e[Math.round(nt(t,[0,1],[0,e.length-1],!0))]||{}}function Ah(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Xh(t){var e=this.option.visual;return e[this.option.loop&&t!==Xy?t%e.length:t]}function pl(){return this.option.visual[0]}function TT(t){return{linear:function(e){return nt(e,t,this.option.visual,!0)},category:Xh,piecewise:function(e,r){var n=CT.call(this,r);return n==null&&(n=nt(e,t,this.option.visual,!0)),n},fixed:pl}}function CT(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 y6(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 pse={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??Xy},fixed:Rt};function Dg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=Sse(i,l,g,m,p,n);x6(g,y,r,n)}})}}}function yse(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 $N(t){var e=Q1(t,"color");if(e){var r=Q1(t,"colorAlpha"),n=Q1(t,"colorSaturation");return n&&(e=Ja(e,null,null,n)),r&&(e=qd(e,r)),e}}function _se(t,e){return e!=null?Ja(e,null,null,t):null}function Q1(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function xse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=J1(e,"color")||i.color!=null&&i.color!=="none"&&(J1(e,"colorAlpha")||J1(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"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new dr(f);return _6(h).drColorMappingBy=c,h}}}function J1(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function Sse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&_6(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 yv=Math.max,qy=Math.min,YN=wr,nA=R,S6=["itemStyle","borderWidth"],wse=["itemStyle","gapWidth"],bse=["upperLabel","show"],Tse=["upperLabel","height"];const Cse={seriesType:"treemap",reset:function(t,e,r,n){var i=t.option,a=sr(t,r).refContainer,o=wt(t.getBoxLayoutParams(),a),s=i.size||[],l=oe(YN(o.width,s[0]),a.width),u=oe(YN(o.height,s[1]),a.height),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],h=gv(n,f,t),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=p6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?kse(t,h,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),w6(p,_,!1,0),S=p.getLayout(),nA(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var b=t.getData().tree.root;b.setLayout(Ise(o,d,h),!0),t.setLayoutInfo(o),b6(b,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function w6(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(S6),u=s.get(wse)/2,c=T6(s),f=Math.max(l,c),h=l-u,d=f-u;t.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=yv(i-2*h,0),a=yv(a-h-d,0);var p=i*a,g=Mse(t,s,p,e,r,n);if(g.length){var m={x:h,y:d,width:i,height:a},y=qy(i,a),_=1/0,S=[];S.area=0;for(var b=0,C=g.length;b=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Dse(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?yv(u*n/l,l/(u*i)):1/0}function XN(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 f=0,h=t.length;fmb&&(u=mb),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=b[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var D=-Math.atan2(b[1],b[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*y+c[0],a.y=-h[1]*_+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*A+c[0],a.y=c[1]+E,p=b[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+f[0],a.y=f[1]+E,p=b[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),lA=function(){function t(e){this.group=new _e,this._LineCtor=e||sA}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=tR(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=tR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!Xse(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function tR(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 rR(t){return isNaN(t[0])||isNaN(t[1])}function iS(t){return t&&!rR(t[0])&&!rR(t[1])}var aS=[],oS=[],sS=[],Zu=Sr,lS=os,nR=Math.abs;function iR(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){aS[0]=Zu(n[0],i[0],a[0],c),aS[1]=Zu(n[1],i[1],a[1],c);var f=nR(lS(aS,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function uS(t,e){var r=[],n=Yd,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[ga(u[0]),ga(u[1])],u[2]&&u.__original.push(ga(u[2])));var h=u.__original;if(u[2]!=null){if(Gr(i[0],h[0]),Gr(i[1],h[2]),Gr(i[2],h[1]),c&&c!=="none"){var d=Kh(s.node1),p=iR(i,h[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(f&&f!=="none"){var d=Kh(s.node2),p=iR(i,h[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],h[0]),Gr(a[1],h[1]),Ho(o,a[1],a[0]),lu(o,o),c&&c!=="none"){var d=Kh(s.node1);iy(a[0],a[0],o,d*e)}if(f&&f!=="none"){var d=Kh(s.node2);iy(a[1],a[1],o,-d*e)}Gr(u[0],a[0]),Gr(u[1],a[1])}})}var k6=Fe();function qse(t){if(t)return k6(t).bridge}function aR(t,e){t&&(k6(t).bridge=e)}function oR(t){return t.type==="view"}var Kse=function(t){$(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 $v,a=new lA,o=this.group,s=new _e;this._controller=new pu(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(oR(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):Qe(this._mainGroup,f,r)}uS(r.getGraph(),qh(r));var h=r.getData();u.updateData(h);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");h.graph.eachNode(function(b){var C=b.dataIndex,M=b.getGraphicEl(),A=b.getModel();if(M){M.off("drag").off("dragend");var D=A.get("draggable");D&&M.on("drag",function(k){switch(m){case"force":p.warmUp(),!a._layouting&&a._startForceLayoutIteration(p,i,g),p.setFixed(C),h.setItemLayout(C,[M.x,M.y]);break;case"circular":h.setItemLayout(C,[M.x,M.y]),b.setLayout({fixed:!0},!0),oA(r,"symbolSize",b,[k.offsetX,k.offsetY]),a.updateLayout(r);break;case"none":default:h.setItemLayout(C,[M.x,M.y]),aA(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){p&&p.setUnfixed(C)}),M.setDraggable(D,!!A.get("cursor"));var E=A.get(["emphasis","focus"]);E==="adjacency"&&(Le(M).focus=b.getAdjacentDataIndices())}}),h.graph.eachEdge(function(b){var C=b.getGraphicEl(),M=b.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Le(C).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=h.getLayout("cx"),S=h.getLayout("cy");h.graph.eachNode(function(b){L6(b,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(!oR(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&&(qM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(KM(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),uS(r.getGraph(),qh(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=qh(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(uS(r.getGraph(),qh(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=qse(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,f=new _e;s.add(f),s.add(c);for(var h=0;h=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 gl||(r=this._nodesMap[$u(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}(),I6=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(f)&&(e.set(f,!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 E6(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(gl,E6("hostGraph","data"));Bt(I6,E6("hostGraph","edgeData"));function uA(t,e,r,n,i){for(var a=new Qse(n),o=0;o "+h)),u++)}var d=r.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar"||d==="matrix")p=Pa(t,r);else{var g=Mf.get(d),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Df(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,_),d6({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Jse=function(t){$(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 Rf(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),Yl(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){Vse(this);var s=uA(a,i,this,!0,l);return R(s.edges,function(u){jse(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 f=We.prototype.getModel;function h(p,g){var m=f.call(this,p,g);return m.resolveParentPath=d,m}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=h,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 f=Oj({series:this,dataIndex:r,multipleSeries:n});return f},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}(ft);function ele(t){t.registerChartView(Kse),t.registerSeriesModel(Jse),t.registerProcessor(Nse),t.registerVisual(Rse),t.registerVisual(Ose),t.registerLayout(Fse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Hse),t.registerLayout(Use),t.registerCoordinateSystem("graphView",{dimensions:gu.dimensions,create:$se}),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=u_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var sR=function(t){$(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"),f=r.getItemLayout(n),h=J(ha(u.getModel("itemStyle"),f,!0),f),d=this;if(isNaN(h.startAngle)){d.setShape(h);return}a?d.setShape(h):Qe(d,{shape:h},l,n);var p=J(ha(u.getModel("itemStyle"),f,!0),f);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");bt(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 f=ar(n),h=i.getVisual("style");vr(a,f,{labelFetcher:{getFormattedLabel:function(_,S,b,C,M,A){return r.getFormattedLabel(_,S,"node",C,xn(M,f.normal&&f.normal.get("formatter"),n.get("name")),A)}},labelDataIndex:i.dataIndex,defaultText:i.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.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),tle=function(t){$(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(),f=n.getItemModel(l.dataIndex),h=f.getModel("lineStyle"),d=f.getModel("emphasis"),p=d.get("focus"),g=J(ha(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),lR(m,l,r,h)):(fi(m),lR(m,l,r,h),Qe(m,{shape:g},s,i)),bt(this,p==="adjacency"?l.getAdjacentDataIndices():p,d.get("blurScope"),d.get("disabled")),ir(m,f,"lineStyle"),n.setItemGraphicEl(l.dataIndex,m)},e}(Ue);function lR(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,f=(c.s1[0]+c.s2[0])/2,h=(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 uu(f,h,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var rle=Math.PI/180,nle=function(t){$(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")*rle;if(a.diff(o).add(function(c){var f=a.getItemLayout(c);if(f){var h=new sR(a,c,l);Le(h).dataIndex=c,s.add(h)}}).update(function(c,f){var h=o.getItemGraphicEl(f),d=a.getItemLayout(c);if(!d){h&&eo(h,r,f);return}h?h.updateData(a,c,l):h=new sR(a,c,l),s.add(h)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&eo(f,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 tle(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&&eo(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(st),ile=function(t){$(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 Rf(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=uA(a,i,this,!0,s);return o.data}function s(l,u){var c=We.prototype.getModel;function f(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}u.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=f,d});function h(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}(ft),cS=Math.PI/180;function ale(t,e){t.eachSeriesByType("chord",function(r){ole(r,e)})}function ole(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=tj(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((t.get("padAngle")||0)*cS,0),h=Math.max((t.get("minAngle")||0)*cS,0),d=-t.get("startAngle")*cS,p=d+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[d,p];U0(y,!g);var _=y[0],S=y[1],b=S-_,C=r.getSum("value")===0&&i.getSum("value")===0,M=[],A=0;n.eachEdge(function(V){var W=C?1:V.getValue("value");C&&(W>0||h)&&(A+=2);var H=V.node1.dataIndex,X=V.node2.dataIndex;M[H]=(M[H]||0)+W,M[X]=(M[X]||0)+W});var D=0;if(n.eachNode(function(V){var W=V.getValue("value");isNaN(W)||(M[V.dataIndex]=Math.max(W,M[V.dataIndex]||0)),!C&&(M[V.dataIndex]>0||h)&&A++,D+=M[V.dataIndex]||0}),!(A===0||D===0)){f*A>=Math.abs(b)&&(f=Math.max(0,(Math.abs(b)-h*A)/A)),(f+h)*A>=Math.abs(b)&&(h=(Math.abs(b)-f*A)/A);var E=(b-f*A*m)/D,k=0,I=0,z=0;n.eachNode(function(V){var W=M[V.dataIndex]||0,H=E*(D?W:1)*m;Math.abs(H)I){var j=k/I;n.eachNode(function(V){var W=V.getLayout().angle;Math.abs(W)>=h?V.setLayout({angle:W*j,ratio:j},!0):V.setLayout({angle:h,ratio:h===0?1:W/h},!0)})}else n.eachNode(function(V){if(!O){var W=V.getLayout().angle,H=Math.min(W/z,1),X=H*k;W-Xh&&h>0){var H=O?1:Math.min(W/z,1),X=W-h,K=Math.min(X,Math.min(G,k*H));G-=K,V.setLayout({angle:W-K,ratio:(W-K)/W},!0)}else h>0&&V.setLayout({angle:h,ratio:W===0?1:h/W},!0)}});var F=_,U=[];n.eachNode(function(V){var W=Math.max(V.getLayout().angle,h);V.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:F,endAngle:F+W*m,clockwise:g},!0),U[V.dataIndex]=F,F+=(W+f)*m}),n.eachEdge(function(V){var W=C?1:V.getValue("value"),H=E*(D?W:1)*m,X=V.node1.dataIndex,K=U[X]||0,ne=Math.abs((V.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=V.node2.dataIndex,xe=U[Ge]||0,ge=Math.abs((V.node2.getLayout().ratio||1)*H),De=xe+ge*m,he=[s+c*Math.cos(xe),l+c*Math.sin(xe)],Me=[s+c*Math.cos(De),l+c*Math.sin(De)];V.setLayout({s1:ue,s2:ve,sStartAngle:K,sEndAngle:ie,t1:he,t2:Me,tStartAngle:xe,tEndAngle:De,cx:s,cy:l,r:c,value:W,clockwise:g}),U[X]=ie,U[Ge]=De})}}}function sle(t){t.registerChartView(nle),t.registerSeriesModel(ile),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,ale),t.registerProcessor(Ef("chord"))}var lle=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),ule=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new lle},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 cle(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 Ig(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var fle=function(t){$(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=cle(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,f=r.getModel("axisLine"),h=f.get("roundCap"),d=h?Hy:Rr,p=f.get("show"),g=f.getModel("lineStyle"),m=g.get("width"),y=[u,c];U0(y,!l),u=y[0],c=y[1];for(var _=c-u,S=u,b=[],C=0;p&&C=E&&(k===0?0:a[k-1][0])Math.PI/2&&(ie+=Math.PI)):ne==="tangential"?ie=-D-Math.PI/2:qe(ne)&&(ie=ne*Math.PI/180),ie===0?f.add(new Xe({style:vt(S,{text:W,x:X,y:K,verticalAlign:G<-.8?"top":G>.8?"bottom":"middle",align:j<-.4?"left":j>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.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!==b){var U=_.get("distance");U=U?U+c:c;for(var ue=0;ue<=C;ue++){j=Math.cos(D),G=Math.sin(D);var ve=new Wt({shape:{x1:j*(p-U)+h,y1:G*(p-U)+d,x2:j*(p-A-U)+h,y2:G*(p-A-U)+d},silent:!0,style:z});z.stroke==="auto"&&ve.setStyle({stroke:a((F+ue/C)/b)}),f.add(ve),D+=k}D-=k}else D+=E}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,p=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),_=r.getData(),S=_.mapDimension("value"),b=+r.get("min"),C=+r.get("max"),M=[b,C],A=[s,l];function D(k,I){var z=_.getItemModel(k),O=z.getModel("pointer"),j=oe(O.get("width"),o.r),G=oe(O.get("length"),o.r),F=r.get(["pointer","icon"]),U=O.get("offsetCenter"),V=oe(U[0],o.r),W=oe(U[1],o.r),H=O.get("keepAspect"),X;return F?X=Ut(F,V-j/2,W-G,j,G,null,H):X=new ule({shape:{angle:-Math.PI/2,width:j,r:G,x:V,y:W}}),X.rotation=-(I+Math.PI/2),X.x=o.cx,X.y=o.cy,X}function E(k,I){var z=m.get("roundCap"),O=z?Hy:Rr,j=m.get("overlap"),G=j?m.get("width"):c/_.count(),F=j?o.r-G:o.r-(k+1)*G,U=j?o.r:o.r-k*G,V=new O({shape:{startAngle:s,endAngle:I,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:U}});return j&&(V.z2=nt(_.get(S,k),[b,C],[100,0],!0)),V}(y||g)&&(_.diff(h).add(function(k){var I=_.get(S,k);if(g){var z=D(k,s);St(z,{rotation:-((isNaN(+I)?A[0]:nt(I,M,A,!0))+Math.PI/2)},r),f.add(z),_.setItemGraphicEl(k,z)}if(y){var O=E(k,s),j=m.get("clip");St(O,{shape:{endAngle:nt(I,M,A,j)}},r),f.add(O),Tb(r.seriesIndex,_.dataType,k,O),p[k]=O}}).update(function(k,I){var z=_.get(S,k);if(g){var O=h.getItemGraphicEl(I),j=O?O.rotation:s,G=D(k,j);G.rotation=j,Qe(G,{rotation:-((isNaN(+z)?A[0]:nt(z,M,A,!0))+Math.PI/2)},r),f.add(G),_.setItemGraphicEl(k,G)}if(y){var F=d[I],U=F?F.shape.endAngle:s,V=E(k,U),W=m.get("clip");Qe(V,{shape:{endAngle:nt(z,M,A,W)}},r),f.add(V),Tb(r.seriesIndex,_.dataType,k,V),p[k]=V}}).execute(),_.each(function(k){var I=_.getItemModel(k),z=I.getModel("emphasis"),O=z.get("focus"),j=z.get("blurScope"),G=z.get("disabled");if(g){var F=_.getItemGraphicEl(k),U=_.getItemVisual(k,"style"),V=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(V);F.setStyle(I.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(nt(_.get(S,k),M,[0,1],!0))),F.z2EmphasisLift=0,ir(F,I),bt(F,O,j,G)}if(y){var H=p[k];H.useStyle(_.getItemVisual(k,"style")),H.setStyle(I.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ir(H,I),bt(H,O,j,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"),f=+r.get("max"),h=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),b=new _e,C=a(nt(S,[c,f],[0,1],!0)),M=_.getModel("title");if(M.get("show")){var A=M.get("offsetCenter"),D=o.cx+oe(A[0],o.r),E=o.cy+oe(A[1],o.r),k=d[y];k.attr({z2:m?0:2,style:vt(M,{x:D,y:E,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),b.add(k)}var I=_.getModel("detail");if(I.get("show")){var z=I.get("offsetCenter"),O=o.cx+oe(z[0],o.r),j=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,k=p[y],V=I.get("formatter");k.attr({z2:m?0:2,style:vt(I,{x:O,y:j,text:Ig(S,V),width:isNaN(G)?null:G,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:U})}),zV(k,{normal:I},S,function(H){return Ig(H,V)}),g&&BV(k,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return Ig(ue?ue.interpolatedValue:S,V)}}),b.add(k)}h.add(b)}),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(st),hle=function(t){$(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 Nf(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}(ft);function dle(t){t.registerChartView(fle),t.registerSeriesModel(hle)}var vle=["itemStyle","opacity"],ple=function(t){$(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(vle);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),bt(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,f=r.getItemVisual(n,"style"),h=f.fill;vr(o,ar(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:r.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var d=l.getModel("label"),p=d.get("color"),g=p==="inherit"?h: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}),OM(i,zM(l),{stroke:h})},e}(Or),gle=function(t){$(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 ple(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);eo(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),mle=function(t){$(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 Rf(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Nf(this,{coordDimensions:["value"],encodeDefaulter:Ie(cM,this)})},e.prototype._defaultLabelLine=function(r){Yl(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}(ft);function yle(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();oNle)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||!hS(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 hS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var zle=function(t){$(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}(je),Ble=function(t){$(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}(vi);function Ss(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Yu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Yu(s,[0,o]),i=a=Yu(s,[i,a]),n=0}e[0]=Yu(e[0],r),e[1]=Yu(e[1],r);var l=dS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Yu(e[n],c);var f;return f=dS(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function dS(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 Yu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var vS=R,R6=Math.min,O6=Math.max,fR=Math.floor,Vle=Math.ceil,hR=Ht,jle=Math.PI,Fle=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;vS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new Ble(o,Uv(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&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();vS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),tu(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){var n=sr(e,r).refContainer;this._rect=wt(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=Eg(e.get("axisExpandWidth"),l),f=Eg(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=Eg(d[1]-d[0],l),d[1]=d[0]+p;else{p=Eg(c*(f-1),l);var g=e.get("axisExpandCenter")||fR(u/2);d=[c*g-p/2],d[1]=d[0]+p}var m=(s-p)/(u-f);m<3&&(m=0);var y=[fR(hR(d[0]/c,1))+1,Vle(hR(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:h,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])}),vS(n,function(o,s){var l=(i.axisExpandable?Hle:Gle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:jle/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],d=hr();yo(d,d,h),Ri(d,d,f),this._axesLayout[o]={position:f,rotation:h,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-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[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=[O6(0,p-d/2)],i[1]=R6(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Eg(t,e){return R6(O6(t,e[0]),e[1])}function Gle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Hle(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--)Dn(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;aYle}function G6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function H6(t,e,r,n){var i=new _e;return i.add(new Be({name:"main",style:vA(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(pR,t,e,i,["n","s","w","e"]),ondragend:Ie(nu,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(pR,t,e,i,a),ondragend:Ie(nu,e,{isEnd:!0})}))}),i}function W6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=lf(i,Xle),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,c=r[0][1],f=r[1][1],h=c-a+i/2,d=f-a+i/2,p=c-o,g=f-s,m=p+i,y=g+i;Ba(t,e,"main",o,s,p,g),n.transformable&&(Ba(t,e,"w",l,u,a,y),Ba(t,e,"e",h,u,a,y),Ba(t,e,"n",l,u,m,a),Ba(t,e,"s",l,d,m,a),Ba(t,e,"nw",l,u,a,a),Ba(t,e,"ne",h,u,a,a),Ba(t,e,"sw",l,d,a,a),Ba(t,e,"se",h,d,a,a))}function kT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(vA(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?IT(t,a[0]):tue(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Kle[s]+"-resize":null})})}function Ba(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(nue(pA(t,e,[[n,i],[n+a,i+o]])))}function vA(t){return Se({strokeNoScale:!0},t.brushStyle)}function U6(t,e,r,n){var i=[xv(t,r),xv(e,n)],a=[lf(t,r),lf(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function eue(t){return cs(t.group)}function IT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=X0(r[e],eue(t));return n[i]}function tue(t,e){var r=[IT(t,e[0]),IT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function pR(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=Z6(e,i,a);R(n,function(u){var c=qle[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(U6(s[0][0],s[1][0],s[0][1],s[1][1])),fA(e,r),nu(e,{isEnd:!1})}function rue(t,e,r,n){var i=e.__brushOption.range,a=Z6(t,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),fA(t,e),nu(t,{isEnd:!1})}function Z6(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 pA(t,e,r){var n=F6(t,e);return n&&n!==ru?n.clipPath(r,t._transform):ye(r)}function nue(t){var e=xv(t[0][0],t[1][0]),r=xv(t[0][1],t[1][1]),n=lf(t[0][0],t[1][0]),i=lf(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function iue(t,e,r){if(!(!t._brushType||oue(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=dA(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var d_={lineX:yR(0),lineY:yR(1),rect:{createCover:function(t,e){function r(n){return n}return H6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=G6(t);return U6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){W6(t,e,r,n)},updateCommon:kT,contain:NT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new Tr({name:"main",style:vA(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(rue,t,e),ondragend:Ie(nu,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:pA(t,e,r)})},updateCommon:kT,contain:NT}};function yR(t){return{createCover:function(e,r){return H6({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=G6(e),n=xv(r[0][t],r[1][t]),i=lf(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=F6(e,r);if(o!==ru&&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(),W6(e,r,l,i)},updateCommon:kT,contain:NT}}function Y6(t){return t=gA(t),function(e){return U2(e,t)}}function X6(t,e){return t=gA(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 q6(t,e,r){var n=gA(t);return function(i,a){return n.contain(a[0],a[1])&&!t6(i,e,r)}}function gA(t){return Ce.create(t)}var sue=function(t){$(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 cA(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!lue(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=cue(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),c=u.width,f=r.axis.dim,h=l.getAxisLayout(f),d=J({strokeContainThreshold:c},h),p=new rn(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Fv(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),f=Ce.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:Y6(f),isTargetByCursor:q6(f,s,a),getLinearBrushOtherExtent:X6(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(uue(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 lue(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function uue(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 cue(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var fue={type:"axisAreaSelect",event:"axisAreaSelected"};function hue(t){t.registerAction(fue,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 due={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function K6(t){t.registerComponentView(Rle),t.registerComponentModel(zle),t.registerCoordinateSystem("parallel",Ule),t.registerPreprocessor(kle),t.registerComponentModel(PT),t.registerComponentView(sue),of(t,"parallel",PT,due),hue(t)}function vue(t){Oe(K6),t.registerChartView(ble),t.registerSeriesModel(Mle),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Dle)}var pue=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}(),gue=function(t){$(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new pue},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(){co(this)},e.prototype.downplay=function(){fo(this)},e}(Ue),mue=function(t){$(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 pu(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,f=r.getData(),h=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(r,i),r6(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new gue,m=Le(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),S=_.get("curveness"),b=p.node1.getLayout(),C=p.node1.getModel(),M=C.get("localX"),A=C.get("localY"),D=p.node2.getLayout(),E=p.node2.getModel(),k=E.get("localX"),I=E.get("localY"),z=p.getLayout(),O,j,G,F,U,V,W,H;g.shape.extent=Math.max(1,z.dy),g.shape.orient=d,d==="vertical"?(O=(M!=null?M*u:b.x)+z.sy,j=(A!=null?A*c:b.y)+b.dy,G=(k!=null?k*u:D.x)+z.ty,F=I!=null?I*c:D.y,U=O,V=j*(1-S)+F*S,W=G,H=j*S+F*(1-S)):(O=(M!=null?M*u:b.x)+b.dx,j=(A!=null?A*c:b.y)+z.sy,G=k!=null?k*u:D.x,F=(I!=null?I*c:D.y)+z.ty,U=O*(1-S)+G*S,V=j,W=O*S+G*(1-S),H=F),g.setShape({x1:O,y1:j,x2:G,y2:F,cpx1:U,cpy1:V,cpx2:W,cpy2:H}),g.useStyle(_.getItemStyle()),_R(g.style,d,p);var X=""+y.get("value"),K=ar(y,"edgeLabel");vr(g,K,{labelFetcher:{getFormattedLabel:function(ue,ve,Ge,xe,ge,De){return r.getFormattedLabel(ue,ve,"edge",xe,xn(ge,K.normal&&K.normal.get("formatter"),X),De)}},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 _R(ve,d,p),ve}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var ie=ne.get("focus");bt(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"),b=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:b},style:m.getModel("itemStyle").getItemStyle(),z2:10});vr(C,ar(m),{labelFetcher:{getFormattedLabel:function(A,D){return r.getFormattedLabel(A,D,"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),f.setItemGraphicEl(p.dataIndex,C),Le(C).dataType="node";var M=S.get("focus");bt(C,M==="adjacency"?p.getAdjacentDataIndices():M==="trajectory"?p.getTrajectoryDataIndices():M,S.get("blurScope"),S.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var m=f.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:f.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(yue(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 gu(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 _R(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 uu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function yue(t,e,r){var n=new Be({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 _ue=function(t){$(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=uA(a,i,this,!0,c);return u.data;function c(f,h){f.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}),h.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),f=c.getLayout().value,h=this.getDataParams(r,i).data.name;return Kt("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},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}(ft);function xue(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sr(r,e).refContainer,o=wt(r.getBoxLayoutParams(),a);r.layoutInfo=o;var s=o.width,l=o.height,u=r.getGraph(),c=u.nodes,f=u.edges;wue(c);var h=et(c,function(m){return m.getLayout().value===0}),d=h.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");Sue(c,f,n,i,s,l,d,p,g)})}function Sue(t,e,r,n,i,a,o,s,l){bue(t,e,r,i,a,s,l),Aue(t,e,a,i,n,o,s),Oue(t,s)}function wue(t){R(t,function(e){var r=ds(e.outEdges,Ky),n=ds(e.inEdges,Ky),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function bue(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:f},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var _=0;_f-1?d:f-1;o&&o!=="left"&&Tue(t,o,a,A);var D=a==="vertical"?(i-r)/A:(n-r)/A;Mue(t,D,a)}function Q6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function Tue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,Due(s,l,o),pS(s,i,r,n,o),Rue(s,l,o),pS(s,i,r,n,o)}function Lue(t,e){var r=[],n=e==="vertical"?"y":"x",i=_b(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 Pue(t,e,r,n,i,a){var o=1/0;R(t,function(s){var l=s.length,u=0;R(s,function(f){u+=f.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()[h]+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=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+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 Due(t,e,r){R(t.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=ds(i.outEdges,kue,r)/ds(i.outEdges,Ky);if(isNaN(a)){var o=i.outEdges.length;a=o?ds(i.outEdges,Iue,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 kue(t,e){return ws(t.node2,e)*t.getValue()}function Iue(t,e){return ws(t.node2,e)}function Eue(t,e){return ws(t.node1,e)*t.getValue()}function Nue(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 Ky(t){return t.getValue()}function ds(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 Bue(t){t.registerChartView(mue),t.registerSeriesModel(_ue),t.registerLayout(xue),t.registerVisual(zue),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=u_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var J6=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,f=this._baseAxisDim=u[c],h=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(b,C){var M;ee(b)?(M=b.slice(),b.unshift(C)):ee(b.value)?(M=J({},b),M.value=M.value.slice(),b.value.unshift(C)):M=b,y.push(M)}),e.data=y}var _=this.defaultValueDimensions,S=[{name:f,type:Ny(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ny(g),dimsDef:_.slice()}];return Nf(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:Ie(uj,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),eH=function(t){$(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}(ft);Bt(eH,J6,!0);var Vue=function(t){$(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),f=xR(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(fi(f),tH(h,f,a,u)):f=xR(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).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),jue=function(){function t(){}return t}(),Fue=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new jue},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 b=[y,S];n.push(b)}}}return{boxData:r,outliers:n}}var Yue={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Cr){var n="";it(n)}var i=$ue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Xue(t){t.registerSeriesModel(eH),t.registerChartView(Vue),t.registerLayout(Hue),t.registerTransform(Yue)}var que=["itemStyle","borderColor"],Kue=["itemStyle","borderColor0"],Que=["itemStyle","borderColorDoji"],Jue=["itemStyle","color"],ece=["itemStyle","color0"];function mA(t,e){return e.get(t>0?Jue:ece)}function yA(t,e){return e.get(t===0?Que:t>0?que:Kue)}var tce={seriesType:"candlestick",plan:Af(),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=yA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},rce=["color","borderColor"],nce=function(t){$(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){Ps(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 f=n.getItemLayout(c);if(s&&SR(u,f))return;var h=gS(f,c,!0);St(h,{shape:{points:f.ends}},r,c),mS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&SR(u,d)){a.remove(h);return}h?(Qe(h,{shape:{points:d.ends}},r,c),fi(h)):h=gS(d),mS(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),wR(r,this.group);var n=r.get("clip",!0)?Yv(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=gS(s);mS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){wR(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),ice=function(){function t(){}return t}(),ace=function(t){$(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new ice},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 gS(t,e,r){var n=t.ends;return new ace({shape:{points:r?oce(n,t):n},z2:100})}function SR(t,e){for(var r=!0,n=0;nC?I[a]:k[a],ends:j,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 V(X,K,ne){var ie=K.slice(),ue=K.slice();ie[i]=gm(ie[i]+n/2,1,!1),ue[i]=gm(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]=gm(X[i],1),X}}function p(g,m){for(var y=ca(g.count*4),_=0,S,b=[],C=[],M,A=m.getStore(),D=!!t.get(["itemStyle","borderColorDoji"]);(M=g.next())!=null;){var E=A.get(s,M),k=A.get(u,M),I=A.get(c,M),z=A.get(f,M),O=A.get(h,M);if(isNaN(E)||isNaN(z)||isNaN(O)){y[_++]=NaN,_+=3;continue}y[_++]=bR(A,M,k,I,c,D),b[i]=E,b[a]=z,S=e.dataToPoint(b,null,C),y[_++]=S?S[0]:NaN,y[_++]=S?S[1]:NaN,b[a]=O,S=e.dataToPoint(b,null,C),y[_++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function bR(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 cce(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 fce(t){t.registerChartView(nce),t.registerSeriesModel(rH),t.registerPreprocessor(lce),t.registerVisual(tce),t.registerLayout(uce)}function TR(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 hce=function(t){$(e,t);function e(r,n){var i=t.call(this)||this,a=new Zv(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 h=void 0;me(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,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 Za(r.__p1,r.__cp1)+Za(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=nb;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=r.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=r.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(h,f)-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]),f=i[l],h=i[l+1];r.x=f[0]*(1-c)+c*h[0],r.y=f[1]*(1-c)+c*h[1];var d=r.__t<1?h[0]-f[0]:f[0]-h[0],p=r.__t<1?h[1]-f[1]:f[1]-h[1];r.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(nH),mce=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),yce=function(t){$(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 mce},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+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;r.quadraticCurveTo(d,p,f,h)}else r.lineTo(f,h)}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 f=a[u++],h=a[u++],d=1;d0){var m=(f+p)/2-(h-g)*o,y=(h+g)/2-(p-f)*o;if(iV(f,h,m,y,p,g,s,r,n))return l}else if(Oo(f,h,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}(),aH={seriesType:"lines",plan:Af(),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 f=r.get("clip",!0)&&Yv(r.coordinateSystem,!1,r);f?this.group.setClipPath(f):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=aH.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 _ce:new lA(o?a?gce:iH:a?nH:sA),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),Sce=typeof Uint32Array>"u"?Array:Uint32Array,wce=typeof Float64Array>"u"?Array:Float64Array;function CR(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),E0([i,r[0],r[1]])}))}var bce=function(t){$(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||[],CR(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(CR(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=$c(this._flatCoords,n.flatCoords),this._flatCoordsOffset=$c(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}(ft);function Ng(t){return t instanceof Array||(t=[t,t]),t}var Tce={seriesType:"lines",reset:function(t){var e=Ng(t.get("symbol")),r=Ng(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=Ng(s.getShallow("symbol",!0)),u=Ng(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 Cce(t){t.registerChartView(xce),t.registerSeriesModel(bce),t.registerLayout(aH),t.registerVisual(Tce)}var Mce=256,Ace=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,f=this.canvas,h=f.getContext("2d"),d=e.length;f.width=r,f.height=n;for(var p=0;p0){var z=o(S)?l:u;S>0&&(S=S*k+D),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 h.putImageData(b,0,0),f},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 Lce(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 MR(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Dce=function(t){$(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()):MR(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&&(MR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Ps(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=xs(s,"cartesian2d"),u=xs(s,"matrix"),c,f,h,d;if(l){var p=s.getAxis("x"),g=s.getAxis("y");c=p.getBandWidth()+.5,f=g.getBandWidth()+.5,h=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(),b=r.getModel(["select","itemStyle"]).getItemStyle(),C=r.get(["itemStyle","borderRadius"]),M=ar(r),A=r.getModel("emphasis"),D=A.get("focus"),E=A.get("blurScope"),k=A.get("disabled"),I=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],z=i;zh[1]||Fd[1])continue;var U=s.dataToPoint([G,F]);O=new Be({shape:{x:U[0]-c/2,y:U[1]-f/2,width:c,height:f},style:j})}else if(u){var V=s.dataToLayout([y.get(I[0],z),y.get(I[1],z)]).rect;if(kr(V.x))continue;O=new Be({z2:1,shape:V,style:j})}else{if(isNaN(y.get(I[1],z)))continue;var W=s.dataToLayout([y.get(I[0],z)]),V=W.contentRect||W.rect;if(kr(V.x)||kr(V.y))continue;O=new Be({z2:1,shape:V,style:j})}if(y.hasItemOption){var H=y.getItemModel(z),X=H.getModel("emphasis");_=X.getModel("itemStyle").getItemStyle(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),b=H.getModel(["select","itemStyle"]).getItemStyle(),C=H.get(["itemStyle","borderRadius"]),D=X.get("focus"),E=X.get("blurScope"),k=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:j.opacity,defaultText:ne}),O.ensureState("emphasis").style=_,O.ensureState("blur").style=S,O.ensureState("select").style=b,bt(O,D,E,k),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 Ace;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(),f=r.getRoamTransform();c.applyTransform(f);var h=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-h,y=g-d,_=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],S=l.mapArray(_,function(A,D,E){var k=r.dataToPoint([A,D]);return k[0]-=h,k[1]-=d,k.push(E),k}),b=i.getExtent(),C=i.type==="visualMap.continuous"?Pce(b,i.option.range):Lce(b,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:h,y:d,image:u.canvas},silent:!0});this.group.add(M)},e.type="heatmap",e}(st),kce=function(t){$(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 Pa(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=Mf.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}(ft);function Ice(t){t.registerChartView(Dce),t.registerSeriesModel(kce)}var Ece=["itemStyle","borderWidth"],AR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],xS=new La,Nce=function(t){$(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(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:AR[+c],categoryDim:AR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=PR(o,p),m=LR(o,p,g,h),y=DR(o,h,m);o.setItemGraphicEl(p,y),a.add(y),IR(y,h,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=PR(o,p),_=LR(o,p,y,h),S=fH(o,_);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Fce(m,h,_):m=DR(o,h,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),IR(m,h,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&kR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?Yv(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){kR(a,Le(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(st);function LR(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,f=r.isAnimationEnabled(),h={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:f?r:null,hoverScale:f&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};Rce(r,a,i,n,h),Oce(t,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),zce(r,h.symbolScale,u,n,h);var d=h.symbolSize,p=du(r.get("symbolOffset"),d);return Bce(r,d,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function Rce(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 f=[SS(s,o[0])-l,SS(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function SS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Oce(t,e,r,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(r[f.wh]),d=t.getItemVisual(e,"symbolSize"),p;ee(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[f.index]=oe(p[f.index],h),p[c.index]=oe(p[c.index],n?h: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 zce(t,e,r,n,i){var a=t.get(Ece)||0;a&&(xS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),xS.updateTransform(),a/=xS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function Bce(t,e,r,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,p=f.pxSign,g=Math.max(e[d.index]+s,0),m=g;if(n){var y=Math.abs(l),_=wr(t.get("symbolMargin"),"15%")+"",S=!1;_.lastIndexOf("!")===_.length-1&&(S=!0,_=_.slice(0,_.length-1));var b=oe(_,e[d.index]),C=Math.max(g+b*2,0),M=S?0:b*2,A=L2(n),D=A?n:ER((y+M)/C),E=y-D*g;b=E/2/(S?D:Math.max(D-1,1)),C=g+b*2,M=S?0:b*2,!A&&n!=="fixed"&&(D=u?ER((Math.abs(u)+M)/C):0),m=D*C-M,f.repeatTimes=D,f.symbolMargin=b}var k=p*(m/2),I=f.pathPosition=[];I[h.index]=r[h.wh]/2,I[d.index]=o==="start"?k:o==="end"?l-k:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var z=f.bundlePosition=[];z[h.index]=r[h.xy],z[d.index]=r[d.xy];var O=f.barRectShape=J({},r);O[d.wh]=p*Math.max(Math.abs(r[d.wh]),Math.abs(I[d.index]+k)),O[h.wh]=r[h.wh];var j=f.clipShape={};j[h.xy]=-r[h.xy],j[h.wh]=c.ecSize[h.wh],j[d.xy]=0,j[d.wh]=r[d.wh]}function oH(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 sH(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,f=a[e.valueDim.index]+o+r.symbolMargin*2;for(_A(t,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:y<0)&&(_=u-1-g),m[l.index]=f*(_-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function lH(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?zc(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=oH(r),i.add(a),zc(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 uH(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?zc(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 cH(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],cu[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function PR(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Vce,r.isAnimationEnabled=jce,r}function Vce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function jce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function DR(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?sH(i,e,r):lH(i,e,r),uH(i,r,n),cH(i,e,r,n),i.__pictorialShapeStr=fH(t,r),i.__pictorialSymbolMeta=r,i}function Fce(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?sH(t,e,r,!0):lH(t,e,r,!0),uH(t,r,!0),cH(t,e,r,!0)}function kR(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];_A(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){_s(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function fH(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function _A(t,e,r){R(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function zc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&cu[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function IR(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"),f=a.get("blurScope"),h=a.get("scale");_A(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,h&&(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:af(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),bt(t,c,f,a.get("disabled"))}function ER(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Gce=function(t){$(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(vv.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}(vv);function Hce(t){t.registerChartView(Nce),t.registerSeriesModel(Gce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(kF,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,IF("pictorialBar"))}var Wce=function(t){$(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,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(m){return m.name}var d=new ho(this._layersSeries||[],l,h,h),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 b=[],C=[],M,A=l[y].indices,D=0;Da&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function Xce(t){t.registerChartView(Wce),t.registerSeriesModel(Zce),t.registerLayout($ce),t.registerProcessor(Ef("themeRiver"))}var qce=2,Kce=4,RR=function(t){$(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=qce,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:Kce,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(),f=J({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=tf(d,o));var p=ha(l.getModel("itemStyle"),f,!0);J(f,p),R(an,function(_){var S=s.ensureState(_),b=l.getModel([_,"itemStyle"]);S.style=b.getItemStyle();var C=ha(b,f);C&&(S.shape=C)}),r?(s.setShape(f),s.shape.r=c.r0,St(s,{shape:{r:c.r}},i,n.dataIndex)):(Qe(s,{shape:f},i),fi(s)),s.useStyle(h),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"?$c(n.getAncestorsIndices(),n.getDescendantIndices()):m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;bt(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),f=this,h=f.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)j&&!qc(F-j)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new RR(_,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(b){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";Ty(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:RT,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),tfe=function(t){$(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};hH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=tA.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),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=f_(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(){g6(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}(ft);function hH(t){var e=0;R(t.children,function(n){hH(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 rfe(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),f=oe(a[0],l/2),h=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&&dH(m,_);var S=0;R(m.children,function(F){!isNaN(F.getValue())&&S++});var b=m.getValue(),C=Math.PI/(b||S)*2,M=m.depth>0,A=m.height-(M?-1:1),D=(h-f)/(A||1),E=n.get("clockwise"),k=n.get("stillShowZeroSum"),I=E?1:-1,z=function(F,U){if(F){var V=U;if(F!==g){var W=F.getValue(),H=b===0&&k?C:W*C;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&se(s)&&(s=cy(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 afe(t){t.registerChartView(efe),t.registerSeriesModel(tfe),t.registerLayout(Ie(rfe,"sunburst")),t.registerProcessor(Ie(Ef,"sunburst")),t.registerVisual(ife),Jce(t)}var BR={color:"fill",borderColor:"stroke"},ofe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},to=Fe(),sfe=function(t){$(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 Pa(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=to(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}(ft);function lfe(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 ufe(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(lfe,t)}}}function cfe(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 ffe(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(cfe,t)}}}function hfe(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 dfe(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(hfe,t)}}}function vfe(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 pfe(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(vfe,t)}}}function gfe(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 mfe(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 vH(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||fe(t,"text")))}function pH(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},fe(n,"text")&&(o.text=n.text),fe(n,"rich")&&(o.rich=n.rich),fe(n,"textFill")&&(o.fill=n.textFill),fe(n,"textStroke")&&(o.stroke=n.textStroke),fe(n,"fontFamily")&&(o.fontFamily=n.fontFamily),fe(n,"fontSize")&&(o.fontSize=n.fontSize),fe(n,"fontStyle")&&(o.fontStyle=n.fontStyle),fe(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=fe(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),fe(n,"textPosition")&&(i.position=n.textPosition),fe(n,"textOffset")&&(i.offset=n.textOffset),fe(n,"textRotation")&&(i.rotation=n.textRotation),fe(n,"textDistance")&&(i.distance=n.textDistance)}return VR(o,t),R(o.rich,function(l){VR(l,l)}),{textConfig:i,textContent:a}}function VR(t,e){e&&(e.font=e.textFont||e.font,fe(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),fe(e,"textAlign")&&(t.align=e.textAlign),fe(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),fe(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),fe(e,"textWidth")&&(t.width=e.textWidth),fe(e,"textHeight")&&(t.height=e.textHeight),fe(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),fe(e,"textPadding")&&(t.padding=e.textPadding),fe(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),fe(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),fe(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),fe(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),fe(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),fe(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),fe(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function jR(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;FR(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){FR(s,s)}),n}function FR(t,e){e&&(fe(e,"fill")&&(t.textFill=e.fill),fe(e,"stroke")&&(t.textStroke=e.fill),fe(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),fe(e,"font")&&(t.font=e.font),fe(e,"fontStyle")&&(t.fontStyle=e.fontStyle),fe(e,"fontWeight")&&(t.fontWeight=e.fontWeight),fe(e,"fontSize")&&(t.fontSize=e.fontSize),fe(e,"fontFamily")&&(t.fontFamily=e.fontFamily),fe(e,"align")&&(t.textAlign=e.align),fe(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),fe(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),fe(e,"width")&&(t.textWidth=e.width),fe(e,"height")&&(t.textHeight=e.height),fe(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),fe(e,"padding")&&(t.textPadding=e.padding),fe(e,"borderColor")&&(t.textBorderColor=e.borderColor),fe(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),fe(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),fe(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),fe(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),fe(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),fe(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),fe(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),fe(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),fe(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),fe(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var gH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},GR=$e(gH);li(xa,function(t,e){return t[e]=1,t},{});xa.join(", ");var Qy=["","style","shape","extra"],uf=Fe();function xA(t,e,r,n,i){var a=t+"Animation",o=Sf(t,n,i)||{},s=uf(e).userDuring;return o.duration>0&&(o.during=s?le(wfe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function Tm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=uf(t),u=e.style;l.userDuring=e.during;var c={},f={};if(Tfe(t,e,f),t.type==="compound")for(var h=t.shape.paths,d=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else _fe(t,e,i||0,r,c);mH(t,e),u?t.dirty():t.markRedraw()}function mH(t,e){for(var r=uf(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function xfe(t,e){fe(e,"silent")&&(t.silent=e.silent),fe(e,"ignore")&&(t.ignore=e.ignore),t instanceof ci&&fe(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ue&&fe(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var ea={},Sfe={setTransform:function(t,e){return ea.el[t]=e,this},getTransform:function(t){return ea.el[t]},setShape:function(t,e){var r=ea.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=ea.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=ea.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=ea.el.style;if(e)return e[t]},setExtra:function(t,e){var r=ea.el.extra||(ea.el.extra={});return r[t]=e,this},getExtra:function(t){var e=ea.el.extra;if(e)return e[t]}};function wfe(){var t=this,e=t.el;if(e){var r=uf(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}ea.el=e,n(Sfe)}}function HR(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]={}),jl(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 h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=$e(r),u=0;u=0?e.getStore().get(V,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"),V=U&&U.fill,W=U&&U.opacity,H=S(F,Yo).getItemStyle();V!=null&&(H.fill=V),W!=null&&(H.opacity=W);var X={inheritColor:se(V)?V:q.color.neutral99},K=b(F,Yo),ne=vt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(F,Yo),af(e,F)):null;var ie=Sy(K,X,!1);return k(G,H),H=jR(H,ne,ie),G&&E(H,G),H.legacy=!0,H}function D(G,F){F==null&&(F=c);var U=S(F,ro).getItemStyle(),V=b(F,ro),W=vt(V,null,null,!0,!0);W.text=V.getShallow("show")?xn(t.getFormattedLabel(F,ro),t.getFormattedLabel(F,Yo),af(e,F)):null;var H=Sy(V,null,!0);return k(G,U),U=jR(U,W,H),G&&E(U,G),U.legacy=!0,U}function E(G,F){for(var U in F)fe(F,U)&&(G[U]=F[U])}function k(G,F){G&&(G.textFill&&(F.textFill=G.textFill),G.textPosition&&(F.textPosition=G.textPosition))}function I(G,F){if(F==null&&(F=c),fe(BR,G)){var U=e.getItemVisual(F,"style");return U?U[BR[G]]:null}if(fe(ofe,G))return e.getItemVisual(F,G)}function z(G){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Dte(Se({axis:F},G))}}function O(){return r.getCurrentSeriesIndices()}function j(G){return Y2(G,r)}}function Rfe(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 MS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=CA(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&bt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function CA(t,e,r,n,i,a){var o=-1,s=e;e&&SH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=bA(n),s&&kfe(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,zfe(u,r,n,i,l,Un),Ofe(u,r,n,i,l),TA(t,u,r,n,Un,i,l),fe(n,"info")&&(to(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function SH(t,e,r){var n=to(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&Gfe(a)&&wH(a)!==n.customPathData||i==="image"&&fe(o,"image")&&o.image!==n.customImagePath}function Ofe(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&&SH(o,a,n)&&(o=null),o||(o=bA(a),t.setClipPath(o)),TA(null,o,e,a,null,n,i)}}function zfe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){UR(r,null,a),UR(r,ro,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=bA(o),t.setTextContent(c)),TA(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h=c;d--){var p=e.childAt(d);Vfe(e,p,i)}}}function Vfe(t,e,r){e&&v_(e,to(t).option,r)}function jfe(t){new ho(t.oldChildren,t.newChildren,ZR,ZR,t).add($R).update($R).remove(Ffe).execute()}function ZR(t,e){var r=t&&t.name;return r??Pfe+e}function $R(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;CA(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Ffe(t){var e=this.context,r=e.oldChildren[t];r&&v_(r,to(r).option,e.seriesModel)}function wH(t){return t&&(t.pathData||t.d)}function Gfe(t){return t&&(fe(t,"pathData")||fe(t,"d"))}function Hfe(t){t.registerChartView(Ife),t.registerSeriesModel(sfe)}var xl=Fe(),YR=ye,AS=le,AA=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 f=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 h=Ie(XR,r,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,r)}KR(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=YM(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=xl(e).pointerEl=new cu[a.type](YR(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=xl(e).labelEl=new Xe(YR(r.label));e.add(a),qR(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=xl(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=xl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),qR(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=wf(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){uo(u.event)},onmousedown:AS(this._onHandleDragMove,this,0,0),drift:AS(this._onHandleDragMove,this),ondragend:AS(this._onHandleDragEnd,this)}),n.add(i)),KR(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,Lf(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){XR(this._axisPointerModel,!r&&this._moveAnimation,this._handle,LS(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(LS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(LS(i)),xl(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),ov(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 XR(t,e,r,n){bH(xl(r).lastProp,n)||(xl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function bH(t,e){if(we(t)&&we(e)){var r=!0;return R(e,function(n,i){r=r&&bH(t[i],n)}),!!r}else return t===e}function qR(t,e){t[e.get(["label","show"])?"show":"hide"]()}function LS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function KR(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 LA(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 TH(t,e,r,n,i){var a=r.get("value"),o=CH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Cf(s.get("padding")||0),u=s.getFont(),c=B0(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=d),g==="middle"&&(f[1]-=d/2),Wfe(f,h,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:vt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Wfe(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 CH(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:Ry(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};R(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),se(o)?a=o.replace("{value}",a):me(o)&&(a=o(s))}return a}function PA(t,e,r){var n=hr();return yo(n,n,r.rotation),Ri(n,n,r.position),Ii([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function MH(t,e,r,n,i,a){var o=rn.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),TH(e,n,i,a,{position:PA(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function DA(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function AH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function QR(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Ufe=function(t){$(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=JR(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=LA(a),d=Zfe[u](s,f,c);d.style=h,r.graphicKey=d.type,r.pointer=d}var p=Uy(l.getRect(),i);MH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Uy(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=PA(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=JR(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[r.x,r.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:r.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(AA);function JR(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var Zfe={line:function(t,e,r){var n=DA([e,r[0]],[e,r[1]],eO(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:AH([e-n/2,r[0]],[n,i],eO(t))}}};function eO(t){return t.dim==="x"?0:1}var $fe=function(t){$(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}(je),qa=Fe(),Yfe=R;function LH(t,e,r){if(!Ze.node){var n=e.getZr();qa(n).records||(qa(n).records={}),Xfe(n,e);var i=qa(n).records[t]||(qa(n).records[t]={});i.handler=r}}function Xfe(t,e){if(qa(t).initialized)return;qa(t).initialized=!0,r("click",Ie(tO,"click")),r("mousemove",Ie(tO,"mousemove")),r("globalout",Kfe);function r(n,i){t.on(n,function(a){var o=Qfe(e);Yfe(qa(t).records,function(s){s&&i(s,a,o.dispatchAction)}),qfe(o.pendings,e)})}}function qfe(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 Kfe(t,e,r){t.handler("leave",null,r)}function tO(t,e,r,n){e.handler(t,r,n)}function Qfe(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 BT(t,e){if(!Ze.node){var r=e.getZr(),n=(qa(r).records||{})[t];n&&(qa(r).records[t]=null)}}var Jfe=function(t){$(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";LH("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){BT("axisPointer",n)},e.prototype.dispose=function(r,n){BT("axisPointer",n)},e.type="axisPointer",e}(gt);function PH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Xl(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),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),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 rO=Fe();function ehe(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){Cm(i)&&(i=PH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Cm(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||Cm(i),h={},d={},p={list:[],map:{}},g={showPointer:Ie(rhe,d),showTooltip:Ie(nhe,p)};R(s.coordSysMap,function(y,_){var S=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(b,C){var M=b.axis,A=she(u,b);if(!f&&S&&(!u||A)){var D=A&&A.value;D==null&&!l&&(D=M.pointToData(i)),D!=null&&nO(b,D,g,!1,h)}})});var m={};return R(c,function(y,_){var S=y.linkGroup;S&&!d[_]&&R(S.axesInfo,function(b,C){var M=d[C];if(b!==y&&M){var A=M.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,iO(b),iO(y)))),m[y.key]=A}})}),R(m,function(y,_){nO(c[_],y,g,!0,h)}),ihe(d,c,h),ahe(p,i,t,o),ohe(c,o,r),h}}function nO(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=the(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 the(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),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,t,r);h=d.dataIndices,f=d.nestestValue}else{if(h=l.indicesOfNearest(n,c[0],t,r.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=t-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),R(h,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function rhe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function nhe(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=pv(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 ihe(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 ahe(t,e,r,n){if(Cm(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 ohe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=rO(n)[i]||{},o=rO(n)[i]={};R(t,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&R(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});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 she(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 iO(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 Cm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Kv(t){vu.registerAxisPointerClass("CartesianAxisPointer",Ufe),t.registerComponentModel($fe),t.registerComponentView(Jfe),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=lae(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ehe)}function lhe(t){Oe(JG),Oe(Kv)}var uhe=function(t){$(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(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=LA(a),p=fhe[h](s,l,f,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=che(n,i,a,l,g);TH(r,i,a,o,m)},e}(AA);function che(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,f;if(a.dim==="radius"){var h=hr();yo(h,h,s),Ri(h,h,[n.cx,n.cy]),u=Ii([o,-i],h);var d=e.getModel("axisLabel").get("rotate")||0,p=rn.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,f=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",f=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var fhe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:DA(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:QR(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:QR(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},hhe=function(t){$(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}(je),kA=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Dt).models[0]},e.type="polarAxis",e}(je);Bt(kA,If);var dhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(kA),vhe=function(t){$(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(kA),IA=function(t){$(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}(vi);IA.prototype.dataToRadius=vi.prototype.dataToCoord;IA.prototype.radiusToData=vi.prototype.coordToData;var phe=Fe(),EA=function(t){$(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=B0(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),p=phe(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}(vi);EA.prototype.dataToAngle=vi.prototype.dataToCoord;EA.prototype.angleToData=vi.prototype.coordToData;var DH=["radius","angle"],ghe=function(){function t(e){this.dimensions=DH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new IA,this._angleAxis=new EA,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,f=u*u+c*c,h=this.r,d=this.r0;return h!==d&&f-o<=h*h&&f+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=aO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=aO(r);return i===this?this.pointToData(n):null},t}();function aO(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function mhe(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 yhe(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(Oy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(Oy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),tu(n.scale,n.model),tu(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 _he(t){return t.mainType==="angleAxis"}function oO(t,e){var r;if(t.type=e.get("type"),t.scale=Uv(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),_he(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 xhe={dimensions:DH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new ghe(i+"");a.update=yhe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");oO(o,l),oO(s,u),mhe(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",Dt).models[0];n.coordinateSystem=i.coordinateSystem}}),r}},She=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Rg(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 Og(t){var e=t.getRadiusAxis();return e.inverse?0:1}function sO(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 whe=function(t){$(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 f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});sO(u),sO(s),R(She,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&bhe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(vu),bhe={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=Og(r),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new cu[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}):h=new _f({shape:{cx:r.cx,cy:r.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,t.add(h)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Og(r)],u=re(n,function(c){return new Wt({shape:Rg(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[Og(r)],c=[],f=0;fy?"left":"right",b=Math.abs(m[1]-_)/g<.3?"middle":m[1]>_?"top":"bottom";if(s&&s[p]){var C=s[p];we(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:f.formattedLabel,align:S,verticalAlign:b})});if(t.add(M),xo({el:M,componentModel:e,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return M.isTruncated},value:f.rawLabel,tickIndex:h}}),c){var A=rn.makeAxisEventDataBase(e);A.targetType="axisLabel",A.value=f.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=[],f=0;f=0?"p":"n",G=E;C&&(n[c][O]||(n[c][O]={p:E,n:E}),G=n[c][O][j]);var F=void 0,U=void 0,V=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(z)-E,X=l.dataToCoord(O);Math.abs(H)=W})}}})}function Phe(t){var e={};R(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=IH(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var d=kH(n);h[d]||f.autoWidthCount++,h[d]=h[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&&!h[d].width&&(p=Math.min(f.remainedWidth,p),h[d].width=p,f.remainedWidth-=p),g&&(h[d].maxWidth=g),m!=null&&(f.gap=m),y!=null&&(f.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,f=(u-s)/(c+(c-1)*l);f=Math.max(f,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=lO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=lO(r);return i===this?this.pointToData(n):null},t}();function lO(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Vhe(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new Bhe(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",Dt).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var jhe={create:Vhe,dimensions:EH},uO=["x","y"],Fhe=["width","height"],Ghe=function(t){$(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=PS(l,1-t0(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=LA(a),d=Hhe[f](s,c,u);d.style=h,r.graphicKey=d.type,r.pointer=d}var p=VT(i);MH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=VT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=PA(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=t0(o),u=PS(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 f=PS(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(AA),Hhe={line:function(t,e,r){var n=DA([e,r[0]],[e,r[1]],t0(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:AH([e-n/2,r[0]],[n,i],t0(t))}}};function t0(t){return t.isHorizontal()?0:1}function PS(t,e){var r=t.getRect();return[r[uO[e]],r[uO[e]]+r[Fhe[e]]]}var Whe=function(t){$(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 Uhe(t){Oe(Kv),vu.registerAxisPointerClass("SingleAxisPointer",Ghe),t.registerComponentView(Whe),t.registerComponentView(Rhe),t.registerComponentModel(Mm),of(t,"single",Mm,Mm.defaultOption),t.registerCoordinateSystem("single",jhe)}var Zhe=function(t){$(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=fu(r);t.prototype.init.apply(this,arguments),cO(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),cO(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}(je);function cO(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 vQ(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});ba(t,e,{type:"box",ignoreSize:i})}var $he=function(t){$(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,f=new Be({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},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 f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=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?sQ(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,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},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"),f=[this._tlpoints,this._blpoints];(!s||se(s))&&(s&&(n=Nb(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=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/DS)-Math.floor(r[0].time/DS)+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),f=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:f,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){Hv({targetModel:a,coordSysType:"calendar",coordSysProvider:QV})}),n},t.dimensions=["time","value"],t}();function kS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function Xhe(t){t.registerComponentModel(Zhe),t.registerComponentView($he),t.registerCoordinateSystem("calendar",Yhe)}var Ha={level:1,leaf:2,nonLeaf:3},no={none:0,all:1,body:2,corner:3};function jT(t,e,r){var n=e[ke[r]].getCell(t);return!n&&qe(t)&&t<0&&(n=e[ke[1-r]].getUnitLayoutInfo(r,Math.round(t))),n}function NH(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 RH(t,e,r,n,i){fO(t[0],e,i,r,n,0),fO(t[1],e,i,r,n,1)}function fO(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?(hO(t,e,s,u,i,a,0),l>1&&hO(t,e,s,u,i,a,l-1)):t[0]=t[1]=NaN,u){var c=-i[ke[1-a]].getLocatorCount(a),f=i[ke[a]].getLocatorCount(a)-1;r===no.body?c=Gt(0,c):r===no.corner&&(f=Nn(-1,f)),f=e[0]&&t[0]<=e[1]}function pO(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 Qhe(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 gO(t,e,r,n){var i=jT(e[n][0],r,n),a=jT(e[n][1],r,n);t[ke[n]]=t[qt[n]]=NaN,i&&a&&(t[ke[n]]=i.xy,t[qt[n]]=a.xy+a.wh-i.xy)}function Lh(t,e,r,n){return t[ke[e]]=r,t[ke[1-e]]=n,t}function Jhe(t){return t&&(t.type===Ha.leaf||t.type===Ha.nonLeaf)?t:null}function r0(){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=ede(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,f){var h=0;return u&&R(u,function(d,p){var g;se(d)?g={value:d}:we(d)?(g=d,d.value!=null&&!se(d.value)&&(g={value:null})):g={value:null};var m={type:Ha.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new Te,span:Lh(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:r0()};o++,(a[c]||(a[c]=[])).push(m),i[f]||(i[f]={type:Ha.level,xy:NaN,wh:NaN,option:null,id:new Te,dim:r});var y=s(g.children,c,f+1),_=Math.max(1,y);m.span[ke[r.dimIdx]]=_,h+=_,c+=_}),h}function l(){for(var u=[];n.length=1,S=r[ke[n]],b=a.getLocatorCount(n)-1,C=new ls;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){kr(A.wh)&&(A.wh=y),A.xy=S,A.id[ke[n]]===b&&!_&&(A.wh=r[ke[n]]+r[qt[n]]-A.xy),S+=A.wh}}function TO(t,e){for(var r=e[ke[t]].resetCellIterator();r.next();){var n=r.item;n0(n.rect,t,n.id,n.span,e),n0(n.rect,1-t,n.id,n.span,e),n.type===Ha.nonLeaf&&(n.xy=n.rect[ke[t]],n.wh=n.rect[qt[t]])}}function CO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;n0(i,0,a,n,e),n0(i,1,a,n,e)}})}function n0(t,e,r,n,i){t[qt[e]]=0;var a=r[ke[e]],o=a<0?i[ke[1-e]]:i[ke[e]],s=o.getUnitLayoutInfo(e,r[ke[e]]);if(t[ke[e]]=s.xy,t[qt[e]]=s.wh,n[ke[e]]>1){var l=o.getUnitLayoutInfo(e,r[ke[e]]+n[ke[e]]-1);t[qt[e]]=l.xy+l.wh-s.xy}}function dde(t,e,r){var n=gy(t,r[qt[e]]);return GT(n,r[qt[e]])}function GT(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function NS(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},Qi={x:null,y:null,point:[]};function MO(t,e,r,n,i){var a=r[ke[e]],o=r[ke[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,f=t.point[e]=n[e];if(!l&&!c){t[ke[e]]=Pr.outside;return}if(i===no.body){l?(t[ke[e]]=Pr.inBody,f=Nn(s.xy+s.wh,Gt(l.xy,f)),t.point[e]=f):t[ke[e]]=Pr.outside;return}else if(i===no.corner){c?(t[ke[e]]=Pr.inCorner,f=Nn(c.xy+c.wh,Gt(u.xy,f)),t.point[e]=f):t[ke[e]]=Pr.outside;return}var h=l?l.xy:c?c.xy+c.wh:NaN,d=u?u.xy:h,p=s?s.xy+s.wh:h;if(fp){if(!i){t[ke[e]]=Pr.outside;return}f=p}t.point[e]=f,t[ke[e]]=h<=f&&f<=p?Pr.inBody:d<=f&&f<=h?Pr.inCorner:Pr.outside}function AO(t,e,r,n){var i=1-r;if(t[ke[r]]!==Pr.outside)for(n[ke[r]].resetCellIterator(ES);ES.next();){var a=ES.item;if(PO(t.point[r],a.rect,r)&&PO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[ke[i]];return}}}function LO(t,e,r,n){if(t[ke[r]]!==Pr.outside){var i=t[ke[r]]===Pr.inCorner?n[ke[1-r]]:n[ke[r]];for(i.resetLayoutIterator(Fg,r);Fg.next();)if(vde(t.point[r],Fg.item)){e[r]=Fg.item.id[ke[r]];return}}}function vde(t,e){return e.xy<=t&&t<=e.xy+e.wh}function PO(t,e,r){return e[ke[r]]<=t&&t<=e[ke[r]]+e[qt[r]]}function pde(t){t.registerComponentModel(ide),t.registerComponentView(ude),t.registerCoordinateSystem("matrix",hde)}function gde(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 DO(t,e){var r;return R(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function mde(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Ne(i,n,!0),ba(i,n,{ignoreSize:!0}),nj(r,i),Gg(r,i),Gg(r,i,"shape"),Gg(r,i,"style"),Gg(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var zH=["transition","enterFrom","leaveTo"],yde=zH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Gg(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?zH:yde,i=0;i=0;c--){var f=i[c],h=rr(f.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,y=qn(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},b=Q0(d,f,_,null,{hv:f.hv,boundingMode:f.bounding},S);if(!qn(d).isNew&&b){for(var C=f.transition,M={},A=0;A=0)?M[D]=E:d[D]=E}Qe(d,M,r,0)}else d.attr(S)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Am(i,qn(i).option,n,r._lastGraphicModel)}),this._elMap=de()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(gt);function HT(t){var e=fe(kO,t)?kO[t]:rv(t),r=new e({});return qn(r).type=t,r}function IO(t,e,r,n){var i=HT(r);return e.add(i),n.set(t,i),qn(i).id=t,qn(i).isNew=!0,i}function Am(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Am(a,e,r,n)}),v_(t,e,n),r.removeKey(qn(t).id))}function EO(t,e,r,n){t.isGroup||R([["cursor",ci.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];fe(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}}),fe(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function wde(t){return t=J({},t),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(JV),function(e){delete t[e]}),t}function bde(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 Tde(t){t.registerComponentModel(xde),t.registerComponentView(Sde),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 NO=["x","y","radius","angle","single"],Cde=["cartesian2d","polar","singleAxis"];function Mde(t){var e=t.get("coordinateSystem");return Ee(Cde,e)>=0}function Xo(t){return t+"Axis"}function Ade(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 f=!1;return c.eachTargetAxis(function(h,d){var p=r.get(h);p&&p[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(r.get(f)||r.set(f,[]))[h]=!0})}return n}function BH(t){var e=t.ecModel,r={infoList:[],infoMap:de()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Xo(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 RS=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}(),Sv=function(t){$(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=RO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=RO(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(NO,function(i){var a=this.getReferringComponents(Xo(i),UX);if(a.specified){n=!0;var o=new RS;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 f=u[0];if(f){var h=new RS;if(h.add(f.componentIndex),r.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",Dt).models[0];d&&R(u,function(p){f.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",Dt).models[0]&&h.add(p.componentIndex)})}}}a&&R(NO,function(u){if(a){var c=i.findComponents({mainType:Xo(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new RS;f.add(c[0].componentIndex),r.set(u,f),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(Xo(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(Xo(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&&!b&&!C)return!0;S&&(m=!0),b&&(p=!0),C&&(g=!0)}return m&&p&&g})}else ac(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)}});ac(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;ac(["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=C2(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 kde(t,e,r){var n=[1/0,-1/0];ac(r,function(o){Xte(n,o.getData(),e)});var i=t.getAxisModel(),a=zF(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Ide={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Xo(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 Dde(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 Ede(t){t.registerAction("dataZoom",function(e,r){var n=Ade(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,Ide),Ede(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Nde(t){t.registerComponentModel(Lde),t.registerComponentView(Pde),zA(t)}var ei=function(){function t(){}return t}(),VH={};function oc(t,e){VH[t]=e}function jH(t){return VH[t]}var Rde=function(t){$(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=jH(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}(je);function FH(t,e){var r=Cf(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 Ode=function(t){$(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={}),f=[];R(u,function(_,S){f.push(S)}),new ho(this._featureNames||[],f).add(h).update(h).remove(Ie(h,null)).execute(),this._featureNames=f;function h(_,S){var b=f[_],C=f[S],M=u[b],A=new We(M,r,r.ecModel),D;if(a&&a.newTitle!=null&&a.featureName===b&&(M.title=a.newTitle),b&&!C){if(zde(b))D={onclick:A.option.onclick,featureName:b};else{var E=jH(b);if(!E)return;D=new E}c[b]=D}else if(D=c[C],!D)return;D.uid=Tf("toolbox-feature"),D.model=A,D.ecModel=n,D.api=i;var k=D instanceof ei;if(!b&&C){k&&D.dispose&&D.dispose(n,i);return}if(!A.get("show")||k&&D.unusable){k&&D.remove&&D.remove(n,i);return}d(A,D,b),A.setIconStatus=function(I,z){var O=this.option,j=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,j[I]&&(z==="emphasis"?co:fo)(j[I])},D instanceof ei&&D.render&&D.render(A,n,i,a)}function d(_,S,b){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=S instanceof ei&&S.getIcons?S.getIcons():_.get("icon"),D=_.get("title")||{},E,k;se(A)?(E={},E[b]=A):E=A,se(D)?(k={},k[b]=D):k=D;var I=_.iconPaths={};R(E,function(z,O){var j=wf(z,{},{x:-s/2,y:-s/2,width:s,height:s});j.setStyle(C.getItemStyle());var G=j.ensureState("emphasis");G.style=M.getItemStyle();var F=new Xe({style:{text:k[O],align:M.get("textAlign"),borderRadius:M.get("textBorderRadius"),padding:M.get("textPadding"),fill:null,font:Y2({fontStyle:M.get("textFontStyle"),fontFamily:M.get("textFontFamily"),fontSize:M.get("textFontSize"),fontWeight:M.get("textFontWeight")},n)},ignore:!0});j.setTextContent(F),xo({el:j,componentModel:r,itemName:O,formatterParamsExtra:{title:k[O]}}),j.__title=k[O],j.on("mouseover",function(){var U=M.getItemStyle(),V=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")}),j.setTextConfig({position:M.get("textPosition")||V}),F.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",O])!=="emphasis"&&i.leaveEmphasis(this),F.hide()}),(_.get(["iconStatus",O])==="emphasis"?co:fo)(j),o.add(j),j.on("click",le(S.onclick,S,n,i,O)),I[O]=j})}var p=sr(r,i).refContainer,g=r.getBoxLayoutParams(),m=r.get("padding"),y=wt(g,p,m);zl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),Q0(o,g,p,m),o.add(FH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var S=_.__title,b=_.ensureState("emphasis"),C=b.textConfig||(b.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&S){var D=A.style||(A.style={}),E=B0(S,Xe.makeFont(D)),k=_.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;k+E.width/2>i.getWidth()?(C.position=["100%",O],D.align="right"):k-E.width/2<0&&(C.position=[0,O],D.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 zde(t){return t.indexOf("my")===0}var Bde=function(t){$(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 f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[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 b=S.contentWindow,C=b.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),b.focus(),C.execCommand("SaveAs",!0,g),document.body.removeChild(S)}}else{var M=i.get("lang"),A='',D=window.open();D.document.write(A),D.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),BO="__ec_magicType_stack__",Vde=[["line","bar"],["stack"]],jde=function(t){$(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(VO[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,p=VO[i](h,d,f,a);p&&(Se(p,f.option),s.series.push(p));var g=f.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=f.getReferringComponents(_,Dt).models[0],b=S.componentIndex;s[_]=s[_]||[];for(var C=0;C<=b;C++)s[_][b]=s[_][b]||{};s[_][b].boundaryGap=i==="bar"}}};R(Vde,function(f){Ee(f,i)>=0&&R(f,function(h){a.setIconStatus(h,"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),VO={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")===BO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ne({id:e,stack:i?"":BO},n.get(["option","stack"])||{},!0)}};Vi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var p_=new Array(60).join("-"),cf=" ";function Fde(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 Gde(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(cf)],c=0;c1||r>0&&!t.noHeader;return R(t.blocks,function(i){var a=EV(i);a>=e&&(e=a+ +(n&&(!a||Zw(i)&&!i.noHeader)))}),e}return 0}function _J(t,e,r,n){var i=e.noHeader,a=SJ(EV(e)),o=[],s=e.blocks||[];Rr(!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 CV(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,_=IV(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):$w(n,o.join(""),i?r:a.html);if(i)return h;var f=Vw(e.header,"ordinal",t.useUTC),d=DV(n,t.renderMode).nameStyle,p=kV(n);return t.renderMode==="richText"?NV(t,f,d)+a.richText+h:$w(n,'
'+Zr(f)+"
"+h,r)}function xJ(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(T){return T=ee(T)?T:[T],re(T,function(C,M){return Vw(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?"":Vw(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,m=!s&&a,y=DV(n,i),_=y.nameStyle,S=y.valueStyle;return i==="richText"?(s?"":h)+(a?"":NV(t,f,_))+(o?"":TJ(t,p,g,m,S)):$w(n,(s?"":h)+(a?"":bJ(f,!s,_))+(o?"":wJ(p,g,m,S)),r)}}function bI(t,e,r,n,i,a){if(t){var o=IV(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function SJ(t){return{html:mJ[t],richText:yJ[t]}}function $w(t,e,r){var n='
',i="margin: "+r+"px 0 0",a=kV(t);return'
'+e+n+"
"}function bJ(t,e,r){var n=e?"margin-left:2px":"";return''+Zr(t)+""}function wJ(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 Zr(o)}).join("  ")+""}function NV(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function TJ(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 RV(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return eu(n)}function OV(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var S1=function(){function t(){this.richTextStyles={},this._nextStyleNameId=H4()}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=qj({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=RV(e,r),c,h,f,d;if(o>1||l&&!o){var p=CJ(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=eh(i,r,a[0]),h=g.type}else d=c=l?s[0]:s;var m=I2(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:!kn(S),value:c,valueType:h,dataIndex:r})].concat(f||[])})}function CJ(t,e,r,n,i){var a=e.getData(),o=ci(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(eh(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 Ao=Fe();function ug(t,e){return t.getName(e)||t.getId(e)}var Tm="__universalTransitionEnabled",dt=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=xd({count:AJ,reset:LJ}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Ao(this).sourceManager=new PV(this);a.prepareSource();var o=this.getInitialData(r,i);TI(o,this),this.dataTask.context.data=o,Ao(this).dataBeforeProcessed=o,wI(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=av(this),a=i?hu(r):{},o=this.subType;Ve.hasClass(o)&&(o+="Series"),Ne(r,n.getTheme().get(this.subType)),Ne(r,this.getDefaultOption()),Yl(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&Ca(r,a,i)},e.prototype.mergeOption=function(r,n){r=Ne(this.option,r,!0),this.fillDataTextStyle(r.data);var i=av(this);i&&Ca(this.option,r,i);var a=Ao(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);TI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ao(this).dataBeforeProcessed=o,wI(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!sn(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=pM.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[ug(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Tm])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(dt,i_);Bt(dt,pM);J4(dt,Ve);function wI(t){var e=t.name;I2(t)||(t.name=MJ(t)||e)}function MJ(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 AJ(t){return t.model.getRawData().count()}function LJ(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),PJ}function PJ(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function TI(t,e){R($c(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,Ie(kJ,e))})}function kJ(t,e){var r=Yw(t);return r&&r.setOutputEnd((e||this).count()),e}function Yw(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 mt=function(){function t(){this.group=new _e,this.uid=wh("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}();N2(mt);U0(mt);function Mh(){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 BV=Fe(),DJ=Mh(),lt=function(){function t(){this.group=new _e,this.uid=wh("viewChart"),this.renderTask=xd({plan:IJ,reset:EJ}),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&&MI(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&MI(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){Ps(this.group,e)},t.markUpdateMethod=function(e,r){BV(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function CI(t,e,r){t&&rv(t)&&(e==="emphasis"?ho:fo)(t,r)}function MI(t,e,r){var n=Xl(t,e),i=e&&e.highlightKey!=null?aK(e.highlightKey):null;n!=null?R(gt(n),function(a){CI(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){CI(a,r,i)})}N2(lt);U0(lt);function IJ(t){return DJ(t.model)}function EJ(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&BV(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),NJ[l]}var NJ={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)}}},Ly="\0__throttleOriginMethod",AI="\0__throttleRate",LI="\0__throttleType";function o_(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 Ah(t,e,r,n){var i=t[e];if(i){var a=i[Ly]||i,o=i[LI],s=i[AI];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=o_(a,r,n==="debounce"),i[Ly]=a,i[LI]=n,i[AI]=r}return i}}function sv(t,e){var r=t[e];r&&r[Ly]&&(r.clear&&r.clear(),t[e]=r[Ly])}var PI=Fe(),kI={itemStyle:ql(Fj,!0),lineStyle:ql(Vj,!0)},RJ={lineStyle:"stroke",itemStyle:"fill"};function jV(t,e){var r=t.visualStyleMapper||kI[e];return r||(console.warn("Unknown style type '"+e+"'."),kI.itemStyle)}function VV(t,e){var r=t.visualDrawType||RJ[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var OJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=jV(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=VV(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)}}}},hf=new We,zJ={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=jV(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){hf.option=l[n];var u=i(hf),c=o.ensureUniqueItemVisual(s,"style");J(c,u),hf.option.decal&&(o.setItemVisual(s,"decal",hf.option.decal),hf.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},BJ={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)),PI(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=PI(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=VV(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)}})}})}},cg=Math.PI;function jJ(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 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 Gv({shape:{startAngle:-cg/2,endAngle:-cg/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:cg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:cg*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 FV=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="";Rr(!(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)||xd({plan:WJ,reset:UJ,count:$J}));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||xd({reset:VJ});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="";Rr(!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,xd({reset:FJ,onDirty:HJ})));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:YJ(e)}),e.uid=wh("stageHandler"),r&&(e.visualType=r),e},t}();function VJ(t){t.overallReset(t.ecModel,t.api,t.payload)}function FJ(t){return t.overallProgress&&GJ}function GJ(){this.agent.dirty(),this.getDownstream().dirty()}function HJ(){this.agent&&this.agent.dirty()}function WJ(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function UJ(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=gt(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?re(e,function(r,n){return GV(n)}):ZJ}var ZJ=GV(0);function GV(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}(),Xw=["symbol","symbolSize","symbolRotate","symbolOffset"],II=Xw.concat(["symbolKeepAspect"]),KJ={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&&kl(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function qw(t,e,r){for(var n=e.type==="radial"?fee(t,e,r):hee(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 bM(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&vee(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 pee=new Ta(!0);function Dy(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function EI(t){return typeof t=="string"&&t!=="none"}function Iy(t){var e=t.fill;return e!=null&&e!=="none"}function NI(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 RI(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 Kw(t,e,r){var n=R2(e.image,e.__image,r);if(Z0(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)*ud),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function gee(t,e,r,n){var i,a=Dy(r),o=Iy(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||pee,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,T=void 0,C=void 0,M=void 0;(p||g)&&(M=e.getBoundingRect()),p&&(_=h?qw(t,f,M):e.__canvasFillGradient,e.__canvasFillGradient=_),g&&(S=h?qw(t,d,M):e.__canvasStrokeGradient,e.__canvasStrokeGradient=S),m&&(T=h||!e.__canvasFillPattern?Kw(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=T),y&&(C=h||!e.__canvasStrokePattern?Kw(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),p?t.fillStyle=_:m&&(T?t.fillStyle=T: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=bM(e),k=i[0],E=i[1]);var D=!0;(u||h&nc)&&(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&&RI(t,r),o&&NI(t,r)):(o&&NI(t,r),a&&RI(t,r))),k&&t.setLineDash([])}function mee(t,e,r){var n=e.__image=R2(r.image,e.__image,e,e.onload);if(!(!n||!Z0(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 yee(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||uo,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=bM(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(Dy(r)&&t.strokeText(i,r.x,r.y),Iy(r)&&t.fillText(i,r.x,r.y)):(Iy(r)&&t.fillText(i,r.x,r.y),Dy(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var OI=["shadowBlur","shadowOffsetX","shadowOffsetY"],zI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function YV(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){gn(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Rl.opacity:o}(n||e.blend!==r.blend)&&(a||(gn(t,i),a=!0),t.globalCompositeOperation=e.blend||Rl.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,Gu(this),!this._model||n){var l=new IQ(this._api),u=this._theme,c=this._model=new gM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},tT);var h={seriesTransition:s,optionChanged:!0};if(i)this[yr]={silent:a,updateParams:h},this[er]=!1,this.getZr().wakeUp();else{try{al(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,Vu.call(this,a),Fu.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,Gu(this);try{this._updateTheme(r),i.setTheme(this._theme),al(this),za.update.call(this,{type:"setTheme"},o)}catch(s){throw this[er]=!1,s}this[er]=!1,Vu.call(this,a),Fu.call(this,a)}}},e.prototype._updateTheme=function(r){se(r)&&(r=dF[r]),r&&(r=ye(r),r&&gV(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(Oy[i]){var l=s,u=s,c=-s,h=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();R(Bl,function(S,T){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=bn.createCanvas(),y=_w(m,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:g}),n){var _="";return R(f,function(S){var T=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 Be({shape:{x:0,y:0,width:p,height:g},style:{fill:r.connectedBackgroundColor}})),R(f,function(S){var T=new pr({style:{x:S.left*d-l,y:S.top*d-u,image:S.dom}});y.add(T)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n,i){return vg(this,"convertToPixel",r,n,i)},e.prototype.convertToLayout=function(r,n,i){return vg(this,"convertToLayout",r,n,i)},e.prototype.convertFromPixel=function(r,n,i){return vg(this,"convertFromPixel",r,n,i)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=Nc(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=Nc(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?SM(s,l,n):$v(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(Wee,function(i){var a=function(o){var s=r.getModel(),l=o.target,u,c=i==="globalout";if(c?u={}:l&&Pl(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(Jw,function(i,a){n.on(a,function(o){r.trigger(a,o)})}),JJ(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&&q4(this.getDom(),MM,"");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 Bl[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,Gu(this);try{i&&al(this),za.update.call(this,{type:"resize",animation:J({duration:0},r&&r.animation)})}catch(o){throw this[er]=!1,o}this[er]=!1,Vu.call(this,a),Fu.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(),!!rT[r]){var i=rT[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=Qw[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(be(n)||(n={silent:!!n}),!!Ny[r.type]&&this._model){if(this[er]){this._pendingActions.push(r);return}var i=n.silent;A1.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&Ze.browser.weChat&&this._throttledZrFlush(),Vu.call(this,i),Fu.call(this,i)}},e.prototype.updateLabelLayout=function(){wi.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(){al=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),C1(h,!0),C1(h,!1),f.plan()},C1=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=Jl(h);f.eachRendered(function(p){return e_(p,d.z,d.zlevel),!0})}}function u(h,f){f.eachRendered(function(d){if(!Rc(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(Rc(y))return;if(y instanceof Ue&&oK(y),y.__dirty){var _=y.prevStates;_&&y.useStates(_)}if(p){y.stateTransition=m;var S=y.getTextContent(),T=y.getTextGuideLine();S&&(S.stateTransition=m),T&&(T.stateTransition=m)}y.__dirty&&a(y)}})}qI=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){ho(p,g),Wn(h)},d.prototype.leaveEmphasis=function(p,g){fo(p,g),Wn(h)},d.prototype.enterBlur=function(p){vj(p),Wn(h)},d.prototype.leaveBlur=function(p){F2(p),Wn(h)},d.prototype.enterSelect=function(p){pj(p),Wn(h)},d.prototype.leaveSelect=function(p){gj(p),Wn(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[fg]},d}(vV))(h)},fF=function(h){function f(d,p){for(var g=0;g=0)){QI.push(r);var a=FV.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function IM(t,e){rT[t]=e}function ete(t){t4({createCanvas:t})}function _F(t,e,r){var n=eF("registerMap");n&&n(t,e,r)}function tte(t){var e=eF("getMap");return e&&e(t)}var xF=cJ;Ds(TM,OJ);Ds(s_,zJ);Ds(s_,BJ);Ds(TM,KJ);Ds(s_,QJ);Ds(aF,Mee);PM(gV);kM(Eee,WQ);IM("default",jJ);Fi({type:Ol,event:Ol,update:Ol},Rt);Fi({type:ym,event:ym,update:ym},Rt);Fi({type:Sy,event:j2,update:Sy,action:Rt,refineEvent:EM,publishNonRefinedEvent:!0});Fi({type:Pw,event:j2,update:Pw,action:Rt,refineEvent:EM,publishNonRefinedEvent:!0});Fi({type:by,event:j2,update:by,action:Rt,refineEvent:EM,publishNonRefinedEvent:!0});function EM(t,e,r,n){return{eventContent:{selected:tK(r),isFromClick:e.isFromClick||!1}}}LM("default",{});LM("dark",UV);var rte={},JI=[],nte={registerPreprocessor:PM,registerProcessor:kM,registerPostInit:pF,registerPostUpdate:gF,registerUpdateLifecycle:l_,registerAction:Fi,registerCoordinateSystem:mF,registerLayout:yF,registerVisual:Ds,registerTransform:xF,registerLoading:IM,registerMap:_F,registerImpl:Aee,PRIORITY:oF,ComponentModel:Ve,ComponentView:mt,SeriesModel:dt,ChartView:lt,registerComponentModel:function(t){Ve.registerClass(t)},registerComponentView:function(t){mt.registerClass(t)},registerSeriesModel:function(t){dt.registerClass(t)},registerChartView:function(t){lt.registerClass(t)},registerCustomSeries:function(t,e){rF(t,e)},registerSubTypeDefaulter:function(t,e){Ve.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){O4(t,e)}};function ze(t){if(ee(t)){R(t,function(e){ze(e)});return}Ee(JI,t)>=0||(JI.push(t),me(t)&&(t={install:t}),t.install(nte))}function df(t){return t==null?0:t.length||1}function eE(t){return t}var vo=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||eE,this._newKeyGetter=i||eE,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 vf=be,Lo=re,ute=typeof Int32Array>"u"?Array:Int32Array,cte="e\0\0",tE=-1,hte=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],fte=["_approximateExtent"],rE,gg,pf,gf,k1,mf,D1,Yr=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;bF(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===jn;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():vf(a)&&(a=J({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,vf(r)?J(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){vf(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;Lw(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:Lo(this.dimensions,this._getDimInfo,this),this.hostModel)),k1(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(B0(arguments)))})},t.internalField=function(){rE=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 ute(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[r]=l}}}(),t}();function dte(t,e){return Ph(t,e).dimensions}function Ph(t,e){mM(t)||(t=yM(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=de(),a=[],o=pte(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&CF(o),l=n===t.dimensionsDefine,u=l?TF(t):wF(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,o));for(var h=de(c),f=new AV(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function pte(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 gte(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 mte=function(){function t(e){this.coordSysDims=[],this.axisMap=de(),this.categoryAxisMap=de(),this.coordSysName=e}return t}();function yte(t){var e=t.get("coordinateSystem"),r=new mte(e),n=_te[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var _te={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),Hu(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Hu(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),Hu(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),Hu(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Hu(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),Hu(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 Hu(t){return t.get("type")==="category"}function MF(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;xte(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 xte(t){return!bF(t.schema)}function po(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function NM(t,e){return po(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Ste(t,e){var r=t.get("coordinateSystem"),n=Ch.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=zy(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function bte(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=yM(t)):(i=n.getSource(),a=i.sourceFormat===jn);var o=yte(e),s=Ste(e,o),l=r.useEncodeDefaulter,u=me(l)?l:l?Ie(cV,s,e):null,c={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Ph(i,c),f=bte(h.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=MF(e,{schema:h,store:d}),g=new Yr(h,e);g.setCalculationInfo(p);var m=f!=null&&wte(i)?function(y,_,S,T){return T===f?S:this.defaultDimValueGetter(y,_,S,T)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function wte(t){if(t.sourceFormat===jn){var e=Tte(t.data||[]);return!ee(ph(e))}}function Tte(t){for(var e=0;ei&&(o=a.interval=i);var s=a.intervalPrecision=cv(o),l=a.niceTickExtent=[Ht(Math.ceil(t[0]/o)*o,s),Ht(Math.floor(t[1]/o)*o,s)];return Mte(l,t),a}function I1(t){var e=Math.pow(10,W0(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ht(r*e)}function cv(t){return Li(t)+2}function nE(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Mte(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),nE(t,0,e),nE(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function RM(t,e){return t>=e[0]&&t<=e[1]}var Ate=function(){function t(){this.normalize=iE,this.scale=aE}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=le(e.normalize,e),this.scale=le(e.scale,e)):(this.normalize=iE,this.scale=aE)},t}();function iE(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function aE(t,e){return t*(e[1]-e[0])+e[0]}function iT(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 Is=function(){function t(e){this._calculator=new Ate,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}();U0(Is);var Lte=0,hv=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Lte,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&re(n,Pte);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 Pte(t){return be(t)&&t.value!=null?t.value:t+""}var rh=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 hv({})),ee(i)&&(i=new hv({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 RM(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}(Is);Is.registerClass(rh);var Po=Ht,go=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 RM(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=cv(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=Po(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:Po(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 kF(t){var e=Ite(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")||(RF(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:OM(a),stackId:LF(n)})}),DF(r)}function DF(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 T=y.width;_&&(T=Math.min(T,_)),S&&(T=Math.max(T,S)),y.width=T,h-=T+c*T,f--}else{var T=d;_&&_T&&(T=S),T!==d&&(y.width=T,h-=T+c*T,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 Ete(t,e,r){if(t&&e){var n=t[OM(e)];return n}}function IF(t,e){var r=PF(t,e),n=kF(r);R(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=LF(i),u=n[OM(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function EF(t){return{seriesType:t,plan:Mh(),reset:function(e){if(NF(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=po(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Nte(i,a),p=RF(e),g=e.get("barMinHeight")||0,m=c&&r.getDimensionIndex(c),y=r.getLayout("size"),_=r.getLayout("offset");return{progress:function(S,T){for(var C=S.count,M=p&&fa(C*3),A=p&&l&&fa(C*3),k=p&&fa(C),E=n.master.getRect(),D=f?E.width:E.height,I,z=T.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 Rte=function(t,e,r,n){for(;r>>1;t[i][1]i&&(this._approxInterval=i);var o=mg.length,s=Math.min(Rte(mg,this._approxInterval,0,o),o-1);this._interval=mg[s][1],this._intervalPrecision=cv(this._interval),this._minLevelUnit=mg[Math.max(s-1,0)][0]},e.prototype.parse=function(r){return qe(r)?r:+La(r)},e.prototype.contain=function(r){return RM(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}(go),mg=[["second",tM],["minute",rM],["hour",yd],["quarter-day",yd*6],["half-day",yd*12],["day",ri*1.2],["half-week",ri*3.5],["week",ri*7],["month",ri*31],["quarter",ri*95],["half-year",XD/2],["year",XD]];function OF(t,e,r,n){return My(new Date(e),t,n).getTime()===My(new Date(r),t,n).getTime()}function Ote(t,e){return t/=ri,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function zte(t){var e=30*ri;return t/=e,t>6?6:t>3?3:t>2?2:1}function Bte(t){return t/=yd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function oE(t,e){return t/=e?rM:tM,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function jte(t){return k2(t,!0)}function Vte(t,e,r){var n=Math.max(0,Ee(Cn,e)-1);return My(new Date(t),Cn[n],r).getTime()}function Fte(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 Gte(t,e,r,n,i,a){var o=1e4,s=eQ,l=0;function u(O,V,G,F,U,j,W){for(var H=Fte(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(!OF(_d(O),n[0],n[1],r)){U&&(V=[{value:Vte(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]&&T<=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=tt(re(h,function(O){return tt(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=[oT(Wte(n[0]/a)*a),oT(Hte(n[1]/a)*a)];this._interval=a,this._intervalPrecision=cv(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=_g(r)/_g(this.base),t.prototype.contain.call(this,r)},e.prototype.normalize=function(r){return r=_g(r)/_g(this.base),t.prototype.normalize.call(this,r)},e.prototype.scale=function(r){return r=t.prototype.scale.call(this,r),yg(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}(go);function xg(t,e){return oT(t,Li(e))}Is.registerClass(zF);var Ute=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[$te[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=Zte[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),Zte={min:"_determinedMin",max:"_determinedMax"},$te={min:"_dataMin",max:"_dataMax"};function BF(t,e,r){var n=t.rawExtentInfo;return n||(n=new Ute(t,e,r),t.rawExtentInfo=n,n)}function Sg(t,e){return e==null?null:Ir(e)?NaN:t.parse(e)}function jF(t,e){var r=t.type,n=BF(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=PF("bar",o),l=!1;if(R(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=kF(s),c=Yte(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Yte(t,e,r,n){var i=r.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Ete(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 tu(t,e){var r=e,n=jF(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(FF(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 Yv(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new rh({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new zM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Is.getClass(e)||go)}}function Xte(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function kh(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var r=tQ(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(By(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(By(t,i),a,o)}}else return function(i){return t.scale.getLabel(i)}}}function By(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function BM(t){var e=t.get("interval");return e??"auto"}function VF(t){return t.type==="category"&&BM(t.getLabelModel())===0}function jy(t,e){var r={};return R(t.mapDimensionsAll(e),function(n){r[NM(t,n)]=!0}),$e(r)}function qte(t,e,r){e&&R(jy(e,r),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}function nh(t){return t==="middle"||t==="center"}function fv(t){return t.getShallow("show")}function FF(t){var e=t.get("breaks",!0);if(e!=null)return!Xt()||!Kte(t.axis)?void 0:e}function Kte(t){return(t.dim==="x"||t.dim==="y"||t.dim==="z"||t.dim==="single")&&t.type!=="category"}var Dh=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}();function Qte(t){return ka(null,t)}var Jte={isDimensionStacked:po,enableDataStack:MF,getStackedDimension:NM};function ere(t,e){var r=e;e instanceof We||(r=new We(e));var n=Yv(r);return n.setExtent(t[0],t[1]),tu(n,r),n}function tre(t){Bt(t,Dh)}function rre(t,e){return e=e||{},pt(t,null,null,e.state!=="normal")}const nre=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:dte,createList:Qte,createScale:ere,createSymbol:Ut,createTextStyle:rre,dataStack:Jte,enableHoverEmphasis:us,getECData:Le,getLayoutRect:bt,mixinAxisModelCommonMethods:tre},Symbol.toStringTag,{value:"Module"}));var ire=1e-8;function sE(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return ore(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"?lE(s.exterior,i,a,r):R(s.points,function(l){lE(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 sT(t,e){return t=lre(t),re(tt(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 uE(o[0],o.slice(1)));break;case"MultiPolygon":R(i.coordinates,function(l){l[0]&&a.push(new uE(l[0],l.slice(1)))});break;case"LineString":a.push(new cE([i.coordinates]));break;case"MultiLineString":a.push(new cE(i.coordinates))}var s=new HF(n[e||"name"],a,n.cp);return s.properties=n,s})}const ure=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Sw,asc:Dn,getPercentWithPrecision:LX,getPixelPrecision:L2,getPrecision:Li,getPrecisionSafe:V4,isNumeric:D2,isRadianAroundZero:qc,linearMap:it,nice:k2,numericToNumber:wa,parseDate:La,parsePercent:oe,quantile:mm,quantity:G4,quantityExponent:W0,reformIntervals:bw,remRadian:P2,round:Ht},Symbol.toStringTag,{value:"Module"})),cre=Object.freeze(Object.defineProperty({__proto__:null,format:Uv,parse:La,roundTime:My},Symbol.toStringTag,{value:"Module"})),hre=Object.freeze(Object.defineProperty({__proto__:null,Arc:Gv,BezierCurve:_h,BoundingRect:Ce,Circle:Pa,CompoundPath:Hv,Ellipse:Fv,Group:_e,Image:pr,IncrementalDisplayable:Lj,Line:Wt,LinearGradient:uu,Polygon:zr,Polyline:Tr,RadialGradient:W2,Rect:Be,Ring:yh,Sector:Or,Text:Xe,clipPointsByRect:Y2,clipRectByRect:Ej,createIcon:Sh,extendPath:Dj,extendShape:kj,getShapeClass:nv,getTransform:cs,initProps:St,makeImage:Z2,makePath:Qc,mergePath:Ln,registerShape:pi,resizePath:$2,updateProps:Qe},Symbol.toStringTag,{value:"Module"})),fre=Object.freeze(Object.defineProperty({__proto__:null,addCommas:uM,capitalFirst:cQ,encodeHTML:Zr,formatTime:uQ,formatTpl:hM,getTextRect:sQ,getTooltipMarker:qj,normalizeCssArray:Th,toCamelCase:cM,truncateText:sq},Symbol.toStringTag,{value:"Module"})),dre=Object.freeze(Object.defineProperty({__proto__:null,bind:le,clone:ye,curry:Ie,defaults:Se,each:R,extend:J,filter:tt,indexOf:Ee,inherits:x2,isArray:ee,isFunction:me,isObject:be,isString:se,map:re,merge:Ne,reduce:ci},Symbol.toStringTag,{value:"Module"}));var vre=Fe(),Sd=Fe(),ji={estimate:1,determine:2};function Vy(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function UF(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 pre(t,e){var r=t.getLabelModel().get("customValues");if(r){var n=kh(t),i=t.scale.getExtent(),a=UF(t,r),o=tt(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"?mre(t,e):_re(t)}function gre(t,e,r){var n=t.getTickModel().get("customValues");if(n){var i=t.scale.getExtent(),a=UF(t,n);return{ticks:tt(a,function(o){return o>=i[0]&&o<=i[1]})}}return t.type==="category"?yre(t,e):{ticks:re(t.scale.getTicks(r),function(o){return o.value})}}function mre(t,e){var r=t.getLabelModel(),n=ZF(t,r,e);return!r.get("show")||t.scale.isBlank()?{labels:[]}:n}function ZF(t,e,r){var n=Sre(t),i=BM(e),a=r.kind===ji.estimate;if(!a){var o=YF(n,i);if(o)return o}var s,l;me(i)?s=KF(t,i):(l=i==="auto"?bre(t,r):i,s=qF(t,l));var u={labels:s,labelCategoryInterval:l};return a?r.out.noPxChangeTryDetermine.push(function(){return lT(n,i,u),!0}):lT(n,i,u),u}function yre(t,e){var r=xre(t),n=BM(e),i=YF(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),me(n))a=KF(t,n,!0);else if(n==="auto"){var s=ZF(t,t.getLabelModel(),Vy(ji.determine));o=s.labelCategoryInterval,a=re(s.labels,function(l){return l.tickValue})}else o=n,a=qF(t,o,!0);return lT(r,n,{ticks:a,tickCategoryInterval:o})}function _re(t){var e=t.scale.getTicks(),r=kh(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 xre=$F("axisTick"),Sre=$F("axisLabel");function $F(t){return function(r){return Sd(r)[t]||(Sd(r)[t]={list:[]})}}function YF(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=G0(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 T=g/d,C=m/p;isNaN(T)&&(T=1/0),isNaN(C)&&(C=1/0);var M=Math.max(0,Math.floor(Math.min(T,C)));if(r===ji.estimate)return e.out.noPxChangeTryDetermine.push(le(Tre,null,t,M,l)),M;var A=XF(t,M,l);return A??M}function Tre(t,e,r){return XF(t,e,r)==null}function XF(t,e,r){var n=vre(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 Cre(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 qF(t,e,r){var n=kh(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=VF(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 KF(t,e,r){var n=t.scale,i=kh(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 hE=[0,1],gi=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 L2(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(),fE(n,i.count())),it(e,hE,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),fE(n,i.count()));var a=it(e,n,hE,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=gre(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 Mre(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||Vy(ji.determine),pre(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||Vy(ji.determine),wre(this,e)},t}();function fE(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Mre(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+=yf);var d=Math.atan2(s,o);if(d<0&&(d+=yf),d>=n&&d<=i||d+yf>=n&&d+yf<=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,Pi.fromArray(t[0]),_t.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(da,Pi,_t),Te.sub(ua,Ft,_t);var r=da.len(),n=ua.len();if(!(r<.001||n<.001)){da.scale(1/r),ua.scale(1/n);var i=da.dot(ua),a=Math.cos(e);if(a1&&Te.copy(nn,Ft),nn.toArray(t[1])}}}}function Ore(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,Pi.fromArray(t[0]),_t.fromArray(t[1]),Ft.fromArray(t[2]),Te.sub(da,_t,Pi),Te.sub(ua,Ft,_t);var n=da.len(),i=ua.len();if(!(n<.001||i<.001)){da.scale(1/n),ua.scale(1/i);var a=da.dot(e),o=Math.cos(r);if(a=l)Te.copy(nn,Ft);else{nn.scaleAndAdd(ua,s/Math.tan(Math.PI/2-c));var h=Ft.x!==_t.x?(nn.x-_t.x)/(Ft.x-_t.x):(nn.y-_t.y)/(Ft.y-_t.y);if(isNaN(h))return;h<0?Te.copy(nn,_t):h>1&&Te.copy(nn,Ft)}nn.toArray(t[1])}}}}function R1(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 zre(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=$a(n[0],n[1]),a=$a(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=hd([],n[1],n[0],o/i),l=hd([],n[1],n[2],o/a),u=hd([],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){T(D*E,0,a);var I=D+A;I<0&&C(-I*E,1)}else C(-A*E,1)}}function T(A,k,E){A!==0&&(c=!0);for(var D=k;D0)for(var I=0;I0;I--){var G=E[I-1]*V;T(-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?T(E,0,D+1):T(-E,a-D-1,a),A-=E,A<=0)return}return c}function Vre(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),!bh(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={};bg(d,u,wg),bg(d,n.states.select,wg)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};bg(p,u,wg),bg(p,n.states.emphasis,wg)}jj(n,l,c,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Hre(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}(),B1=Fe();function Ure(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=B1(r).labelManager;i||(i=B1(r).labelManager=new Wre),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=B1(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var j1=Math.sin,V1=Math.cos,iG=Math.PI,sl=Math.PI*2,Zre=180/iG,aG=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=$o(h-sl)||(c?u>=sl:-u>=sl),d=u>0?u%sl:u%sl+sl,p=!1;f?p=!0:$o(h)?p=!1:p=d>=iG==!!c;var g=e+n*V1(o),m=r+i*j1(o);this._start&&this._add("M",g,m);var y=Math.round(a*Zre);if(f){var _=1/this._p,S=(c?1:-1)*(sl-_);this._add("A",n,i,y,1,+c,e+n*V1(o+S),r+i*j1(o+S)),_>.01&&this._add("A",n,i,y,0,+c,g,m)}else{var T=e+n*V1(s),C=r+i*j1(s);this._add("A",n,i,y,+p,+c,T,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 tne(t){return""}function GM(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 ene(o,s)+(o!=="style"?Zr(l):l||"")+(a?""+r+re(a,function(u){return n(u)}).join(r)+r:"")+tne(o)}return n(t)}function rne(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 dT(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function yE(t,e,r,n){return hr("svg","root",{width:t,height:e,xmlns:oG,"xmlns:xlink":sG,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var nne=0;function uG(){return nne++}var _E={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"},fl="transform-origin";function ine(t,e,r){var n=J({},t.shape);J(n,e),t.buildPath(r,n);var i=new aG;return i.reset(P4(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function ane(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[fl]=r+"px "+n+"px")}var one={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function cG(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function sne(t,e,r){var n=t.shape.paths,i={},a,o;if(R(n,function(l){var u=dT(r.zrId);u.animation=!0,c_(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=cG(i,r);return a.replace(o,s)}}function xE(t){return se(t)?_E[t]?"cubic-bezier("+_E[t]+")":T2(t)?t:"":""}function c_(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof Hv){var s=sne(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=cG(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-"+uG();r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function lne(t,e,r){if(!t.ignore)if(t.isSilent()){var n={"pointer-events":"none"};SE(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=vy(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),SE(n,e,r)}}function SE(t,e,r,n){var i=JSON.stringify(t),a=r.cssStyleCache[i];a||(a=r.zrId+"-cls-"+uG(),r.cssStyleCache[i]=a,r.cssNodes["."+a+":hover"]=t),e.class=e.class?e.class+" "+a:a}var dv=Math.round;function hG(t){return t&&se(t.src)}function fG(t){return t&&me(t.toDataURL)}function HM(t,e,r,n){Kre(function(i,a){var o=i==="fill"||i==="stroke";o&&L4(a)?vG(e,t,i,n):o&&M2(a)?pG(r,t,i,n):t[i]=a,o&&n.ssr&&a==="none"&&(t["pointer-events"]="visible")},e,r,!1),pne(r,t,n)}function WM(t,e){var r=z4(e);r&&(r.each(function(n,i){n!=null&&(t[(mE+i).toLowerCase()]=n+"")}),e.isSilent()&&(t[mE+"silent"]="true"))}function bE(t){return $o(t[0]-1)&&$o(t[1])&&$o(t[2])&&$o(t[3]-1)}function une(t){return $o(t[4])&&$o(t[5])}function UM(t,e,r){if(e&&!(une(e)&&bE(e))){var n=1e4;t.transform=bE(e)?"translate("+dv(e[4]*n)/n+" "+dv(e[5]*n)/n+")":WY(e)}}function wE(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.";Rr(f,m),Rr(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))}},_=R2(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,T;l?S=T=1:u?(T=1,S=o.width/a.width):c?(S=1,T=o.height/a.height):o.patternUnits="userSpaceOnUse",S!=null&&!isNaN(S)&&(o.width=S),T!=null&&!isNaN(T)&&(o.height=T);var C=k4(i);C&&(o.patternTransform=C);var M=hr("pattern","",o,[h]),A=GM(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]=F0(E)}}function gne(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,[dG(t,r)])}e["clip-path"]=F0(a)}function ME(t){return document.createTextNode(t)}function _l(t,e,r){t.insertBefore(e,r)}function AE(t,e){t.removeChild(e)}function LE(t,e){t.appendChild(e)}function gG(t){return t.parentNode}function mG(t){return t.nextSibling}function F1(t,e){t.textContent=e}var PE=58,mne=120,yne=hr("","");function vT(t){return t===void 0}function aa(t){return t!==void 0}function _ne(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 Zf(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function vv(t){var e,r=t.children,n=t.tag;if(aa(n)){var i=t.elm=lG(n);if(ZM(yne,t),ee(r))for(e=0;ea?(p=r[l+1]==null?null:r[l+1].elm,yG(t,p,r,i,l)):Uy(t,e,n,a))}function ic(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(ZM(t,e),vT(e.text)?aa(n)&&aa(i)?n!==i&&xne(r,n,i):aa(i)?(aa(t.text)&&F1(r,""),yG(r,null,i,0,i.length-1)):aa(n)?Uy(r,n,0,n.length-1):aa(t.text)&&F1(r,""):t.text!==e.text&&(aa(n)&&Uy(r,n,0,n.length-1),F1(r,e.text)))}function Sne(t,e){if(Zf(t,e))ic(t,e);else{var r=t.elm,n=gG(r);vv(e),n!==null&&(_l(n,e.elm,mG(r)),Uy(n,[t],0,0))}return e}var bne=0,wne=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=kE(),this.configLayer=kE(),this.storage=r,this._opts=n=J({},n),this.root=e,this._id="zr"+bne++,this._oldVNode=yE(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=lG("svg");ZM(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",Sne(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return CE(e,dT(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=dT(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=Tne(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=rne(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=hr("style","stl",{},[],c);o.push(h)}}return yE(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},GM(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?Tg:0),this._needsManuallyCompositing),c.__builtin__||O0("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&An&&!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}(dt);function ih(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=eh(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 Xv=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=Ine,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(){ho(this.childAt(0))},e.prototype.downplay=function(){fo(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),di(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 T=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(T||0)*Math.PI/180||0);var C=du(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):ih(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&&_s(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();_s(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return Lh(r.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(r,n){return r.getItemVisual(n,"z2")},e}(_e);function Ine(t,e){this.parent.drift(t,e)}function H1(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 EE(t){return t!=null&&!be(t)&&(t={isIgnore:t}),t||{}}function NE(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||Xv}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=EE(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=NE(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(H1(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(!H1(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=NE(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=EE(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 SG(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 Nne(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 Rne(t,e,r,n,i,a,o,s){for(var l=Nne(t,e),u=[],c=[],h=[],f=[],d=[],p=[],g=[],m=xG(i,e,o),y=t.getLayout("points")||[],_=e.getLayout("points")||[],S=0;S=i||g<0)break;if(jl(y,_)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,_),h=y,f=_;else{var S=y-u,T=_-c;if(S*S+T*T<.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||jl(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=ko(z,Do(M,y)),O=ko(O,Do(A,_)),z=Do(z,ko(M,y)),O=Do(O,ko(A,_)),D=z-y,I=O-_,d=y-D*j/W,p=_-I*j/W,d=ko(d,Do(u,y)),p=ko(p,Do(c,_)),d=Do(d,ko(u,y)),p=Do(p,ko(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 bG=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),One=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 bG},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&jl(i[o*2-2],i[o*2-1]);o--);for(;a=0){var T=u?(p-l)*S+l:(d-s)*S+s;return u?[r,T]:[T,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?fy(s,d,g,y,r,c):fy(l,p,m,_,r,c);if(C>0)for(var M=0;M=0){var T=u?ur(l,p,m,_,A):ur(s,d,g,y,A);return u?[r,T]:[T,r]}}s=y,l=_;break}}},e}(Ue),zne=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(bG),wG=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 zne},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&&jl(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 Vne(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=jne(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 uu(0,0,0,0,f,!0);return _[i]=g,_[i+"2"]=m,_}}}function Fne(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Gne(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 Gne(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 Hne(t,e){return isNaN(t)||isNaN(e)}function Wne(t){for(var e=t.length/2;e>0&&Hne(t[e*2-2],t[e*2-1]);e--);return e-1}function jE(t,e){return[t[e*2],t[e*2+1]]}function Une(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 MG(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=BE(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=BE(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=Xl(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 Xv(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 lt.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Xl(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 lt.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;wy(this._polyline,r),n&&wy(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new One({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 wG({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 T=i,C=n.pointToCoord(m);a?(y=T.startAngle,_=T.endAngle,S=-C[1]/180*Math.PI):(y=T.r0,_=T.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(MG(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=Wne(l);c>=0&&(vr(s,ar(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?_G(o,d):ih(o,h)},enableTextSetter:!0},Zne(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,T=_?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=Une(h,T,A),E=k.range,D=E[1]-E[0],I=void 0;if(D>=1){if(D>1&&!d){var z=jE(h,E[0]);u.attr({x:z[0]+C,y:z[1]+M}),o&&(I=f.getRawValue(E[0]))}else{var z=c.getPointOn(T,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=K4(i,p,O,V,k.t))}a.lastFrameIndex=E[0]}else{var G=r===1||a.lastFrameIndex>0?E[0]:0,z=jE(h,G);o&&(I=f.getRawValue(G)),u.attr({x:z[0]+C,y:z[1]+M})}if(o){var F=bh(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=Rne(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=Io(f.stackedOnCurrent,f.current,i,o,l),d=Io(f.current,null,i,o,l),m=Io(f.stackedOnNext,f.next,i,o,l),g=Io(f.next,null,i,o,l)),zE(d,g)>3e3||c&&zE(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,T=0;Te&&(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=Yne[a]:me(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,Xne))}}}}}function qne(t){t.registerChartView($ne),t.registerSeriesModel(Dne),t.registerLayout(Qv("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,AG("line"))}var pv=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,T=1,C=0;Cm){S=(M+_)/2;break}C===1&&(T=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}(dt);dt.registerClass(pv);var Kne=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=ks(pv.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}(pv),Qne=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}(),Zy=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 Qne},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){to(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}(lt),VE={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=U1(e.x,t.x),s=Z1(e.x+e.width,i),l=U1(e.y,t.y),u=Z1(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=Z1(e.r,t.r),a=U1(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}},FE={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?Zy:Or,c=new u({shape:n,z2:1});c.name="item";var h=LG(i);if(c.calculateTextPosition=Jne(h,{isRoundCap:u===Zy}),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 nie(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 GE(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 HE(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 oie(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function LG(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 UE(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=va(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:ih(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,eie(t,m==="outside"?d:m,LG(o),n.get(["label","rotate"]))}Bj(g,p,a.getRawValue(r),function(_){return _G(e,_)});var y=n.getModel(["emphasis"]);wt(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),ir(t,n),oie(i)&&(t.style.fill="none",t.style.stroke="none",R(t.states,function(_){_.style&&(_.style.fill=_.style.stroke="none")}))}function sie(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 lie=function(){function t(){}return t}(),ZE=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 lie},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 uie(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 PG(t,e,r){if(xs(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 cie(t,e,r){var n=t.type==="polar"?Or:Be;return new n({shape:PG(e,r,t),silent:!0,z2:0})}function hie(t){t.registerChartView(rie),t.registerSeriesModel(Kne),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(IF,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EF("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,AG("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 XE=Math.PI*2,Lg=Math.PI/180;function fie(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=rV(n,r),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=o.viewRect,f=-n.get("startAngle")*Lg,d=n.get("endAngle"),p=n.get("padAngle")*Lg;d=d==="auto"?f-XE:-d*Lg;var g=n.get("minAngle")*Lg,m=g+p,y=0;i.each(a,function(U){!isNaN(U)&&y++});var _=i.getSum(a),S=Math.PI/(_||y)*2,T=n.get("clockwise"),C=n.get("roseType"),M=n.get("stillShowZeroSum"),A=i.getDataExtent(a);A[0]=0;var k=T?1:-1,E=[f,d],D=k*p/2;X0(E,!T),f=E[0],d=E[1];var I=kG(n);I.startAngle=f,I.endAngle=d,I.clockwise=T,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:T,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:T,cx:s,cy:l,r0:c,r:C?it(U,A,[c,u]):u}),G=H}),Or?y:m,C=Math.abs(S.label.y-r);if(C>=T.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)}IG(a,n)}}}function IG(t,e){KE.rect=t,rG(KE,e,pie)}var pie={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},KE={};function $1(t){return t.position==="center"}function gie(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*die,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 rt=Math.PI,ut=0,Dt=z.get("rotate");if(qe(Dt))ut=Dt*(rt/180);else if(O==="center")ut=0;else if(Dt==="radial"||Dt===!0){var gr=K<0?-X+rt:-X;ut=gr}else if(Dt==="tangential"&&O!=="outside"&&O!=="outer"){var Br=Math.atan2(K,ne);Br<0&&(Br=rt*2+Br);var Gi=ne>0;Gi&&(Br=rt+Br),ut=Br-rt}if(a=!!ut,E.x=ie,E.y=ue,E.rotation=ut,E.setStyle({verticalAlign:"middle"}),xe){E.setStyle({align:Ge});var yu=E.states.select;yu&&(yu.x+=E.x,yu.y+=E.y)}else{var Hi=new Ce(0,0,0,0);IG(Hi,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:Hi,unconstrainedWidth:Hi.width,labelStyleWidth:E.style.width})}A.setTextConfig({inside:xe})}}),!a&&t.get("avoidLabelOverlap")&&vie(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}(lt);function Eh(t,e,r){e=ee(e)&&{coordDimensions:e}||J({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Ph(n,e).dimensions,a=new Yr(i,t);return a.initData(n,r),a}var Nh=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}(),_ie=Fe(),EG=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 Nh(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 Eh(this,{coordDimensions:["value"],encodeDefaulter:Ie(dM,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=_ie(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=F4(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){Yl(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}(dt);fQ({fullType:EG.type,getCoord2:function(t){return t.getShallow("center")}});function xie(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 Sie(t){t.registerChartView(yie),t.registerSeriesModel(EG),$V("pie",t.registerAction),t.registerLayout(Ie(fie,"pie")),t.registerProcessor(Ih("pie")),t.registerProcessor(xie("pie"))}var bie=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}(dt),NG=4,wie=function(){function t(){}return t}(),Tie=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 wie},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}(),Mie=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=Qv("").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 Cie: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}(lt),RG={left:0,right:0,top:0,bottom:0},$y=["25%","25%"],Aie=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(r,n){var i=hu(r.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),i&&r.outerBounds&&Ca(r.outerBounds,i)},e.prototype.mergeOption=function(r,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&r.outerBounds&&Ca(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:RG,outerBoundsContain:"all",outerBoundsClampWidth:$y[0],outerBoundsClampHeight:$y[1],backgroundColor:q.color.transparent,borderWidth:1,borderColor:q.color.neutral30},e}(Ve),gT=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(gT,Dh);var OG={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"}},Lie=Ne({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},OG),$M=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}}},OG),Pie=Ne({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},$M),kie=Se({logBase:10},$M);const zG={category:Lie,value:$M,time:Pie,log:kie};var Die={value:1,category:1,time:1,log:1},mT=null;function Iie(t){mT||(mT=t)}function Jv(){return mT}function ah(t,e,r,n){R(Die,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=av(this),d=f?hu(c):{},p=h.getTheme();Ne(c,p.get(a+"Axis")),Ne(c,this.getDefaultOption()),c.type=QE(c),f&&Ca(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=hv.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=Jv();return h?h.updateModelAxisBreak(this,c):{breaks:[]}},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",QE)}function QE(t){return t.type||(t.data?"category":"value")}var Eie=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(),tt(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}(),yT=["x","y"];function JE(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Nie=function(t){Y(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=yT,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!JE(r)||!JE(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=hi([],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}(Eie),BG=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}(gi),h_="expandAxisBreak",jG="collapseAxisBreak",VG="toggleAxisBreak",YM="axisbreakchanged",Rie={type:h_,event:YM,update:"update",refineEvent:XM},Oie={type:jG,event:YM,update:"update",refineEvent:XM},zie={type:VG,event:YM,update:"update",refineEvent:XM};function XM(t,e,r,n){var i=[];return R(t,function(a){i=i.concat(a.eventBreaks)}),{eventContent:{breaks:i}}}function Bie(t){t.registerAction(Rie,e),t.registerAction(Oie,e),t.registerAction(zie,e);function e(r,n){var i=[],a=Nc(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 Yo=Math.PI,jie=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Vie=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],oh=Fe(),FG=Fe(),GG=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 Fie(t,e,r,n){var i=r.axis,a=e.ensureRecord(r),o=[],s,l=qM(t.axisName)&&nh(t.nameLocation);R(n,function(p){var g=Ma(p);if(!(!g||g.label.ignore)){o.push(g);var m=a.transGroup;l&&(m.transform?hi(_f,m.transform):zv(_f),g.transform&&Ii(_f,_f,g.transform),Ce.copy(Pg,g.localRect),Pg.applyTransform(_f),s?s.union(Pg):Ce.copy(s=new Ce(0,0,0,0),Pg))}});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 _f=fr(),Pg=new Ce(0,0,0,0),HG=function(t,e,r,n,i,a){if(nh(t.nameLocation)){var o=a.stOccupiedRect;o&&WG(jre({},o,a.transGroup.transform),n,i)}else UG(a.labelInfoList,a.dirVec,n,i)};function WG(t,e,r){var n=new Te;u_(t,e,n,{direction:Math.atan2(r.y,r.x),bidirectional:!1,touchThreshold:.05})&&uT(e,n)}function UG(t,e,r,n){for(var i=Te.dot(n,e)>=0,a=0,o=t.length;a0?"top":"bottom",a="center"):qc(i-Yo)?(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}(),Gie=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Hie={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())Jv().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));Jc(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 _=du(n.get(["axisLine","symbolOffset"])||0,y),S=y[0],T=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,-T/2,S,T,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=tN(e,i,s);l&&eN(t,e,r,n,i,a,o,ji.estimate)},axisTickLabelDetermine:function(t,e,r,n,i,a,o,s){var l=tN(e,i,s);l&&eN(t,e,r,n,i,a,o,ji.determine);var u=$ie(t,i,a,n);Zie(t,e.labelLayoutList,u),Yie(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(qM(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(_o(_,_,t.rotation));var S=n.get("nameRotate");S!=null&&(S=S*Yo/180);var T,C;nh(c)?T=on.innerTextLayout(t.rotation,S??t.rotation,h):(T=Wie(t.rotation,c,S||0,p),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(T.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:T.rotation,silent:on.isLabelSilent(n),style:pt(f,{text:u,font:M,overflow:"truncate",width:E,ellipsis:k,fill:f.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:f.get("align")||T.textAlign,verticalAlign:f.get("verticalAlign")||T.textVerticalAlign}),z2:1});if(So({el:I,componentModel:n,itemName:u}),I.__fullText=u,I.anid="name",n.get("triggerEvent")){var z=on.makeAxisEventDataBase(n);z.targetType="axisName",z.name=u,Le(I).eventData=z}a.add(I),I.updateTransform(),e.nameEl=I;var O=l.nameLayout=Ma({label:I,priority:I.z2,defaultAttr:{ignore:I.ignore},marginDefault:nh(c)?jie[D]:Vie[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 eN(t,e,r,n,i,a,o,s){$G(e)||Xie(t,e,i,s,n,o);var l=e.labelLayoutList;qie(t,n,l,a),Jie(n,t.rotation,l);var u=t.optionHideOverlap;Uie(n,l,u),u&&nG(tt(l,function(c){return c&&!c.label.ignore})),Fie(t,r,n,l)}function Wie(t,e,r,n){var i=P2(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return qc(i-Yo/2)?(o=l?"bottom":"top",a="center"):qc(i-Yo*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iYo/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Uie(t,e,r){if(VF(t.axis))return;function n(s,l,u){var c=Ma(e[l]),h=Ma(e[u]);if(!(!c||!h)){if(s===!1||c.suggestIgnore){$f(c.label);return}if(h.suggestIgnore){$f(h.label);return}var f=.1;if(!r){var d=[0,0,0,0];c=cT({marginForce:d},c),h=cT({marginForce:d},h)}u_(c,h,null,{touchThreshold:f})&&$f(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 Zie(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=I1(d),p=u[1]-d*o;else{var m=t.getTicks().length-1;m>o&&(d=I1(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 nN=[[3,1],[0,2]],nae=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=yT,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;nT(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(tu(g,p),nT(g)&&(s=d))}c.length&&(s||(s=c.pop(),tu(s.scale,s.model)),R(c,function(m){YG(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};R(n.x,function(o){iN(n,"y",o,a)}),R(n.y,function(o){iN(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(xT(o,a),!n){var u=oae(a,s,o,l,r),c=void 0;if(l)ST?(ST(this._axesList,a),xT(o,a)):c=sN(a.clone(),"axisLabel",null,a,o,u,i);else{var h=sae(e,a,i),f=h.outerBoundsRect,d=h.parsedOuterBoundsContain,p=h.outerBoundsClamp;f&&(c=sN(f,d,p,a,o,u,i))}XG(a,o,ji.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 Ql(n,s,!0,!0,r),xT(i,n),l;function u(f){R(i[De[f]],function(d){if(fv(d.model)){var p=a.ensureRecord(d.model),g=p.labelInfoList;if(g)for(var m=0;m0&&!Ir(d)&&d>1e-4&&(f/=d),f}}function oae(t,e,r,n,i){var a=new GG(lae);return R(r,function(o){return R(o,function(s){if(fv(s.model)){var l=!n;s.axisBuilder=tae(t,e,s.model,i,a,l)}})}),a}function XG(t,e,r,n,i,a){var o=r===ji.determine;R(e,function(u){return R(u,function(c){fv(c.model)&&(rae(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){fv(h.model)&&((n==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function sae(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)||RG,r.refContainer));var a=t.get("outerBoundsContain",!0),o;a==null||a==="auto"||Ee(["all","axisLabel"],a)<0?o="all":o=a;var s=[_y(pe(t.get("outerBoundsClampWidth",!0),$y[0]),e.width),_y(pe(t.get("outerBoundsClampHeight",!0),$y[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var lae=function(t,e,r,n,i,a){var o=r.axis.dim==="x"?"y":"x";HG(t,e,r,n,i,a),nh(t.nameLocation)||R(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&UG(s.labelInfoList,s.dirVec,n,i)})};function uae(t,e){var r={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return cae(r,t,e),r.seriesInvolved&&fae(r,t),r}function cae(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=gv(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),T=S.get("show");if(!(!T||T==="auto"&&!m&&!bT(S))){y==null&&(y=S.get("triggerTooltip")),S=m?hae(_,h,i,e,m,y):S;var C=S.get("snap"),M=S.get("triggerEmphasis"),A=gv(_.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:bT(S),seriesModels:[],linkGroup:null};u[A]=E,t.seriesInvolved=t.seriesInvolved||k;var D=dae(a,_);if(D!=null){var I=o[D]||(o[D]={axesInfo:{}});I.axesInfo[A]=E,I.mapper=a[D].mapper,E.linkGroup=I}}}})}function hae(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 fae(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[gv(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 dae(t,e){for(var r=e.model,n=e.dim,i=0;i=0||t===e}function vae(t){var e=KM(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=bT(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 Sae=Fe();function cN(t,e,r,n){if(t instanceof BG){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?t6(r,o,u,n):bae(t,e,r,n,o,l):r}function t6(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 bae(t,e,r,n,i,a){var o=Sae(t);o.items||(o.items=[]);var s=o.items,l=hN(s,e,r,n,i,a,1),u=hN(s,e,r,n,i,a,-1),c=Math.abs(l-r)i/2||h&&f>h/2-n?t6(r,i,h,n):(s.push({fixedCoord:e,floatCoord:c,r:n}),c)}function hN(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(_,Dh.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}},xf.axisLine),axisLabel:kg(xf.axisLabel,!1),axisTick:kg(xf.axisTick,!1),splitLine:kg(xf.splitLine,!0),splitArea:kg(xf.splitArea,!0),indicator:[]},e}(Ve),Dae=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 on(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(),T=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(!(vN(this._zr,"globalPan")||Sf(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)&&(co(a.event),a.__ecRoamConsumed=!0,pN(r,n,i,a,o))},e}(vi);function Sf(t){return t.__ecRoamConsumed}var jae=Fe();function f_(t){var e=jae(t);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function bf(t,e,r,n){for(var i=f_(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=s6(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=q1[s];if(c&&he(q1,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=_N[s];if(d&&he(_N,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 Kc({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Un(r,n),wn(e,n,this._defsUsePending,!1,!1),Hae(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(){q1={g:function(e,r){var n=new _e;return Un(r,n),wn(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new Be;return Un(r,n),wn(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 Un(r,n),wn(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 Un(r,n),wn(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 Fv;return Un(r,n),wn(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=bN(n));var a=new zr({shape:{points:i||[]},silent:!0});return Un(r,a),wn(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=bN(n));var a=new Tr({shape:{points:i||[]},silent:!0});return Un(r,a),wn(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new pr;return Un(r,n),wn(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 Un(r,s),wn(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 Un(r,s),wn(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=wj(n);return Un(r,i),wn(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),_N={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 uu(e,r,n,i);return xN(t,a),SN(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 W2(e,r,n);return xN(t,i),SN(t,i),i}};function xN(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function SN(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={};o6(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000",s=a.stopOpacity||r.getAttribute("stop-opacity");if(s){var l=$r(o),u=l&&l[3];u&&(l[3]*=Ja(s),o=oi(l,"rgba"))}e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Un(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Se(e.__inheritedStyle,t.__inheritedStyle))}function bN(t){for(var e=v_(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=v_(o);switch(i=i||fr(),s){case"translate":zi(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":V0(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":_o(i,i,-parseFloat(l[0])*K1,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*K1);Ii(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*K1);Ii(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 TN=/([^\s:;]+)\s*:\s*([^:;]+)/g;function o6(t,e,r){var n=t.getAttribute("style");if(n){TN.lastIndex=0;for(var i;(i=TN.exec(n))!=null;){var a=i[1],o=he(Xy,a)?Xy[a]:null;o&&(e[o]=i[2]);var s=he(qy,a)?qy[a]:null;s&&(r[s]=i[2])}}}function Xae(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&&(l6(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 PN(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 kN(t,e,r,n,i){t.data||So({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function DN(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&&iK(e,i,r),o}function IN(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}(dt);function poe(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 T=t.getBoxLayoutParams();T.aspect=g,S=bt(T,p),S=nV(t,S,g)}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function _oe(t,e){R(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var xoe=function(){function t(){this.dimensions=c6}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 CT(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=ON,u.resize(o,r)}),e.eachSeries(function(o){Zv({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 CT(s,s,J({nameMap:z0(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=ON,u.resize(o[0],r),R(o,function(c){c.coordinateSystem=u,_oe(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 Moe(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){Loe(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=Poe(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Aoe(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function zN(t){return arguments.length?t:Ioe}function Yf(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Loe(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 Poe(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=Q1(s),a=J1(a),s&&a;){i=Q1(i),o=J1(o),i.hierNode.ancestor=t;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(Doe(koe(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&&!Q1(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!J1(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,r=t)}return r}function Q1(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function J1(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function koe(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Doe(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 Ioe(t,e){return t.parentNode===e.parentNode?1:2}var Eoe=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Noe=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 Eoe},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||(T=T-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?-T:D,origin:"center"}),I.setStyle("verticalAlign","middle"))}var z=s.get(["emphasis","focus"]),O=z==="relative"?$c(o.getAncestorsIndices(),o.getDescendantIndices()):z==="ancestor"?o.getAncestorsIndices():z==="descendant"?o.getDescendantIndices():null;O&&(Le(r).focus=O),Ooe(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===Vv||wy(r.__edge,V)}})}function Ooe(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 _h({shape:MT(c,h,f,i,i)})),Qe(g,{shape:MT(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 g6(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function aA(t,e){var r=g6(t);return Ee(r,e)>=0}function p_(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 Uoe=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=iA.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=p_(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}(dt);function Zoe(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 $oe(t,e){t.eachSeriesByType("tree",function(r){Yoe(r,e)})}function Yoe(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=zN(function(T,C){return(T.parentNode===C.parentNode?1:2)/T.depth})):(a=n.width,o=n.height,s=zN());var l=t.getData().tree.root,u=l.children[0];if(u){Coe(l),Zoe(u,Moe,s),l.hierNode.modifier=-u.hierNode.prelim,Cf(u,Aoe);var c=u,h=u,f=u;Cf(u,function(T){var C=T.getLayout().x;Ch.getLayout().x&&(h=T),T.depth>f.depth&&(f=T)});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),Cf(u,function(T){y=(T.getLayout().x+p)*g,_=(T.depth-1)*m;var C=Yf(y,_);T.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),Cf(u,function(T){_=(T.getLayout().x+p)*m,y=S==="LR"?(T.depth-1)*g:a-(T.depth-1)*g,T.setLayout({x:y,y:_},!0)})):(S==="TB"||S==="BT")&&(g=a/(h.getLayout().x+d+p),m=o/(f.depth-1||1),Cf(u,function(T){y=(T.getLayout().x+p)*g,_=S==="TB"?(T.depth-1)*m:o-(T.depth-1)*m,T.setLayout({x:y,y:_},!0)}))}}}function Xoe(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 qoe(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=d_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}function Koe(t){t.registerChartView(Roe),t.registerSeriesModel(Uoe),t.registerLayout($oe),t.registerVisual(Xoe),qoe(t)}var GN=["treemapZoomToNode","treemapRender","treemapMove"];function Qoe(t){for(var e=0;e1;)a=a.parentNode;var o=Hw(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Joe=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};y6(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new We({itemStyle:o},this,n);a=r.levels=ese(a,n);var l=re(a||[],function(h){return new We(h,s,n)},this),u=iA.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=p_(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}(dt);function y6(t){var e=0;R(t.children,function(n){y6(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 ese(t,e){var r=gt(e.get("color")),n=gt(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 tse=8,HN=8,eS=5,rse=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),r_(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+tse*2,r.emptyItemWidth);r.totalWidth+=s+HN,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 T=new zr({shape:{points:nse(u,0,_,h,g===d.length-1,g===0)},style:Se(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xe({style:pt(o,{text:S})}),textConfig:{position:"inside"},z2:mh*1e4,onclick:Ie(l,y)});T.disableLabelAnimation=!0,T.getTextContent().ensureState("emphasis").style=pt(s,{text:S}),T.ensureState("emphasis").style=p,wt(T,a.get("focus"),a.get("blurScope"),a.get("disabled")),this.group.add(T),ise(T,e,y),u+=_+HN}},t.prototype.remove=function(){this.group.removeAll()},t}();function nse(t,e,r,n,i,a){var o=[[i?t:t-eS,e],[t+r,e],[t+r,e+n],[i?t:t-eS,e+n]];return!a&&o.splice(2,0,[t+r+eS,e+n/2]),!i&&o.push([t,e+n/2]),o}function ise(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&&p_(r,e)}}var ase=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;iUN||Math.abs(r.dy)>UN)){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();zi(m,m,[-n,-i]),V0(m,m,[p,p]),zi(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&&Ay(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 rse(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(aA(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Mf(),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}(lt);function Mf(){return{nodeGroup:[],background:[],content:[]}}function hse(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,T=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",AT);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),Ky(I).nodeWidth=d,Ky(I).nodeHeight=p,c.isAboveViewRoot)return I;var z=ue("background",WN,u,lse);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)rv(I)&&Al(I,!1),z&&(Al(z,!F),h.setItemGraphicEl(o.dataIndex,z),Iw(z,U,G));else{var j=ue("content",WN,u,use);j&&X(I,j),z.disableMorphing=!0,z&&rv(z)&&Al(z,!1),Al(I,!F),h.setItemGraphicEl(o.dataIndex,I);var W=f.getShallow("cursor");W&&j.attr("cursor",W),Iw(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"),st=Me.stroke,Ye=YN(M);Ye.fill=st;var rt=vl(A);rt.fill=A.get("borderColor");var ut=vl(k);ut.fill=k.get("borderColor");var Dt=vl(E);if(Dt.fill=E.get("borderColor"),ke){var gr=d-2*g;ne(ge,st,Me.opacity,{x:g,y:0,width:gr,height:T})}else ge.removeTextContent();ge.setStyle(Ye),ge.ensureState("emphasis").style=rt,ge.ensureState("blur").style=ut,ge.ensureState("select").style=Dt,Kl(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 st=o.getVisual("style"),Ye=st.fill,rt=YN(M);rt.fill=Ye,rt.decal=st.decal;var ut=vl(A),Dt=vl(k),gr=vl(E);ne(ge,Ye,st.opacity,null),ge.setStyle(rt),ge.ensureState("emphasis").style=ut,ge.ensureState("blur").style=Dt,ge.ensureState("select").style=gr,Kl(ge)}xe.add(ge)}function K(xe){!xe.invisible&&a.push(xe)}function ne(xe,ge,ke,fe){var Me=f.getModel(fe?$N:ZN),st=rr(f.get("name"),null),Ye=Me.getShallow("show");vr(xe,ar(f,fe?$N:ZN),{defaultText:Ye?st:null,inheritColor:ge,defaultOpacity:ke,labelFetcher:t,labelDataIndex:o.dataIndex});var rt=xe.getTextContent();if(rt){var ut=rt.style,Dt=Rv(ut.padding||0);fe&&(xe.setTextConfig({layoutRect:fe}),rt.disableLabelLayout=!0),rt.beforeUpdate=function(){var Br=Math.max((fe?fe.width:xe.shape.width)-Dt[1]-Dt[3],0),Gi=Math.max((fe?fe.height:xe.shape.height)-Dt[0]-Dt[2],0);(ut.width!==Br||ut.height!==Gi)&&rt.setStyle({width:Br,height:Gi})},ut.truncateMinChar=2,ut.lineOverflow="truncate",ie(ut,fe,c);var gr=rt.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][_],st=i[xe];return Me?(r[xe][_]=null,ve(st,Me)):m||(Me=new ge,Me instanceof fi&&(Me.z2=fse(ke,fe)),Ge(st,Me)),e[xe][y]=Me}function ve(xe,ge){var ke=xe[y]={};ge instanceof AT?(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 st=0,Ye=0,rt=i.background[fe.getRawIndex()];!n&&rt&&rt.oldShape&&(st=rt.oldShape.width,Ye=rt.oldShape.height),Me?(ke.oldX=0,ke.oldY=Ye):ke.oldShape={x:st,y:Ye,width:0,height:0}}ke.fadein=!Me}}function fse(t,e){return t*sse+e}var yv=R,dse=be,Qy=-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=gse[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(tS(i),vse(i)):r==="category"?i.categories?pse(i):tS(i,!0):(Rr(r!=="linear"||i.dataExtent),tS(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&&yv(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(dse(e)){var r=[];yv(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 tS(t,e){var r=t.visual,n=[];be(r)?yv(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]),_6(t,n)}function Ig(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:LT([0,1])}}function XN(t){var e=this.option.visual;return e[Math.round(it(t,[0,1],[0,e.length-1],!0))]||{}}function Af(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function Xf(t){var e=this.option.visual;return e[this.option.loop&&t!==Qy?t%e.length:t]}function pl(){return this.option.visual[0]}function LT(t){return{linear:function(e){return it(e,t,this.option.visual,!0)},category:Xf,piecewise:function(e,r){var n=PT.call(this,r);return n==null&&(n=it(e,t,this.option.visual,!0)),n},fixed:pl}}function PT(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 _6(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=re(e,function(r){var n=$r(r);return n||[0,0,0,1]})),e}var gse={linear:function(t){return it(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 it(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Qy},fixed:Rt};function Eg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=bse(i,l,g,m,p,n);S6(g,y,r,n)}})}}}function _se(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 qN(t){var e=rS(t,"color");if(e){var r=rS(t,"colorAlpha"),n=rS(t,"colorSaturation");return n&&(e=eo(e,null,null,n)),r&&(e=Kd(e,r)),e}}function xse(t,e){return e!=null?eo(e,null,null,t):null}function rS(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function Sse(t,e,r,n,i,a){if(!(!a||!a.length)){var o=nS(e,"color")||i.color!=null&&i.color!=="none"&&(nS(e,"colorAlpha")||nS(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 x6(f).drColorMappingBy=c,f}}}function nS(t,e){var r=t.get(e);return ee(r)&&r.length?{name:e,range:r}:null}function bse(t,e,r,n,i,a){var o=J({},e);if(i){var s=i.type,l=s==="color"&&x6(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 _v=Math.max,Jy=Math.min,KN=br,oA=R,b6=["itemStyle","borderWidth"],wse=["itemStyle","gapWidth"],Tse=["upperLabel","show"],Cse=["upperLabel","height"];const Mse={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(KN(o.width,s[0]),a.width),u=oe(KN(o.height,s[1]),a.height),c=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],f=mv(n,h,t),d=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,p=t.getViewRoot(),g=g6(p);if(c!=="treemapMove"){var m=c==="treemapZoomToNode"?Ise(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),w6(p,_,!1,0),S=p.getLayout(),oA(g,function(C,M){var A=(g[M+1]||p).getValue();C.setLayout(J({dataExtent:[A,A],borderWidth:0,upperHeight:0},S))})}var T=t.getData().tree.root;T.setLayout(Ese(o,d,f),!0),t.setLayoutInfo(o),T6(T,new Ce(-o.x,-o.y,r.getWidth(),r.getHeight()),g,p,0)}};function w6(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(b6),u=s.get(wse)/2,c=C6(s),h=Math.max(l,c),f=l-u,d=h-u;t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=_v(i-2*f,0),a=_v(a-f-d,0);var p=i*a,g=Ase(t,s,p,e,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=Jy(i,a),_=1/0,S=[];S.area=0;for(var T=0,C=g.length;T=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Dse(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?_v(u*n/l,l/(u*i)):1/0}function QN(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;hSw&&(u=Sw),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=T[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var k=-Math.atan2(T[1],T[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=T[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=T[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),hA=function(){function t(e){this.group=new _e,this._LineCtor=e||cA}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=iR(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=iR(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!qse(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function iR(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 aR(t){return isNaN(t[0])||isNaN(t[1])}function lS(t){return t&&!aR(t[0])&&!aR(t[1])}var uS=[],cS=[],hS=[],Zu=Sr,fS=os,oR=Math.abs;function sR(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){uS[0]=Zu(n[0],i[0],a[0],c),uS[1]=Zu(n[1],i[1],a[1],c);var h=oR(fS(uS,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function dS(t,e){var r=[],n=Xd,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=[ya(u[0]),ya(u[1])],u[2]&&u.__original.push(ya(u[2])));var f=u.__original;if(u[2]!=null){if(Hr(i[0],f[0]),Hr(i[1],f[2]),Hr(i[2],f[1]),c&&c!=="none"){var d=Kf(s.node1),p=sR(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=Kf(s.node2),p=sR(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]}Hr(u[0],i[0]),Hr(u[1],i[2]),Hr(u[2],i[1])}else{if(Hr(a[0],f[0]),Hr(a[1],f[1]),Wo(o,a[1],a[0]),lu(o,o),c&&c!=="none"){var d=Kf(s.node1);sy(a[0],a[0],o,d*e)}if(h&&h!=="none"){var d=Kf(s.node2);sy(a[1],a[1],o,-d*e)}Hr(u[0],a[0]),Hr(u[1],a[1])}})}var I6=Fe();function Kse(t){if(t)return I6(t).bridge}function lR(t,e){t&&(I6(t).bridge=e)}function uR(t){return t.type==="view"}var Qse=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 hA,o=this.group,s=new _e;this._controller=new pu(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(uR(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)}dS(r.getGraph(),qf(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(T){var C=T.dataIndex,M=T.getGraphicEl(),A=T.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]),T.setLayout({fixed:!0},!0),uA(r,"symbolSize",T,[D.offsetX,D.offsetY]),a.updateLayout(r);break;case"none":default:f.setItemLayout(C,[M.x,M.y]),lA(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=T.getAdjacentDataIndices())}}),f.graph.eachEdge(function(T){var C=T.getGraphicEl(),M=T.getModel().get(["emphasis","focus"]);C&&M==="adjacency"&&(Le(C).focus={edge:[T.dataIndex],node:[T.node1.dataIndex,T.node2.dataIndex]})});var y=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),_=f.getLayout("cx"),S=f.getLayout("cy");f.graph.eachNode(function(T){P6(T,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(!uR(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&&(JM(this._controllerHost,i.dx,i.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(r,n,i){this._active&&(eA(this._controllerHost,i.zoom,i.originX,i.originY),this._updateNodeAndLinkScale(),dS(r.getGraph(),qf(r)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=qf(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){this._active&&(dS(r.getGraph(),qf(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=Kse(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 gl||(r=this._nodesMap[$u(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}(),E6=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 N6(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(gl,N6("hostGraph","data"));Bt(E6,N6("hostGraph","edgeData"));function fA(t,e,r,n,i){for(var a=new Jse(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=Ch.get(d),m=g?g.dimensions||[]:[];Ee(m,"value")<0&&m.concat(["value"]);var y=Ph(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;p=new Yr(y,r),p.initData(t)}var _=new Yr(["value"],r);return _.initData(l,s),i&&i(p,_),v6({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:_},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var ele=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 Nh(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),Yl(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){Vse(this);var s=fA(a,i,this,!0,l);return R(s.edges,function(u){Fse(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 Yr(["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}(dt);function tle(t){t.registerChartView(Qse),t.registerSeriesModel(ele),t.registerProcessor(Rse),t.registerVisual(Ose),t.registerVisual(zse),t.registerLayout(Gse),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,Wse),t.registerLayout(Zse),t.registerCoordinateSystem("graphView",{dimensions:gu.dimensions,create:Yse}),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=d_(o,e,i.get("scaleLimit"));i.setCenter&&i.setCenter(s.center),i.setZoom&&i.setZoom(s.zoom)})})}var cR=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(va(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(va(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,T,C,M,A){return r.getFormattedLabel(_,S,"node",C,Sn(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}(Or),rle=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(va(c.getModel("itemStyle"),u,!0),u),m=this;if(isNaN(g.sStartAngle)||isNaN(g.tStartAngle)){m.setShape(g);return}o?(m.setShape(g),hR(m,l,r,f)):(di(m),hR(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 hR(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 uu(h,f,d,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var nle=Math.PI/180,ile=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")*nle;if(a.diff(o).add(function(c){var h=a.getItemLayout(c);if(h){var f=new cR(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&&to(f,r,h);return}f?f.updateData(a,c,l):f=new cR(a,c,l),s.add(f)}).remove(function(c){var h=o.getItemGraphicEl(c);h&&to(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 rle(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&&to(u,r,l)}).execute(),this._edgeData=a},e.prototype.dispose=function(){},e.type="chord",e}(lt),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){t.prototype.init.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this.legendVisualProvider=new Nh(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=fA(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}(dt),vS=Math.PI/180;function ole(t,e){t.eachSeriesByType("chord",function(r){sle(r,e)})}function sle(t,e){var r=t.getData(),n=r.graph,i=t.getEdgeData(),a=i.count();if(a){var o=rV(t,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,h=Math.max((t.get("padAngle")||0)*vS,0),f=Math.max((t.get("minAngle")||0)*vS,0),d=-t.get("startAngle")*vS,p=d+Math.PI*2,g=t.get("clockwise"),m=g?1:-1,y=[d,p];X0(y,!g);var _=y[0],S=y[1],T=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(T)&&(h=Math.max(0,(Math.abs(T)-f*A)/A)),(h+f)*A>=Math.abs(T)&&(f=(Math.abs(T)-h*A)/A);var E=(T-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 lle(t){t.registerChartView(ile),t.registerSeriesModel(ale),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,ole),t.registerProcessor(Ih("chord"))}var ule=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),cle=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 ule},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 hle(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 Rg(t,e){var r=t==null?"":t+"";return e&&(se(e)?r=e.replace("{value}",r):me(e)&&(r=e(t))),r}var 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.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=hle(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?Zy:Or,p=h.get("show"),g=h.getModel("lineStyle"),m=g.get("width"),y=[u,c];X0(y,!l),u=y[0],c=y[1];for(var _=c-u,S=u,T=[],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:pt(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:pt(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!==T){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)/T)}),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"),T=+r.get("min"),C=+r.get("max"),M=[T,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 cle({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?Zy:Or,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=it(_.get(S,D),[T,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]:it(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:it(I,M,A,V)}},r),h.add(O),Lw(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]:it(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:it(z,M,A,W)}},r),h.add(j),Lw(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(it(_.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),T=new _e,C=a(it(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:pt(M,{x:k,y:E,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:C})}),T.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:pt(I,{x:O,y:V,text:Rg(S,j),width:isNaN(G)?null:G,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:U})}),Bj(D,{normal:I},S,function(H){return Rg(H,j)}),g&&jj(D,y,l,r,{getFormattedLabel:function(H,X,K,ne,ie,ue){return Rg(ue?ue.interpolatedValue:S,j)}}),T.add(D)}f.add(T)}),this.group.add(f),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(lt),dle=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 Eh(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}(dt);function vle(t){t.registerChartView(fle),t.registerSeriesModel(dle)}var ple=["itemStyle","opacity"],gle=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(ple);c=c??1,i||di(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}),jM(i,VM(l),{stroke:f})},e}(zr),mle=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 gle(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);to(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}(lt),yle=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 Nh(le(this.getData,this),le(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return Eh(this,{coordDimensions:["value"],encodeDefaulter:Ie(dM,this)})},e.prototype._defaultLabelLine=function(r){Yl(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}(dt);function _le(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();oRle)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||!gS(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 gS(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}var Ble=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=tt(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),jle=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}(gi);function Ss(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=Yu(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Yu(s,[0,o]),i=a=Yu(s,[i,a]),n=0}e[0]=Yu(e[0],r),e[1]=Yu(e[1],r);var l=mS(e,n);e[n]+=t;var u=i||0,c=r.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Yu(e[n],c);var h;return h=mS(e,n),i!=null&&(h.sign!==l.sign||h.spana&&(e[1-n]=e[n]+h.sign*a),e}function mS(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 Yu(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var yS=R,O6=Math.min,z6=Math.max,vR=Math.floor,Vle=Math.ceil,pR=Ht,Fle=Math.PI,Gle=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;yS(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),c=this._axesMap.set(o,new jle(o,Yv(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();yS(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),tu(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=Og(e.get("axisExpandWidth"),l),h=Og(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=Og(d[1]-d[0],l),d[1]=d[0]+p;else{p=Og(c*(h-1),l);var g=e.get("axisExpandCenter")||vR(u/2);d=[c*g-p/2],d[1]=d[0]+p}var m=(s-p)/(u-h);m<3&&(m=0);var y=[vR(pR(d[0]/c,1))+1,Vle(pR(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])}),yS(n,function(o,s){var l=(i.axisExpandable?Wle:Hle)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Fle/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],f=c[a],d=fr();_o(d,d,f),zi(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=[z6(0,p-d/2)],i[1]=O6(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Og(t,e){return O6(z6(t,e[0]),e[1])}function Hle(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Wle(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--)Dn(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;aXle}function H6(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function W6(t,e,r,n){var i=new _e;return i.add(new Be({name:"main",style:mA(r),silent:!0,draggable:!0,cursor:"move",drift:Ie(yR,t,e,i,["n","s","w","e"]),ondragend:Ie(nu,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(yR,t,e,i,a),ondragend:Ie(nu,e,{isEnd:!0})}))}),i}function U6(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=sh(i,qle),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 RT(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(mA(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?OT(t,a[0]):rue(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Qle[s]+"-resize":null})})}function ja(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(iue(yA(t,e,[[n,i],[n+a,i+o]])))}function mA(t){return Se({strokeNoScale:!0},t.brushStyle)}function Z6(t,e,r,n){var i=[Sv(t,r),Sv(e,n)],a=[sh(t,r),sh(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function tue(t){return cs(t.group)}function OT(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=J0(r[e],tue(t));return n[i]}function rue(t,e){var r=[OT(t,e[0]),OT(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function yR(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=$6(e,i,a);R(n,function(u){var c=Kle[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=t.fromRectRange(Z6(s[0][0],s[1][0],s[0][1],s[1][1])),vA(e,r),nu(e,{isEnd:!1})}function nue(t,e,r,n){var i=e.__brushOption.range,a=$6(t,r,n);R(i,function(o){o[0]+=a[0],o[1]+=a[1]}),vA(t,e),nu(t,{isEnd:!1})}function $6(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 yA(t,e,r){var n=G6(t,e);return n&&n!==ru?n.clipPath(r,t._transform):ye(r)}function iue(t){var e=Sv(t[0][0],t[1][0]),r=Sv(t[0][1],t[1][1]),n=sh(t[0][0],t[1][0]),i=sh(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function aue(t,e,r){if(!(!t._brushType||sue(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=gA(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var m_={lineX:SR(0),lineY:SR(1),rect:{createCover:function(t,e){function r(n){return n}return W6({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=H6(t);return Z6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){U6(t,e,r,n)},updateCommon:RT,contain:BT},polygon:{createCover:function(t,e){var r=new _e;return r.add(new Tr({name:"main",style:mA(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new zr({name:"main",draggable:!0,drift:Ie(nue,t,e),ondragend:Ie(nu,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:yA(t,e,r)})},updateCommon:RT,contain:BT}};function SR(t){return{createCover:function(e,r){return W6({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=H6(e),n=Sv(r[0][t],r[1][t]),i=sh(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=G6(e,r);if(o!==ru&&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(),U6(e,r,l,i)},updateCommon:RT,contain:BT}}function X6(t){return t=_A(t),function(e){return Y2(e,t)}}function q6(t,e){return t=_A(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 K6(t,e,r){var n=_A(t);return function(i,a){return n.contain(a[0],a[1])&&!r6(i,e,r)}}function _A(t){return Ce.create(t)}var lue=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 dA(n.getZr())).on("brush",le(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!uue(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=hue(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 on(r,i,d);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(d,u,r,s,c,i),Wv(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:X6(h),isTargetByCursor:K6(h,s,a),getLinearBrushOtherExtent:q6(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(cue(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}(mt);function uue(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function cue(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 hue(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var fue={type:"axisAreaSelect",event:"axisAreaSelected"};function due(t){t.registerAction(fue,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 vue={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Q6(t){t.registerComponentView(Ole),t.registerComponentModel(Ble),t.registerCoordinateSystem("parallel",Zle),t.registerPreprocessor(Ile),t.registerComponentModel(ET),t.registerComponentView(lue),ah(t,"parallel",ET,vue),due(t)}function pue(t){ze(Q6),t.registerChartView(Tle),t.registerSeriesModel(Ale),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Dle)}var gue=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}(),mue=function(t){Y(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new gue},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(){ho(this)},e.prototype.downplay=function(){fo(this)},e}(Ue),yue=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 pu(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),n6(r,i,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var g=new mue,m=Le(g);m.dataIndex=p.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=p.getModel(),_=y.getModel("lineStyle"),S=_.get("curveness"),T=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:T.x)+z.sy,V=(A!=null?A*c:T.y)+T.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:T.x)+T.dx,V=(A!=null?A*c:T.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()),bR(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,Sn(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 bR(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"),T=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:T},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(_ue(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 gu(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}(lt);function bR(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 uu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function _ue(t,e,r){var n=new Be({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 xue=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=fA(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}(dt);function Sue(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;wue(c);var f=tt(c,function(m){return m.getLayout().value===0}),d=f.length!==0?0:r.get("layoutIterations"),p=r.get("orient"),g=r.get("nodeAlign");bue(c,h,n,i,s,l,d,p,g)})}function bue(t,e,r,n,i,a,o,s,l){Tue(t,e,r,i,a,s,l),Lue(t,e,a,i,n,o,s),zue(t,s)}function wue(t){R(t,function(e){var r=ds(e.outEdges,e0),n=ds(e.inEdges,e0),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function Tue(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"&&Cue(t,o,a,A);var k=a==="vertical"?(i-r)/A:(n-r)/A;Aue(t,k,a)}function J6(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function Cue(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,Due(s,l,o),_S(s,i,r,n,o),Oue(s,l,o),_S(s,i,r,n,o)}function Pue(t,e){var r=[],n=e==="vertical"?"y":"x",i=ww(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 kue(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 Due(t,e,r){R(t.slice().reverse(),function(n){R(n,function(i){if(i.outEdges.length){var a=ds(i.outEdges,Iue,r)/ds(i.outEdges,e0);if(isNaN(a)){var o=i.outEdges.length;a=o?ds(i.outEdges,Eue,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-bs(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-bs(i,r))*e;i.setLayout({y:l},!0)}}})})}function Iue(t,e){return bs(t.node2,e)*t.getValue()}function Eue(t,e){return bs(t.node2,e)}function Nue(t,e){return bs(t.node1,e)*t.getValue()}function Rue(t,e){return bs(t.node1,e)}function bs(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function e0(t){return t.getValue()}function ds(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 jue(t){t.registerChartView(yue),t.registerSeriesModel(xue),t.registerLayout(Sue),t.registerVisual(Bue),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=d_(a,e,i.get("scaleLimit"));i.setCenter(o.center),i.setZoom(o.zoom)})})}var eH=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(T,C){var M;ee(T)?(M=T.slice(),T.unshift(C)):ee(T.value)?(M=J({},T),M.value=M.value.slice(),T.value.unshift(C)):M=T,y.push(M)}),e.data=y}var _=this.defaultValueDimensions,S=[{name:h,type:zy(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:zy(g),dimsDef:_.slice()}];return Eh(this,{coordDimensions:S,dimensionsCount:_.length+1,encodeDefaulter:Ie(cV,S,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),tH=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}(dt);Bt(tH,eH,!0);var Vue=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=wR(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?(di(h),rH(f,h,a,u)):h=wR(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}(lt),Fue=function(){function t(){}return t}(),Gue=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 Fue},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 T=[y,S];n.push(T)}}}return{boxData:r,outliers:n}}var Xue={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Cr){var n="";at(n)}var i=Yue(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function que(t){t.registerSeriesModel(tH),t.registerChartView(Vue),t.registerLayout(Wue),t.registerTransform(Xue)}var Kue=["itemStyle","borderColor"],Que=["itemStyle","borderColor0"],Jue=["itemStyle","borderColorDoji"],ece=["itemStyle","color"],tce=["itemStyle","color0"];function xA(t,e){return e.get(t>0?ece:tce)}function SA(t,e){return e.get(t===0?Jue:t>0?Kue:Que)}var rce={seriesType:"candlestick",plan:Mh(),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=xA(s,o),l.stroke=SA(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");J(u,l)}}}}}},nce=["color","borderColor"],ice=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){Ps(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&&TR(u,h))return;var f=xS(h,c,!0);St(f,{shape:{points:h.ends}},r,c),SS(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&&TR(u,d)){a.remove(f);return}f?(Qe(f,{shape:{points:d.ends}},r,c),di(f)):f=xS(d),SS(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(),CR(r,this.group);var n=r.get("clip",!0)?Kv(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=xS(s);SS(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){CR(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}(lt),ace=function(){function t(){}return t}(),oce=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 ace},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 xS(t,e,r){var n=t.ends;return new oce({shape:{points:r?sce(n,t):n},z2:100})}function TR(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]=_m(ie[i]+n/2,1,!1),ue[i]=_m(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]=_m(X[i],1),X}}function p(g,m){for(var y=fa(g.count*4),_=0,S,T=[],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[_++]=MR(A,M,D,I,c,k),T[i]=E,T[a]=z,S=e.dataToPoint(T,null,C),y[_++]=S?S[0]:NaN,y[_++]=S?S[1]:NaN,T[a]=O,S=e.dataToPoint(T,null,C),y[_++]=S?S[1]:NaN}m.setLayout("largePoints",y)}}};function MR(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 hce(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 fce(t){t.registerChartView(ice),t.registerSeriesModel(nH),t.registerPreprocessor(uce),t.registerVisual(rce),t.registerLayout(cce)}function AR(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 dce=function(t){Y(e,t);function e(r,n){var i=t.call(this)||this,a=new Xv(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 $a(r.__p1,r.__cp1)+$a(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=sw;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}(iH),yce=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),_ce=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 yce},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(aj(h,f,m,y,p,g,s,r,n))return l}else if(zo(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}(),oH={seriesType:"lines",plan:Mh(),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)&&Kv(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=oH.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 xce:new hA(o?a?mce:aH:a?iH:cA),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}(lt),bce=typeof Uint32Array>"u"?Array:Uint32Array,wce=typeof Float64Array>"u"?Array:Float64Array;function LR(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),z0([i,r[0],r[1]])}))}var Tce=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||[],LR(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(LR(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=$c(this._flatCoords,n.flatCoords),this._flatCoordsOffset=$c(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}(dt);function zg(t){return t instanceof Array||(t=[t,t]),t}var Cce={seriesType:"lines",reset:function(t){var e=zg(t.get("symbol")),r=zg(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=zg(s.getShallow("symbol",!0)),u=zg(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 Mce(t){t.registerChartView(Sce),t.registerSeriesModel(Tce),t.registerLayout(oH),t.registerVisual(Cce)}var Ace=256,Lce=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(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(T,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 Pce(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 PR(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Dce=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()):PR(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&&(PR(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnGridLike(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){Ps(this._progressiveEls||this.group,r)},e.prototype._renderOnGridLike=function(r,n,i,a,o){var s=r.coordinateSystem,l=xs(s,"cartesian2d"),u=xs(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(),T=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 Be({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(Ir(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(Ir(j.x)||Ir(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(),S=H.getModel(["blur","itemStyle"]).getItemStyle(),T=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=T,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 Lce;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}),T=i.getExtent(),C=i.type==="visualMap.continuous"?kce(T,i.option.range):Pce(T,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}(lt),Ice=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=Ch.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}(dt);function Ece(t){t.registerChartView(Dce),t.registerSeriesModel(Ice)}var Nce=["itemStyle","borderWidth"],kR=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],TS=new Pa,Rce=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:kR[+c],categoryDim:kR[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=IR(o,p),m=DR(o,p,g,f),y=ER(o,f,m);o.setItemGraphicEl(p,y),a.add(y),RR(y,f,m)}}).update(function(p,g){var m=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(m);return}var y=IR(o,p),_=DR(o,p,y,f),S=fH(o,_);m&&S!==m.__pictorialShapeStr&&(a.remove(m),o.setItemGraphicEl(p,null),m=null),m?Gce(m,f,_):m=ER(o,f,_,!0),o.setItemGraphicEl(p,m),m.__pictorialSymbolMeta=_,a.add(m),RR(m,f,_)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&NR(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=r.get("clip",!0)?Kv(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){NR(a,Le(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(lt);function DR(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};Oce(r,a,i,n,f),zce(t,e,i,a,o,f.boundingLength,f.pxSign,c,n,f),Bce(r,f.symbolScale,u,n,f);var d=f.symbolSize,p=du(r.get("symbolOffset"),d);return jce(r,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function Oce(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=[CS(s,o[0])-l,CS(s,o[1])-l];h[1]=0?1:-1:c>0?1:-1}function CS(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function zce(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 Bce(t,e,r,n,i){var a=t.get(Nce)||0;a&&(TS.attr({scaleX:e[0],scaleY:e[1],rotation:r}),TS.updateTransform(),a/=TS.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function jce(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 T=oe(_,e[d.index]),C=Math.max(g+T*2,0),M=S?0:T*2,A=D2(n),k=A?n:OR((y+M)/C),E=y-k*g;T=E/2/(S?k:Math.max(k-1,1)),C=g+T*2,M=S?0:T*2,!A&&n!=="fixed"&&(k=u?OR((Math.abs(u)+M)/C):0),m=k*C-M,h.repeatTimes=k,h.symbolMargin=T}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 sH(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 lH(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(bA(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 uH(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?zc(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=sH(r),i.add(a),zc(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 cH(t,e,r){var n=J({},e.barRectShape),i=t.__pictorialBarRect;i?zc(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 hH(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],cu[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function IR(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Vce,r.isAnimationEnabled=Fce,r}function Vce(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Fce(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ER(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?lH(i,e,r):uH(i,e,r),cH(i,r,n),hH(i,e,r,n),i.__pictorialShapeStr=fH(t,r),i.__pictorialSymbolMeta=r,i}function Gce(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?lH(t,e,r,!0):uH(t,e,r,!0),cH(t,r,!0),hH(t,e,r,!0)}function NR(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];bA(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),R(a,function(o){_s(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function fH(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function bA(t,e,r){R(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function zc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&cu[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function RR(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");bA(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:ih(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),wt(t,c,h,a.get("disabled"))}function OR(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Hce=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=ks(pv.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}(pv);function Wce(t){t.registerChartView(Rce),t.registerSeriesModel(Hce),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,Ie(IF,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,EF("pictorialBar"))}var Uce=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 vo(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 T=[],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 qce(t){t.registerChartView(Uce),t.registerSeriesModel($ce),t.registerLayout(Yce),t.registerProcessor(Ih("themeRiver"))}var Kce=2,Qce=4,BR=function(t){Y(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=Kce,o.textConfig={inside:!0},Le(o).seriesIndex=n.seriesIndex;var s=new Xe({z2:Qce,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=th(d,o));var p=va(l.getModel("itemStyle"),h,!0);J(h,p),R(ln,function(_){var S=s.ensureState(_),T=l.getModel([_,"itemStyle"]);S.style=T.getItemStyle();var C=va(T,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),di(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"?$c(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&&!qc(F-V)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,_,r,n,i):(o.virtualPiece=new BR(_,r,n,i),c.add(o.virtualPiece)),S.piece.off("click"),o.virtualPiece.on("click",function(T){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";Ay(u,c)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:jT,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}(lt),rhe=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};dH(i);var a=this._levelModels=re(r.levels||[],function(l){return new We(l,this,n)},this),o=iA.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=p_(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}(dt);function dH(t){var e=0;R(t.children,function(n){dH(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 VR=Math.PI/180;function nhe(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")*VR,p=n.get("minAngle")*VR,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,_=n.get("sort");_!=null&&vH(m,_);var S=0;R(m.children,function(F){!isNaN(F.getValue())&&S++});var T=m.getValue(),C=Math.PI/(T||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=T===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=dy(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 ohe(t){t.registerChartView(the),t.registerSeriesModel(rhe),t.registerLayout(Ie(nhe,"sunburst")),t.registerProcessor(Ie(Ih,"sunburst")),t.registerVisual(ahe),ehe(t)}var FR={color:"fill",borderColor:"stroke"},she={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ro=Fe(),lhe=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=ro(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}(dt);function uhe(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 che(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(uhe,t)}}}function hhe(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 fhe(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(hhe,t)}}}function dhe(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 vhe(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(dhe,t)}}}function phe(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 ghe(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(phe,t)}}}function mhe(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 yhe(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 pH(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||he(t,"text")))}function gH(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 GR(o,t),R(o.rich,function(l){GR(l,l)}),{textConfig:i,textContent:a}}function GR(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 HR(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;WR(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){WR(s,s)}),n}function WR(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"]},UR=$e(mH);ci(ba,function(t,e){return t[e]=1,t},{});ba.join(", ");var t0=["","style","shape","extra"],lh=Fe();function wA(t,e,r,n,i){var a=t+"Animation",o=xh(t,n,i)||{},s=lh(e).userDuring;return o.duration>0&&(o.during=s?le(whe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),J(o,r[a]),o}function Am(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=lh(t),u=e.style;l.userDuring=e.during;var c={},h={};if(Che(t,e,h),t.type==="compound")for(var f=t.shape.paths,d=e.shape.paths,p=0;p0&&t.animateFrom(m,y)}else xhe(t,e,i||0,r,c);yH(t,e),u?t.dirty():t.markRedraw()}function yH(t,e){for(var r=lh(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function She(t,e){he(e,"silent")&&(t.silent=e.silent),he(e,"ignore")&&(t.ignore=e.ignore),t instanceof fi&&he(e,"invisible")&&(t.invisible=e.invisible),t instanceof Ue&&he(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var ra={},bhe={setTransform:function(t,e){return ra.el[t]=e,this},getTransform:function(t){return ra.el[t]},setShape:function(t,e){var r=ra.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=ra.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=ra.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=ra.el.style;if(e)return e[t]},setExtra:function(t,e){var r=ra.el.extra||(ra.el.extra={});return r[t]=e,this},getExtra:function(t){var e=ra.el.extra;if(e)return e[t]}};function whe(){var t=this,e=t.el;if(e){var r=lh(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}ra.el=e,n(bhe)}}function ZR(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]={}),Vl(l))J(o,a);else for(var u=gt(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,Xo).getItemStyle();j!=null&&(H.fill=j),W!=null&&(H.opacity=W);var X={inheritColor:se(j)?j:q.color.neutral99},K=T(F,Xo),ne=pt(K,null,X,!1,!0);ne.text=K.getShallow("show")?pe(t.getFormattedLabel(F,Xo),ih(e,F)):null;var ie=Ty(K,X,!1);return D(G,H),H=HR(H,ne,ie),G&&E(H,G),H.legacy=!0,H}function k(G,F){F==null&&(F=c);var U=S(F,no).getItemStyle(),j=T(F,no),W=pt(j,null,null,!0,!0);W.text=j.getShallow("show")?Sn(t.getFormattedLabel(F,no),t.getFormattedLabel(F,Xo),ih(e,F)):null;var H=Ty(j,null,!0);return D(G,U),U=HR(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(FR,G)){var U=e.getItemVisual(F,"style");return U?U[FR[G]]:null}if(he(she,G))return e.getItemVisual(F,G)}function z(G){if(o.type==="cartesian2d"){var F=o.getBaseAxis();return Dte(Se({axis:F},G))}}function O(){return r.getCurrentSeriesIndices()}function V(G){return K2(G,r)}}function Ohe(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 kS(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=LA(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&wt(s,n.focus,n.blurScope,n.emphasisDisabled),s}function LA(t,e,r,n,i,a){var o=-1,s=e;e&&bH(e,n,i)&&(o=Ee(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=MA(n),s&&Ihe(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),Zn.normal.cfg=Zn.normal.conOpt=Zn.emphasis.cfg=Zn.emphasis.conOpt=Zn.blur.cfg=Zn.blur.conOpt=Zn.select.cfg=Zn.select.conOpt=null,Zn.isLegacy=!1,Bhe(u,r,n,i,l,Zn),zhe(u,r,n,i,l),AA(t,u,r,n,Zn,i,l),he(n,"info")&&(ro(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function bH(t,e,r){var n=ro(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&Hhe(a)&&wH(a)!==n.customPathData||i==="image"&&he(o,"image")&&o.image!==n.customImagePath}function zhe(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&&bH(o,a,n)&&(o=null),o||(o=MA(a),t.setClipPath(o)),AA(null,o,e,a,null,n,i)}}function Bhe(t,e,r,n,i,a){if(!(t.isGroup||t.type==="compoundPath")){YR(r,null,a),YR(r,no,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=MA(o),t.setTextContent(c)),AA(null,c,e,o,null,n,i);for(var h=o&&o.style,f=0;f=c;d--){var p=e.childAt(d);Vhe(e,p,i)}}}function Vhe(t,e,r){e&&y_(e,ro(t).option,r)}function Fhe(t){new vo(t.oldChildren,t.newChildren,XR,XR,t).add(qR).update(qR).remove(Ghe).execute()}function XR(t,e){var r=t&&t.name;return r??khe+e}function qR(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;LA(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function Ghe(t){var e=this.context,r=e.oldChildren[t];r&&y_(r,ro(r).option,e.seriesModel)}function wH(t){return t&&(t.pathData||t.d)}function Hhe(t){return t&&(he(t,"pathData")||he(t,"d"))}function Whe(t){t.registerChartView(Ehe),t.registerSeriesModel(lhe)}var xl=Fe(),KR=ye,DS=le,kA=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(QR,r,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}eO(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=KM(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=xl(e).pointerEl=new cu[a.type](KR(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=xl(e).labelEl=new Xe(KR(r.label));e.add(a),JR(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=xl(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=xl(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),JR(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=Sh(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){co(u.event)},onmousedown:DS(this._onHandleDragMove,this,0,0),drift:DS(this._onHandleDragMove,this),ondragend:DS(this._onHandleDragEnd,this)}),n.add(i)),eO(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,Ah(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){QR(this._axisPointerModel,!r&&this._moveAnimation,this._handle,IS(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(IS(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(IS(i)),xl(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),sv(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 QR(t,e,r,n){TH(xl(r).lastProp,n)||(xl(r).lastProp=n,e?Qe(r,n,t):(r.stopAnimation(),r.attr(n)))}function TH(t,e){if(be(t)&&be(e)){var r=!0;return R(e,function(n,i){r=r&&TH(t[i],n)}),!!r}else return t===e}function JR(t,e){t[e.get(["label","show"])?"show":"hide"]()}function IS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function eO(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 DA(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 CH(t,e,r,n,i){var a=r.get("value"),o=MH(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=Th(s.get("padding")||0),u=s.getFont(),c=G0(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),Uhe(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:pt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function Uhe(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 MH(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:By(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 IA(t,e,r){var n=fr();return _o(n,n,r.rotation),zi(n,n,r.position),Ni([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function AH(t,e,r,n,i,a){var o=on.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),CH(e,n,i,a,{position:IA(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function EA(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function LH(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function tO(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var Zhe=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=rO(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=DA(a),d=$he[u](s,h,c);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=Yy(l.getRect(),i);AH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Yy(n.axis.grid.getRect(),n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=IA(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=rO(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}(kA);function rO(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var $he={line:function(t,e,r){var n=EA([e,r[0]],[e,r[1]],nO(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:LH([e-n/2,r[0]],[n,i],nO(t))}}};function nO(t){return t.dim==="x"?0:1}var Yhe=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),Ka=Fe(),Xhe=R;function PH(t,e,r){if(!Ze.node){var n=e.getZr();Ka(n).records||(Ka(n).records={}),qhe(n,e);var i=Ka(n).records[t]||(Ka(n).records[t]={});i.handler=r}}function qhe(t,e){if(Ka(t).initialized)return;Ka(t).initialized=!0,r("click",Ie(iO,"click")),r("mousemove",Ie(iO,"mousemove")),r("globalout",Qhe);function r(n,i){t.on(n,function(a){var o=Jhe(e);Xhe(Ka(t).records,function(s){s&&i(s,a,o.dispatchAction)}),Khe(o.pendings,e)})}}function Khe(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 Qhe(t,e,r){t.handler("leave",null,r)}function iO(t,e,r,n){e.handler(t,r,n)}function Jhe(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 GT(t,e){if(!Ze.node){var r=e.getZr(),n=(Ka(r).records||{})[t];n&&(Ka(r).records[t]=null)}}var efe=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";PH("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){GT("axisPointer",n)},e.prototype.dispose=function(r,n){GT("axisPointer",n)},e.type="axisPointer",e}(mt);function kH(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Xl(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 aO=Fe();function tfe(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){Lm(i)&&(i=kH({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Lm(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||Lm(i),f={},d={},p={list:[],map:{}},g={showPointer:Ie(nfe,d),showTooltip:Ie(ife,p)};R(s.coordSysMap,function(y,_){var S=l||y.containPoint(i);R(s.coordSysAxesInfo[_],function(T,C){var M=T.axis,A=lfe(u,T);if(!h&&S&&(!u||A)){var k=A&&A.value;k==null&&!l&&(k=M.pointToData(i)),k!=null&&oO(T,k,g,!1,f)}})});var m={};return R(c,function(y,_){var S=y.linkGroup;S&&!d[_]&&R(S.axesInfo,function(T,C){var M=d[C];if(T!==y&&M){var A=M.value;S.mapper&&(A=y.axis.scale.parse(S.mapper(A,sO(T),sO(y)))),m[y.key]=A}})}),R(m,function(y,_){oO(c[_],y,g,!0,f)}),afe(d,c,f),ofe(p,i,t,o),sfe(c,o,r),f}}function oO(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=rfe(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 rfe(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 nfe(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function ife(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=gv(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 afe(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 ofe(t,e,r,n){if(Lm(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 sfe(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=aO(n)[i]||{},o=aO(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 lfe(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 sO(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 Lm(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function ep(t){vu.registerAxisPointerClass("CartesianAxisPointer",Zhe),t.registerComponentModel(Yhe),t.registerComponentView(efe),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=uae(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},tfe)}function ufe(t){ze(e6),ze(ep)}var cfe=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=DA(a),p=ffe[f](s,l,h,c);p.style=d,r.graphicKey=p.type,r.pointer=p}var g=a.get(["label","margin"]),m=hfe(n,i,a,l,g);CH(r,i,a,o,m)},e}(kA);function hfe(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();_o(f,f,s),zi(f,f,[n.cx,n.cy]),u=Ni([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,p=on.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 ffe={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:EA(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:tO(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:tO(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}},dfe=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),NA=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(NA,Dh);var vfe=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}(NA),pfe=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}(NA),RA=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}(gi);RA.prototype.dataToRadius=gi.prototype.dataToCoord;RA.prototype.radiusToData=gi.prototype.coordToData;var gfe=Fe(),OA=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=G0(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=gfe(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}(gi);OA.prototype.dataToAngle=gi.prototype.dataToCoord;OA.prototype.angleToData=gi.prototype.coordToData;var DH=["radius","angle"],mfe=function(){function t(e){this.dimensions=DH,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new RA,this._angleAxis=new OA,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=lO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=lO(r);return i===this?this.pointToData(n):null},t}();function lO(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function yfe(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 _fe(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(jy(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),R(jy(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),tu(n.scale,n.model),tu(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 xfe(t){return t.mainType==="angleAxis"}function uO(t,e){var r;if(t.type=e.get("type"),t.scale=Yv(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),xfe(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 Sfe={dimensions:DH,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new mfe(i+"");a.update=_fe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");uO(o,l),uO(s,u),yfe(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}},bfe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Bg(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 jg(t){var e=t.getRadiusAxis();return e.inverse?0:1}function cO(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 wfe=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});cO(u),cO(s),R(bfe,function(c){r.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Tfe[c](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(vu),Tfe={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=jg(r),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new cu[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 yh({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[jg(r)],u=re(n,function(c){return new Wt({shape:Bg(r,[l,l+s],c.coord)})});t.add(Ln(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[jg(r)],c=[],h=0;hy?"left":"right",T=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:on.isLabelSilent(e),style:pt(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:S,verticalAlign:T})});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=on.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 kfe(t){var e={};R(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=EH(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=IH(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=hO(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=hO(r);return i===this?this.pointToData(n):null},t}();function hO(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function Vfe(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new jfe(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 Ffe={create:Vfe,dimensions:NH},fO=["x","y"],Gfe=["width","height"],Hfe=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=ES(l,1-i0(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=DA(a),d=Wfe[h](s,c,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var p=HT(i);AH(n,r,p,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=HT(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=IA(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=i0(o),u=ES(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=ES(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}(kA),Wfe={line:function(t,e,r){var n=EA([e,r[0]],[e,r[1]],i0(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:LH([e-n/2,r[0]],[n,i],i0(t))}}};function i0(t){return t.isHorizontal()?0:1}function ES(t,e){var r=t.getRect();return[r[fO[e]],r[fO[e]]+r[Gfe[e]]]}var Ufe=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}(mt);function Zfe(t){ze(ep),vu.registerAxisPointerClass("SingleAxisPointer",Hfe),t.registerComponentView(Ufe),t.registerComponentView(Ofe),t.registerComponentModel(Pm),ah(t,"single",Pm,Pm.defaultOption),t.registerCoordinateSystem("single",Ffe)}var $fe=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=hu(r);t.prototype.init.apply(this,arguments),dO(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),dO(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 dO(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 pQ(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Ca(t,e,{type:"box",ignoreSize:i})}var Yfe=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?lQ(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:pt(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=Bw(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/NS)-Math.floor(r[0].time/NS)+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){Zv({targetModel:a,coordSysType:"calendar",coordSysProvider:Jj})}),n},t.dimensions=["time","value"],t}();function RS(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}function qfe(t){t.registerComponentModel($fe),t.registerComponentView(Yfe),t.registerCoordinateSystem("calendar",Xfe)}var Wa={level:1,leaf:2,nonLeaf:3},io={none:0,all:1,body:2,corner:3};function WT(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 RH(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 OH(t,e,r,n,i){vO(t[0],e,i,r,n,0),vO(t[1],e,i,r,n,1)}function vO(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?(pO(t,e,s,u,i,a,0),l>1&&pO(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===io.body?c=Gt(0,c):r===io.corner&&(h=Rn(-1,h)),h=e[0]&&t[0]<=e[1]}function yO(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 Jfe(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 _O(t,e,r,n){var i=WT(e[n][0],r,n),a=WT(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 Lf(t,e,r,n){return t[De[e]]=r,t[De[1-e]]=n,t}function ede(t){return t&&(t.type===Wa.leaf||t.type===Wa.nonLeaf)?t:null}function a0(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var xO=function(){function t(e,r){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=r,this._uniqueValueGen=tde(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:Wa.nonLeaf,ordinal:NaN,level:h,firstLeafLocator:c,id:new Te,span:Lf(new Te,r.dimIdx,1,1),option:g,xy:NaN,wh:NaN,dim:r,rect:a0()};o++,(a[c]||(a[c]=[])).push(m),i[h]||(i[h]={type:Wa.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]],T=a.getLocatorCount(n)-1,C=new ls;for(o.resetLayoutIterator(C,n);C.next();)M(C.item);for(a.resetLayoutIterator(C,n);C.next();)M(C.item);function M(A){Ir(A.wh)&&(A.wh=y),A.xy=S,A.id[De[n]]===T&&!_&&(A.wh=r[De[n]]+r[qt[n]]-A.xy),S+=A.wh}}function AO(t,e){for(var r=e[De[t]].resetCellIterator();r.next();){var n=r.item;o0(n.rect,t,n.id,n.span,e),o0(n.rect,1-t,n.id,n.span,e),n.type===Wa.nonLeaf&&(n.xy=n.rect[De[t]],n.wh=n.rect[qt[t]])}}function LO(t,e){t.travelExistingCells(function(r){var n=r.span;if(n){var i=r.spanRect,a=r.id;o0(i,0,a,n,e),o0(i,1,a,n,e)}})}function o0(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 vde(t,e,r){var n=_y(t,r[qt[e]]);return ZT(n,r[qt[e]])}function ZT(t,e){return Math.max(Math.min(t,pe(e,1/0)),0)}function BS(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},ea={x:null,y:null,point:[]};function PO(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===io.body){l?(t[De[e]]=Pr.inBody,h=Rn(s.xy+s.wh,Gt(l.xy,h)),t.point[e]=h):t[De[e]]=Pr.outside;return}else if(i===io.corner){c?(t[De[e]]=Pr.inCorner,h=Rn(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 kO(t,e,r,n){var i=1-r;if(t[De[r]]!==Pr.outside)for(n[De[r]].resetCellIterator(zS);zS.next();){var a=zS.item;if(IO(t.point[r],a.rect,r)&&IO(t.point[i],a.rect,i)){e[r]=a.ordinal,e[i]=a.id[De[i]];return}}}function DO(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(Wg,r);Wg.next();)if(pde(t.point[r],Wg.item)){e[r]=Wg.item.id[De[r]];return}}}function pde(t,e){return e.xy<=t&&t<=e.xy+e.wh}function IO(t,e,r){return e[De[r]]<=t&&t<=e[De[r]]+e[qt[r]]}function gde(t){t.registerComponentModel(ade),t.registerComponentView(cde),t.registerCoordinateSystem("matrix",dde)}function mde(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 EO(t,e){var r;return R(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function yde(t,e,r){var n=J({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(Ne(i,n,!0),Ca(i,n,{ignoreSize:!0}),iV(r,i),Ug(r,i),Ug(r,i,"shape"),Ug(r,i,"style"),Ug(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var BH=["transition","enterFrom","leaveTo"],_de=BH.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Ug(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?BH:_de,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=Kn(p),_=p===a?{width:s,height:l}:{width:y.width,height:y.height},S={},T=r_(d,h,_,null,{hv:h.hv,boundingMode:h.bounding},S);if(!Kn(d).isNew&&T){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){km(i,Kn(i).option,n,r._lastGraphicModel)}),this._elMap=de()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(mt);function $T(t){var e=he(NO,t)?NO[t]:nv(t),r=new e({});return Kn(r).type=t,r}function RO(t,e,r,n){var i=$T(r);return e.add(i),n.set(t,i),Kn(i).id=t,Kn(i).isNew=!0,i}function km(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){km(a,e,r,n)}),y_(t,e,n),r.removeKey(Kn(t).id))}function OO(t,e,r,n){t.isGroup||R([["cursor",fi.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 wde(t){return t=J({},t),R(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(eV),function(e){delete t[e]}),t}function Tde(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 Cde(t){t.registerComponentModel(Sde),t.registerComponentView(bde),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 zO=["x","y","radius","angle","single"],Mde=["cartesian2d","polar","singleAxis"];function Ade(t){var e=t.get("coordinateSystem");return Ee(Mde,e)>=0}function qo(t){return t+"Axis"}function Lde(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 jH(t){var e=t.ecModel,r={infoList:[],infoMap:de()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(qo(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 jS=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}(),bv=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=BO(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=BO(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(zO,function(i){var a=this.getReferringComponents(qo(i),ZX);if(a.specified){n=!0;var o=new jS;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 jS;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(zO,function(u){if(a){var c=i.findComponents({mainType:qo(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new jS;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(qo(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(qo(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&&!T&&!C)return!0;S&&(m=!0),T&&(p=!0),C&&(g=!0)}return m&&p&&g})}else ac(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)}});ac(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;ac(["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=it(n[0]+o,n,[0,100],!0):a!=null&&(o=it(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=L2(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 Ide(t,e,r){var n=[1/0,-1/0];ac(r,function(o){qte(n,o.getData(),e)});var i=t.getAxisModel(),a=BF(i.axis.scale,i,n).calculate();return[a.min,a.max]}var Ede={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(qo(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 Dde(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 Nde(t){t.registerAction("dataZoom",function(e,r){var n=Lde(r,e);R(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var VO=!1;function VA(t){VO||(VO=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Ede),Nde(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Rde(t){t.registerComponentModel(Pde),t.registerComponentView(kde),VA(t)}var ti=function(){function t(){}return t}(),VH={};function oc(t,e){VH[t]=e}function FH(t){return VH[t]}var Ode=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=FH(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 GH(t,e){var r=Th(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 zde=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 vo(this._featureNames||[],h).add(f).update(f).remove(Ie(f,null)).execute(),this._featureNames=h;function f(_,S){var T=h[_],C=h[S],M=u[T],A=new We(M,r,r.ecModel),k;if(a&&a.newTitle!=null&&a.featureName===T&&(M.title=a.newTitle),T&&!C){if(Bde(T))k={onclick:A.option.onclick,featureName:T};else{var E=FH(T);if(!E)return;k=new E}c[T]=k}else if(k=c[C],!k)return;k.uid=wh("toolbox-feature"),k.model=A,k.ecModel=n,k.api=i;var D=k instanceof ti;if(!T&&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,T),A.setIconStatus=function(I,z){var O=this.option,V=this.iconPaths;O.iconStatus=O.iconStatus||{},O.iconStatus[I]=z,V[I]&&(z==="emphasis"?ho:fo)(V[I])},k instanceof ti&&k.render&&k.render(A,n,i,a)}function d(_,S,T){var C=_.getModel("iconStyle"),M=_.getModel(["emphasis","iconStyle"]),A=S instanceof ti&&S.getIcons?S.getIcons():_.get("icon"),k=_.get("title")||{},E,D;se(A)?(E={},E[T]=A):E=A,se(k)?(D={},D[T]=k):D=k;var I=_.iconPaths={};R(E,function(z,O){var V=Sh(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:K2({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 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"?ho:fo)(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);zl(r.get("orient"),o,r.get("itemGap"),y.width,y.height),r_(o,g,p,m),o.add(GH(o.getBoundingRect(),r)),l||o.eachChild(function(_){var S=_.__title,T=_.ensureState("emphasis"),C=T.textConfig||(T.textConfig={}),M=_.getTextContent(),A=M&&M.ensureState("emphasis");if(A&&!me(A)&&S){var k=A.style||(A.style={}),E=G0(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 ti&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){R(this._features,function(i){i instanceof ti&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){R(this._features,function(i){i instanceof ti&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(mt);function Bde(t){return t.indexOf("my")===0}var jde=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 T=S.contentWindow,C=T.document;C.open("image/svg+xml","replace"),C.write(p),C.close(),T.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}(ti),FO="__ec_magicType_stack__",Vde=[["line","bar"],["stack"]],Fde=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(GO[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=GO[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],T=S.componentIndex;s[_]=s[_]||[];for(var C=0;C<=T;C++)s[_][T]=s[_][T]||{};s[_][T].boundaryGap=i==="bar"}}};R(Vde,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}(ti),GO={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")===FO;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ne({id:e,stack:i?"":FO},n.get(["option","stack"])||{},!0)}};Fi({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var __=new Array(60).join("-"),uh=" ";function Gde(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 Hde(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(uh)],c=0;c=0)return!0}var WT=new RegExp("["+cf+"]+","g");function Zde(t){for(var e=t.split(/\n+/g),r=i0(e.shift()).split(WT),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 Qde(t){var e=BA(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return GH(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 Jde(t){HH(t).snapshots=null}function eve(t){return BA(t).length}function BA(t){var e=HH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var tve=function(t){$(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){Jde(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 rve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],VA=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=jO(r,e);R(nve,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=OS[n.brushType](0,a,i);n.__rangeOffset={offset:WO[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=OS[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=OS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?WO[n.brushType](a.values,o.offset,ive(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:Y6(i),isTargetByCursor:q6(i,e,n.coordSysModel),getLinearBrushOtherExtent:X6(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=jO(r,e),a=0;at[1]&&t.reverse(),t}function jO(t,e){return Nc(t,e,{includeMainTypes:rve})}var nve={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(f,h){(Ee(r,f.getAxis("x").model)>=0||Ee(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:GO.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:GO.geo})})}},FO=[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}],GO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(cs(t)),e}},OS={lineX:Ie(HO,0),lineY:Ie(HO,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=[UT([i[0],a[0]]),UT([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 HO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=UT(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 WO={lineX:Ie(UO,0),lineY:Ie(UO,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 UO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function ive(t,e){var r=ZO(t),n=ZO(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 ZO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var ZT=R,ave=jX("toolbox-dataZoom_"),ove=function(t){$(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 cA(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),uve(r,n,this,a,i),lve(r,n)},e.prototype.onclick=function(r,n,i){sve[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 VA(jA(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),Kde(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=Ss(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(h=d)}),h}},e.prototype._dispatchZoomAction=function(r){var n=[];ZT(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),sve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Qde(this.ecModel))}};function jA(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 lve(t,e){t.setIconStatus("back",eve(e)>1?"emphasis":"normal")}function uve(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 VA(jA(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)}SQ("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=jA(n),o=Nc(t,a);ZT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),ZT(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:ave+u+f};h[c]=f,i.push(h)}return i});function cve(t){t.registerComponentModel(Rde),t.registerComponentView(Ode),oc("saveAsImage",Bde),oc("magicType",jde),oc("dataView",Xde),oc("dataZoom",ove),oc("restore",tve),Oe(Nde)}var fve=function(t){$(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}(je);function WH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function UH(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,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/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 yve(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?""+FA+i:",left"+i+",top"+i)),vve+":"+a}function $O(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;"+FA+":"+o+";":[["top",0],["left",0],[ZH,o]]}function _ve(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 xve(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"),f=t.getModel("textStyle"),h=Rj(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&a>0&&i.push(yve(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=sM(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(_ve(f)),h!=null&&i.push("padding:"+Cf(h).join("px ")+"px"),i.join(";")+";"}function YO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&aY(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 Sve=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):$l(a)?a:me(a)&&a(e.getDom()));YO(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=dve(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=pve+xve(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+$O(a[0],a[1],!0)+("border-color:"+eu(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"&&!WH(n)&&(s=mve(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=KO(a,i);this._ticket="";var s=a.dataByCoordSys,l=Lve(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=bve;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 f=PH(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.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(KO(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(),f=Dh([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.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;Pl(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=Dh([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),f=[],h=new m1;R(r,function(_){R(_.dataByAxis,function(S){var b=i.getComponent(S.axisDim+"Axis",S.axisIndex),C=S.value;if(!(!b||C==null)){var M=CH(C,b.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(D){var E=i.getSeriesByIndex(D.seriesIndex),k=D.dataIndexInside,I=E.getDataParams(k);if(!(I.dataIndex<0)){I.axisDim=S.axisDim,I.axisIndex=S.axisIndex,I.axisType=S.axisType,I.axisId=S.axisId,I.axisValue=Ry(b.axis,{value:C}),I.axisValueLabel=M,I.marker=h.makeTooltipMarker("item",eu(I.color),l);var z=dI(E.formatTooltip(k,!0,null)),O=z.frag;if(O){var j=Dh([E],a).get("valueFormatter");A.blocks.push(j?J({valueFormatter:j},O):O)}z.text&&f.push(z.text),u.push(I)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,p=s.get("order"),g=_I(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var m=l==="richText"?` +`),meta:e.meta}}function s0(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Zde(t){var e=t.slice(0,t.indexOf(` +`));if(e.indexOf(uh)>=0)return!0}var YT=new RegExp("["+uh+"]+","g");function $de(t){for(var e=t.split(/\n+/g),r=s0(e.shift()).split(YT),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 Jde(t){var e=FA(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return HH(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 eve(t){WH(t).snapshots=null}function tve(t){return FA(t).length}function FA(t){var e=WH(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var rve=function(t){Y(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){eve(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}(ti);Fi({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var nve=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],GA=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=HO(r,e);R(ive,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=VS[n.brushType](0,a,i);n.__rangeOffset={offset:$O[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=VS[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=VS[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?$O[n.brushType](a.values,o.offset,ave(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:X6(i),isTargetByCursor:K6(i,e,n.coordSysModel),getLinearBrushOtherExtent:q6(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=HO(r,e),a=0;at[1]&&t.reverse(),t}function HO(t,e){return Nc(t,e,{includeMainTypes:nve})}var ive={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:UO.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:UO.geo})})}},WO=[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}],UO={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(cs(t)),e}},VS={lineX:Ie(ZO,0),lineY:Ie(ZO,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=[XT([i[0],a[0]]),XT([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 ZO(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=XT(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 $O={lineX:Ie(YO,0),lineY:Ie(YO,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 YO(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function ave(t,e){var r=XO(t),n=XO(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 XO(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var qT=R,ove=FX("toolbox-dataZoom_"),sve=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 dA(i.getZr()),this._brushController.on("brush",le(this._onBrush,this)).mount()),cve(r,n,this,a,i),uve(r,n)},e.prototype.onclick=function(r,n,i){lve[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 GA(HA(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)}}),Qde(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=[];qT(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}(ti),lve={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Jde(this.ecModel))}};function HA(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 uve(t,e){t.setIconStatus("back",tve(e)>1?"emphasis":"normal")}function cve(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 GA(HA(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)}bQ("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=HA(n),o=Nc(t,a);qT(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),qT(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:ove+u+h};f[c]=h,i.push(f)}return i});function hve(t){t.registerComponentModel(Ode),t.registerComponentView(zde),oc("saveAsImage",jde),oc("magicType",Fde),oc("dataView",qde),oc("dataZoom",sve),oc("restore",rve),ze(Rde)}var fve=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 UH(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function ZH(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 _ve(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?""+WA+i:",left"+i+",top"+i)),pve+":"+a}function qO(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;"+WA+":"+o+";":[["top",0],["left",0],[$H,o]]}function xve(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 Sve(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=OV(t,"html"),d=u+"px "+c+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&a>0&&i.push(_ve(a,r,n)),o&&i.push("background-color:"+o),R(["width","color","radius"],function(p){var g="border-"+p,m=cM(g),y=t.get(m);y!=null&&i.push(g+":"+y+(p==="color"?"":"px"))}),i.push(xve(h)),f!=null&&i.push("padding:"+Th(f).join("px ")+"px"),i.join(";")+";"}function KO(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&oY(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 bve=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):$l(a)?a:me(a)&&a(e.getDom()));KO(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();Yn(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=vve(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=gve+Sve(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+qO(a[0],a[1],!0)+("border-color:"+eu(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"&&!UH(n)&&(s=yve(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=e5(a,i);this._ticket="";var s=a.dataByCoordSys,l=Pve(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=Tve;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=kH(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(e5(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=kf([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;Pl(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=kf([n.tooltipOption],a),l=this._renderMode,u=[],c=Kt("section",{blocks:[],noHeader:!0}),h=[],f=new S1;R(r,function(_){R(_.dataByAxis,function(S){var T=i.getComponent(S.axisDim+"Axis",S.axisIndex),C=S.value;if(!(!T||C==null)){var M=MH(C,T.axis,i,S.seriesDataIndices,S.valueLabelOpt),A=Kt("section",{header:M,noHeader:!kn(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=By(T.axis,{value:C}),I.axisValueLabel=M,I.marker=f.makeTooltipMarker("item",eu(I.color),l);var z=gI(E.formatTooltip(D,!0,null)),O=z.frag;if(O){var V=kf([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=bI(c,f,l,p,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var m=l==="richText"?` -`:"
",y=f.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,h)})},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,f=o.dataType,h=u.getData(f),d=this._renderMode,p=r.positionDefault,g=Dh([h.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,f),_=new m1;y.marker=_.makeTooltipMarker("item",eu(y.color),d);var S=dI(u.formatTooltip(c,!1,f)),b=g.get("order"),C=g.get("valueFormatter"),M=S.frag,A=M?_I(C?J({valueFormatter:C},M):M,_,d,b,a.get("useUTC"),g.get("textStyle")):S.text,D="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,A,y,D,r.offsetX,r.offsetY,r.position,r.target,_)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.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 f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=r.positionDefault,p=Dh(f,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 f=this._tooltipContent;f.setEnterable(r.get("enterable"));var h=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(h)if(se(h)){var m=r.ecModel.get("useUTC"),y=ee(i)?i[0]:i,_=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=h,_&&(d=Gv(y.axisValue,d,m)),d=lM(d,i,!0)}else if(me(h)){var S=le(function(b,C){b===this._ticket&&(f.setContent(C,c,r,g,l),this._updatePosition(r,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,S)}else d=h;f.setContent(d,c,r,g,l),f.show(r,g),this._updatePosition(r,l,o,s,f,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 f=o.getSize(),h=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:f.slice()})),ee(n))i=oe(n[0],u),a=oe(n[1],c);else if(we(n)){var g=n;g.width=f[0],g.height=f[1];var m=wt(g,{width:u,height:c});i=m.x,a=m.y,h=null,d=null}else if(se(n)&&l){var y=Ave(n,p,f,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=Cve(i,a,o,u,c,h?null:20,d?null:20);i=y[0],a=y[1]}if(h&&(i-=QO(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=QO(d)?f[1]/2:d==="bottom"?f[1]:0),WH(r)){var y=Mve(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]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&R(u,function(h,d){var p=f[d]||{},g=h.seriesDataIndices||[],m=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.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(h.seriesDataIndices,function(y){var _=y.seriesIndex,S=n[_],b=a[_];S&&b&&b.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()||(ov(this,"_updatePosition"),this._tooltipContent.dispose(),BT("itemTooltip",n))},e.type="tooltip",e}(gt);function Dh(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 KO(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function Cve(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 Mve(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 Ave(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 QO(t){return t==="center"||t==="middle"}function Lve(t,e,r){var n=D2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=mf(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 Pve(t){Oe(Kv),t.registerComponentModel(fve),t.registerComponentView(Tve),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Dve=["rect","polygon","keep","clear"];function kve(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),Ive(s),e&&!s.length&&s.push.apply(s,Dve)}}function Ive(t){var e={};R(t,function(r){e[r]=1}),t.length=0,R(e,function(r,n){t.push(n)})}var JO=R;function ez(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function $T(t,e,r){var n={};return JO(e,function(a){var o=n[a]=i();JO(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 YH(t,e,r){var n;R(r,function(i){e.hasOwnProperty(i)&&ez(e[i])&&(n=!0)}),n&&R(r,function(i){e.hasOwnProperty(i)&&ez(e[i])?t[i]=ye(e[i]):delete t[i]})}function Eve(t,e,r,n,i,a){var o={};R(t,function(f){var h=dr.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return yM(r,s,f)}function u(f,h){Uj(r,s,f,h)}r.each(c);function c(f,h){s=f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,f),g=e[p],m=o[p],y=0,_=m.length;y<_;y++){var S=m[y];g[S]&&g[S].applyVisual(f,l,u)}}}function Nve(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 yM(s,f,C)}function c(C,M){Uj(s,f,C,M)}for(var f,h=s.getStore();(f=o.next())!=null;){var d=s.getRawDataItem(f);if(!(d&&d.visualMap===!1))for(var p=n!=null?h.get(l,f):f,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&&az(e)}};function az(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Fve=function(t){$(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 cA(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){XH(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),Gve=function(t){$(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&&YH(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 oz(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=oz(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}(je);function oz(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 Hve=["rect","polygon","lineX","lineY","keep","clear"],Wve=function(t){$(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:Hve.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 Uve(t){t.registerComponentView(Fve),t.registerComponentModel(Gve),t.registerPreprocessor(kve),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,Ove),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),oc("brush",Wve)}var Zve=function(t){$(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}(je),$ve=function(t){$(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}),f=c.getBoundingRect(),h=r.get("subtext"),d=new Xe({style:vt(s,{text:h,fill:s.getTextColor(),y:f.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(){Ty(p,"_"+r.get("target"))}),g&&d.on("click",function(){Ty(g,"_"+r.get("subtarget"))}),Le(c).eventData=Le(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(c),h&&a.add(d);var y=a.getBoundingRect(),_=r.getBoxLayoutParams();_.width=y.width,_.height=y.height;var S=sr(r,i),b=wt(_,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),d.setStyle(C),y=a.getBoundingRect();var M=b.margin,A=r.getItemStyle(["color","opacity"]);A.fill=r.get("backgroundColor");var D=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(D)}},e.type="title",e}(gt);function Yve(t){t.registerComponentModel(Zve),t.registerComponentView($ve)}var sz=function(t){$(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 f=rr(gf(u),""),h;we(u)?(h=ye(u),h.value=c):h=c,o.push(h),a.push(f)})):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}(je),qH=function(t){$(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(sz.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}(sz);Bt(qH,e_.prototype);var Xve=function(t){$(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),qve=function(t){$(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}(vi),BS=Math.PI,lz=Fe(),Kve=function(t){$(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=Jve(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:BS/2},f=a==="vertical"?o.height:o.width,h=r.getModel("controlStyle"),d=h.get("show",!0),p=d?h.get("itemSize"):0,g=d?h.get("itemGap"):0,m=p+g,y=r.get(["label","rotate"])||0;y=y*BS/180;var _,S,b,C=h.get("position",!0),M=d&&h.get("showPlayBtn",!0),A=d&&h.get("showPrevBtn",!0),D=d&&h.get("showNextBtn",!0),E=0,k=f;C==="left"||C==="bottom"?(M&&(_=[0,0],E+=m),A&&(S=[E,0],E+=m),D&&(b=[k-p,0],k-=m)):(M&&(_=[k-p,0],k-=m),A&&(S=[0,0],E+=m),D&&(b=[k-p,0],k-=m));var I=[E,k];return r.get("inverse")&&I.reverse(),{viewRect:o,mainLength:f,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:b,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=hr(),l=o.x,u=o.y+o.height;Ri(s,s,[-l,-u]),yo(s,s,-BS/2),Ri(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=_(o),f=_(i.getBoundingRect()),h=_(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,f,c,1,m),S(p,h,c,1,1-m)}else{var m=g>=0?0:1;S(d,f,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(b){b.originX=c[0][0]-b.x,b.originY=c[1][0]-b.y}function _(b){return[[b.x,b.x+b.width],[b.y,b.y+b.height]]}function S(b,C,M,A,D){b[A]+=M[A][D]-C[A][D]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Qve(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 qve("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),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:le(o._changeTimeline,o,u.value)},m=uz(f,h,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),us(m);var y=Le(m);f.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 f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.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,f),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),us(y),lz(y).dataIndex=f,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(),f=a.get("inverse",!0);h(r.nextBtnPosition,"next",le(this._changeTimeline,this,f?"-":"+")),h(r.prevBtnPosition,"prev",le(this._changeTimeline,this,f?"+":"-")),h(r.playPosition,c?"stop":"play",le(this._handlePlayClick,this,!c),!0);function h(d,p,g,m){if(d){var y=Oi(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],S=epe(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),us(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(f){f.draggable=!0,f.drift=le(u._handlePointerDrag,u),f.ondragend=le(u._handlePointerDragend,u),cz(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){cz(f,u._progressLine,s,i,a)}};this._currentPointer=uz(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=Dn(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var Zg={min:Ie(Ug,"min"),max:Ie(Ug,"max"),average:Ie(Ug,"average"),median:Ie(Ug,"median")};function wv(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!ope(e)&&!ee(e.coord)&&ee(i)){var a=KH(e,r,n,t);if(e=ye(e),e.type&&Zg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=Zg[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&&Zg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=a0(r,r.mapDimension(c.dim),e.type))}}else for(var f=e.coord,h=0;h<2;h++)Zg[f[h]]&&(f[h]=a0(r,r.mapDimension(i[h]),f[h]));return e}}function KH(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(spe(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 spe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function bv(t,e){return t&&t.containData&&e.coord&&!XT(e)?t.containData(e.coord):!0}function lpe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!XT(e)&&!XT(r)?t.containZone(e.coord,r.coord):!0}function QH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return hs(o,e[a])}:function(r,n,i,a){return hs(r.value,e[a])}}function a0(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 VS=Fe(),HA=function(t){$(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){VS(s).keep=!1}),n.eachSeries(function(s){var l=Ca.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!VS(s).keep&&a.group.remove(s.group)}),upe(n,o,this.type)},e.prototype.markKeep=function(r){VS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Ca.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?dV(l):B2(l))})}})},e.type="marker",e}(gt);function upe(t,e,r){t.eachSeries(function(n){var i=Ca.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=Jl(i),s=o.z,l=o.zlevel;q0(a.group,s,l)}})}function hz(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,f=u?o?o.height:0:a,h=u&&o?o.x:0,d=u&&o?o.y:0,p,g=oe(l.get("x"),c)+h,m=oe(l.get("y"),f)+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 cpe=function(t){$(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=Ca.getMarkerModelFromSeries(a,"markPoint");o&&(hz(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 $v),f=fpe(o,r,n);n.setData(f),hz(n.getData(),r,a),f.each(function(h){var d=f.getItemModel(h),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(h),b=n.getDataParams(h);me(p)&&(p=p(S,b)),me(g)&&(g=g(S,b)),me(m)&&(m=m(S,b)),me(y)&&(y=y(S,b))}var C=d.getModel("itemStyle").getItemStyle(),M=d.get("z2"),A=Wv(l,"color");C.fill||(C.fill=A),f.setItemVisual(h,{z2:pe(M,0),symbol:p,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:_,style:C})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Le(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(HA);function fpe(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(wv,e));t&&(a=et(a,Ie(bv,t)));var o=QH(!!t,n);return i.initData(a,null,o),i}function hpe(t){t.registerComponentModel(ape),t.registerComponentView(cpe),t.registerPreprocessor(function(e){GA(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var dpe=function(t){$(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}(Ca),$g=Fe(),vpe=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=wr(n.yAxis,n.xAxis);else{var u=KH(n,i,e,t);s=u.valueAxis;var c=kM(i,u.valueDataDim);l=a0(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=ye(n),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var g=r.get("precision");g>=0&&qe(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[f]=p.coord[f]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[wv(t,a[0]),wv(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 o0(t){return!isNaN(t)&&!isFinite(t)}function dz(t,e,r,n){var i=1-t,a=n.dimensions[t];return o0(e[i])&&o0(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function ppe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(dz(1,r,n,t)||dz(0,r,n,t)))return!0}return bv(t,e[0])&&bv(t,e[1])}function jS(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,f=t.get(c[0],e),h=t.get(c[1],e);s=a.dataToPoint([f,h])}if(xs(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;o0(t.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):o0(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 gpe=function(t){$(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=Ca.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=$g(o).from,u=$g(o).to;l.each(function(c){jS(l,c,!0,a,i),jS(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 lA);this.group.add(c.group);var f=mpe(o,r,n),h=f.from,d=f.to,p=f.line;$g(n).from=h,$g(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(_)||(_=[_,_]),f.from.each(function(b){S(h,b,!0),S(d,b,!1)}),p.each(function(b){var C=p.getItemModel(b),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(b,[h.getItemLayout(b),d.getItemLayout(b)]);var A=C.get("z2");M.stroke==null&&(M.stroke=h.getItemVisual(b,"style").fill),p.setItemVisual(b,{z2:pe(A,0),fromSymbolKeepAspect:h.getItemVisual(b,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(b,"symbolOffset"),fromSymbolRotate:h.getItemVisual(b,"symbolRotate"),fromSymbolSize:h.getItemVisual(b,"symbolSize"),fromSymbol:h.getItemVisual(b,"symbol"),toSymbolKeepAspect:d.getItemVisual(b,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(b,"symbolOffset"),toSymbolRotate:d.getItemVisual(b,"symbolRotate"),toSymbolSize:d.getItemVisual(b,"symbolSize"),toSymbol:d.getItemVisual(b,"symbol"),style:M})}),c.updateData(p),f.line.eachItemGraphicEl(function(b){Le(b).dataModel=n,b.traverse(function(C){Le(C).dataModel=n})});function S(b,C,M){var A=b.getItemModel(C);jS(b,C,M,r,a);var D=A.getModel("itemStyle").getItemStyle();D.fill==null&&(D.fill=Wv(l,"color")),b.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:D})}this.markKeep(c),c.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(HA);function mpe(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(vpe,e,t,r));t&&(s=et(s,Ie(ppe,t)));var l=QH(!!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 ype(t){t.registerComponentModel(dpe),t.registerComponentView(gpe),t.registerPreprocessor(function(e){GA(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var _pe=function(t){$(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}(Ca),Yg=Fe(),xpe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=wv(t,i),s=wv(t,a),l=o.coord,u=s.coord;l[0]=wr(l[0],-1/0),l[1]=wr(l[1],-1/0),u[0]=wr(u[0],1/0),u[1]=wr(u[1],1/0);var c=E0([{},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 s0(t){return!isNaN(t)&&!isFinite(t)}function vz(t,e,r,n){var i=1-t;return s0(e[i])&&s0(r[i])}function Spe(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 xs(t,"cartesian2d")?r&&n&&(vz(1,r,n)||vz(0,r,n))?!0:lpe(t,i,a):bv(t,i)||bv(t,a)}function pz(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),f=t.getValues(["x1","y1"],e),h=a.clampData(c),d=a.clampData(f),p=[];r[0]==="x0"?p[0]=h[0]>d[0]?f[0]:c[0]:p[0]=h[0]>d[0]?c[0]:f[0],r[1]==="y0"?p[1]=h[1]>d[1]?f[1]:c[1]:p[1]=h[1]>d[1]?c[1]:f[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(xs(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);s0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):s0(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 gz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],wpe=function(t){$(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=Ca.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(gz,function(f){return pz(s,l,f,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 f=bpe(o,r,n);n.setData(f),f.each(function(h){var d=re(gz,function(k){return pz(f,h,k,r,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,m=p.getExtent(),y=g.getExtent(),_=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],S=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];Dn(_),Dn(S);var b=!(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}(je),Ku=Ie,KT=R,Xg=_e,JH=function(t){$(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 Xg),this.group.add(this._selectorGroup=new Xg),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,f=r.getBoxLayoutParams(),h=r.get("padding"),d=wt(f,c,h),p=this.layoutInner(r,o,d,a,l,u),g=wt(Se({width:p.width,height:p.height},f),c,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=FH(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(),f=n.get("selectedMode"),h=n.get("triggerEvent"),d=[];i.eachRawSeries(function(p){!p.get("legendHoverLink")&&d.push(p.id)}),KT(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` -`)){var _=new Xg;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var b=S.getData(),C=b.getVisual("legendLineStyle")||{},M=b.getVisual("legendIcon"),A=b.getVisual("style"),D=this._createItem(S,y,g,p,n,r,C,A,M,f,a);D.on("click",Ku(mz,y,null,a,d)).on("mouseover",Ku(QT,S.name,null,a,d)).on("mouseout",Ku(JT,S.name,null,a,d)),i.ssr&&D.eachChild(function(E){var k=Le(E);k.seriesIndex=S.seriesIndex,k.dataIndex=g,k.ssrType="legend"}),h&&D.eachChild(function(E){m.packEventData(E,n,S,g,y)}),c.set(y,!0)}else i.eachRawSeries(function(E){var k=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"),j=I.getItemVisual(z,"legendIcon"),G=Zr(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:ii(G,"rgba")}));var F=this._createItem(E,y,g,p,n,r,{},O,j,f,a);F.on("click",Ku(mz,null,y,a,d)).on("mouseover",Ku(QT,null,y,a,d)).on("mouseout",Ku(JT,null,y,a,d)),i.ssr&&F.eachChild(function(U){var V=Le(U);V.seriesIndex=E.seriesIndex,V.dataIndex=g,V.ssrType="legend"}),h&&F.eachChild(function(U){k.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();KT(r,function(u){var c=u.type,f=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(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);vr(f,{normal:h,emphasis:d},{defaultText:u.title}),us(f)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,c,f,h){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 b=Mpe(c,a,l,u,d,m,h),C=new Xg,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:_}));else{var A=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(Ape({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:b.itemStyle,symbolKeepAspect:_}))}var D=s==="left"?p+5:-5,E=s,k=o.get("formatter"),I=n;se(k)&&k?I=k.replace("{name}",n??""):me(k)&&(I=k(n));var z=m?M.getTextColor():a.get("inactiveColor");C.add(new Xe({style:vt(M,{text:I,x:D,y:g/2,fill:z,align:E,verticalAlign:"middle"},{inheritColor:z})}));var O=new Be({shape:C.getBoundingRect(),style:{fill:"transparent"}}),j=a.getModel("tooltip");return j.get("show")&&xo({el:O,componentModel:o,itemName:n,itemTooltipOption:j.option}),C.add(O),C.eachChild(function(G){G.silent=!0}),O.silent=!f,this.getContentGroup().add(C),us(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();zl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){zl("horizontal",u,r.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.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:f[g]+=h[m]+p,d[1-g]+=c[y]/2-h[y]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var S={x:0,y:0};return S[m]=c[m]+p+h[m],S[y]=Math.max(c[y],h[y]),S[_]=Math.min(0,h[_]+d[1-g]),S}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(gt);function Mpe(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),KT(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",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:tf(f,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 h=e.getModel("lineStyle"),d=h.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=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Ape(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 mz(t,e,r,n){JT(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),QT(t,e,r,n)}function e8(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 b=r.get("pageButtonPosition",!0);b==="end"?_[a]+=i[o]-p[o]:y[a]+=p[o]+S}_[1-a]+=d[s]/2-p[s]/2,c.setPosition(m),f.setPosition(y),h.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]),f.__rectSize=i[o],g){var M={x:0,y:0};M[o]=Math.max(i[o]-p[o]-S,0),M[s]=C[s],f.setClipPath(new Be({shape:M})),f.__rectSize=M[o]}else h.eachChild(function(D){D.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 f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=h?"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=FS[o],l=GS[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=b(f);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,S=null;m<=h;++m)S=b(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=b(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 b(M){if(M){var A=M.getBoundingRect(),D=A[l]+M[l];return{s:D,e:D+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}(JH);function Ipe(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 Epe(t){Oe(t8),t.registerComponentModel(Dpe),t.registerComponentView(kpe),Ipe(t)}function Npe(t){Oe(t8),Oe(Epe)}var Rpe=function(t){$(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(Sv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Sv),WA=Fe();function Ope(t,e,r){WA(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function zpe(t,e){for(var r=WA(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 Gpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=WA(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=de());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=BH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,Bpe(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){r8(i,a);return}var c=Fpe(l,a,r);o.enable(c.controlType,c.opt),Lf(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Hpe=function(t){$(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(),Ope(i,r,{pan:le(HS.pan,this),zoom:le(HS.zoom,this),scrollMove:le(HS.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){zpe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(OA),HS={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=WS[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:Sz(function(t,e,r,n,i,a){var o=WS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:Sz(function(t,e,r,n,i,a){var o=WS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function Sz(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 WS={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 n8(t){zA(t),t.registerComponentModel(Rpe),t.registerComponentView(Hpe),Gpe(t)}var Wpe=function(t){$(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(Sv.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}(Sv),Eh=Be,Upe=1,US=30,Zpe=7,Nh="horizontal",wz="vertical",$pe=5,Ype=["line","bar","candlestick","scatter"],Xpe={easing:"cubicOut",duration:100,delay:0},qpe=function(t){$(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),Lf(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(){ov(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?Zpe:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Nh?{right:o.width-s.x-s.width,top:o.height-US-l-a,width:s.width,height:US}:{right:l,top:s.y,width:US,height:s.height},c=fu(r.option);R(["right","top","width","height"],function(h){c[h]==="ph"&&(c[h]=u[h])});var f=wt(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===wz&&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===Nh&&!o?{scaleY:l?1:-1,scaleX:1}:i===Nh&&o?{scaleY:l?1:-1,scaleX:-1}:i===wz&&!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 Eh({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Eh({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 f=o.getDataExtent(r.thisDim),h=o.getDataExtent(l),d=(h[1]-h[0])*.3;h=[h[0]-d,h[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]/(f[1]-f[0]),b=r.thisAxis.type==="time",C=-_,M=Math.round(o.count()/n[0]),A;o.each([r.thisDim,l],function(z,O,j){if(M>0&&j%M){b||(C+=_);return}C=b?(+z-f[0])*S:C+_;var G=O==null||isNaN(O)||O==="",F=G?0:nt(O,h,p,!0);G&&!A&&j?(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 D=this.dataZoomModel;function E(z){var O=D.getModel(z?"selectedDataBackground":"dataBackground"),j=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 j.add(G),j.add(F),j}for(var k=0;k<3;k++){var I=E(k===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(Ype,u.get("type"))<0)){var c=a.getComponent(Xo(o),s).axis,f=Kpe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var p=u.getData().mapDimension(o);i={thisAxis:c,series:u,thisDim:p,otherDim:f,otherAxisInverse:h}}},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,f=l.get("brushSelect"),h=n.filler=new Eh({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Eh({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:Upe,fill:q.color.transparent}})),R([0,1],function(S){var b=l.get("handleIcon");!Ay[b]&&b.indexOf("path://")<0&&b.indexOf("image://")<0&&(b="path://"+b);var C=Ut(b,-1,0,2,2,null,!0);C.attr({cursor:Qpe(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(),us(C);var D=l.get("handleColor");D!=null&&(C.style.fill=D),o.add(i[S]=C);var E=l.getModel("textStyle"),k=l.get("handleLabel")||{},I=k.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=h;if(f){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=Dn([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=Dn(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=Dn([nt(l[0],o,s,!0),nt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(uo(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 Eh({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),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?Xpe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=BH(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}(OA);function Kpe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Qpe(t){return t==="vertical"?"ns-resize":"ew-resize"}function i8(t){t.registerComponentModel(Wpe),t.registerComponentView(qpe),zA(t)}function Jpe(t){Oe(n8),Oe(i8)}var a8={get:function(t,e,r){var n=ye((ege[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},ege={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]}},bz=dr.mapVisual,tge=dr.eachVisual,rge=ee,Tz=R,nge=Dn,ige=nt,l0=function(t){$(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&&YH(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=$T(this.option.controller,n,r),this.targetVisuals=$T(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=mf(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?[f(r[0]),f(r[1])]:f(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 f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=nge([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(f){rge(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:r.get("gradientColor")}}function u(f,h,d){var p=f[h],g=f[d];p&&!g&&(g=f[d]={},Tz(p,function(m,y){if(dr.isValidType(y)){var _=a8.get(y,"inactive",s);_!=null&&(g[y]=_,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";Tz(this.stateList,function(y){var _=this.itemSize,S=f[y];S||(S=f[y]={color:s?p:[p]}),S.symbol==null&&(S.symbol=h&&ye(h)||(s?m:[m])),S.symbolSize==null&&(S.symbolSize=d&&ye(d)||(s?_[0]:[_[0],_[0]])),S.symbol=bz(S.symbol,function(M){return M==="none"?m:M});var b=S.symbolSize;if(b!=null){var C=-1/0;tge(b,function(M){M>C&&(C=M)}),S.symbolSize=bz(b,function(M){return ige(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}(je),Cz=[20,140],age=function(t){$(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]=Cz[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=Cz[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=Dn((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=Mz(this,"outOfRange",this.getExtent()),i=Mz(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);oge([0,1],function(f){var h=o[f];h.setStyle("fill",n.handlesColor[f]),h.y=r[f];var d=ta(r[f],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");h.scaleX=h.scaleY=p/l[0],h.x=l[0]-p/2;var g=Ii(i.handleLabelPoints[f],cs(h,this.group));if(this._orient==="horizontal"){var m=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=m}s[f].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[f]),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,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",h),p=this.getControllerVisual(r,"symbolSize"),g=ta(r,s,u,!0),m=l[0]-p/2,y={x:f.x,y:f.y};f.y=g,f.x=m;var _=Ii(c.indicatorLabelPoint,cs(f,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var b=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?b:"middle",align:M?"center":b});var A={x:m,y:g,style:{fill:d}},D={style:{x:_[0],y:_[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var E={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(A,E),S.animateTo(D,E)}else f.attr(A),S.attr(D);this._firstShowIndicator=!1;var k=this._shapes.handleLabels;if(k)for(var I=0;Io[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||Dz(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=HX(h,d);this._dispatchHighDown("downplay",Lm(p[0],i)),this._dispatchHighDown("highlight",Lm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Pl(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 vge(t,e,r,n){for(var i=e.targetVisuals[n],a=dr.prepareVisualTypes(i),o={color:Wv(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(fge,hge),R(dge,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(pge))}function u8(t){t.registerComponentModel(age),t.registerComponentView(uge),l8(t)}var gge=function(t){$(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=[],mge[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]=a8.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,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=r(h,f);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 f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Ds(l0.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}(l0),mge={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 Nz(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var yge=function(t){$(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=wr(n.get("showLabel",!0),!u),f=!n.get("selectedMode");u&&this._renderEndsText(r,u[0],s,c,o),R(l.viewPieceList,function(h){var d=h.piece,p=new _e;p.onclick=le(this._onItemClick,this,d),this._enableHoverLink(p,h.indexInModelPieceList);var g=n.getRepresentValue(d);if(this._createItemSymbol(p,g,[0,0,s[0],s[1]],f),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:f}))}r.add(p)},this),u&&this._renderEndsText(r,u[1],s,c,o),zl(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:Lm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return s8(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}(o8);function c8(t){t.registerComponentModel(gge),t.registerComponentView(yge),l8(t)}function _ge(t){Oe(u8),Oe(c8)}var xge=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:NV(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}(),Sge=function(t){$(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 xge(this);if(this._target=null,this.ecModel.eachSeries(function(i){aR(i,null)}),this.shouldShow()){var n=this.getTarget();aR(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}(je),wge=function(t){$(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 gu),!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=wt(ej(r,!0),l),c=s.lineWidth||0,f=this._contentRect=Ql(u.clone(),c/2,!0,!0),h=new _e;a.add(h),h.setClipPath(new Be({shape:f.plain()}));var d=this._targetGroup=new _e;h.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);h.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(),Oz(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),Oz(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=wt({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=ui([],r.targetTrans),i=Di([],this._coordSys.transform,n);this._transThisToTarget=ui([],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 pu(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(Rz(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(Rz(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 Rz(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 Oz(t,e){var r=Jl(t);q0(e.group,r.z,r.zlevel)}function bge(t){t.registerComponentModel(Sge),t.registerComponentView(wge)}var Tge={label:{enabled:!0},decal:{show:!1}},zz=Fe(),Cge={};function Mge(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(Tge);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 f=de();t.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),zz(h).scope=d}}),t.eachRawSeries(function(h){if(t.isSeriesFiltered(h))return;if(me(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var _=Vb(h.ecModel,h.name,Cge,t.getSeriesCount()),S=d.getVisual("decal");d.setVisual("decal",b(S,_))}else{var p=h.getRawData(),g={},m=zz(h).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+"",D=Vb(h.ecModel,A,m,y),E=d.getItemVisual(M,"decal");d.setItemVisual(M,"decal",b(E,D))})}function b(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"),f=r.getModel("label");if(f.option=Se(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=t.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),m;if(!(h<1)){var y=s();if(y){var _=f.get(["general","withTitle"]);m=o(_,{title:y})}else m=f.get(["general","withoutTitle"]);var S=[],b=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);m+=o(b,{seriesCount:h}),t.eachSeries(function(D,E){if(E1?f.get(["series","multiple",z]):f.get(["series","single",z]),k=o(k,{seriesId:D.seriesIndex,seriesName:D.get("name"),seriesType:l(D.subType)});var O=D.getData();if(O.count()>d){var j=f.get(["data","partialData"]);k+=o(j,{displayCnt:d})}else k+=f.get(["data","allData"]);for(var G=f.get(["data","separator","middle"]),F=f.get(["data","separator","end"]),U=f.get(["data","excludeDimensionId"]),V=[],W=0;W":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Pge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):i4(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}(),Dge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),kge=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[O,j]}function c(O,j,G,F){Cc(O,G)&&Cc(j,F)||i.push(O,j,G,F,G,F)}function f(O,j,G,F,U,V){var W=Math.abs(j-O),H=Math.tan(W/4)*4/3,X=jD:I2&&n.push(i),n}function tC(t,e,r,n,i,a,o,s,l,u){if(Cc(t,r)&&Cc(e,n)&&Cc(i,o)&&Cc(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-t,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=r-t,m=n-e,y=i-o,_=a-s,S=g*g+m*m,b=y*y+_*_;if(S=0&&D=0){l.push(o,s);return}var E=[],k=[];ys(t,r,i,o,.5,E),ys(e,n,a,s,.5,k),tC(E[0],k[0],E[1],k[1],E[2],k[2],E[3],k[3],l,u),tC(E[4],k[4],E[5],k[5],E[6],k[6],E[7],k[7],l,u)}function Uge(t,e){var r=eC(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=h8([l,u],c?0:1,e),h=(c?s:u)/f.length,d=0;di,o=h8([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=t[s]/o.length,h=0;h1?null:new Te(g*l+t,g*u+e)}function Yge(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 Ju(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function Xge(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),Xge(e,u,c)}function u0(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);u0(t,a[0],i,n),u0(t,a[1],r-i,n)}return n}function qge(t,e){for(var r=[],n=0;n0;u/=2){var c=0,f=0;(t&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function h0(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),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),r=Math.min(f,r),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=re(a,function(s,l){return{cp:s,z:ame(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 p8(t){return Jge(t.path,t.count)}function rC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function ome(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 lme={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;Zz(t)&&(u=t,c=e),Zz(e)&&(u=e,c=t);function f(y,_,S,b,C){var M=y.many,A=y.one;if(M.length===1&&!C){var D=_?M[0]:A,E=_?A:M[0];if(c0(D))f({many:[D],one:E},!0,S,b,!0);else{var k=s?Se({delay:s(S,b)},l):l;ZA(D,E,k),a(D,E,D,E,k)}}else for(var I=Se({dividePath:lme[r],individualDelay:s&&function(U,V,W,H){return s(U+S,b)}},l),z=_?ome(M,A,I):sme(A,M,I),O=z.fromIndividuals,j=z.toIndividuals,G=O.length,F=0;Fe.length,d=u?$z(c,u):$z(h?e:t,[h?t:e]),p=0,g=0;gg8))for(var a=n.getIndices(),o=0;o0&&M.group.traverse(function(D){D instanceof Ue&&!D.animators.length&&D.animateFrom({style:{opacity:0}},A)})})}function Qz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function Jz(t){return ee(t)?t.sort().join(","):t}function zo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function pme(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=Qz(a),c=Jz(u);n.set(c,{dataGroupId:s,data:l}),ee(u)&&R(u,function(f){i.set(f,{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=Qz(a),u=Jz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:zo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:zo(s),data:s}]});else if(ee(l)){var f=[];R(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:zo(g.data),data:g.data})}),f.length&&r.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:zo(s)}]})}else{var h=i.get(l);if(h){var d=r.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:zo(h.data)}],newSeries:[]},r.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:zo(s)})}}}}),r}function e5(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:zo(e.oldData[s]),groupIdDim:o.dimension})}),R(pt(t.to),function(o){var s=e5(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:zo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&m8(i,a,n)}function mme(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=t5,n=r5,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 _me(){return new yme}var t5=0,r5=0;function xme(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=$A(s,e);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(c&&f))if(c||f){var d=c?"S":"E";a[d][l.type].has=!0,a[d][l.type].span=h,a[d][l.type].inExtFrac=h/(s.vmax-s.vmin),a[d][l.type].val=l.val}else n[l.type].span+=h,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 Sme(t,e,r,n,i,a){t!=="no"&&R(r,function(o){var s=$A(o,a);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],c=n(u),f=i*3/4;c>s.vmin-f&&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 f=e(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}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 h=s.vmax;s.vmax=s.vmin,s.vmin=h}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 YA(t,e){return iC(e)===iC(t)}function iC(t){return t.start+"_\0_"+t.end}function bme(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=As(n,function(u){return YA(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 Tme(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=As(r,function(f){return YA(f.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 Cme(t,e,r){var n={noNegative:!0},i=nC(t,r,n),a=nC(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 Mme={vmin:"start",vmax:"end"};function Ame(t,e){return e&&(t=t||{},t.break={type:Mme[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function Lme(){qK({createScaleBreakContext:_me,pruneTicksByBreak:Sme,addBreaksToTicks:wme,parseAxisBreakOption:nC,identifyAxisBreak:YA,serializeAxisBreakIdentifier:iC,retrieveAxisBreakPairs:bme,getTicksLogTransformBreak:Tme,logarithmicParseBreaksFromOption:Cme,makeAxisLabelFormatterParamBreak:Ame})}var n5=Fe();function Pme(t,e){var r=As(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function Dme(t){R(t,function(e){return e.shouldRemove=!0})}function kme(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Ime(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 f=s.get("expandOnClick"),h=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}),b=a.isHorizontal(),C=n5(e).visualList||(n5(e).visualList=[]);Dme(C);for(var M=function(E){var k=o[E][0].break.parsedBreak,I=[];I[0]=a.toGlobalCoord(a.dataToCoord(k.vmin,!0)),I[1]=a.toGlobalCoord(a.dataToCoord(k.vmax,!0)),I[1]=V;ve&&(ne=V);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,f=0;f=0?l[0].width:l[1].width),h=(f+c.x)/2-u.x,d=Math.min(h,h-c.x),p=Math.max(h,h-c.x),g=p<0?p:d>0?d:0;s=(h-g)/c.x}var m=new Te,y=new Te;Te.scale(m,n,-s),Te.scale(y,n,1-s),aT(r[0],m),aT(r[1],y)}function Rme(t,e){var r={breaks:[]};return R(e.breaks,function(n){if(n){var i=As(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===s_?!0:a===BG?!1:a===VG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function Ome(){kie({adjustBreakLabelPair:Nme,buildAxisBreakLine:Eme,rectCoordBuildBreakAxis:Ime,updateModelAxisBreak:Rme})}function zme(t){zie(t),Lme(),Ome()}function Bme(){iae(Vme)}function Vme(t,e){R(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=jme(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 jme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof rf?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=kf(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 nye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function iye(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function aye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=Y.useRef(null),[a,o]=Y.useState("connected"),s=Y.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=Y.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>o5.includes(y.role))),m},[t,a,s]),u=Y.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=Y.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),f=Y.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]),h=Y.useMemo(()=>{const m=l.map(_=>{const S=nye(_.latitude),b=a5[S%a5.length],C=o5.includes(_.role),M=_.node_num===r,A=f.has(_.node_num),D=r===null||M||A;return{id:String(_.node_num),name:_.short_name,value:_.node_num,symbolSize:iye(_.role),itemStyle:{color:C?b:"#111827",borderColor:b,borderWidth:C?0:2,opacity:D?1:.15},label:{show:!0,position:"bottom",distance:5,fontSize:10,fontFamily:"JetBrains Mono, monospace",color:D?"#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:rye(_.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,f]),d=Y.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:h.nodes,links:h.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"]}]}),[h]),p=Y.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=Y.useMemo(()=>({click:p}),[p]);return Y.useEffect(()=>{var y;const m=(y=i.current)==null?void 0:y.getEchartsInstance();m&&m.setOption(d,{notMerge:!1,lazyUpdate:!0})},[d]),T.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[T.jsx(tye,{ref:i,option:d,style:{height:"540px",width:"100%"},onEvents:g,opts:{renderer:"canvas"}}),T.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:[T.jsx(c2,{size:14,className:"text-slate-500"}),T.jsx("div",{className:"flex gap-1",children:[{key:"connected",label:"Connected"},{key:"infra",label:"Infra"},{key:"all",label:"All"}].map(({key:m,label:y})=>T.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))}),T.jsxs("span",{className:"text-xs text-slate-500 ml-2",children:[l.length," nodes • ",c.length," edges"]})]}),T.jsxs("div",{className:"absolute bottom-4 left-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[T.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Edge Quality (SNR)"}),T.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=>T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-4 h-0.5",style:{backgroundColor:m.color}}),T.jsx("span",{className:"text-xs text-slate-500",children:m.label})]},m.label))})]}),T.jsxs("div",{className:"absolute bottom-4 right-4 bg-bg-card/90 backdrop-blur-sm border border-border rounded p-3",children:[T.jsx("div",{className:"text-xs text-slate-400 font-medium mb-2",children:"Node Type"}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-500"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Infrastructure"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:"w-3 h-3 rounded-full bg-gray-900 border-2 border-blue-500"}),T.jsx("span",{className:"text-xs text-slate-500",children:"Client"})]})]})]})]})}function x8(t,e){const r=Y.useRef(e);Y.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 oye(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const sye=1;function lye(t){return Object.freeze({__version:sye,map:t})}function S8(t,e){return Object.freeze({...t,...e})}const w8=Y.createContext(null),b8=w8.Provider;function __(){const t=Y.useContext(w8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function uye(t){function e(r,n){const{instance:i,context:a}=t(r).current;return Y.useImperativeHandle(n,()=>i),r.children==null?null:Bc.createElement(b8,{value:a},r.children)}return Y.forwardRef(e)}function cye(t){function e(r,n){const[i,a]=Y.useState(!1),{instance:o}=t(r,a).current;Y.useImperativeHandle(n,()=>o),Y.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?M3.createPortal(r.children,s):null}return Y.forwardRef(e)}function fye(t){function e(r,n){const{instance:i}=t(r).current;return Y.useImperativeHandle(n,()=>i),null}return Y.forwardRef(e)}function QA(t,e){const r=Y.useRef();Y.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 x_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function hye(t,e){return function(n,i){const a=__(),o=t(x_(n,a),a);return x8(a.map,n.attribution),QA(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var sC={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=kf([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 S1;y.marker=_.makeTooltipMarker("item",eu(y.color),d);var S=gI(u.formatTooltip(c,!1,h)),T=g.get("order"),C=g.get("valueFormatter"),M=S.frag,A=M?bI(C?J({valueFormatter:C},M):M,_,d,T,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=Zr(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=kf(h,this._tooltipModel,d?{position:d}:null),g=p.get("content"),m=Math.random()+"",y=new S1;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=Uv(y.axisValue,d,m)),d=hM(d,i,!0)}else if(me(f)){var S=le(function(T,C){T===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=Lve(n,p,h,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=Mve(i,a,o,u,c,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=t5(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=t5(d)?h[1]/2:d==="bottom"?h[1]:0),UH(r)){var y=Ave(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[_],T=a[_];S&&T&&T.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()||(sv(this,"_updatePosition"),this._tooltipContent.dispose(),GT("itemTooltip",n))},e.type="tooltip",e}(mt);function kf(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 e5(t,e){return t.dispatchAction||le(e.dispatchAction,e)}function Mve(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 Ave(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 Lve(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 t5(t){return t==="center"||t==="middle"}function Pve(t,e,r){var n=E2(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=gh(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 kve(t){ze(ep),t.registerComponentModel(fve),t.registerComponentView(Cve),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Rt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Rt)}var Dve=["rect","polygon","keep","clear"];function Ive(t,e){var r=gt(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),Eve(s),e&&!s.length&&s.push.apply(s,Dve)}}function Eve(t){var e={};R(t,function(r){e[r]=1}),t.length=0,R(e,function(r,n){t.push(n)})}var r5=R;function n5(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function KT(t,e,r){var n={};return r5(e,function(a){var o=n[a]=i();r5(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 XH(t,e,r){var n;R(r,function(i){e.hasOwnProperty(i)&&n5(e[i])&&(n=!0)}),n&&R(r,function(i){e.hasOwnProperty(i)&&n5(e[i])?t[i]=ye(e[i]):delete t[i]})}function Nve(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 SM(r,s,h)}function u(h,f){ZV(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 Rve(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 SM(s,h,C)}function c(C,M){ZV(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&&l5(e)}};function l5(t){return new Ce(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Gve=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 dA(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){qH(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}(mt),Hve=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&&XH(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 u5(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=u5(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 u5(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 Wve=["rect","polygon","lineX","lineY","keep","clear"],Uve=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:Wve.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}(ti);function Zve(t){t.registerComponentView(Gve),t.registerComponentModel(Hve),t.registerPreprocessor(Ive),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,zve),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),oc("brush",Uve)}var $ve=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),Yve=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:pt(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=r.get("subtext"),d=new Xe({style:pt(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(){Ay(p,"_"+r.get("target"))}),g&&d.on("click",function(){Ay(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),T=bt(_,S.refContainer,r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?T.x+=T.width:l==="center"&&(T.x+=T.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?T.y+=T.height:u==="middle"&&(T.y+=T.height/2),u=u||"top"),a.x=T.x,a.y=T.y,a.markRedraw();var C={align:l,verticalAlign:u};c.setStyle(C),d.setStyle(C),y=a.getBoundingRect();var M=T.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}(mt);function Xve(t){t.registerComponentModel($ve),t.registerComponentView(Yve)}var c5=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(ph(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 Yr([{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),KH=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=ks(c5.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}(c5);Bt(KH,i_.prototype);var qve=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}(mt),Kve=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}(gi),GS=Math.PI,h5=Fe(),Qve=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=epe(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:GS/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*GS/180;var _,S,T,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&&(T=[D-p,0],D-=m)):(M&&(_=[D-p,0],D-=m),A&&(S=[0,0],E+=m),k&&(T=[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:T,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;zi(s,s,[-l,-u]),_o(s,s,-GS/2),zi(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(T){T.originX=c[0][0]-T.x,T.originY=c[1][0]-T.y}function _(T){return[[T.x,T.x+T.width],[T.y,T.y+T.height]]}function S(T,C,M,A,k){T[A]+=M[A][k]-C[A][k]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=Jve(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 Kve("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=f5(h,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=p.getItemStyle(),us(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:pt(d,{text:c.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=pt(p),y.ensureState("progress").style=pt(g),n.add(y),us(y),h5(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=Bi(pe(a.get(["controlStyle",p+"BtnSize"]),o),o),_=[0,-y/2,y,y],S=tpe(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),us(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),d5(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){d5(h,u._progressLine,s,i,a)}};this._currentPointer=f5(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=Dn(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(s[o]=+s[o].toFixed(p)),[s,d]}var Xg={min:Ie(Yg,"min"),max:Ie(Yg,"max"),average:Ie(Yg,"average"),median:Ie(Yg,"median")};function wv(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!spe(e)&&!ee(e.coord)&&ee(i)){var a=QH(e,r,n,t);if(e=ye(e),e.type&&Xg[e.type]&&a.baseAxis&&a.valueAxis){var o=Ee(i,a.baseAxis.dim),s=Ee(i,a.valueAxis.dim),l=Xg[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&&Xg[e.type]){var c=n.getOtherAxis(u);c&&(e.value=l0(r,r.mapDimension(c.dim),e.type))}}else for(var h=e.coord,f=0;f<2;f++)Xg[h[f]]&&(h[f]=l0(r,r.mapDimension(i[f]),h[f]));return e}}function QH(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(lpe(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 lpe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function Tv(t,e){return t&&t.containData&&e.coord&&!JT(e)?t.containData(e.coord):!0}function upe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!JT(e)&&!JT(r)?t.containZone(e.coord,r.coord):!0}function JH(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return fs(o,e[a])}:function(r,n,i,a){return fs(r.value,e[a])}}function l0(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 HS=Fe(),ZA=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){HS(s).keep=!1}),n.eachSeries(function(s){var l=Aa.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!HS(s).keep&&a.group.remove(s.group)}),cpe(n,o,this.type)},e.prototype.markKeep=function(r){HS(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;R(r,function(a){var o=Aa.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?vj(l):F2(l))})}})},e.type="marker",e}(mt);function cpe(t,e,r){t.eachSeries(function(n){var i=Aa.getMarkerModelFromSeries(n,r),a=e.get(n.id);if(i&&a&&a.group){var o=Jl(i),s=o.z,l=o.zlevel;e_(a.group,s,l)}})}function p5(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 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.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=Aa.getMarkerModelFromSeries(a,"markPoint");o&&(p5(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=fpe(o,r,n);n.setData(h),p5(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),T=n.getDataParams(f);me(p)&&(p=p(S,T)),me(g)&&(g=g(S,T)),me(m)&&(m=m(S,T)),me(y)&&(y=y(S,T))}var C=d.getModel("itemStyle").getItemStyle(),M=d.get("z2"),A=$v(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}(ZA);function fpe(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 Yr(n,r),a=re(r.get("data"),Ie(wv,e));t&&(a=tt(a,Ie(Tv,t)));var o=JH(!!t,n);return i.initData(a,null,o),i}function dpe(t){t.registerComponentModel(ope),t.registerComponentView(hpe),t.registerPreprocessor(function(e){UA(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var vpe=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}(Aa),qg=Fe(),ppe=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=QH(n,i,e,t);s=u.valueAxis;var c=NM(i,u.valueDataDim);l=l0(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=[wv(t,a[0]),wv(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 u0(t){return!isNaN(t)&&!isFinite(t)}function g5(t,e,r,n){var i=1-t,a=n.dimensions[t];return u0(e[i])&&u0(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function gpe(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(g5(1,r,n,t)||g5(0,r,n,t)))return!0}return Tv(t,e[0])&&Tv(t,e[1])}function WS(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(xs(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;u0(t.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):u0(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 mpe=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=Aa.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=qg(o).from,u=qg(o).to;l.each(function(c){WS(l,c,!0,a,i),WS(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 hA);this.group.add(c.group);var h=ype(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(T){S(f,T,!0),S(d,T,!1)}),p.each(function(T){var C=p.getItemModel(T),M=C.getModel("lineStyle").getLineStyle();p.setItemLayout(T,[f.getItemLayout(T),d.getItemLayout(T)]);var A=C.get("z2");M.stroke==null&&(M.stroke=f.getItemVisual(T,"style").fill),p.setItemVisual(T,{z2:pe(A,0),fromSymbolKeepAspect:f.getItemVisual(T,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(T,"symbolOffset"),fromSymbolRotate:f.getItemVisual(T,"symbolRotate"),fromSymbolSize:f.getItemVisual(T,"symbolSize"),fromSymbol:f.getItemVisual(T,"symbol"),toSymbolKeepAspect:d.getItemVisual(T,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(T,"symbolOffset"),toSymbolRotate:d.getItemVisual(T,"symbolRotate"),toSymbolSize:d.getItemVisual(T,"symbolSize"),toSymbol:d.getItemVisual(T,"symbol"),style:M})}),c.updateData(p),h.line.eachItemGraphicEl(function(T){Le(T).dataModel=n,T.traverse(function(C){Le(C).dataModel=n})});function S(T,C,M){var A=T.getItemModel(C);WS(T,C,M,r,a);var k=A.getModel("itemStyle").getItemStyle();k.fill==null&&(k.fill=$v(l,"color")),T.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}(ZA);function ype(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 Yr(n,r),a=new Yr(n,r),o=new Yr([],r),s=re(r.get("data"),Ie(ppe,e,t,r));t&&(s=tt(s,Ie(gpe,t)));var l=JH(!!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 _pe(t){t.registerComponentModel(vpe),t.registerComponentView(mpe),t.registerPreprocessor(function(e){UA(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var xpe=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}(Aa),Kg=Fe(),Spe=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=wv(t,i),s=wv(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=z0([{},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 c0(t){return!isNaN(t)&&!isFinite(t)}function m5(t,e,r,n){var i=1-t;return c0(e[i])&&c0(r[i])}function bpe(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 xs(t,"cartesian2d")?r&&n&&(m5(1,r,n)||m5(0,r,n))?!0:upe(t,i,a):Tv(t,i)||Tv(t,a)}function y5(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(xs(a,"cartesian2d")){var _=a.getAxis("x"),S=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);c0(g)?s[0]=_.toGlobalCoord(_.getExtent()[r[0]==="x0"?0:1]):c0(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 _5=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],wpe=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=Aa.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=re(_5,function(h){return y5(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=Tpe(o,r,n);n.setData(h),h.each(function(f){var d=re(_5,function(D){return y5(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))];Dn(_),Dn(S);var T=!(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),Ku=Ie,tC=R,Qg=_e,e8=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 Qg),this.group.add(this._selectorGroup=new Qg),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=GH(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)}),tC(n.getData(),function(p,g){var m=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` +`)){var _=new Qg;_.newline=!0,u.add(_);return}var S=i.getSeriesByName(y)[0];if(!c.get(y))if(S){var T=S.getData(),C=T.getVisual("legendLineStyle")||{},M=T.getVisual("legendIcon"),A=T.getVisual("style"),k=this._createItem(S,y,g,p,n,r,C,A,M,h,a);k.on("click",Ku(x5,y,null,a,d)).on("mouseover",Ku(rC,S.name,null,a,d)).on("mouseout",Ku(nC,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=$r(O.fill);G&&G[3]===0&&(G[3]=.2,O=J(J({},O),{fill:oi(G,"rgba")}));var F=this._createItem(E,y,g,p,n,r,{},O,V,h,a);F.on("click",Ku(x5,null,y,a,d)).on("mouseover",Ku(rC,null,y,a,d)).on("mouseout",Ku(nC,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();tC(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}),us(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 T=Ape(c,a,l,u,d,m,f),C=new Qg,M=a.getModel("textStyle");if(me(r.getLegendIcon)&&(!S||S==="inherit"))C.add(r.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:y,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:_}));else{var A=S==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;C.add(Lpe({itemWidth:p,itemHeight:g,icon:c,iconRotate:A,itemStyle:T.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:pt(M,{text:I,x:k,y:g/2,fill:z,align:E,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),us(C),C.__legendDataIndex=i,C},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();zl(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){zl("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}(mt);function Ape(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),tC(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:th(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 Lpe(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 x5(t,e,r,n){nC(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),rC(t,e,r,n)}function t8(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 T=r.get("pageButtonPosition",!0);T==="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 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=US[o],l=ZS[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=T(h);p.contentPosition[o]=-g.s;for(var m=u+1,y=g,_=g,S=null;m<=f;++m)S=T(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=T(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 T(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}(e8);function Epe(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 Npe(t){ze(r8),t.registerComponentModel(Dpe),t.registerComponentView(Ipe),Epe(t)}function Rpe(t){ze(r8),ze(Npe)}var Ope=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=ks(bv.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(bv),$A=Fe();function zpe(t,e,r){$A(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function Bpe(t,e){for(var r=$A(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 Hpe(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=$A(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=de());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=jH(a);R(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,jpe(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){n8(i,a);return}var c=Gpe(l,a,r);o.enable(c.controlType,c.opt),Ah(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Wpe=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(),zpe(i,r,{pan:le($S.pan,this),zoom:le($S.zoom,this),scrollMove:le($S.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Bpe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(jA),$S={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=YS[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:T5(function(t,e,r,n,i,a){var o=YS[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:T5(function(t,e,r,n,i,a){var o=YS[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function T5(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 YS={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 i8(t){VA(t),t.registerComponentModel(Ope),t.registerComponentView(Wpe),Hpe(t)}var Upe=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=ks(bv.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}(bv),Ef=Be,Zpe=1,XS=30,$pe=7,Nf="horizontal",C5="vertical",Ype=5,Xpe=["line","bar","candlestick","scatter"],qpe={easing:"cubicOut",duration:100,delay:0},Kpe=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),Ah(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(){sv(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?$pe:0,o=sr(r,n).refContainer,s=this._findCoordRect(),l=r.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Nf?{right:o.width-s.x-s.width,top:o.height-XS-l-a,width:s.width,height:XS}:{right:l,top:s.y,width:XS,height:s.height},c=hu(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===C5&&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===Nf&&!o?{scaleY:l?1:-1,scaleX:1}:i===Nf&&o?{scaleY:l?1:-1,scaleX:-1}:i===C5&&!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 Ef({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new Ef({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]),T=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){T||(C+=_);return}C=T?(+z-h[0])*S:C+_;var G=O==null||isNaN(O)||O==="",F=G?0:it(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 zr({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(Xpe,u.get("type"))<0)){var c=a.getComponent(qo(o),s).axis,h=Qpe(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 Ef({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new Ef({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:Zpe,fill:q.color.transparent}})),R([0,1],function(S){var T=l.get("handleIcon");!ky[T]&&T.indexOf("path://")<0&&T.indexOf("image://")<0&&(T="path://"+T);var C=Ut(T,-1,0,2,2,null,!0);C.attr({cursor:Jpe(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(),us(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:pt(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 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=[it(r[0],[0,100],n,!0),it(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?it(s.minSpan,l,o,!0):null,s.maxSpan!=null?it(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Dn([it(a[0],o,l,!0),it(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=Dn(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?it(u.minSpan,s,o,!0):null,u.maxSpan!=null?it(u.maxSpan,s,o,!0):null),this._range=Dn([it(l[0],o,s,!0),it(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(co(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 Ef({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?qpe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=jH(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}(jA);function Qpe(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function Jpe(t){return t==="vertical"?"ns-resize":"ew-resize"}function a8(t){t.registerComponentModel(Upe),t.registerComponentView(Kpe),VA(t)}function ege(t){ze(i8),ze(a8)}var o8={get:function(t,e,r){var n=ye((tge[t]||{})[e]);return r&&ee(n)?n[n.length-1]:n}},tge={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]}},M5=dr.mapVisual,rge=dr.eachVisual,nge=ee,A5=R,ige=Dn,age=it,h0=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&&XH(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=KT(this.option.controller,n,r),this.targetVisuals=KT(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=gh(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=ige([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){nge(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]={},A5(p,function(m,y){if(dr.isValidType(y)){var _=o8.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";A5(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=M5(S.symbol,function(M){return M==="none"?m:M});var T=S.symbolSize;if(T!=null){var C=-1/0;rge(T,function(M){M>C&&(C=M)}),S.symbolSize=M5(T,function(M){return age(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),L5=[20,140],oge=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]=L5[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=L5[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=Dn((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=P5(this,"outOfRange",this.getExtent()),i=P5(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);sge([0,1],function(h){var f=o[h];f.setStyle("fill",n.handlesColor[h]),f.y=r[h];var d=na(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],cs(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=na(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,cs(h,this.group)),S=c.indicatorLabel;S.attr("invisible",!1);var T=this._applyTransform("left",c.mainGroup),C=this._orient,M=C==="horizontal";S.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:M?T:"middle",align:M?"center":T});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||E5(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=WX(f,d);this._dispatchHighDown("downplay",Dm(p[0],i)),this._dispatchHighDown("highlight",Dm(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Pl(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 pge(t,e,r,n){for(var i=e.targetVisuals[n],a=dr.prepareVisualTypes(i),o={color:$v(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(fge,dge),R(vge,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(gge))}function c8(t){t.registerComponentModel(oge),t.registerComponentView(cge),u8(t)}var mge=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=[],yge[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]=o8.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=ks(h0.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}(h0),yge={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 z5(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var _ge=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:pt(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),zl(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:Dm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return l8(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:pt(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}(s8);function h8(t){t.registerComponentModel(mge),t.registerComponentView(_ge),u8(t)}function xge(t){ze(c8),ze(h8)}var Sge=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:Rj(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}(),bge=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 Sge(this);if(this._target=null,this.ecModel.eachSeries(function(i){lR(i,null)}),this.shouldShow()){var n=this.getTarget();lR(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),wge=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 gu),!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(tV(r,!0),l),c=s.lineWidth||0,h=this._contentRect=Ql(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(),j5(r,this)},e.prototype.renderContent=function(r){this._bridgeRendered=r,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),j5(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=hi([],r.targetTrans),i=Ii([],this._coordSys.transform,n);this._transThisToTarget=hi([],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 pu(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(B5(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(B5(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}(mt);function B5(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 j5(t,e){var r=Jl(t);e_(e.group,r.z,r.zlevel)}function Tge(t){t.registerComponentModel(bge),t.registerComponentView(wge)}var Cge={label:{enabled:!0},decal:{show:!1}},V5=Fe(),Mge={};function Age(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ye(Cge);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)),V5(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 _=Hw(f.ecModel,f.name,Mge,t.getSeriesCount()),S=d.getVisual("decal");d.setVisual("decal",T(S,_))}else{var p=f.getRawData(),g={},m=V5(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=Hw(f.ecModel,A,m,y),E=d.getItemVisual(M,"decal");d.setItemVisual(M,"decal",T(E,k))})}function T(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=[],T=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(T,{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"},kge=function(){function t(e){var r=this._condVal=se(e)?new RegExp(e):a4(e)?e:null;if(r==null){var n="";at(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}(),Dge=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),Ige=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){Cc(O,G)&&Cc(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 aC(t,e,r,n,i,a,o,s,l,u){if(Cc(t,r)&&Cc(e,n)&&Cc(i,o)&&Cc(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,T=y*y+_*_;if(S=0&&k=0){l.push(o,s);return}var E=[],D=[];ys(t,r,i,o,.5,E),ys(e,n,a,s,.5,D),aC(E[0],D[0],E[1],D[1],E[2],D[2],E[3],D[3],l,u),aC(E[4],D[4],E[5],D[5],E[6],D[6],E[7],D[7],l,u)}function Zge(t,e){var r=iC(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),h=d8([l,u],c?0:1,e),f=(c?s:u)/h.length,d=0;di,o=d8([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 Xge(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 Ju(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function qge(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),qge(e,u,c)}function f0(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);f0(t,a[0],i,n),f0(t,a[1],r-i,n)}return n}function Kge(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 p0(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:ome(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 g8(t){return eme(t.path,t.count)}function oC(){return{fromIndividuals:[],toIndividuals:[],count:0}}function sme(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 ume={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;X5(t)&&(u=t,c=e),X5(e)&&(u=e,c=t);function h(y,_,S,T,C){var M=y.many,A=y.one;if(M.length===1&&!C){var k=_?M[0]:A,E=_?A:M[0];if(d0(k))h({many:[k],one:E},!0,S,T,!0);else{var D=s?Se({delay:s(S,T)},l):l;XA(k,E,D),a(k,E,k,E,D)}}else for(var I=Se({dividePath:ume[r],individualDelay:s&&function(U,j,W,H){return s(U+S,T)}},l),z=_?sme(M,A,I):lme(A,M,I),O=z.fromIndividuals,V=z.toIndividuals,G=O.length,F=0;Fe.length,d=u?q5(c,u):q5(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 tz(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function rz(t){return ee(t)?t.sort().join(","):t}function Bo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function gme(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=tz(a),c=rz(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=tz(a),u=rz(l),c=n.get(u);if(c)r.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Bo(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Bo(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:Bo(g.data),data:g.data})}),h.length&&r.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Bo(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:Bo(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Bo(s)})}}}}),r}function nz(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Bo(e.oldData[s]),groupIdDim:o.dimension})}),R(gt(t.to),function(o){var s=nz(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Bo(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&y8(i,a,n)}function yme(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){R(gt(n.seriesTransition),function(i){R(gt(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=iz,n=az,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 xme(){return new _me}var iz=0,az=0;function Sme(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=qA(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 bme(t,e,r,n,i,a){t!=="no"&&R(r,function(o){var s=qA(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=kn(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 KA(t,e){return lC(e)===lC(t)}function lC(t){return t.start+"_\0_"+t.end}function Tme(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=As(n,function(u){return KA(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 Cme(t,e,r,n){var i,a;if(t.break){var o=t.break.parsedBreak,s=As(r,function(h){return KA(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 Mme(t,e,r){var n={noNegative:!0},i=sC(t,r,n),a=sC(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 Ame={vmin:"start",vmax:"end"};function Lme(t,e){return e&&(t=t||{},t.break={type:Ame[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),t}function Pme(){KK({createScaleBreakContext:xme,pruneTicksByBreak:bme,addBreaksToTicks:wme,parseAxisBreakOption:sC,identifyAxisBreak:KA,serializeAxisBreakIdentifier:lC,retrieveAxisBreakPairs:Tme,getTicksLogTransformBreak:Cme,logarithmicParseBreaksFromOption:Mme,makeAxisLabelFormatterParamBreak:Lme})}var oz=Fe();function kme(t,e){var r=As(t,function(n){return Xt().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return r||t.push(r={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),r}function Dme(t){R(t,function(e){return e.shouldRemove=!0})}function Ime(t){for(var e=t.length-1;e>=0;e--)t[e].shouldRemove&&t.splice(e,1)}function Eme(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}),T=a.isHorizontal(),C=oz(e).visualList||(oz(e).visualList=[]);Dme(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),uT(r[0],m),uT(r[1],y)}function Ome(t,e){var r={breaks:[]};return R(e.breaks,function(n){if(n){var i=As(t.get("breaks",!0),function(s){return Xt().identifyAxisBreak(s,n)});if(i){var a=e.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===h_?!0:a===jG?!1:a===VG?!i.isExpanded:i.isExpanded,r.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),r}function zme(){Iie({adjustBreakLabelPair:Rme,buildAxisBreakLine:Nme,rectCoordBuildBreakAxis:Eme,updateModelAxisBreak:Ome})}function Bme(t){Bie(t),Pme(),zme()}function jme(){aae(Vme)}function Vme(t,e){R(t,function(r){if(!r.model.get(["axisLabel","inside"])){var n=Fme(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 Fme(t){var e=t.model,r=t.scale;if(!e.get(["axisLabel","show"])||r.isBlank())return;var n,i,a=r.getExtent();r instanceof rh?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=kh(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 iye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function aye(t){return t==="ROUTER"||t==="ROUTER_LATE"?30:t==="REPEATER"||t==="TRACKER"?25:t==="CLIENT_MUTE"?7:t==="CLIENT_BASE"?12:15}function oye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=$.useRef(null),[a,o]=$.useState("connected"),s=$.useMemo(()=>{const m=new Set;return e.forEach(y=>{m.add(y.from_node),m.add(y.to_node)}),m},[e]),l=$.useMemo(()=>{let m=t;return a==="connected"?m=m.filter(y=>s.has(y.node_num)):a==="infra"&&(m=m.filter(y=>uz.includes(y.role))),m},[t,a,s]),u=$.useMemo(()=>new Map(l.map(m=>[m.node_num,m])),[l]),c=$.useMemo(()=>e.filter(m=>u.has(m.from_node)&&u.has(m.to_node)),[e,u]),h=$.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=$.useMemo(()=>{const m=l.map(_=>{const S=iye(_.latitude),T=lz[S%lz.length],C=uz.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:aye(_.role),itemStyle:{color:C?T:"#111827",borderColor:T,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:nye(_.snr),width:S&&r!==null?2:1,opacity:r===null?.4:S?.6:.04}}});return{nodes:m,links:y}},[l,c,r,h]),d=$.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=$.useCallback(m=>{if(m.data&&"nodeNum"in m.data){const y=m.data.nodeNum;n(r===y?null:y??null)}},[r,n]),g=$.useMemo(()=>({click:p}),[p]);return $.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(rye,{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(f2,{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 S8(t,e){const r=$.useRef(e);$.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 sye(t,e,r){e.center!==r.center&&t.setLatLng(e.center),e.radius!=null&&e.radius!==r.radius&&t.setRadius(e.radius)}const lye=1;function uye(t){return Object.freeze({__version:lye,map:t})}function b8(t,e){return Object.freeze({...t,...e})}const w8=$.createContext(null),T8=w8.Provider;function w_(){const t=$.useContext(w8);if(t==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return t}function cye(t){function e(r,n){const{instance:i,context:a}=t(r).current;return $.useImperativeHandle(n,()=>i),r.children==null?null:Bc.createElement(T8,{value:a},r.children)}return $.forwardRef(e)}function hye(t){function e(r,n){const[i,a]=$.useState(!1),{instance:o}=t(r,a).current;$.useImperativeHandle(n,()=>o),$.useEffect(function(){i&&o.update()},[o,i,r.children]);const s=o._contentNode;return s?P3.createPortal(r.children,s):null}return $.forwardRef(e)}function fye(t){function e(r,n){const{instance:i}=t(r).current;return $.useImperativeHandle(n,()=>i),null}return $.forwardRef(e)}function tL(t,e){const r=$.useRef();$.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 T_(t,e){const r=t.pane??e.pane;return r?{...t,pane:r}:t}function dye(t,e){return function(n,i){const a=w_(),o=t(T_(n,a),a);return S8(a.map,n.attribution),tL(o.current,n.eventHandlers),e(o.current,a,n,i),o}}var hC={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)})(JW,function(r){var n="1.9.4";function i(v){var x,w,P,N;for(w=1,P=arguments.length;w"u"||!L||!L.Mixin)){v=S(v)?v:[v];for(var x=0;x0?Math.floor(v):Math.ceil(v)};V.prototype={clone:function(){return new V(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 V(this.x*v.x,this.y*v.y)},unscaleBy:function(v){return new V(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,w=v.y-this.y;return Math.sqrt(x*x+w*w)},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("+h(this.x)+", "+h(this.y)+")"}};function H(v,x,w){return v instanceof V?v:S(v)?new V(v[0],v[1]):v==null?v:typeof v=="object"&&"x"in v&&"y"in v?new V(v.x,v.y):new V(v,x,w)}function X(v,x){if(v)for(var w=x?[v,x]:v,P=0,N=w.length;P=this.min.x&&w.x<=this.max.x&&x.y>=this.min.y&&w.y<=this.max.y},intersects:function(v){v=K(v);var x=this.min,w=this.max,P=v.min,N=v.max,B=N.x>=x.x&&P.x<=w.x,Z=N.y>=x.y&&P.y<=w.y;return B&&Z},overlaps:function(v){v=K(v);var x=this.min,w=this.max,P=v.min,N=v.max,B=N.x>x.x&&P.xx.y&&P.y=x.lat&&N.lat<=w.lat&&P.lng>=x.lng&&N.lng<=w.lng},intersects:function(v){v=ie(v);var x=this._southWest,w=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>=x.lat&&P.lat<=w.lat,Z=N.lng>=x.lng&&P.lng<=w.lng;return B&&Z},overlaps:function(v){v=ie(v);var x=this._southWest,w=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>x.lat&&P.latx.lng&&P.lng1,F8=function(){var v=!1;try{var x=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("testPassiveEventSupport",f,x),window.removeEventListener("testPassiveEventSupport",f,x)}catch{}return v}(),G8=function(){return!!document.createElement("canvas").getContext}(),b_=!!(document.createElementNS&&tt("svg").createSVGRect),H8=!!b_&&function(){var v=document.createElement("div");return v.innerHTML="",(v.firstChild&&v.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),W8=!b_&&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}}(),U8=navigator.platform.indexOf("Mac")===0,Z8=navigator.platform.indexOf("Linux")===0;function Gi(v){return navigator.userAgent.toLowerCase().indexOf(v)>=0}var Re={ie:gr,ielt9:zr,edge:ji,webkit:Fi,android:yu,android23:eL,androidStock:k8,opera:S_,chrome:tL,gecko:rL,safari:I8,phantom:nL,opera12:iL,win:E8,ie3d:aL,webkit3d:w_,gecko3d:oL,any3d:N8,mobile:Of,mobileWebkit:R8,mobileWebkit3d:O8,msPointer:sL,pointer:lL,touch:z8,touchNative:uL,mobileOpera:B8,mobileGecko:V8,retina:j8,passiveEvents:F8,canvas:G8,svg:b_,vml:W8,inlineSvg:H8,mac:U8,linux:Z8},cL=Re.msPointer?"MSPointerDown":"pointerdown",fL=Re.msPointer?"MSPointerMove":"pointermove",hL=Re.msPointer?"MSPointerUp":"pointerup",dL=Re.msPointer?"MSPointerCancel":"pointercancel",T_={touchstart:cL,touchmove:fL,touchend:hL,touchcancel:dL},vL={touchstart:Q8,touchmove:Jv,touchend:Jv,touchcancel:Jv},_u={},pL=!1;function $8(v,x,w){return x==="touchstart"&&K8(),vL[x]?(w=vL[x].bind(this,w),v.addEventListener(T_[x],w,!1),w):(console.warn("wrong event specified:",x),f)}function Y8(v,x,w){if(!T_[x]){console.warn("wrong event specified:",x);return}v.removeEventListener(T_[x],w,!1)}function X8(v){_u[v.pointerId]=v}function q8(v){_u[v.pointerId]&&(_u[v.pointerId]=v)}function gL(v){delete _u[v.pointerId]}function K8(){pL||(document.addEventListener(cL,X8,!0),document.addEventListener(fL,q8,!0),document.addEventListener(hL,gL,!0),document.addEventListener(dL,gL,!0),pL=!0)}function Jv(v,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var w in _u)x.touches.push(_u[w]);x.changedTouches=[x],v(x)}}function Q8(v,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),Jv(v,x)}function J8(v){var x={},w,P;for(P in v)w=v[P],x[P]=w&&w.bind?w.bind(v):w;return v=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var eW=200;function tW(v,x){v.addEventListener("dblclick",x);var w=0,P;function N(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var Z=SL(B);if(!(Z.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!Z.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=eW?(P++,P===2&&x(J8(B))):P=1,w=Q}}}return v.addEventListener("click",N),{dblclick:x,simDblclick:N}}function rW(v,x){v.removeEventListener("dblclick",x.dblclick),v.removeEventListener("click",x.simDblclick)}var C_=rp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),zf=rp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),mL=zf==="webkitTransition"||zf==="OTransition"?zf+"End":"transitionend";function yL(v){return typeof v=="string"?document.getElementById(v):v}function Bf(v,x){var w=v.style[x]||v.currentStyle&&v.currentStyle[x];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(v,null);w=P?P[x]:null}return w==="auto"?null:w}function ht(v,x,w){var P=document.createElement(v);return P.className=x||"",w&&w.appendChild(P),P}function It(v){var x=v.parentNode;x&&x.removeChild(v)}function ep(v){for(;v.firstChild;)v.removeChild(v.firstChild)}function xu(v){var x=v.parentNode;x&&x.lastChild!==v&&x.appendChild(v)}function Su(v){var x=v.parentNode;x&&x.firstChild!==v&&x.insertBefore(v,x.firstChild)}function M_(v,x){if(v.classList!==void 0)return v.classList.contains(x);var w=tp(v);return w.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(w)}function Je(v,x){if(v.classList!==void 0)for(var w=p(x),P=0,N=w.length;P0?2*window.devicePixelRatio:1;function bL(v){return Re.edge?v.wheelDeltaY/2:v.deltaY&&v.deltaMode===0?-v.deltaY/aW: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 B_(v,x){var w=x.relatedTarget;if(!w)return!0;try{for(;w&&w!==v;)w=w.parentNode}catch{return!1}return w!==v}var oW={__proto__:null,on:Ke,off:Tt,stopPropagation:Rs,disableScrollPropagation:z_,disableClickPropagation:Gf,preventDefault:Mr,stop:Os,getPropagationPath:SL,getMousePosition:wL,getWheelDelta:bL,isExternalTarget:B_,addListener:Ke,removeListener:Tt},TL=U.extend({run:function(v,x,w,P){this.stop(),this._el=v,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Ns(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,w=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(v):this},panInsideBounds:function(v,x){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(v));return w.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(v,x){x=x||{};var w=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),N=this.project(this.getCenter()),B=this.project(v),Z=this.getPixelBounds(),Q=K([Z.min.add(w),Z.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 w=this.getSize(),P=x.divideBy(2).round(),N=w.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:w}))},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),w=o(this._handleGeolocationError,this);return v.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,w,v):navigator.geolocation.getCurrentPosition(x,w,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,w=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: "+w+"."})}},_handleGeolocationResponse:function(v){if(this._container._leaflet_id){var x=v.coords.latitude,w=v.coords.longitude,P=new ue(x,w),N=P.toBounds(v.coords.accuracy*2),B=this._locateOptions;if(B.setView){var Z=this.getBoundsZoom(N);this.setView(P,B.maxZoom?Math.min(Z,B.maxZoom):Z)}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 w=this[v]=new x(this);return this._handlers.push(w),this.options[v]&&w.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 w="leaflet-pane"+(v?" leaflet-"+v.replace("Pane","")+"-pane":""),P=ht("div",w,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()),w=this.unproject(v.getTopRight());return new ne(x,w)},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,w){v=ie(v),w=H(w||[0,0]);var P=this.getZoom()||0,N=this.getMinZoom(),B=this.getMaxZoom(),Z=v.getNorthWest(),Q=v.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(Z,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 V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(v,x){var w=this._getTopLeftPoint(v,x);return new X(w,w.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 w=this.options.crs;return x=x===void 0?this._zoom:x,w.scale(v)/w.scale(x)},getScaleZoom:function(v,x){var w=this.options.crs;x=x===void 0?this._zoom:x;var P=w.zoom(v*w.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 wL(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=yL(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=Bf(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 V(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,w){Qt(this._mapPane,new V(0,0));var P=!this._loaded;this._loaded=!0,x=this._limitZoom(x),this.fire("viewprereset");var N=this._zoom!==x;this._moveStart(N,w)._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,w,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?w&&w.pinch&&this.fire("zoom",w):((N||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),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 w=[],P,N=x==="mouseout"||x==="mouseover",B=v.target||v.srcElement,Z=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){Z=!0;break}if(P&&P.listens(x,!0)&&(N&&!B_(B,v)||(w.push(P),N))||B===this._container)break;B=B.parentNode}return!w.length&&!Z&&!N&&this.listens(x,!0)&&(w=[this]),w},_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 w=v.type;w==="mousedown"&&I_(x),this._fireDOMEvent(v,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(v,x,w){if(v.type==="click"){var P=i({},v);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var N=this._findEventTargets(v,x);if(w){for(var B=[],Z=0;Z0?Math.round(v-x)/2:Math.max(0,Math.ceil(v))-Math.max(0,Math.floor(x))},_limitZoom:function(v){var x=this.getMinZoom(),w=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(v=Math.round(v/P)*P),Math.max(x,Math.min(w,v))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(v,x){var w=this._getCenterOffset(v)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,x),!0)},_createAnimProxy:function(){var v=this._proxy=ht("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(v),this.on("zoomanim",function(x){var w=C_,P=this._proxy.style[w];Es(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[w]&&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,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.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 w.animate!==!0&&!this.getSize().contains(N)?!1:(I(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(v,x,!0)},this),!0)},_animateZoom:function(v,x,w,P){this._mapPane&&(w&&(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 sW(v,x){return new ut(v,x)}var pi=j.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),w=this.getPosition(),P=v._controlCorners[w];return Je(x,"leaflet-control"),w.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()}}),Hf=function(v){return new pi(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-",w=this._controlContainer=ht("div",x+"control-container",this._container);function P(N,B){var Z=x+N+" "+x+B;v[N+B]=ht("div",Z,w)}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 CL=pi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(v,x,w,P){return w1,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)),w=x.overlay?v.type==="add"?"overlayadd":"overlayremove":v.type==="add"?"baselayerchange":null;w&&this._map.fire(w,x)},_createRadioElement:function(v,x){var w='",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(v){var x=document.createElement("label"),w=this._map.hasLayer(v.layer),P;v.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),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 Z=v.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var v=this._layerControlInputs,x,w,P=[],N=[];this._handlingClick=!0;for(var B=v.length-1;B>=0;B--)x=v[B],w=this._getLayer(x.layerId).layer,x.checked?P.push(w):x.checked||N.push(w);for(B=0;B=0;N--)x=v[N],w=this._getLayer(x.layerId).layer,x.disabled=w.options.minZoom!==void 0&&Pw.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})}}),lW=function(v,x,w){return new CL(v,x,w)},V_=pi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(v){var x="leaflet-control-zoom",w=ht("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",w,this._zoomOut),this._updateDisabled(),v.on("zoomend zoomlevelschange",this._updateDisabled,this),w},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,w,P,N){var B=ht("a",w,P);return B.innerHTML=v,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Gf(B),Ke(B,"click",Os),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 V_,this.addControl(this.zoomControl))});var uW=function(v){return new V_(v)},ML=pi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(v){var x="leaflet-control-scale",w=ht("div",x),P=this.options;return this._addScales(P,x+"-line",w),v.on(P.updateWhenIdle?"moveend":"move",this._update,this),v.whenReady(this._update,this),w},onRemove:function(v){v.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(v,x,w){v.metric&&(this._mScale=ht("div",x,w)),v.imperial&&(this._iScale=ht("div",x,w))},_update:function(){var v=this._map,x=v.getSize().y/2,w=v.distance(v.containerPointToLatLng([0,x]),v.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(w)},_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),w=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,w,x/v)},_updateImperial:function(v){var x=v*3.2808399,w,P,N;x>5280?(w=x/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(N=this._getRoundNum(x),this._updateScale(this._iScale,N+" ft",N/x))},_updateScale:function(v,x,w){v.style.width=Math.round(this.options.maxWidth*w)+"px",v.innerHTML=x},_getRoundNum:function(v){var x=Math.pow(10,(Math.floor(v)+"").length-1),w=v/x;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,x*w}}),cW=function(v){return new ML(v)},fW='',j_=pi.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?fW+" ":"")+"Leaflet"},initialize:function(v){g(this,v),this._attributions={}},onAdd:function(v){v.attributionControl=this,this._container=ht("div","leaflet-control-attribution"),Gf(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 w=[];this.options.prefix&&w.push(this.options.prefix),v.length&&w.push(v.join(", ")),this._container.innerHTML=w.join(' ')}}});ut.mergeOptions({attributionControl:!0}),ut.addInitHook(function(){this.options.attributionControl&&new j_().addTo(this)});var hW=function(v){return new j_(v)};pi.Layers=CL,pi.Zoom=V_,pi.Scale=ML,pi.Attribution=j_,Hf.layers=lW,Hf.zoom=uW,Hf.scale=cW,Hf.attribution=hW;var Wi=j.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}});Wi.addTo=function(v,x){return v.addHandler(x,this),this};var dW={Events:F},AL=Re.touch?"touchstart mousedown":"mousedown",So=U.extend({options:{clickTolerance:3},initialize:function(v,x,w,P){g(this,P),this._element=v,this._dragStartTarget=x||v,this._preventOutline=w},enable:function(){this._enabled||(Ke(this._dragStartTarget,AL,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(So._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,AL,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(v){if(this._enabled&&(this._moved=!1,!M_(this._element,"leaflet-zoom-anim"))){if(v.touches&&v.touches.length!==1){So._dragging===this&&this.finishDrag();return}if(!(So._dragging||v.shiftKey||v.which!==1&&v.button!==1&&!v.touches)&&(So._dragging=this,this._preventOutline&&I_(this._element),P_(),Vf(),!this._moving)){this.fire("down");var x=v.touches?v.touches[0]:v,w=_L(this._element);this._startPoint=new V(x.clientX,x.clientY),this._startPos=Ns(this._element),this._parentScale=E_(w);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,w=new V(x.clientX,x.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)B&&(Z=Q,B=te);B>w&&(x[Z]=1,G_(v,x,w,P,Z),G_(v,x,w,Z,N))}function mW(v,x){for(var w=[v[0]],P=1,N=0,B=v.length;Px&&(w.push(v[P]),N=P);return Nx.max.x&&(w|=2),v.yx.max.y&&(w|=8),w}function yW(v,x){var w=x.x-v.x,P=x.y-v.y;return w*w+P*P}function Wf(v,x,w,P){var N=x.x,B=x.y,Z=w.x-N,Q=w.y-B,te=Z*Z+Q*Q,ae;return te>0&&(ae=((v.x-N)*Z+(v.y-B)*Q)/te,ae>1?(N=w.x,B=w.y):ae>0&&(N+=Z*ae,B+=Q*ae)),Z=v.x-N,Q=v.y-B,P?Z*Z+Q*Q:new V(N,B)}function Fn(v){return!S(v[0])||typeof v[0][0]!="object"&&typeof v[0][0]<"u"}function NL(v){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(v)}function RL(v,x){var w,P,N,B,Z,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=F_(v));var Xr=v.length,mr=[];for(w=0;wP){te=(B-P)/N,ae=[Q.x-te*(Q.x-Z.x),Q.y-te*(Q.y-Z.y)];break}var cn=x.unproject(H(ae));return ve([cn.lat+Ae.lat,cn.lng+Ae.lng])}var _W={__proto__:null,simplify:DL,pointToSegmentDistance:kL,closestPointOnSegment:pW,clipSegment:EL,_getEdgeIntersection:ap,_getBitCode:zs,_sqClosestPointOnSegment:Wf,isFlat:Fn,_flat:NL,polylineCenter:RL},H_={project:function(v){return new V(v.lng,v.lat)},unproject:function(v){return new ue(v.y,v.x)},bounds:new X([-180,-90],[180,90])},W_={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,w=this.R,P=v.lat*x,N=this.R_MINOR/w,B=Math.sqrt(1-N*N),Z=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-Z)/(1+Z),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new V(v.lng*x*w,P)},unproject:function(v){for(var x=180/Math.PI,w=this.R,P=this.R_MINOR/w,N=Math.sqrt(1-P*P),B=Math.exp(-v.y/w),Z=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=N*Math.sin(Z),ae=Math.pow((1-ae)/(1+ae),N/2),te=Math.PI/2-2*Math.atan(B*ae)-Z,Z+=te;return new ue(Z*x,v.x*x/w)}},xW={__proto__:null,LonLat:H_,Mercator:W_,SphericalMercator:De},SW=i({},xe,{code:"EPSG:3395",projection:W_,transformation:function(){var v=.5/(Math.PI*W_.R);return Me(v,.5,-v,.5)}()}),OL=i({},xe,{code:"EPSG:4326",projection:H_,transformation:Me(1/180,1,-1/180,.5)}),wW=i({},Ge,{projection:H_,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 w=x.lng-v.lng,P=x.lat-v.lat;return Math.sqrt(w*w+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=SW,Ge.EPSG3857=ot,Ge.EPSG900913=Ye,Ge.EPSG4326=OL,Ge.Simple=wW;var gi=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 w=this.getEvents();x.on(w,this),this.once("remove",function(){x.off(w,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 w in this._layers)v.call(x,this._layers[w]);return this},_addLayers:function(v){v=v?S(v)?v:[v]:[];for(var x=0,w=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[w-1])&&x.pop(),x},_setLatLngs:function(v){ka.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,w=new V(x,x);if(v=new X(v.min.subtract(w),v.max.add(w)),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||ka.prototype._containsPoint.call(this,v,!0)}});function DW(v,x){return new Tu(v,x)}var Ia=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,w,P,N;if(x){for(w=0,P=x.length;w0&&N.push(N[0].slice()),N}function Cu(v,x){return v.feature?i({},v.feature,{geometry:x}):fp(x)}function fp(v){return v.type==="Feature"||v.type==="FeatureCollection"?v:{type:"Feature",properties:{},geometry:v}}var Y_={toGeoJSON:function(v){return Cu(this,{type:"Point",coordinates:$_(this.getLatLng(),v)})}};op.include(Y_),U_.include(Y_),sp.include(Y_),ka.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),w=cp(this._latlngs,x?1:0,!1,v);return Cu(this,{type:(x?"Multi":"")+"LineString",coordinates:w})}}),Tu.include({toGeoJSON:function(v){var x=!Fn(this._latlngs),w=x&&!Fn(this._latlngs[0]),P=cp(this._latlngs,w?2:x?1:0,!0,v);return x||(P=[P]),Cu(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),wu.include({toMultiPoint:function(v){var x=[];return this.eachLayer(function(w){x.push(w.toGeoJSON(v).geometry.coordinates)}),Cu(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 w=x==="GeometryCollection",P=[];return this.eachLayer(function(N){if(N.toGeoJSON){var B=N.toGeoJSON(v);if(w)P.push(B.geometry);else{var Z=fp(B);Z.type==="FeatureCollection"?P.push.apply(P,Z.features):P.push(Z)}}}),w?Cu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function VL(v,x){return new Ia(v,x)}var kW=VL,hp=gi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(v,x,w){this._url=v,this._bounds=ie(x),g(this,w)},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&&xu(this._image),this},bringToBack:function(){return this._map&&Su(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:ht("img");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=f,x.onmousemove=f,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),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,v.zoom,v.center).min;Es(this._image,w,x)},_reset:function(){var v=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=x.getSize();Qt(v,x.min),v.style.width=w.x+"px",v.style.height=w.y+"px"},_updateOpacity:function(){jn(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()}}),IW=function(v,x,w){return new hp(v,x,w)},jL=hp.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:ht("video");if(Je(x,"leaflet-image-layer"),this._zoomAnimated&&Je(x,"leaflet-zoom-animated"),this.options.className&&Je(x,this.options.className),x.onselectstart=f,x.onmousemove=f,x.onloadeddata=o(this.fire,this,"load"),v){for(var w=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),w=this._getAnchor();Qt(this._container,x.add(w))},_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(Bf(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+x,P=this._containerWidth,N=new V(this._containerLeft,-w-this._containerBottom);N._add(Ns(this._container));var B=v.layerPointToContainerPoint(N),Z=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||Z),te=H(this.options.autoPanPaddingBottomRight||Z),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+w+te.y>ae.y&&(He=B.y+w-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])}}),RW=function(v,x){return new dp(v,x)};ut.mergeOptions({closePopupOnClick:!0}),ut.include({openPopup:function(v,x,w){return this._initOverlay(dp,v,x,w).openOn(this),this},closePopup:function(v){return v=arguments.length?v:this._popup,v&&v.close(),this}}),gi.include({bindPopup:function(v,x){return this._popup=this._initOverlay(dp,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)){Os(v);var x=v.layer||v.target;if(this._popup._source===x&&!(x instanceof wo)){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 vp=Ui.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(v){Ui.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){Ui.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=Ui.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=ht("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(v){var x,w,P=this._map,N=this._container,B=P.latLngToContainerPoint(P.getCenter()),Z=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,w=ae):Q==="bottom"?(x=te/2,w=0):Q==="center"?(x=te/2,w=ae/2):Q==="right"?(x=0,w=ae/2):Q==="left"?(x=te,w=ae/2):Z.xthis.options.maxZoom||wP?this._retainParent(N,B,Z,P):!1)},_retainChildren:function(v,x,w,P){for(var N=2*v;N<2*v+2;N++)for(var B=2*x;B<2*x+2;B++){var Z=new V(N,B);Z.z=w+1;var Q=this._tileCoordsToKey(Z),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1this.options.maxZoom||this.options.minZoom!==void 0&&N1){this._setView(v,w);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 V(rt,He);if(Xr.z=this._tileZoom,!!this._isValidTile(Xr)){var mr=this._tiles[this._tileCoordsToKey(Xr)];mr?mr.current=!0:Z.push(Xr)}}if(Z.sort(function(cn,Au){return cn.distanceTo(B)-Au.distanceTo(B)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Gn=document.createDocumentFragment();for(rt=0;rtw.max.x)||!x.wrapLat&&(v.yw.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,w=this.getTileSize(),P=v.scaleBy(w),N=P.add(w),B=x.unproject(P,v.z),Z=x.unproject(N,v.z);return[B,Z]},_tileCoordsToBounds:function(v){var x=this._tileCoordsToNwSe(v),w=new ne(x[0],x[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(v){return v.x+":"+v.y+":"+v.z},_keyToTileCoords:function(v){var x=v.split(":"),w=new V(+x[0],+x[1]);return w.z=+x[2],w},_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=f,v.onmousemove=f,Re.ielt9&&this.options.opacity<1&&jn(v,this.options.opacity)},_addTile:function(v,x){var w=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,w),this._tiles[P]={el:N,coords:v,current:!0},x.appendChild(N),this.fire("tileloadstart",{tile:N,coords:v})},_tileReady:function(v,x,w){x&&this.fire("tileerror",{error:x,tile:w,coords:v});var P=this._tileCoordsToKey(v);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(jn(w.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),x||(Je(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.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 V(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 BW(v){return new Zf(v)}var Mu=Zf.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 w=document.createElement("img");return Ke(w,"load",o(this._tileOnLoad,this,x,w)),Ke(w,"error",o(this._tileOnError,this,x,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(v),w},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 w=this._globalTileRange.max.y-v.y;this.options.tms&&(x.y=w),x["-y"]=w}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,w){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),v(w,x)},_onTileRemove:function(v){v.tile.onload=null},_getZoomForUrl:function(){var v=this._tileZoom,x=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(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=f,x.onerror=f,!x.complete)){x.src=C;var w=this._tiles[v].coords;It(x),delete this._tiles[v],this.fire("tileabort",{tile:x,coords:w})}},_removeTile:function(v){var x=this._tiles[v];if(x)return x.el.setAttribute("src",C),Zf.prototype._removeTile.call(this,v)},_tileReady:function(v,x,w){if(!(!this._map||w&&w.getAttribute("src")===C))return Zf.prototype._tileReady.call(this,v,x,w)}});function HL(v,x){return new Mu(v,x)}var WL=Mu.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 w=i({},this.defaultWmsParams);for(var P in x)P in this.options||(w[P]=x[P]);x=g(this,x);var N=x.detectRetina&&Re.retina?2:1,B=this.getTileSize();w.width=B.x*N,w.height=B.y*N,this.wmsParams=w},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,Mu.prototype.onAdd.call(this,v)},getTileUrl:function(v){var x=this._tileCoordsToNwSe(v),w=this._crs,P=K(w.project(x[0]),w.project(x[1])),N=P.min,B=P.max,Z=(this._wmsVersion>=1.3&&this._crs===OL?[N.y,N.x,B.y,B.x]:[N.x,N.y,B.x,B.y]).join(","),Q=Mu.prototype.getTileUrl.call(this,v);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(v,x){return i(this.wmsParams,v),x||this.redraw(),this}});function VW(v,x){return new WL(v,x)}Mu.WMS=WL,HL.wms=VW;var Ea=gi.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 w=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(-w).add(N).subtract(this._map._getNewPixelOrigin(v,x));Re.any3d?Es(this._container,B,w):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(),w=this._map.containerPointToLayerPoint(x.multiplyBy(-v)).round();this._bounds=new X(w,w.add(x.multiplyBy(1+v*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),UL=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,w=v.getSize(),P=Re.retina?2:1;Qt(x,v.min),x.width=P*w.x,x.height=P*w.y,x.style.width=w.x+"px",x.style.height=w.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,w=x.next,P=x.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,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(/[, ]+/),w=[],P,N;for(N=0;N')}}catch{}return function(v){return document.createElement("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),jW={_initContainer:function(){this._container=ht("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ea.prototype._update.call(this),this.fire("update"))},_initPath:function(v){var x=v._container=$f("shape");Je(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",v._path=$f("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,w=v._fill,P=v.options,N=v._container;N.stroked=!!P.stroke,N.filled=!!P.fill,P.stroke?(x||(x=v._stroke=$f("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?(w||(w=v._fill=$f("fill")),N.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(N.removeChild(w),v._fill=null)},_updateCircle:function(v){var x=v._point.round(),w=Math.round(v._radius),P=Math.round(v._radiusY||w);this._setPath(v,v._empty()?"M0 0":"AL "+x.x+","+x.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(v,x){v._path.v=x},_bringToFront:function(v){xu(v._container)},_bringToBack:function(v){Su(v._container)}},pp=Re.vml?$f:tt,Yf=Ea.extend({_initContainer:function(){this._container=pp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pp("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(),w=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,w.setAttribute("width",x.x),w.setAttribute("height",x.y)),Qt(w,v.min),w.setAttribute("viewBox",[v.min.x,v.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(v){var x=v._path=pp("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,w=v.options;x&&(w.stroke?(x.setAttribute("stroke",w.color),x.setAttribute("stroke-opacity",w.opacity),x.setAttribute("stroke-width",w.weight),x.setAttribute("stroke-linecap",w.lineCap),x.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?x.setAttribute("stroke-dasharray",w.dashArray):x.removeAttribute("stroke-dasharray"),w.dashOffset?x.setAttribute("stroke-dashoffset",w.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),w.fill?(x.setAttribute("fill",w.fillColor||w.color),x.setAttribute("fill-opacity",w.fillOpacity),x.setAttribute("fill-rule",w.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(v,x){this._setPath(v,lt(v._parts,x))},_updateCircle:function(v){var x=v._point,w=Math.max(Math.round(v._radius),1),P=Math.max(Math.round(v._radiusY),1)||w,N="a"+w+","+P+" 0 1,0 ",B=v._empty()?"M0 0":"M"+(x.x-w)+","+x.y+N+w*2+",0 "+N+-w*2+",0 ";this._setPath(v,B)},_setPath:function(v,x){v._path.setAttribute("d",x)},_bringToFront:function(v){xu(v._path)},_bringToBack:function(v){Su(v._path)}});Re.vml&&Yf.include(jW);function $L(v){return Re.svg||Re.vml?new Yf(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&&ZL(v)||$L(v)}});var YL=Tu.extend({initialize:function(v,x){Tu.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 FW(v,x){return new YL(v,x)}Yf.create=pp,Yf.pointsToPath=lt,Ia.geometryToLayer=lp,Ia.coordsToLatLng=Z_,Ia.coordsToLatLngs=up,Ia.latLngToCoords=$_,Ia.latLngsToCoords=cp,Ia.getFeature=Cu,Ia.asFeature=fp,ut.mergeOptions({boxZoom:!0});var XL=Wi.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(),Vf(),P_(),this._startPoint=this._map.mouseEventToContainerPoint(v),Ke(document,{contextmenu:Os,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(v){this._moved||(this._moved=!0,this._box=ht("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),w=x.getSize();Qt(this._box,x.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),jf(),D_(),Tt(document,{contextmenu:Os,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",XL),ut.mergeOptions({doubleClickZoom:!0});var qL=Wi.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,w=x.getZoom(),P=x.options.zoomDelta,N=v.originalEvent.shiftKey?w-P:w+P;x.options.doubleClickZoom==="center"?x.setZoom(N):x.setZoomAround(v.containerPoint,N)}});ut.addInitHook("addHandler","doubleClickZoom",qL),ut.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var KL=Wi.extend({addHooks:function(){if(!this._draggable){var v=this._map;this._draggable=new So(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,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),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),w=this._initialWorldOffset,P=this._draggable._newPos.x,N=(P-x+w)%v+x-w,B=(P+x+w)%v-x-w,Z=Math.abs(N+w)0?B:-B))-x;this._delta=0,this._startTime=null,Z&&(v.options.scrollWheelZoom==="center"?v.setZoom(x+Z):v.setZoomAround(this._lastMousePos,x+Z))}});ut.addInitHook("addHandler","scrollWheelZoom",JL);var GW=600;ut.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var eP=Wi.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 V(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),GW),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 V(x.clientX,x.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(v,x){var w=new MouseEvent(v,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});w._simulated=!0,x.target.dispatchEvent(w)}});ut.addInitHook("addHandler","tapHold",eP),ut.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var tP=Wi.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 w=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(w.add(P)._divideBy(2))),this._startDist=w.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,w=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]),N=w.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=w._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 Z=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(Z,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",tP),ut.BoxZoom=XL,ut.DoubleClickZoom=qL,ut.Drag=KL,ut.Keyboard=QL,ut.ScrollWheelZoom=JL,ut.TapHold=eP,ut.TouchZoom=tP,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=UL,r.Circle=U_,r.CircleMarker=sp,r.Class=j,r.Control=pi,r.DivIcon=GL,r.DivOverlay=Ui,r.DomEvent=oW,r.DomUtil=iW,r.Draggable=So,r.Evented=U,r.FeatureGroup=Da,r.GeoJSON=Ia,r.GridLayer=Zf,r.Handler=Wi,r.Icon=bu,r.ImageOverlay=hp,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=gi,r.LayerGroup=wu,r.LineUtil=_W,r.Map=ut,r.Marker=op,r.Mixin=dW,r.Path=wo,r.Point=V,r.PolyUtil=vW,r.Polygon=Tu,r.Polyline=ka,r.Popup=dp,r.PosAnimation=TL,r.Projection=xW,r.Rectangle=YL,r.Renderer=Ea,r.SVG=Yf,r.SVGOverlay=FL,r.TileLayer=Mu,r.Tooltip=vp,r.Transformation=he,r.Util=O,r.VideoOverlay=jL,r.bind=o,r.bounds=K,r.canvas=ZL,r.circle=LW,r.circleMarker=AW,r.control=Hf,r.divIcon=zW,r.extend=i,r.featureGroup=TW,r.geoJSON=VL,r.geoJson=kW,r.gridLayer=BW,r.icon=CW,r.imageOverlay=IW,r.latLng=ve,r.latLngBounds=ie,r.layerGroup=bW,r.map=sW,r.marker=MW,r.point=H,r.polygon=DW,r.polyline=PW,r.popup=RW,r.rectangle=FW,r.setOptions=g,r.stamp=l,r.svg=$L,r.svgOverlay=NW,r.tileLayer=HL,r.tooltip=OW,r.transformation=Me,r.version=n,r.videoOverlay=EW;var HW=window.L;r.noConflict=function(){return window.L=HW,this},window.L=r})})(sC,sC.exports);var mu=sC.exports;const T8=uC(mu);function Qv(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function JA(t,e){return e==null?function(n,i){const a=Y.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=Y.useRef();a.current||(a.current=t(n,i));const o=Y.useRef(n),{instance:s}=a.current;return Y.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function C8(t,e){Y.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 dye(t){return function(r){const n=__(),i=t(x_(r,n),n);return x8(n.map,r.attribution),QA(i.current,r.eventHandlers),C8(i.current,n),i}}function vye(t,e){const r=Y.useRef();Y.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function pye(t){return function(r){const n=__(),i=t(x_(r,n),n);return QA(i.current,r.eventHandlers),C8(i.current,n),vye(i.current,r),i}}function M8(t,e){const r=JA(t),n=hye(r,e);return cye(n)}function A8(t,e){const r=JA(t,e),n=pye(r);return uye(n)}function gye(t,e){const r=JA(t,e),n=dye(r);return fye(n)}function mye(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 yye(){return __().map}const _ye=A8(function({center:e,children:r,...n},i){const a=new mu.CircleMarker(e,n);return Qv(a,S8(i,{overlayContainer:a}))},oye);function lC(){return lC=Object.assign||function(t){for(var e=1;e(d==null?void 0:d.map)??null,[d]);const g=Y.useCallback(y=>{if(y!==null&&d===null){const _=new mu.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(lye(_))}},[]);Y.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Bc.createElement(b8,{value:d},n):o??null;return Bc.createElement("div",lC({},h,{ref:g}),m)}const Sye=Y.forwardRef(xye),wye=A8(function({positions:e,...r},n){const i=new mu.Polyline(e,r);return Qv(i,S8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),bye=M8(function(e,r){const n=new mu.Popup(e,r.overlayContainer);return Qv(n,r)},function(e,r,{position:n},i){Y.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])}),Tye=gye(function({url:e,...r},n){const i=new mu.TileLayer(e,x_(r,n));return Qv(i,n)},function(e,r,n){mye(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),Cye=M8(function(e,r){const n=new mu.Tooltip(e,r.overlayContainer);return Qv(n,r)},function(e,r,{position:n},i){Y.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])}),Mye="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=",Aye="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==",Lye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete T8.Icon.Default.prototype._getIconUrl;T8.Icon.Default.mergeOptions({iconUrl:Mye,iconRetinaUrl:Aye,shadowUrl:Lye});const s5=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Pye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Dye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function kye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Iye(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 Eye({bounds:t}){const e=yye();return Y.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function Nye({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 T.jsxs("div",{className:"min-w-[200px]",children:[T.jsx("div",{className:"font-semibold text-slate-800",children:t.short_name}),T.jsx("div",{className:"text-xs text-slate-600 mb-2",children:t.long_name}),T.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[T.jsx("div",{className:"text-slate-500",children:"Role"}),T.jsx("div",{className:"text-slate-700 font-medium",children:t.role}),T.jsx("div",{className:"text-slate-500",children:"Hardware"}),T.jsx("div",{className:"text-slate-700",children:t.hardware||"Unknown"}),T.jsx("div",{className:"text-slate-500",children:"Battery"}),T.jsx("div",{className:"text-slate-700",children:r}),T.jsx("div",{className:"text-slate-500",children:"Last Heard"}),T.jsx("div",{className:"text-slate-700",children:Iye(t.last_heard)})]}),e&&T.jsxs("div",{className:"mt-3 pt-2 border-t border-slate-200 flex gap-2",children:[T.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:[T.jsx(Ud,{size:10}),"Google Maps"]}),T.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:[T.jsx(Ud,{size:10}),"OSM"]})]})]})}function Rye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=Y.useMemo(()=>t.filter(f=>f.latitude!==null&&f.longitude!==null),[t]),a=t.length-i.length,o=Y.useMemo(()=>new Map(i.map(f=>[f.node_num,f])),[i]),s=Y.useMemo(()=>e.filter(f=>o.has(f.from_node)&&o.has(f.to_node)),[e,o]),l=Y.useMemo(()=>{if(i.length===0)return null;const f=i.map(d=>d.latitude),h=i.map(d=>d.longitude);return[[Math.min(...f),Math.min(...h)],[Math.max(...f),Math.max(...h)]]},[i]),u=[43.6,-114.4],c=Y.useMemo(()=>{const f=new Set;return r!==null&&e.forEach(h=>{h.from_node===r&&f.add(h.to_node),h.to_node===r&&f.add(h.from_node)}),f},[r,e]);return T.jsxs("div",{className:"relative bg-bg-card rounded-lg border border-border overflow-hidden",children:[T.jsxs(Sye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[T.jsx(Tye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),T.jsx(Eye,{bounds:l}),s.map((f,h)=>{const d=o.get(f.from_node),p=o.get(f.to_node),g=r===null||f.from_node===r||f.to_node===r;return T.jsx(wye,{positions:[[d.latitude,d.longitude],[p.latitude,p.longitude]],color:Dye(f.snr),weight:g&&r!==null?2.5:1.5,opacity:r===null?.3:g?.6:.08},h)}),i.map(f=>{const h=f.node_num===r,d=c.has(f.node_num),p=r===null||h||d,g=Pye.includes(f.role),m=kye(f.latitude),y=s5[m%s5.length];return T.jsxs(_ye,{center:[f.latitude,f.longitude],radius:g?8:5,fillColor:g?y:"#111827",fillOpacity:p?.9:.2,stroke:!0,color:h?"#ffffff":y,weight:h?3:g?0:2,opacity:p?1:.3,eventHandlers:{click:()=>n(h?null:f.node_num)},children:[T.jsx(Cye,{direction:"top",offset:[0,-8],children:T.jsx("span",{className:"font-mono text-xs",children:f.short_name})}),T.jsx(bye,{children:T.jsx(Nye,{node:f})})]},f.node_num)})]}),T.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:[T.jsx(H3,{size:12}),T.jsxs("span",{children:["Showing ",i.length," of ",t.length," nodes",a>0&&T.jsxs("span",{className:"text-slate-500",children:[" (",a," without coordinates)"]})]})]})]})}const l5=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],Oye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function u5(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function zye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function Bye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Vye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function jye(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(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 Gye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=Y.useMemo(()=>{if(!t)return[];const f=new Map(r.map(d=>[d.node_num,d])),h=[];return e.forEach(d=>{if(d.from_node===t.node_num){const p=f.get(d.to_node);p&&h.push({node:p,snr:d.snr,quality:d.quality})}else if(d.to_node===t.node_num){const p=f.get(d.from_node);p&&h.push({node:p,snr:d.snr,quality:d.quality})}}),h.sort((d,p)=>p.snr-d.snr)},[t,e,r]);if(!t)return T.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:[T.jsx("div",{className:"w-12 h-12 rounded-full bg-bg-hover border border-border flex items-center justify-center mb-3",children:T.jsx(Zc,{size:24,className:"text-slate-500"})}),T.jsx("p",{className:"text-sm text-slate-500 text-center",children:"Click a node to inspect"})]});const a=Oye.includes(t.role),o=Bye(t.latitude),s=l5[o%l5.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 T.jsxs("div",{className:"w-[250px] flex-shrink-0 bg-bg-card border-l border-border flex flex-col h-[540px] overflow-hidden",children:[T.jsxs("div",{className:"p-4 border-b border-border",children:[T.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}),T.jsx("div",{className:"font-mono text-lg text-slate-100",children:t.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate",children:t.long_name})]}),T.jsxs("div",{className:"p-4 border-b border-border grid grid-cols-2 gap-3",children:[T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Role"}),T.jsx("div",{className:`text-sm font-medium ${a?"text-cyan-400":"text-slate-300"}`,children:t.role})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Region"}),T.jsx("div",{className:"text-sm text-slate-300",children:Vye(o)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Battery"}),T.jsxs("div",{className:"text-sm text-slate-300 flex items-center gap-1",children:[c&&T.jsx(f2,{size:12,className:"text-amber-400"}),u]})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Status"}),T.jsxs("div",{className:"flex items-center gap-1.5",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${Fye(t.last_heard)}`}),T.jsx("span",{className:"text-sm text-slate-300",children:jye(t.last_heard)})]})]}),T.jsxs("div",{className:"col-span-2",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-0.5",children:"Hardware"}),T.jsx("div",{className:"text-sm text-slate-300 font-mono truncate",children:t.hardware||"Unknown"})]})]}),l&&T.jsxs("div",{className:"px-4 py-3 border-b border-border flex gap-3",children:[T.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:[T.jsx(Ud,{size:10}),"Google Maps"]}),T.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:[T.jsx(Ud,{size:10}),"OSM"]})]}),T.jsxs("div",{className:"flex-1 overflow-y-auto",children:[T.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?T.jsx("div",{className:"divide-y divide-border",children:i.map(f=>T.jsxs("button",{onClick:()=>n(f.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:u5(f.snr)},children:[T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"text-sm text-slate-200 font-mono truncate",children:f.node.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate",children:f.node.long_name})]}),T.jsxs("div",{className:"text-right flex-shrink-0",children:[T.jsxs("div",{className:"text-xs font-mono",style:{color:u5(f.snr)},children:[f.snr.toFixed(1)," dB"]}),T.jsx("div",{className:"text-xs text-slate-500",children:zye(f.snr)})]})]},f.node.node_num))}):T.jsx("div",{className:"px-4 py-6 text-center text-sm text-slate-500",children:"No known neighbors"})]})]})}const c5=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Hye(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 Wye(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 Uye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function f5(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function Zye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=Y.useState(""),[a,o]=Y.useState("short_name"),[s,l]=Y.useState("asc"),[u,c]=Y.useState("all"),f=Y.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>c5.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)||f5(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]),h=p=>{a===p?l(s==="asc"?"desc":"asc"):(o(p),l("asc"))},d=({field:p})=>a!==p?null:s==="asc"?T.jsx(BZ,{size:14,className:"inline ml-1"}):T.jsx(l2,{size:14,className:"inline ml-1"});return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"p-3 border-b border-border flex items-center gap-3",children:[T.jsxs("div",{className:"relative flex-1 max-w-xs",children:[T.jsx(QZ,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),T.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"})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx(c2,{size:14,className:"text-slate-500 mr-1"}),["all","infra","online"].map(p=>T.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))]}),T.jsxs("div",{className:"text-xs text-slate-500 ml-auto",children:[f.length," of ",t.length," nodes"]})]}),T.jsxs("div",{className:"overflow-x-auto",children:[T.jsxs("table",{className:"w-full text-sm",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"bg-bg-hover text-slate-400 text-xs",children:[T.jsx("th",{className:"w-8 px-3 py-2"}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("short_name"),children:["Name ",T.jsx(d,{field:"short_name"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("role"),children:["Role ",T.jsx(d,{field:"role"})]}),T.jsx("th",{className:"px-3 py-2 text-left",children:"Region"}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("battery_level"),children:["Battery ",T.jsx(d,{field:"battery_level"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("last_heard"),children:["Last Heard ",T.jsx(d,{field:"last_heard"})]}),T.jsxs("th",{className:"px-3 py-2 text-left cursor-pointer hover:text-slate-200",onClick:()=>h("hardware"),children:["Hardware ",T.jsx(d,{field:"hardware"})]})]})}),T.jsx("tbody",{className:"divide-y divide-border",children:f.slice(0,100).map(p=>{const g=c5.includes(p.role),m=p.node_num===e;return T.jsxs("tr",{onClick:()=>r(p.node_num),className:`cursor-pointer transition-colors ${m?"bg-accent/10":"hover:bg-bg-hover"}`,children:[T.jsx("td",{className:"px-3 py-2",children:T.jsx("div",{className:`w-2 h-2 rounded-full ${Hye(p.last_heard)}`})}),T.jsxs("td",{className:"px-3 py-2",children:[T.jsx("div",{className:"font-mono text-slate-200",children:p.short_name}),T.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:p.long_name})]}),T.jsx("td",{className:"px-3 py-2",children:T.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})}),T.jsx("td",{className:"px-3 py-2 text-slate-400",children:f5(p.latitude)}),T.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Uye(p)}),T.jsx("td",{className:"px-3 py-2 text-slate-400",children:Wye(p.last_heard)}),T.jsx("td",{className:"px-3 py-2 font-mono text-xs text-slate-400 truncate max-w-[150px]",children:p.hardware||"—"})]},p.node_num)})})]}),f.length>100&&T.jsxs("div",{className:"px-3 py-2 text-xs text-slate-500 text-center border-t border-border",children:["Showing first 100 of ",f.length," nodes"]}),f.length===0&&T.jsx("div",{className:"px-3 py-8 text-sm text-slate-500 text-center",children:"No nodes match your filters"})]})]})}function $ye(){const[t,e]=Y.useState([]),[r,n]=Y.useState([]),[i,a]=Y.useState([]),[o,s]=Y.useState(null),[l,u]=Y.useState("topo"),[c,f]=Y.useState(!0),[h,d]=Y.useState(null);Y.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([i$(),a$(),y$()]).then(([m,y,_])=>{e(m),n(y),a(_),f(!1)}).catch(m=>{d(m.message),f(!1)})},[]);const p=Y.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=Y.useCallback(m=>{s(m)},[]);return c?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading mesh data..."})}):h?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",h]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"text-sm text-slate-400",children:[t.length," nodes • ",r.length," edges"]}),T.jsxs("div",{className:"flex items-center bg-bg-card border border-border rounded-lg p-1",children:[T.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:[T.jsx($Z,{size:14}),"Topology"]}),T.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:[T.jsx(WZ,{size:14}),"Geographic"]})]})]}),T.jsxs("div",{className:"flex gap-0",children:[T.jsx("div",{className:"flex-1 min-w-0",children:l==="topo"?T.jsx(aye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):T.jsx(Rye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),T.jsx(Gye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),T.jsx(Zye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Yye({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 T.jsxs("div",{className:"bg-bg-hover rounded-lg p-4",children:[T.jsxs("div",{className:"flex items-center justify-between mb-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`w-2 h-2 rounded-full ${e()}`}),T.jsx("span",{className:"text-sm font-medium text-slate-200 uppercase",children:t.source})]}),T.jsx("span",{className:"text-xs text-slate-400",children:r()})]}),T.jsxs("div",{className:"text-xs text-slate-500 space-y-1",children:[T.jsxs("div",{children:["Events: ",t.event_count]}),T.jsxs("div",{children:["Last fetch: ",n(t.last_fetch)]}),t.last_error&&T.jsx("div",{className:"text-amber-500 truncate",children:t.last_error})]})]})}function Xye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:D0,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:ry,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:ry,iconColor:"text-slate-400"}}})(t.severity),n=r.icon,i=a=>a?new Date(a*1e3).toLocaleString():null;return T.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-2 ${r.border}`,children:T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(n,{size:18,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:t.event_type}),T.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${r.bg} ${r.iconColor}`,children:t.severity})]}),T.jsx("div",{className:"text-sm text-slate-300 mb-2",children:t.headline}),t.description&&T.jsx("div",{className:"text-xs text-slate-400 mb-2 line-clamp-2",children:t.description}),T.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[T.jsx("span",{className:"uppercase",children:t.source}),t.expires&&T.jsxs("span",{children:["Expires: ",i(t.expires)]})]})]})]})})}function qye({swpc:t}){var n,i;if(!t||!t.enabled)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(bD,{size:14}),"Solar/Geomagnetic Indices"]}),T.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 T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(bD,{size:14}),"Solar/Geomagnetic Indices"]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Solar Flux Index"}),T.jsx("div",{className:"text-2xl font-mono text-slate-100",children:((n=t.sfi)==null?void 0:n.toFixed(0))??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"SFI (10.7 cm)"})]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Planetary K-Index"}),T.jsx("div",{className:`text-2xl font-mono ${e(t.kp_current)}`,children:((i=t.kp_current)==null?void 0:i.toFixed(1))??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"Kp"})]})]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3 mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2",children:"NOAA Space Weather Scales"}),T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"R:"}),T.jsx("span",{className:`text-sm font-mono ${r(t.r_scale)}`,children:t.r_scale??0})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"S:"}),T.jsx("span",{className:`text-sm font-mono ${r(t.s_scale)}`,children:t.s_scale??0})]}),T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx("span",{className:"text-xs text-slate-400",children:"G:"}),T.jsx("span",{className:`text-sm font-mono ${r(t.g_scale)}`,children:t.g_scale??0})]})]}),T.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&&T.jsxs("div",{className:"space-y-2",children:[T.jsx("div",{className:"text-xs text-slate-500",children:"Active Warnings"}),t.active_warnings.slice(0,3).map((a,o)=>T.jsx("div",{className:"text-xs text-amber-400 bg-amber-500/10 rounded p-2",children:a},o))]})]})}function Kye({ducting:t}){if(!t||!t.enabled)return T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(TD,{size:14}),"Tropospheric Ducting"]}),T.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 T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(TD,{size:14}),"Tropospheric Ducting"]}),T.jsxs("div",{className:"bg-bg-hover rounded-lg p-4 mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Condition"}),T.jsx("div",{className:`text-xl font-medium ${e(t.condition)}`,children:r(t.condition)})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Min Gradient"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.min_gradient??"—"}),T.jsx("div",{className:"text-xs text-slate-500",children:"M-units/km"})]}),t.duct_thickness_m&&T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Thickness"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_thickness_m}),T.jsx("div",{className:"text-xs text-slate-500",children:"meters"})]}),t.duct_base_m&&T.jsxs("div",{className:"bg-bg-hover rounded-lg p-3",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Duct Base"}),T.jsx("div",{className:"text-lg font-mono text-slate-100",children:t.duct_base_m}),T.jsx("div",{className:"text-xs text-slate-500",children:"meters AGL"})]})]}),T.jsxs("div",{className:"text-xs text-slate-500 bg-bg-hover rounded p-2",children:[T.jsx("div",{children:"dM/dz reference:"}),T.jsxs("div",{className:"mt-1 space-y-0.5",children:[T.jsx("div",{children:">79: Normal propagation"}),T.jsx("div",{children:"0–79: Super-refraction"}),T.jsx("div",{children:"<0: Ducting (trapping layer)"})]})]}),t.last_update&&T.jsxs("div",{className:"text-xs text-slate-500 mt-3",children:["Last update: ",t.last_update]})]})}function Qye(){var k;const[t,e]=Y.useState(null),[r,n]=Y.useState([]),[i,a]=Y.useState(null),[o,s]=Y.useState(null),[l,u]=Y.useState([]),[c,f]=Y.useState(null),[h,d]=Y.useState([]),[p,g]=Y.useState([]),[m,y]=Y.useState([]),[_,S]=Y.useState([]),[b,C]=Y.useState(0),[M,A]=Y.useState(!0),[D,E]=Y.useState(null);return Y.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([q3().catch(()=>null),l$().catch(()=>[]),c$().catch(()=>null),f$().catch(()=>null),h$().catch(()=>[]),d$().catch(()=>null),v$().catch(()=>[]),p$().catch(()=>[]),g$().catch(()=>[]),m$().catch(()=>({hotspots:[],new_ignitions:0}))]).then(([I,z,O,j,G,F,U,V,W,H])=>{e(I),n(z),a(O),s(j),u(G),f(F),d(U||[]),g(V||[]),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?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading environmental data..."})}):D?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",D]})}):t!=null&&t.enabled?T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("h1",{className:"text-xl font-semibold text-slate-200",children:"Environment"}),T.jsxs("div",{className:"text-xs text-slate-500",children:[r.length," active event",r.length!==1?"s":""]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(s2,{size:14}),"Feed Status"]}),T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.feeds.map(I=>T.jsx(Yye,{feed:I},I.source))})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[T.jsx(qye,{swpc:i}),T.jsx(Kye,{ducting:o})]}),T.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(GZ,{size:14}),"Active Wildfires (",l.length,")"]}),l.length>0?T.jsx("div",{className:"space-y-3",children:l.map(I=>T.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:[T.jsxs("div",{className:"flex items-center justify-between mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.name}),T.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})]}),T.jsxs("div",{className:"text-xs text-slate-400 space-y-1",children:[T.jsxs("div",{children:[I.acres.toLocaleString()," acres, ",I.pct_contained,"% contained"]}),I.distance_km&&I.nearest_anchor&&T.jsxs("div",{children:[Math.round(I.distance_km)," km from ",I.nearest_anchor]})]})]},I.event_id))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(sd,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active wildfires in the area"})]})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(ZZ,{size:14}),"Avalanche Advisories"]}),c!=null&&c.off_season?T.jsx("div",{className:"text-slate-500 py-4",children:T.jsx("p",{children:"Off season - check back in December"})}):c&&c.advisories.length>0?T.jsxs("div",{className:"space-y-3",children:[c.advisories.map(I=>T.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:[T.jsxs("div",{className:"flex items-center justify-between mb-1",children:[T.jsx("span",{className:"text-sm font-medium text-slate-200",children:I.zone_name}),T.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})]}),T.jsx("div",{className:"text-xs text-slate-400",children:I.center}),I.travel_advice&&T.jsx("div",{className:"text-xs text-slate-500 mt-2 line-clamp-2",children:I.travel_advice})]},I.event_id)),((k=c.advisories[0])==null?void 0:k.center_link)&&T.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"})]}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(sd,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No avalanche advisories"})]})]})]}),h.length>0&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(jZ,{size:14}),"Stream Gauges (",h.length,")"]}),T.jsx("div",{className:"space-y-2",children:h.map(I=>{var z,O,j,G,F;return T.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:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm text-slate-200",children:((z=I.properties)==null?void 0:z.site_name)||"Unknown Site"}),T.jsxs("span",{className:"text-sm font-mono text-slate-300",children:[(j=(O=I.properties)==null?void 0:O.value)==null?void 0:j.toLocaleString()," ",(G=I.properties)==null?void 0:G.unit]})]}),T.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)&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(RZ,{size:14}),"Road Conditions"]}),p.length>0&&T.jsxs("div",{className:"mb-4",children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Traffic Flow"}),T.jsx("div",{className:"space-y-2",children:p.map(I=>{var z,O,j,G,F,U,V,W,H;return T.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":((j=I.properties)==null?void 0:j.speedRatio)<.8?"bg-yellow-500/10 border-l-2 border-yellow-500":"bg-green-500/10 border-l-2 border-green-500"}`,children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm text-slate-200",children:((G=I.properties)==null?void 0:G.corridor)||"Unknown"}),T.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`})]}),!((V=I.properties)!=null&&V.roadClosure)&&T.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&&T.jsxs("div",{children:[T.jsx("div",{className:"text-xs text-slate-500 mb-2 uppercase",children:"Road Events"}),T.jsx("div",{className:"space-y-2",children:m.map(I=>{var z,O;return T.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:[T.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.is_closure)&&T.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"CLOSURE"}),T.jsx("span",{className:"text-sm text-slate-200 line-clamp-1",children:I.headline})]}),T.jsx("div",{className:"text-xs text-slate-500 mt-1 uppercase",children:I.event_type})]},I.event_id)})})]})]}),_.length>0&&T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(qZ,{size:14}),"Satellite Hotspots (",_.length,")",b>0&&T.jsxs("span",{className:"ml-2 px-2 py-0.5 text-xs rounded-full bg-red-500/20 text-red-400 animate-pulse",children:[b," NEW"]})]}),T.jsx("div",{className:"space-y-2",children:_.map(I=>{var z,O,j,G,F,U;return T.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:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[((O=I.properties)==null?void 0:O.new_ignition)&&T.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-red-500/20 text-red-400",children:"NEW"}),T.jsx("span",{className:"text-sm text-slate-200",children:I.headline})]}),((j=I.properties)==null?void 0:j.frp)&&T.jsxs("span",{className:"text-sm font-mono text-orange-400",children:[Math.round(I.properties.frp)," MW"]})]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-1 flex items-center gap-3",children:[T.jsxs("span",{children:["Conf: ",((G=I.properties)==null?void 0:G.confidence)||"N/A"]}),((F=I.properties)==null?void 0:F.acq_time)&&T.jsxs("span",{children:["@",I.properties.acq_time,"Z"]}),((U=I.properties)==null?void 0:U.near_fire)&&T.jsxs("span",{children:["Near: ",I.properties.near_fire]})]})]},I.event_id)})})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(ms,{size:14}),"Active Events (",r.length,")"]}),r.length>0?T.jsx("div",{className:"space-y-3",children:r.map(I=>T.jsx(Xye,{event:I},I.event_id))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[T.jsx(sd,{size:16,className:"text-green-500"}),T.jsx("span",{children:"No active environmental events"})]})]})]}):T.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-center",children:[T.jsx("div",{className:"w-16 h-16 rounded-full bg-bg-card border border-border flex items-center justify-center mb-6",children:T.jsx(Wd,{size:32,className:"text-slate-500"})}),T.jsx("h2",{className:"text-xl font-semibold text-slate-300 mb-2",children:"Environmental Feeds Disabled"}),T.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 h5=[{key:"bot",label:"Bot",icon:EZ},{key:"connection",label:"Connection",icon:$3},{key:"response",label:"Response",icon:UZ},{key:"history",label:"History",icon:VZ},{key:"memory",label:"Memory",icon:NZ},{key:"context",label:"Context",icon:F3},{key:"commands",label:"Commands",icon:JZ},{key:"llm",label:"LLM",icon:j3},{key:"weather",label:"Weather",icon:Wd},{key:"meshmonitor",label:"MeshMonitor",icon:Zc},{key:"knowledge",label:"Knowledge",icon:IZ},{key:"mesh_sources",label:"Mesh Sources",icon:HZ},{key:"mesh_intelligence",label:"Intelligence",icon:s2},{key:"environmental",label:"Environmental",icon:e$},{key:"dashboard",label:"Dashboard",icon:G3}],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."},Jye=[{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"}],e0e=[{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 Ma({info:t,link:e,linkText:r="Learn more"}){const[n,i]=Y.useState(!1);return T.jsxs("div",{className:"relative inline-block",children:[T.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&&T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>i(!1)}),T.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&&T.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," ",T.jsx(Ud,{size:10})]})]})]})]})}function un({text:t}){return T.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]=Y.useState(!1),c=n==="password";return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,o&&T.jsx(Ma,{info:o,link:s})]}),T.jsxs("div",{className:"relative",children:[T.jsx("input",{type:c&&!l?"password":"text",value:e,onChange:f=>r(f.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&&T.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?T.jsx(FZ,{size:16}):T.jsx(F3,{size:16})})]}),a&&T.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function ze({label:t,value:e,onChange:r,min:n,max:i,step:a=1,helper:o="",info:s="",infoLink:l=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,s&&T.jsx(Ma,{info:s,link:l})]}),T.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&&T.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 T.jsxs("div",{className:"flex items-center justify-between py-2",children:[T.jsxs("div",{children:[T.jsxs("span",{className:"flex items-center text-sm text-slate-300",children:[t,i&&T.jsx(Ma,{info:i,link:a})]}),n&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]}),T.jsx("button",{type:"button",onClick:()=>r(!e),className:`relative w-11 h-6 rounded-full transition-colors ${e?"bg-accent":"bg-[#1e2a3a]"}`,children:T.jsx("span",{className:`absolute top-1 left-1 w-4 h-4 rounded-full bg-white transition-transform ${e?"translate-x-5":""}`})})]})}function da({label:t,value:e,onChange:r,options:n,helper:i="",info:a="",infoLink:o=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&T.jsx(Ma,{info:a,link:o})]}),T.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=>T.jsx("option",{value:s.value,children:s.label},s.value))}),i&&T.jsx("p",{className:"text-xs text-slate-600",children:i})]})}function t0e({label:t,value:e,onChange:r,rows:n=4,helper:i="",info:a="",infoLink:o=""}){return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,a&&T.jsx(Ma,{info:a,link:o})]}),T.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&&T.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]=Y.useState(e.join(", "));Y.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>c.trim()).filter(Boolean);r(u)};return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&T.jsx(Ma,{info:i,link:a})]}),T.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&&T.jsx("p",{className:"text-xs text-slate-600",children:n})]})}function L8({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=Y.useState(e.join(", "));Y.useEffect(()=>{s(e.join(", "))},[e]);const l=()=>{const u=o.split(",").map(c=>parseInt(c.trim(),10)).filter(c=>!isNaN(c));r(u)};return T.jsxs("div",{className:"space-y-1",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:[t,i&&T.jsx(Ma,{info:i,link:a})]}),T.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&&T.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 T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-3 space-y-2",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("span",{className:"text-sm text-slate-300",children:t}),T.jsx("p",{className:"text-xs text-slate-600",children:e})]}),T.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:T.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&&T.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-[#1e2a3a]",children:[T.jsxs("span",{className:"text-xs text-slate-500",children:[o||"Threshold",":"]}),T.jsx("input",{type:"number",value:i,onChange:f=>a(Number(f.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&&T.jsx("span",{className:"text-xs text-slate-500",children:c})]})]})}function r0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.bot}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.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."}),T.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."})]}),T.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."}),T.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 n0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.connection}),T.jsx(da,{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"?T.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."}):T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.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"}),T.jsx(ze,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function i0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.response}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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."})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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 a0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.history}),T.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."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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."})]}),T.jsx(_t,{label:"Auto Cleanup",checked:t.auto_cleanup,onChange:r=>e({...t,auto_cleanup:r}),helper:"Automatically prune old conversations"}),t.auto_cleanup&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{label:"Cleanup Interval (hours)",value:t.cleanup_interval_hours,onChange:r=>e({...t,cleanup_interval_hours:r}),min:1,helper:"Hours between cleanup runs"}),T.jsx(ze,{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 o0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.memory}),T.jsx(_t,{label:"Enable Memory",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Keep conversation context between messages"}),t.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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 s0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.context}),T.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&&T.jsxs(T.Fragment,{children:[T.jsx(L8,{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."}),T.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."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{label:"Max Age (sec)",value:t.max_age,onChange:r=>e({...t,max_age:r}),min:0,helper:"Ignore messages older than this"}),T.jsx(ze,{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 l0e({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 T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.commands}),T.jsx(_t,{label:"Enable Commands",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Allow !commands on the mesh"}),t.enabled&&T.jsxs(T.Fragment,{children:[T.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."}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Available Commands",T.jsx(Ma,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),T.jsx("div",{className:"grid gap-1",children:Jye.map(i=>{const a=!r.has(i.name.toLowerCase());return T.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#0a0e17] border border-[#1e2a3a] rounded hover:border-[#2a3a4a] transition-colors",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("code",{className:"text-accent text-sm",children:["!",i.name]}),T.jsx("span",{className:"text-xs text-slate-500",children:i.description})]}),T.jsx("button",{type:"button",onClick:()=>n(i.name),className:`relative w-9 h-5 rounded-full transition-colors ${a?"bg-accent":"bg-[#1e2a3a]"}`,children:T.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 u0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.llm}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(da,{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."}),T.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)."})]}),T.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."}),T.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."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{label:"Timeout (sec)",value:t.timeout,onChange:r=>e({...t,timeout:r}),min:5,max:120,helper:"Maximum seconds to wait for response"}),T.jsx(ze,{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"})]}),T.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&&T.jsx(t0e,{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."}),T.jsx(_t,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),T.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 c0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.weather}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(da,{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"}),T.jsx(da,{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"})]}),T.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 f0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.meshmonitor}),T.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&&T.jsxs(T.Fragment,{children:[T.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."}),T.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."}),T.jsx(ze,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:r=>e({...t,refresh_interval:r}),min:10,helper:"How often to fetch patterns"}),T.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 h0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.knowledge}),T.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&&T.jsxs(T.Fragment,{children:[T.jsx(da,{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")&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.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."}),T.jsx(ze,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r}),helper:"Default 6333"})]}),T.jsx(dt,{label:"Collection",value:t.qdrant_collection,onChange:r=>e({...t,qdrant_collection:r}),helper:"Qdrant collection name"}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.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."}),T.jsx(ze,{label:"TEI Port",value:t.tei_port,onChange:r=>e({...t,tei_port:r}),helper:"Default 8090"})]}),T.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."})]}),T.jsx(dt,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r}),helper:"Local knowledge database file"}),T.jsx(ze,{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 d0e({source:t,onChange:e,onDelete:r}){const[n,i]=Y.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 T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>i(!n),children:[T.jsxs("div",{className:"flex items-center gap-3",children:[n?T.jsx(l2,{size:16}):T.jsx(u2,{size:16}),T.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`}),T.jsx("span",{className:"font-mono text-sm text-slate-200",children:t.name||"Unnamed Source"}),T.jsx("span",{className:"text-xs text-slate-500 bg-[#1e2a3a] px-2 py-0.5 rounded",children:t.type})]}),T.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded",children:T.jsx(Z3,{size:14})})]}),n&&T.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Name",value:t.name,onChange:o=>e({...t,name:o}),helper:"Friendly name for this source"}),T.jsx(da,{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"&&T.jsx(dt,{label:"URL",value:t.url,onChange:o=>e({...t,url:o}),helper:"Full URL including protocol"}),t.type==="meshmonitor"&&T.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"&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Host",value:t.host||"",onChange:o=>e({...t,host:o}),helper:"MQTT broker hostname"}),T.jsx(ze,{label:"Port",value:t.port||1883,onChange:o=>e({...t,port:o}),min:1,max:65535,helper:"1883 plain, 8883 TLS"})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Username",value:t.username||"",onChange:o=>e({...t,username:o})}),T.jsx(dt,{label:"Password",value:t.password||"",onChange:o=>e({...t,password:o}),type:"password"})]}),T.jsx(dt,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:o=>e({...t,topic_root:o}),helper:"Base topic to subscribe to"}),T.jsx(_t,{label:"Use TLS",checked:t.use_tls||!1,onChange:o=>e({...t,use_tls:o}),helper:"Encrypt MQTT connection"})]}),T.jsx(ze,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:o=>e({...t,refresh_interval:o}),min:10,helper:"Polling frequency"}),T.jsx(_t,{label:"Enabled",checked:t.enabled,onChange:o=>e({...t,enabled:o})}),T.jsx(_t,{label:"Polite Mode",checked:t.polite_mode,onChange:o=>e({...t,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function v0e({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 T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.mesh_sources}),t.map((n,i)=>T.jsx(d0e,{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)),T.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:[T.jsx(W3,{size:16})," Add Source"]})]})}function p0e({data:t,onChange:e}){const[r,n]=Y.useState(null);return T.jsxs("div",{className:"space-y-6",children:[T.jsx(un,{text:ln.mesh_intelligence}),T.jsx(_t,{label:"Enable Mesh Intelligence",checked:t.enabled,onChange:i=>e({...t,enabled:i}),helper:"Activate health scoring and alerting"}),t.enabled&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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."})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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"})]}),T.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)."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{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."}),T.jsx(ze,{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)."})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Regions",T.jsx(Ma,{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)=>T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg overflow-hidden",children:[T.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a0e17] cursor-pointer",onClick:()=>n(r===a?null:a),children:[T.jsxs("div",{className:"flex items-center gap-3",children:[r===a?T.jsx(l2,{size:16}):T.jsx(u2,{size:16}),T.jsx("span",{className:"font-medium text-slate-200",children:i.name||"Unnamed Region"}),T.jsx("span",{className:"text-xs text-slate-500",children:i.local_name})]}),T.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:T.jsx(Z3,{size:14})})]}),r===a&&T.jsxs("div",{className:"p-4 space-y-3 border-t border-[#1e2a3a]",children:[T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(dt,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),T.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})}})]}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{label:"Latitude",value:i.lat,onChange:o=>{const s=[...t.regions];s[a]={...i,lat:o},e({...t,regions:s})},step:1e-4}),T.jsx(ze,{label:"Longitude",value:i.lon,onChange:o=>{const s=[...t.regions];s[a]={...i,lon:o},e({...t,regions:s})},step:1e-4})]}),T.jsx(dt,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),T.jsx(qo,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),T.jsx(qo,{label:"Cities",value:i.cities,onChange:o=>{const s=[...t.regions];s[a]={...i,cities:o},e({...t,regions:s})}})]})]},a)),T.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:[T.jsx(W3,{size:16})," Add Region"]})]}),T.jsxs("div",{className:"space-y-3",children:[T.jsxs("label",{className:"flex items-center text-xs text-slate-500 uppercase tracking-wide",children:["Alert Rules",T.jsx(Ma,{info:"Configure which conditions trigger alerts. Each rule can have an optional threshold value."})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Infrastructure"}),T.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}})}),T.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}})}),T.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}})}),T.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}})}),T.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}})}),T.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}})})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Power"}),T.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:"%"}),T.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:"%"}),T.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:"%"}),T.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}})}),T.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}})}),T.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}})})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Utilization"}),T.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`}),T.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"})]}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h4",{className:"text-xs text-slate-400 font-medium",children:"Health Scores"}),T.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"}),T.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 g0e({data:t,onChange:e}){var r,n,i,a,o,s,l,u,c,f,h,d,p,g,m,y;return T.jsxs("div",{className:"space-y-6",children:[T.jsx(un,{text:ln.environmental}),T.jsx(_t,{label:"Enable Environmental Feeds",checked:t.enabled,onChange:_=>e({...t,enabled:_}),helper:"Activate live data polling"}),t.enabled&&T.jsxs(T.Fragment,{children:[T.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"}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NWS Weather Alerts"}),T.jsx(_t,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&T.jsxs(T.Fragment,{children:[T.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."}),T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),T.jsx(da,{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."})]})]})]}),T.jsx("div",{className:"border border-[#1e2a3a] rounded-lg p-4",children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NOAA Space Weather (SWPC)"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Solar indices, geomagnetic storms, HF propagation"})]}),T.jsx(_t,{label:"",checked:t.swpc.enabled,onChange:_=>e({...t,swpc:{...t.swpc,enabled:_}})})]})}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Tropospheric Ducting"}),T.jsx("p",{className:"text-xs text-slate-600",children:"VHF/UHF extended range conditions"})]}),T.jsx(_t,{label:"",checked:t.ducting.enabled,onChange:_=>e({...t,ducting:{...t.ducting,enabled:_}})})]}),t.ducting.enabled&&T.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[T.jsx(ze,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),T.jsx(ze,{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."}),T.jsx(ze,{label:"Longitude",value:t.ducting.longitude,onChange:_=>e({...t,ducting:{...t.ducting,longitude:_}}),step:.01})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NIFC Fire Perimeters"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Active wildfires from National Interagency Fire Center"})]}),T.jsx(_t,{label:"",checked:t.fires.enabled,onChange:_=>e({...t,fires:{...t.fires,enabled:_}})})]}),t.fires.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.jsx(ze,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),T.jsx(da,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),options:e0e,helper:"Filter fires by state",info:"Two-letter state code for NIFC wildfire filtering."})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"Avalanche Advisories"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Backcountry avalanche danger ratings"})]}),T.jsx(_t,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&T.jsxs(T.Fragment,{children:[T.jsx(ze,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),T.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/"}),T.jsx(L8,{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."})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"USGS Stream Gauges"}),T.jsx("p",{className:"text-xs text-slate-600",children:"River and stream water levels"})]}),T.jsx(_t,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var S,b;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((S=t.usgs)==null?void 0:S.tick_seconds)||900,sites:((b=t.usgs)==null?void 0:b.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&T.jsxs(T.Fragment,{children:[T.jsx(ze,{label:"Tick Seconds",value:t.usgs.tick_seconds,onChange:_=>e({...t,usgs:{...t.usgs,tick_seconds:_}}),min:900,helper:"Minimum 15 min (900s)"}),T.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"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"TomTom Traffic"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Traffic flow on monitored corridors"})]}),T.jsx(_t,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var S,b,C;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((S=t.traffic)==null?void 0:S.tick_seconds)||300,api_key:((b=t.traffic)==null?void 0:b.api_key)||"",corridors:((C=t.traffic)==null?void 0:C.corridors)||[]}})}})]}),((a=t.traffic)==null?void 0:a.enabled)&&T.jsxs(T.Fragment,{children:[T.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"}),T.jsx(ze,{label:"Tick Seconds",value:t.traffic.tick_seconds,onChange:_=>e({...t,traffic:{...t.traffic,tick_seconds:_}}),min:60}),T.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Corridors (each with name, lat, lon):"}),(t.traffic.corridors||[]).map((_,S)=>T.jsxs("div",{className:"grid grid-cols-4 gap-2 items-end",children:[T.jsx(dt,{label:"Name",value:_.name,onChange:b=>{const C=[...t.traffic.corridors];C[S]={..._,name:b},e({...t,traffic:{...t.traffic,corridors:C}})}}),T.jsx(ze,{label:"Lat",value:_.lat,onChange:b=>{const C=[...t.traffic.corridors];C[S]={..._,lat:b},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),T.jsx(ze,{label:"Lon",value:_.lon,onChange:b=>{const C=[...t.traffic.corridors];C[S]={..._,lon:b},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),T.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((b,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)),T.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"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"511 Road Conditions"}),T.jsx("p",{className:"text-xs text-slate-600",children:"State DOT road events and closures"})]}),T.jsx(_t,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var S,b,C,M,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((S=t.roads511)==null?void 0:S.tick_seconds)||300,api_key:((b=t.roads511)==null?void 0:b.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)&&T.jsxs(T.Fragment,{children:[T.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"}),T.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"}),T.jsx(ze,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),T.jsx(qo,{label:"Endpoints",value:t.roads511.endpoints,onChange:_=>e({...t,roads511:{...t.roads511,endpoints:_}}),helper:"e.g., /get/event, /get/mountainpasses"}),T.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[T.jsx(ze,{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}),T.jsx(ze,{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}),T.jsx(ze,{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}),T.jsx(ze,{label:"North",value:((f=t.roads511.bbox)==null?void 0:f[3])||0,onChange:_=>{const S=[...t.roads511.bbox||[0,0,0,0]];S[3]=_,e({...t,roads511:{...t.roads511,bbox:S}})},step:.01})]}),T.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box filter (leave all 0 to disable)"})]})]}),T.jsxs("div",{className:"border border-[#1e2a3a] rounded-lg p-4 space-y-3",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsx("span",{className:"text-sm font-medium text-slate-300",children:"NASA FIRMS Satellite Fire Detection"}),T.jsx("p",{className:"text-xs text-slate-600",children:"Near real-time thermal anomalies from satellites"})]}),T.jsx(_t,{label:"",checked:((h=t.firms)==null?void 0:h.enabled)||!1,onChange:_=>{var S,b,C,M,A,D,E;return e({...t,firms:{...t.firms,enabled:_,tick_seconds:((S=t.firms)==null?void 0:S.tick_seconds)||1800,map_key:((b=t.firms)==null?void 0:b.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:((D=t.firms)==null?void 0:D.confidence_min)||"nominal",proximity_km:((E=t.firms)==null?void 0:E.proximity_km)||10}})}})]}),((d=t.firms)==null?void 0:d.enabled)&&T.jsxs(T.Fragment,{children:[T.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/"}),T.jsx(ze,{label:"Tick Seconds",value:t.firms.tick_seconds,onChange:_=>e({...t,firms:{...t.firms,tick_seconds:_}}),min:300,helper:"Minimum 5 min (300s)"}),T.jsx(da,{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)"}]}),T.jsx(ze,{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"}),T.jsx(da,{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"}]}),T.jsx(ze,{label:"Proximity (km)",value:t.firms.proximity_km,onChange:_=>e({...t,firms:{...t.firms,proximity_km:_}}),step:.5,helper:"Distance to match known fires"}),T.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[T.jsx(ze,{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}),T.jsx(ze,{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}),T.jsx(ze,{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}),T.jsx(ze,{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})]}),T.jsx("div",{className:"text-xs text-slate-500",children:"Bounding box for monitoring area (required)"})]})]})]})]})}function m0e({data:t,onChange:e}){return T.jsxs("div",{className:"space-y-4",children:[T.jsx(un,{text:ln.dashboard}),T.jsx(_t,{label:"Enable Dashboard",checked:t.enabled,onChange:r=>e({...t,enabled:r}),helper:"Run the web dashboard"}),t.enabled&&T.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[T.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."}),T.jsx(ze,{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 y0e(){var E;const[t,e]=Y.useState(null),[r,n]=Y.useState(null),[i,a]=Y.useState("bot"),[o,s]=Y.useState(!0),[l,u]=Y.useState(!1),[c,f]=Y.useState(null),[h,d]=Y.useState(null),[p,g]=Y.useState(!1),[m,y]=Y.useState(!1),_=Y.useCallback(async()=>{try{const k=await fetch("/api/config");if(!k.ok)throw new Error("Failed to fetch config");const I=await k.json();e(I),n(JSON.parse(JSON.stringify(I))),y(!1),f(null)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{s(!1)}},[]);Y.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),Y.useEffect(()=>{t&&r&&y(JSON.stringify(t)!==JSON.stringify(r))},[t,r]);const S=async()=>{if(t){u(!0),f(null),d(null);try{const k=t[i],I=await fetch(`/api/config/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),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(k){f(k instanceof Error?k.message:"Save failed")}finally{u(!1)}}},b=()=>{r&&(e(JSON.parse(JSON.stringify(r))),y(!1))},C=async()=>{try{await fetch("/api/restart",{method:"POST"}),g(!1),d("Restart initiated")}catch{f("Restart failed")}},M=(k,I)=>{t&&e({...t,[k]:I})};if(o)return T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading configuration..."})});if(!t)return T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-red-400",children:"Failed to load configuration"})});const A=()=>{switch(i){case"bot":return T.jsx(r0e,{data:t.bot,onChange:k=>M("bot",k)});case"connection":return T.jsx(n0e,{data:t.connection,onChange:k=>M("connection",k)});case"response":return T.jsx(i0e,{data:t.response,onChange:k=>M("response",k)});case"history":return T.jsx(a0e,{data:t.history,onChange:k=>M("history",k)});case"memory":return T.jsx(o0e,{data:t.memory,onChange:k=>M("memory",k)});case"context":return T.jsx(s0e,{data:t.context,onChange:k=>M("context",k)});case"commands":return T.jsx(l0e,{data:t.commands,onChange:k=>M("commands",k)});case"llm":return T.jsx(u0e,{data:t.llm,onChange:k=>M("llm",k)});case"weather":return T.jsx(c0e,{data:t.weather,onChange:k=>M("weather",k)});case"meshmonitor":return T.jsx(f0e,{data:t.meshmonitor,onChange:k=>M("meshmonitor",k)});case"knowledge":return T.jsx(h0e,{data:t.knowledge,onChange:k=>M("knowledge",k)});case"mesh_sources":return T.jsx(v0e,{data:t.mesh_sources,onChange:k=>M("mesh_sources",k)});case"mesh_intelligence":return T.jsx(p0e,{data:t.mesh_intelligence,onChange:k=>M("mesh_intelligence",k)});case"environmental":return T.jsx(g0e,{data:t.environmental,onChange:k=>M("environmental",k)});case"dashboard":return T.jsx(m0e,{data:t.dashboard,onChange:k=>M("dashboard",k)});default:return null}},D=((E=h5.find(k=>k.key===i))==null?void 0:E.label)||i;return T.jsxs("div",{className:"flex gap-6 h-[calc(100vh-8rem)]",children:[T.jsx("div",{className:"w-48 flex-shrink-0 space-y-1",children:h5.map(({key:k,label:I,icon:z})=>T.jsxs("button",{onClick:()=>a(k),className:`w-full flex items-center gap-2 px-3 py-2 rounded text-sm transition-colors ${i===k?"bg-accent text-white":"text-slate-400 hover:text-slate-200 hover:bg-bg-hover"}`,children:[T.jsx(z,{size:16}),T.jsx("span",{children:I}),m&&i===k&&T.jsx("span",{className:"ml-auto w-2 h-2 bg-amber-500 rounded-full"})]},k))}),T.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[T.jsxs("div",{className:"flex items-center justify-between mb-6",children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx(U3,{size:20,className:"text-slate-500"}),T.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:D})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[m&&T.jsxs("button",{onClick:b,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:[T.jsx(XZ,{size:14}),"Discard"]}),T.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?T.jsx(YZ,{size:14,className:"animate-spin"}):T.jsx(KZ,{size:14}),"Save"]})]})]}),p&&T.jsxs("div",{className:"flex items-center justify-between p-3 mb-4 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:[T.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[T.jsx(ms,{size:16}),T.jsx("span",{className:"text-sm",children:"Restart required for changes to take effect"})]}),T.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&&T.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:[T.jsx(Y3,{size:16}),T.jsx("span",{className:"text-sm",children:c})]}),h&&T.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:[T.jsx(OZ,{size:16}),T.jsx("span",{className:"text-sm",children:h})]}),T.jsx("div",{className:"flex-1 overflow-y-auto pr-2",children:T.jsx("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:A()})})]})]})}const d5={infra_offline:r$,infra_recovery:$3,battery_warning:Tx,battery_critical:Tx,battery_emergency:Tx,hf_blackout:f2,uhf_ducting:Zc,weather_warning:Wd,weather_watch:Wd,new_router:Zc,packet_flood:ms,sustained_high_util:ms,region_blackout:D0,default:ey};function _0e(t){return d5[t]||d5.default}function P8(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 x0e(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 S0e(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 w0e(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 b0e({alert:t,onAcknowledge:e}){var i;const r=P8(t.severity),n=_0e(t.type);return T.jsx("div",{className:`p-4 rounded-lg ${r.bg} border-l-4 ${r.border}`,children:T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(n,{size:20,className:r.iconColor}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[T.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${r.badge}`,children:(i=t.severity)==null?void 0:i.toUpperCase()}),T.jsx("span",{className:"text-xs text-slate-500",children:t.type})]}),T.jsx("div",{className:"text-sm text-slate-200",children:t.message}),T.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-slate-500",children:[T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx(ty,{size:12}),t.timestamp?x0e(t.timestamp):"Just now"]}),t.scope_value&&T.jsxs("span",{children:[t.scope_type,": ",t.scope_value]})]})]}),T.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 T0e({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 T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg",children:[T.jsxs("div",{className:"p-4 border-b border-border flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(c2,{size:14,className:"text-slate-400"}),T.jsx("span",{className:"text-sm text-slate-400",children:"Filter:"})]}),T.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=>T.jsx("option",{value:c,children:c==="all"?"All Types":c.replace(/_/g," ")},c))}),T.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=>T.jsx("option",{value:c,children:c==="all"?"All Severities":c.charAt(0).toUpperCase()+c.slice(1)},c))})]}),T.jsx("div",{className:"overflow-x-auto",children:T.jsxs("table",{className:"w-full",children:[T.jsx("thead",{children:T.jsxs("tr",{className:"border-b border-border",children:[T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Time"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Type"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Severity"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Message"}),T.jsx("th",{className:"text-left text-xs font-medium text-slate-400 p-4",children:"Duration"})]})}),T.jsx("tbody",{children:t.length>0?t.map((c,f)=>{const h=P8(c.severity);return T.jsxs("tr",{className:"border-b border-border hover:bg-bg-hover",children:[T.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono whitespace-nowrap",children:S0e(c.timestamp)}),T.jsx("td",{className:"p-4 text-sm text-slate-300",children:c.type.replace(/_/g," ")}),T.jsx("td",{className:"p-4",children:T.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${h.badge}`,children:c.severity})}),T.jsx("td",{className:"p-4 text-sm text-slate-200 max-w-md truncate",children:c.message}),T.jsx("td",{className:"p-4 text-sm text-slate-400 font-mono",children:c.duration?w0e(c.duration):"-"})]},c.id||f)}):T.jsx("tr",{children:T.jsx("td",{colSpan:5,className:"p-8 text-center text-slate-500",children:"No alert history available"})})})]})}),o>1&&T.jsxs("div",{className:"p-4 border-t border-border flex items-center justify-between",children:[T.jsxs("span",{className:"text-sm text-slate-400",children:["Page ",a," of ",o]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.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:T.jsx(zZ,{size:16})}),T.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:T.jsx(u2,{size:16})})]})]})]})}function C0e({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 ey;case"daily":return ty;case"weekly":return ty;default:return ey}})();return T.jsx("div",{className:"p-4 rounded-lg bg-bg-hover border border-border",children:T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center",children:T.jsx(n,{size:18,className:"text-blue-400"})}),T.jsxs("div",{className:"flex-1",children:[T.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&&T.jsxs("span",{className:"text-slate-400 font-normal ml-2",children:["(",t.scope_type,": ",t.scope_value,")"]})]}),T.jsxs("div",{className:"text-xs text-slate-500 mt-0.5",children:[e()," • Node ",t.user_id]})]}),T.jsx("div",{className:`w-2 h-2 rounded-full ${t.enabled?"bg-green-500":"bg-slate-500"}`})]})})}function M0e(){const[t,e]=Y.useState([]),[r,n]=Y.useState([]),[i,a]=Y.useState([]),[o,s]=Y.useState(!0),[l,u]=Y.useState(null),[c,f]=Y.useState("all"),[h,d]=Y.useState("all"),[p,g]=Y.useState(1),[m,y]=Y.useState(1),_=20,[S,b]=Y.useState(new Set),{lastAlert:C}=h2();Y.useEffect(()=>{document.title="Alerts — MeshAI"},[]),Y.useEffect(()=>{Promise.all([X3().catch(()=>[]),MD(_,0).catch(()=>({items:[],total:0})),s$().catch(()=>[])]).then(([D,E,k])=>{e(D),Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_))),a(k),s(!1)}).catch(D=>{u(D.message),s(!1)})},[]),Y.useEffect(()=>{C&&e(D=>D.some(k=>k.type===C.type&&k.message===C.message)?D:[C,...D])},[C]),Y.useEffect(()=>{const D=(p-1)*_;MD(_,D,c,h).then(E=>{Array.isArray(E)?(n(E),y(1)):(n(E.items||[]),y(Math.ceil((E.total||0)/_)))}).catch(()=>{})},[p,c,h]);const M=Y.useCallback(D=>{const E=`${D.type}-${D.message}-${D.timestamp}`;b(k=>new Set([...k,E]))},[]),A=t.filter(D=>{const E=`${D.type}-${D.message}-${D.timestamp}`;return!S.has(E)});return o?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsx("div",{className:"text-slate-400",children:"Loading alerts..."})}):l?T.jsx("div",{className:"flex items-center justify-center h-64",children:T.jsxs("div",{className:"text-red-400",children:["Error: ",l]})}):T.jsxs("div",{className:"space-y-6",children:[T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(ms,{size:14}),"Active Alerts (",A.length,")"]}),A.length>0?T.jsx("div",{className:"space-y-3",children:A.map((D,E)=>T.jsx(b0e,{alert:D,onAcknowledge:M},`${D.type}-${D.timestamp}-${E}`))}):T.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-8",children:[T.jsx(sd,{size:20,className:"text-green-500"}),T.jsx("span",{children:"No active alerts — all systems nominal"})]})]}),T.jsxs("div",{children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(ty,{size:14}),"Alert History"]}),T.jsx(T0e,{history:r,typeFilter:c,severityFilter:h,onTypeFilterChange:D=>{f(D),g(1)},onSeverityFilterChange:D=>{d(D),g(1)},page:p,totalPages:m,onPageChange:g})]}),T.jsxs("div",{className:"bg-bg-card border border-border rounded-lg p-6",children:[T.jsxs("h2",{className:"text-sm font-medium text-slate-400 mb-4 flex items-center gap-2",children:[T.jsx(t$,{size:14}),"Mesh Subscriptions (",i.length,")"]}),i.length>0?T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:i.map(D=>T.jsx(C0e,{subscription:D},D.id))}):T.jsxs("div",{className:"text-slate-500 py-4",children:[T.jsx("p",{children:"No active subscriptions."}),T.jsxs("p",{className:"text-xs mt-2",children:["Manage subscriptions via ",T.jsx("code",{className:"text-blue-400",children:"!subscribe"})," on mesh"]})]})]})]})}function A0e(){return T.jsx(w$,{children:T.jsx(C$,{children:T.jsxs(mZ,{children:[T.jsx(rc,{path:"/",element:T.jsx(D$,{})}),T.jsx(rc,{path:"/mesh",element:T.jsx($ye,{})}),T.jsx(rc,{path:"/environment",element:T.jsx(Qye,{})}),T.jsx(rc,{path:"/config",element:T.jsx(y0e,{})}),T.jsx(rc,{path:"/alerts",element:T.jsx(M0e,{})})]})})})}QS.createRoot(document.getElementById("root")).render(T.jsx(Bc.StrictMode,{children:T.jsx(TZ,{children:T.jsx(A0e,{})})})); + */(function(t,e){(function(r,n){n(e)})(eU,function(r){var n="1.9.4";function i(v){var x,w,P,N;for(w=1,P=arguments.length;w"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,w=v.y-this.y;return Math.sqrt(x*x+w*w)},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,w){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,w)}function X(v,x){if(v)for(var w=x?[v,x]:v,P=0,N=w.length;P=this.min.x&&w.x<=this.max.x&&x.y>=this.min.y&&w.y<=this.max.y},intersects:function(v){v=K(v);var x=this.min,w=this.max,P=v.min,N=v.max,B=N.x>=x.x&&P.x<=w.x,Z=N.y>=x.y&&P.y<=w.y;return B&&Z},overlaps:function(v){v=K(v);var x=this.min,w=this.max,P=v.min,N=v.max,B=N.x>x.x&&P.xx.y&&P.y=x.lat&&N.lat<=w.lat&&P.lng>=x.lng&&N.lng<=w.lng},intersects:function(v){v=ie(v);var x=this._southWest,w=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>=x.lat&&P.lat<=w.lat,Z=N.lng>=x.lng&&P.lng<=w.lng;return B&&Z},overlaps:function(v){v=ie(v);var x=this._southWest,w=this._northEast,P=v.getSouthWest(),N=v.getNorthEast(),B=N.lat>x.lat&&P.latx.lng&&P.lng1,G8=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}(),H8=function(){return!!document.createElement("canvas").getContext}(),A_=!!(document.createElementNS&&rt("svg").createSVGRect),W8=!!A_&&function(){var v=document.createElement("div");return v.innerHTML="",(v.firstChild&&v.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),U8=!A_&&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}}(),Z8=navigator.platform.indexOf("Mac")===0,$8=navigator.platform.indexOf("Linux")===0;function Wi(v){return navigator.userAgent.toLowerCase().indexOf(v)>=0}var Re={ie:gr,ielt9:Br,edge:Gi,webkit:Hi,android:yu,android23:nL,androidStock:I8,opera:C_,chrome:iL,gecko:aL,safari:E8,phantom:oL,opera12:sL,win:N8,ie3d:lL,webkit3d:M_,gecko3d:uL,any3d:R8,mobile:Rh,mobileWebkit:O8,mobileWebkit3d:z8,msPointer:cL,pointer:hL,touch:B8,touchNative:fL,mobileOpera:j8,mobileGecko:V8,retina:F8,passiveEvents:G8,canvas:H8,svg:A_,vml:U8,inlineSvg:W8,mac:Z8,linux:$8},dL=Re.msPointer?"MSPointerDown":"pointerdown",vL=Re.msPointer?"MSPointerMove":"pointermove",pL=Re.msPointer?"MSPointerUp":"pointerup",gL=Re.msPointer?"MSPointerCancel":"pointercancel",L_={touchstart:dL,touchmove:vL,touchend:pL,touchcancel:gL},mL={touchstart:J8,touchmove:rp,touchend:rp,touchcancel:rp},_u={},yL=!1;function Y8(v,x,w){return x==="touchstart"&&Q8(),mL[x]?(w=mL[x].bind(this,w),v.addEventListener(L_[x],w,!1),w):(console.warn("wrong event specified:",x),h)}function X8(v,x,w){if(!L_[x]){console.warn("wrong event specified:",x);return}v.removeEventListener(L_[x],w,!1)}function q8(v){_u[v.pointerId]=v}function K8(v){_u[v.pointerId]&&(_u[v.pointerId]=v)}function _L(v){delete _u[v.pointerId]}function Q8(){yL||(document.addEventListener(dL,q8,!0),document.addEventListener(vL,K8,!0),document.addEventListener(pL,_L,!0),document.addEventListener(gL,_L,!0),yL=!0)}function rp(v,x){if(x.pointerType!==(x.MSPOINTER_TYPE_MOUSE||"mouse")){x.touches=[];for(var w in _u)x.touches.push(_u[w]);x.changedTouches=[x],v(x)}}function J8(v,x){x.MSPOINTER_TYPE_TOUCH&&x.pointerType===x.MSPOINTER_TYPE_TOUCH&&Mr(x),rp(v,x)}function eW(v){var x={},w,P;for(P in v)w=v[P],x[P]=w&&w.bind?w.bind(v):w;return v=x,x.type="dblclick",x.detail=2,x.isTrusted=!1,x._simulated=!0,x}var tW=200;function rW(v,x){v.addEventListener("dblclick",x);var w=0,P;function N(B){if(B.detail!==1){P=B.detail;return}if(!(B.pointerType==="mouse"||B.sourceCapabilities&&!B.sourceCapabilities.firesTouchEvents)){var Z=TL(B);if(!(Z.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!Z.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var Q=Date.now();Q-w<=tW?(P++,P===2&&x(eW(B))):P=1,w=Q}}}return v.addEventListener("click",N),{dblclick:x,simDblclick:N}}function nW(v,x){v.removeEventListener("dblclick",x.dblclick),v.removeEventListener("click",x.simDblclick)}var P_=ap(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Oh=ap(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),xL=Oh==="webkitTransition"||Oh==="OTransition"?Oh+"End":"transitionend";function SL(v){return typeof v=="string"?document.getElementById(v):v}function zh(v,x){var w=v.style[x]||v.currentStyle&&v.currentStyle[x];if((!w||w==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(v,null);w=P?P[x]:null}return w==="auto"?null:w}function vt(v,x,w){var P=document.createElement(v);return P.className=x||"",w&&w.appendChild(P),P}function It(v){var x=v.parentNode;x&&x.removeChild(v)}function np(v){for(;v.firstChild;)v.removeChild(v.firstChild)}function xu(v){var x=v.parentNode;x&&x.lastChild!==v&&x.appendChild(v)}function Su(v){var x=v.parentNode;x&&x.firstChild!==v&&x.insertBefore(v,x.firstChild)}function k_(v,x){if(v.classList!==void 0)return v.classList.contains(x);var w=ip(v);return w.length>0&&new RegExp("(^|\\s)"+x+"(\\s|$)").test(w)}function et(v,x){if(v.classList!==void 0)for(var w=p(x),P=0,N=w.length;P0?2*window.devicePixelRatio:1;function ML(v){return Re.edge?v.wheelDeltaY/2:v.deltaY&&v.deltaMode===0?-v.deltaY/oW: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 G_(v,x){var w=x.relatedTarget;if(!w)return!0;try{for(;w&&w!==v;)w=w.parentNode}catch{return!1}return w!==v}var sW={__proto__:null,on:Ke,off:Tt,stopPropagation:Rs,disableScrollPropagation:F_,disableClickPropagation:Fh,preventDefault:Mr,stop:Os,getPropagationPath:TL,getMousePosition:CL,getWheelDelta:ML,isExternalTarget:G_,addListener:Ke,removeListener:Tt},AL=U.extend({run:function(v,x,w,P){this.stop(),this._el=v,this._inProgress=!0,this._duration=w||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=Ns(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,w=this._duration*1e3;xthis.options.maxZoom)?this.setZoom(v):this},panInsideBounds:function(v,x){this._enforcingBounds=!0;var w=this.getCenter(),P=this._limitCenter(w,this._zoom,ie(v));return w.equals(P)||this.panTo(P,x),this._enforcingBounds=!1,this},panInside:function(v,x){x=x||{};var w=H(x.paddingTopLeft||x.padding||[0,0]),P=H(x.paddingBottomRight||x.padding||[0,0]),N=this.project(this.getCenter()),B=this.project(v),Z=this.getPixelBounds(),Q=K([Z.min.add(w),Z.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 w=this.getSize(),P=x.divideBy(2).round(),N=w.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:w}))},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),w=o(this._handleGeolocationError,this);return v.watch?this._locationWatchId=navigator.geolocation.watchPosition(x,w,v):navigator.geolocation.getCurrentPosition(x,w,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,w=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: "+w+"."})}},_handleGeolocationResponse:function(v){if(this._container._leaflet_id){var x=v.coords.latitude,w=v.coords.longitude,P=new ue(x,w),N=P.toBounds(v.coords.accuracy*2),B=this._locateOptions;if(B.setView){var Z=this.getBoundsZoom(N);this.setView(P,B.maxZoom?Math.min(Z,B.maxZoom):Z)}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 w=this[v]=new x(this);return this._handlers.push(w),this.options[v]&&w.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 w="leaflet-pane"+(v?" leaflet-"+v.replace("Pane","")+"-pane":""),P=vt("div",w,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()),w=this.unproject(v.getTopRight());return new ne(x,w)},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,w){v=ie(v),w=H(w||[0,0]);var P=this.getZoom()||0,N=this.getMinZoom(),B=this.getMaxZoom(),Z=v.getNorthWest(),Q=v.getSouthEast(),te=this.getSize().subtract(w),ae=K(this.project(Q,P),this.project(Z,P)).getSize(),Ae=Re.any3d?this.options.zoomSnap:1,He=te.x/ae.x,nt=te.y/ae.y,Qr=x?Math.max(He,nt):Math.min(He,nt);return P=this.getScaleZoom(Qr,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 w=this._getTopLeftPoint(v,x);return new X(w,w.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 w=this.options.crs;return x=x===void 0?this._zoom:x,w.scale(v)/w.scale(x)},getScaleZoom:function(v,x){var w=this.options.crs;x=x===void 0?this._zoom:x;var P=w.zoom(v*w.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 CL(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=SL(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,et(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=zh(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||(et(v.markerPane,"leaflet-zoom-hide"),et(v.shadowPane,"leaflet-zoom-hide"))},_resetView:function(v,x,w){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,w)._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,w,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?w&&w.pinch&&this.fire("zoom",w):((N||w&&w.pinch)&&this.fire("zoom",w),this.fire("move",w)),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 w=[],P,N=x==="mouseout"||x==="mouseover",B=v.target||v.srcElement,Z=!1;B;){if(P=this._targets[l(B)],P&&(x==="click"||x==="preclick")&&this._draggableMoved(P)){Z=!0;break}if(P&&P.listens(x,!0)&&(N&&!G_(B,v)||(w.push(P),N))||B===this._container)break;B=B.parentNode}return!w.length&&!Z&&!N&&this.listens(x,!0)&&(w=[this]),w},_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 w=v.type;w==="mousedown"&&O_(x),this._fireDOMEvent(v,w)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(v,x,w){if(v.type==="click"){var P=i({},v);P.type="preclick",this._fireDOMEvent(P,P.type,w)}var N=this._findEventTargets(v,x);if(w){for(var B=[],Z=0;Z0?Math.round(v-x)/2:Math.max(0,Math.ceil(v))-Math.max(0,Math.floor(x))},_limitZoom:function(v){var x=this.getMinZoom(),w=this.getMaxZoom(),P=Re.any3d?this.options.zoomSnap:1;return P&&(v=Math.round(v/P)*P),Math.max(x,Math.min(w,v))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(v,x){var w=this._getCenterOffset(v)._trunc();return(x&&x.animate)!==!0&&!this.getSize().contains(w)?!1:(this.panBy(w,x),!0)},_createAnimProxy:function(){var v=this._proxy=vt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(v),this.on("zoomanim",function(x){var w=P_,P=this._proxy.style[w];Es(this._proxy,this.project(x.center,x.zoom),this.getZoomScale(x.zoom,1)),P===this._proxy.style[w]&&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,w){if(this._animatingZoom)return!0;if(w=w||{},!this._zoomAnimated||w.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 w.animate!==!0&&!this.getSize().contains(N)?!1:(I(function(){this._moveStart(!0,w.noMoveStart||!1)._animateZoom(v,x,!0)},this),!0)},_animateZoom:function(v,x,w,P){this._mapPane&&(w&&(this._animatingZoom=!0,this._animateToCenter=v,this._animateToZoom=x,et(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 lW(v,x){return new ct(v,x)}var mi=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),w=this.getPosition(),P=v._controlCorners[w];return et(x,"leaflet-control"),w.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()}}),Gh=function(v){return new mi(v)};ct.include({addControl:function(v){return v.addTo(this),this},removeControl:function(v){return v.remove(),this},_initControlPos:function(){var v=this._controlCorners={},x="leaflet-",w=this._controlContainer=vt("div",x+"control-container",this._container);function P(N,B){var Z=x+N+" "+x+B;v[N+B]=vt("div",Z,w)}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 LL=mi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(v,x,w,P){return w1,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)),w=x.overlay?v.type==="add"?"overlayadd":"overlayremove":v.type==="add"?"baselayerchange":null;w&&this._map.fire(w,x)},_createRadioElement:function(v,x){var w='",P=document.createElement("div");return P.innerHTML=w,P.firstChild},_addItem:function(v){var x=document.createElement("label"),w=this._map.hasLayer(v.layer),P;v.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=w):P=this._createRadioElement("leaflet-base-layers_"+l(this),w),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 Z=v.overlay?this._overlaysList:this._baseLayersList;return Z.appendChild(x),this._checkDisabledLayers(),x},_onInputClick:function(){if(!this._preventClick){var v=this._layerControlInputs,x,w,P=[],N=[];this._handlingClick=!0;for(var B=v.length-1;B>=0;B--)x=v[B],w=this._getLayer(x.layerId).layer,x.checked?P.push(w):x.checked||N.push(w);for(B=0;B=0;N--)x=v[N],w=this._getLayer(x.layerId).layer,x.disabled=w.options.minZoom!==void 0&&Pw.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})}}),uW=function(v,x,w){return new LL(v,x,w)},H_=mi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(v){var x="leaflet-control-zoom",w=vt("div",x+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,x+"-in",w,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,x+"-out",w,this._zoomOut),this._updateDisabled(),v.on("zoomend zoomlevelschange",this._updateDisabled,this),w},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,w,P,N){var B=vt("a",w,P);return B.innerHTML=v,B.href="#",B.title=x,B.setAttribute("role","button"),B.setAttribute("aria-label",x),Fh(B),Ke(B,"click",Os),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())&&(et(this._zoomOutButton,x),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||v._zoom===v.getMaxZoom())&&(et(this._zoomInButton,x),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new H_,this.addControl(this.zoomControl))});var cW=function(v){return new H_(v)},PL=mi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(v){var x="leaflet-control-scale",w=vt("div",x),P=this.options;return this._addScales(P,x+"-line",w),v.on(P.updateWhenIdle?"moveend":"move",this._update,this),v.whenReady(this._update,this),w},onRemove:function(v){v.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(v,x,w){v.metric&&(this._mScale=vt("div",x,w)),v.imperial&&(this._iScale=vt("div",x,w))},_update:function(){var v=this._map,x=v.getSize().y/2,w=v.distance(v.containerPointToLatLng([0,x]),v.containerPointToLatLng([this.options.maxWidth,x]));this._updateScales(w)},_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),w=x<1e3?x+" m":x/1e3+" km";this._updateScale(this._mScale,w,x/v)},_updateImperial:function(v){var x=v*3.2808399,w,P,N;x>5280?(w=x/5280,P=this._getRoundNum(w),this._updateScale(this._iScale,P+" mi",P/w)):(N=this._getRoundNum(x),this._updateScale(this._iScale,N+" ft",N/x))},_updateScale:function(v,x,w){v.style.width=Math.round(this.options.maxWidth*w)+"px",v.innerHTML=x},_getRoundNum:function(v){var x=Math.pow(10,(Math.floor(v)+"").length-1),w=v/x;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:1,x*w}}),hW=function(v){return new PL(v)},fW='',W_=mi.extend({options:{position:"bottomright",prefix:''+(Re.inlineSvg?fW+" ":"")+"Leaflet"},initialize:function(v){g(this,v),this._attributions={}},onAdd:function(v){v.attributionControl=this,this._container=vt("div","leaflet-control-attribution"),Fh(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 w=[];this.options.prefix&&w.push(this.options.prefix),v.length&&w.push(v.join(", ")),this._container.innerHTML=w.join(' ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new W_().addTo(this)});var dW=function(v){return new W_(v)};mi.Layers=LL,mi.Zoom=H_,mi.Scale=PL,mi.Attribution=W_,Gh.layers=uW,Gh.zoom=cW,Gh.scale=hW,Gh.attribution=dW;var Zi=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}});Zi.addTo=function(v,x){return v.addHandler(x,this),this};var vW={Events:F},kL=Re.touch?"touchstart mousedown":"mousedown",bo=U.extend({options:{clickTolerance:3},initialize:function(v,x,w,P){g(this,P),this._element=v,this._dragStartTarget=x||v,this._preventOutline=w},enable:function(){this._enabled||(Ke(this._dragStartTarget,kL,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bo._dragging===this&&this.finishDrag(!0),Tt(this._dragStartTarget,kL,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(v){if(this._enabled&&(this._moved=!1,!k_(this._element,"leaflet-zoom-anim"))){if(v.touches&&v.touches.length!==1){bo._dragging===this&&this.finishDrag();return}if(!(bo._dragging||v.shiftKey||v.which!==1&&v.button!==1&&!v.touches)&&(bo._dragging=this,this._preventOutline&&O_(this._element),E_(),Bh(),!this._moving)){this.fire("down");var x=v.touches?v.touches[0]:v,w=bL(this._element);this._startPoint=new j(x.clientX,x.clientY),this._startPos=Ns(this._element),this._parentScale=z_(w);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,w=new j(x.clientX,x.clientY)._subtract(this._startPoint);!w.x&&!w.y||Math.abs(w.x)+Math.abs(w.y)B&&(Z=Q,B=te);B>w&&(x[Z]=1,Z_(v,x,w,P,Z),Z_(v,x,w,Z,N))}function yW(v,x){for(var w=[v[0]],P=1,N=0,B=v.length;Px&&(w.push(v[P]),N=P);return Nx.max.x&&(w|=2),v.yx.max.y&&(w|=8),w}function _W(v,x){var w=x.x-v.x,P=x.y-v.y;return w*w+P*P}function Hh(v,x,w,P){var N=x.x,B=x.y,Z=w.x-N,Q=w.y-B,te=Z*Z+Q*Q,ae;return te>0&&(ae=((v.x-N)*Z+(v.y-B)*Q)/te,ae>1?(N=w.x,B=w.y):ae>0&&(N+=Z*ae,B+=Q*ae)),Z=v.x-N,Q=v.y-B,P?Z*Z+Q*Q:new j(N,B)}function Gn(v){return!S(v[0])||typeof v[0][0]!="object"&&typeof v[0][0]<"u"}function zL(v){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Gn(v)}function BL(v,x){var w,P,N,B,Z,Q,te,ae;if(!v||v.length===0)throw new Error("latlngs not passed");Gn(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),nt=He.getNorthWest().distanceTo(He.getSouthWest())*He.getNorthEast().distanceTo(He.getNorthWest());nt<1700&&(Ae=U_(v));var Qr=v.length,mr=[];for(w=0;wP){te=(B-P)/N,ae=[Q.x-te*(Q.x-Z.x),Q.y-te*(Q.y-Z.y)];break}var hn=x.unproject(H(ae));return ve([hn.lat+Ae.lat,hn.lng+Ae.lng])}var xW={__proto__:null,simplify:EL,pointToSegmentDistance:NL,closestPointOnSegment:gW,clipSegment:OL,_getEdgeIntersection:lp,_getBitCode:zs,_sqClosestPointOnSegment:Hh,isFlat:Gn,_flat:zL,polylineCenter:BL},$_={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])},Y_={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,w=this.R,P=v.lat*x,N=this.R_MINOR/w,B=Math.sqrt(1-N*N),Z=B*Math.sin(P),Q=Math.tan(Math.PI/4-P/2)/Math.pow((1-Z)/(1+Z),B/2);return P=-w*Math.log(Math.max(Q,1e-10)),new j(v.lng*x*w,P)},unproject:function(v){for(var x=180/Math.PI,w=this.R,P=this.R_MINOR/w,N=Math.sqrt(1-P*P),B=Math.exp(-v.y/w),Z=Math.PI/2-2*Math.atan(B),Q=0,te=.1,ae;Q<15&&Math.abs(te)>1e-7;Q++)ae=N*Math.sin(Z),ae=Math.pow((1-ae)/(1+ae),N/2),te=Math.PI/2-2*Math.atan(B*ae)-Z,Z+=te;return new ue(Z*x,v.x*x/w)}},SW={__proto__:null,LonLat:$_,Mercator:Y_,SphericalMercator:ke},bW=i({},xe,{code:"EPSG:3395",projection:Y_,transformation:function(){var v=.5/(Math.PI*Y_.R);return Me(v,.5,-v,.5)}()}),jL=i({},xe,{code:"EPSG:4326",projection:$_,transformation:Me(1/180,1,-1/180,.5)}),wW=i({},Ge,{projection:$_,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 w=x.lng-v.lng,P=x.lat-v.lat;return Math.sqrt(w*w+P*P)},infinite:!0});Ge.Earth=xe,Ge.EPSG3395=bW,Ge.EPSG3857=st,Ge.EPSG900913=Ye,Ge.EPSG4326=jL,Ge.Simple=wW;var yi=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 w=this.getEvents();x.on(w,this),this.once("remove",function(){x.off(w,this)},this)}this.onAdd(x),this.fire("add"),x.fire("layeradd",{layer:this})}}});ct.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 w in this._layers)v.call(x,this._layers[w]);return this},_addLayers:function(v){v=v?S(v)?v:[v]:[];for(var x=0,w=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[w-1])&&x.pop(),x},_setLatLngs:function(v){Ia.prototype._setLatLngs.call(this,v),Gn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Gn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var v=this._renderer._bounds,x=this.options.weight,w=new j(x,x);if(v=new X(v.min.subtract(w),v.max.add(w)),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 DW(v,x){return new Tu(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,w,P,N;if(x){for(w=0,P=x.length;w0&&N.push(N[0].slice()),N}function Cu(v,x){return v.feature?i({},v.feature,{geometry:x}):vp(x)}function vp(v){return v.type==="Feature"||v.type==="FeatureCollection"?v:{type:"Feature",properties:{},geometry:v}}var Q_={toGeoJSON:function(v){return Cu(this,{type:"Point",coordinates:K_(this.getLatLng(),v)})}};up.include(Q_),X_.include(Q_),cp.include(Q_),Ia.include({toGeoJSON:function(v){var x=!Gn(this._latlngs),w=dp(this._latlngs,x?1:0,!1,v);return Cu(this,{type:(x?"Multi":"")+"LineString",coordinates:w})}}),Tu.include({toGeoJSON:function(v){var x=!Gn(this._latlngs),w=x&&!Gn(this._latlngs[0]),P=dp(this._latlngs,w?2:x?1:0,!0,v);return x||(P=[P]),Cu(this,{type:(w?"Multi":"")+"Polygon",coordinates:P})}}),bu.include({toMultiPoint:function(v){var x=[];return this.eachLayer(function(w){x.push(w.toGeoJSON(v).geometry.coordinates)}),Cu(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 w=x==="GeometryCollection",P=[];return this.eachLayer(function(N){if(N.toGeoJSON){var B=N.toGeoJSON(v);if(w)P.push(B.geometry);else{var Z=vp(B);Z.type==="FeatureCollection"?P.push.apply(P,Z.features):P.push(Z)}}}),w?Cu(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function GL(v,x){return new Ea(v,x)}var IW=GL,pp=yi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(v,x,w){this._url=v,this._bounds=ie(x),g(this,w)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(et(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&&xu(this._image),this},bringToBack:function(){return this._map&&Su(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:vt("img");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(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),w=this._map._latLngBoundsToNewLayerBounds(this._bounds,v.zoom,v.center).min;Es(this._image,w,x)},_reset:function(){var v=this._image,x=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),w=x.getSize();Qt(v,x.min),v.style.width=w.x+"px",v.style.height=w.y+"px"},_updateOpacity:function(){Fn(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()}}),EW=function(v,x,w){return new pp(v,x,w)},HL=pp.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:vt("video");if(et(x,"leaflet-image-layer"),this._zoomAnimated&&et(x,"leaflet-zoom-animated"),this.options.className&&et(x,this.options.className),x.onselectstart=h,x.onmousemove=h,x.onloadeddata=o(this.fire,this,"load"),v){for(var w=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",et(v,B)):Zt(v,B),this._containerWidth=this._container.offsetWidth},_animateZoom:function(v){var x=this._map._latLngToNewLayerPoint(this._latlng,v.zoom,v.center),w=this._getAnchor();Qt(this._container,x.add(w))},_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(zh(this._container,"marginBottom"),10)||0,w=this._container.offsetHeight+x,P=this._containerWidth,N=new j(this._containerLeft,-w-this._containerBottom);N._add(Ns(this._container));var B=v.layerPointToContainerPoint(N),Z=H(this.options.autoPanPadding),Q=H(this.options.autoPanPaddingTopLeft||Z),te=H(this.options.autoPanPaddingBottomRight||Z),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+w+te.y>ae.y&&(He=B.y+w-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])}}),OW=function(v,x){return new gp(v,x)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(v,x,w){return this._initOverlay(gp,v,x,w).openOn(this),this},closePopup:function(v){return v=arguments.length?v:this._popup,v&&v.close(),this}}),yi.include({bindPopup:function(v,x){return this._popup=this._initOverlay(gp,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)){Os(v);var x=v.layer||v.target;if(this._popup._source===x&&!(x instanceof wo)){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 mp=$i.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(v){$i.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){$i.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=$i.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=vt("div",x),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(v){var x,w,P=this._map,N=this._container,B=P.latLngToContainerPoint(P.getCenter()),Z=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,w=ae):Q==="bottom"?(x=te/2,w=0):Q==="center"?(x=te/2,w=ae/2):Q==="right"?(x=0,w=ae/2):Q==="left"?(x=te,w=ae/2):Z.xthis.options.maxZoom||wP?this._retainParent(N,B,Z,P):!1)},_retainChildren:function(v,x,w,P){for(var N=2*v;N<2*v+2;N++)for(var B=2*x;B<2*x+2;B++){var Z=new j(N,B);Z.z=w+1;var Q=this._tileCoordsToKey(Z),te=this._tiles[Q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);w+1this.options.maxZoom||this.options.minZoom!==void 0&&N1){this._setView(v,w);return}for(var He=N.min.y;He<=N.max.y;He++)for(var nt=N.min.x;nt<=N.max.x;nt++){var Qr=new j(nt,He);if(Qr.z=this._tileZoom,!!this._isValidTile(Qr)){var mr=this._tiles[this._tileCoordsToKey(Qr)];mr?mr.current=!0:Z.push(Qr)}}if(Z.sort(function(hn,Au){return hn.distanceTo(B)-Au.distanceTo(B)}),Z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Hn=document.createDocumentFragment();for(nt=0;ntw.max.x)||!x.wrapLat&&(v.yw.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,w=this.getTileSize(),P=v.scaleBy(w),N=P.add(w),B=x.unproject(P,v.z),Z=x.unproject(N,v.z);return[B,Z]},_tileCoordsToBounds:function(v){var x=this._tileCoordsToNwSe(v),w=new ne(x[0],x[1]);return this.options.noWrap||(w=this._map.wrapLatLngBounds(w)),w},_tileCoordsToKey:function(v){return v.x+":"+v.y+":"+v.z},_keyToTileCoords:function(v){var x=v.split(":"),w=new j(+x[0],+x[1]);return w.z=+x[2],w},_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){et(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&&Fn(v,this.options.opacity)},_addTile:function(v,x){var w=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,w),this._tiles[P]={el:N,coords:v,current:!0},x.appendChild(N),this.fire("tileloadstart",{tile:N,coords:v})},_tileReady:function(v,x,w){x&&this.fire("tileerror",{error:x,tile:w,coords:v});var P=this._tileCoordsToKey(v);w=this._tiles[P],w&&(w.loaded=+new Date,this._map._fadeAnimated?(Fn(w.el,0),z(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(w.active=!0,this._pruneTiles()),x||(et(w.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:w.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 jW(v){return new Uh(v)}var Mu=Uh.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 w=document.createElement("img");return Ke(w,"load",o(this._tileOnLoad,this,x,w)),Ke(w,"error",o(this._tileOnError,this,x,w)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(w.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(w.referrerPolicy=this.options.referrerPolicy),w.alt="",w.src=this.getTileUrl(v),w},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 w=this._globalTileRange.max.y-v.y;this.options.tms&&(x.y=w),x["-y"]=w}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,w){var P=this.options.errorTileUrl;P&&x.getAttribute("src")!==P&&(x.src=P),v(w,x)},_onTileRemove:function(v){v.tile.onload=null},_getZoomForUrl:function(){var v=this._tileZoom,x=this.options.maxZoom,w=this.options.zoomReverse,P=this.options.zoomOffset;return w&&(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 w=this._tiles[v].coords;It(x),delete this._tiles[v],this.fire("tileabort",{tile:x,coords:w})}},_removeTile:function(v){var x=this._tiles[v];if(x)return x.el.setAttribute("src",C),Uh.prototype._removeTile.call(this,v)},_tileReady:function(v,x,w){if(!(!this._map||w&&w.getAttribute("src")===C))return Uh.prototype._tileReady.call(this,v,x,w)}});function ZL(v,x){return new Mu(v,x)}var $L=Mu.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 w=i({},this.defaultWmsParams);for(var P in x)P in this.options||(w[P]=x[P]);x=g(this,x);var N=x.detectRetina&&Re.retina?2:1,B=this.getTileSize();w.width=B.x*N,w.height=B.y*N,this.wmsParams=w},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,Mu.prototype.onAdd.call(this,v)},getTileUrl:function(v){var x=this._tileCoordsToNwSe(v),w=this._crs,P=K(w.project(x[0]),w.project(x[1])),N=P.min,B=P.max,Z=(this._wmsVersion>=1.3&&this._crs===jL?[N.y,N.x,B.y,B.x]:[N.x,N.y,B.x,B.y]).join(","),Q=Mu.prototype.getTileUrl.call(this,v);return Q+m(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Z},setParams:function(v,x){return i(this.wmsParams,v),x||this.redraw(),this}});function VW(v,x){return new $L(v,x)}Mu.WMS=$L,ZL.wms=VW;var Na=yi.extend({options:{padding:.1},initialize:function(v){g(this,v),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),et(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 w=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(-w).add(N).subtract(this._map._getNewPixelOrigin(v,x));Re.any3d?Es(this._container,B,w):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(),w=this._map.containerPointToLayerPoint(x.multiplyBy(-v)).round();this._bounds=new X(w,w.add(x.multiplyBy(1+v*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),YL=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,w=v.getSize(),P=Re.retina?2:1;Qt(x,v.min),x.width=P*w.x,x.height=P*w.y,x.style.width=w.x+"px",x.style.height=w.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,w=x.next,P=x.prev;w?w.prev=P:this._drawLast=P,P?P.next=w:this._drawFirst=w,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(/[, ]+/),w=[],P,N;for(N=0;N')}}catch{}return function(v){return document.createElement("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),FW={_initContainer:function(){this._container=vt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Na.prototype._update.call(this),this.fire("update"))},_initPath:function(v){var x=v._container=Zh("shape");et(x,"leaflet-vml-shape "+(this.options.className||"")),x.coordsize="1 1",v._path=Zh("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,w=v._fill,P=v.options,N=v._container;N.stroked=!!P.stroke,N.filled=!!P.fill,P.stroke?(x||(x=v._stroke=Zh("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?(w||(w=v._fill=Zh("fill")),N.appendChild(w),w.color=P.fillColor||P.color,w.opacity=P.fillOpacity):w&&(N.removeChild(w),v._fill=null)},_updateCircle:function(v){var x=v._point.round(),w=Math.round(v._radius),P=Math.round(v._radiusY||w);this._setPath(v,v._empty()?"M0 0":"AL "+x.x+","+x.y+" "+w+","+P+" 0,"+65535*360)},_setPath:function(v,x){v._path.v=x},_bringToFront:function(v){xu(v._container)},_bringToBack:function(v){Su(v._container)}},yp=Re.vml?Zh:rt,$h=Na.extend({_initContainer:function(){this._container=yp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=yp("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(),w=this._container;(!this._svgSize||!this._svgSize.equals(x))&&(this._svgSize=x,w.setAttribute("width",x.x),w.setAttribute("height",x.y)),Qt(w,v.min),w.setAttribute("viewBox",[v.min.x,v.min.y,x.x,x.y].join(" ")),this.fire("update")}},_initPath:function(v){var x=v._path=yp("path");v.options.className&&et(x,v.options.className),v.options.interactive&&et(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,w=v.options;x&&(w.stroke?(x.setAttribute("stroke",w.color),x.setAttribute("stroke-opacity",w.opacity),x.setAttribute("stroke-width",w.weight),x.setAttribute("stroke-linecap",w.lineCap),x.setAttribute("stroke-linejoin",w.lineJoin),w.dashArray?x.setAttribute("stroke-dasharray",w.dashArray):x.removeAttribute("stroke-dasharray"),w.dashOffset?x.setAttribute("stroke-dashoffset",w.dashOffset):x.removeAttribute("stroke-dashoffset")):x.setAttribute("stroke","none"),w.fill?(x.setAttribute("fill",w.fillColor||w.color),x.setAttribute("fill-opacity",w.fillOpacity),x.setAttribute("fill-rule",w.fillRule||"evenodd")):x.setAttribute("fill","none"))},_updatePoly:function(v,x){this._setPath(v,ut(v._parts,x))},_updateCircle:function(v){var x=v._point,w=Math.max(Math.round(v._radius),1),P=Math.max(Math.round(v._radiusY),1)||w,N="a"+w+","+P+" 0 1,0 ",B=v._empty()?"M0 0":"M"+(x.x-w)+","+x.y+N+w*2+",0 "+N+-w*2+",0 ";this._setPath(v,B)},_setPath:function(v,x){v._path.setAttribute("d",x)},_bringToFront:function(v){xu(v._path)},_bringToBack:function(v){Su(v._path)}});Re.vml&&$h.include(FW);function qL(v){return Re.svg||Re.vml?new $h(v):null}ct.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&&XL(v)||qL(v)}});var KL=Tu.extend({initialize:function(v,x){Tu.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 GW(v,x){return new KL(v,x)}$h.create=yp,$h.pointsToPath=ut,Ea.geometryToLayer=hp,Ea.coordsToLatLng=q_,Ea.coordsToLatLngs=fp,Ea.latLngToCoords=K_,Ea.latLngsToCoords=dp,Ea.getFeature=Cu,Ea.asFeature=vp,ct.mergeOptions({boxZoom:!0});var QL=Zi.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(),Bh(),E_(),this._startPoint=this._map.mouseEventToContainerPoint(v),Ke(document,{contextmenu:Os,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(v){this._moved||(this._moved=!0,this._box=vt("div","leaflet-zoom-box",this._container),et(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(v);var x=new X(this._point,this._startPoint),w=x.getSize();Qt(this._box,x.min),this._box.style.width=w.x+"px",this._box.style.height=w.y+"px"},_finish:function(){this._moved&&(It(this._box),Zt(this._container,"leaflet-crosshair")),jh(),N_(),Tt(document,{contextmenu:Os,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())}});ct.addInitHook("addHandler","boxZoom",QL),ct.mergeOptions({doubleClickZoom:!0});var JL=Zi.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,w=x.getZoom(),P=x.options.zoomDelta,N=v.originalEvent.shiftKey?w-P:w+P;x.options.doubleClickZoom==="center"?x.setZoom(N):x.setZoomAround(v.containerPoint,N)}});ct.addInitHook("addHandler","doubleClickZoom",JL),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var eP=Zi.extend({addHooks:function(){if(!this._draggable){var v=this._map;this._draggable=new bo(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))}et(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,w=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(w),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),w=this._initialWorldOffset,P=this._draggable._newPos.x,N=(P-x+w)%v+x-w,B=(P+x+w)%v-x-w,Z=Math.abs(N+w)0?B:-B))-x;this._delta=0,this._startTime=null,Z&&(v.options.scrollWheelZoom==="center"?v.setZoom(x+Z):v.setZoomAround(this._lastMousePos,x+Z))}});ct.addInitHook("addHandler","scrollWheelZoom",rP);var HW=600;ct.mergeOptions({tapHold:Re.touchNative&&Re.safari&&Re.mobile,tapTolerance:15});var nP=Zi.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),HW),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 w=new MouseEvent(v,{bubbles:!0,cancelable:!0,view:window,screenX:x.screenX,screenY:x.screenY,clientX:x.clientX,clientY:x.clientY});w._simulated=!0,x.target.dispatchEvent(w)}});ct.addInitHook("addHandler","tapHold",nP),ct.mergeOptions({touchZoom:Re.touch,bounceAtZoomLimits:!0});var iP=Zi.extend({addHooks:function(){et(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 w=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(w.add(P)._divideBy(2))),this._startDist=w.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,w=x.mouseEventToContainerPoint(v.touches[0]),P=x.mouseEventToContainerPoint(v.touches[1]),N=w.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=w._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 Z=o(x._move,x,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(Z,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))}});ct.addInitHook("addHandler","touchZoom",iP),ct.BoxZoom=QL,ct.DoubleClickZoom=JL,ct.Drag=eP,ct.Keyboard=tP,ct.ScrollWheelZoom=rP,ct.TapHold=nP,ct.TouchZoom=iP,r.Bounds=X,r.Browser=Re,r.CRS=Ge,r.Canvas=YL,r.Circle=X_,r.CircleMarker=cp,r.Class=V,r.Control=mi,r.DivIcon=UL,r.DivOverlay=$i,r.DomEvent=sW,r.DomUtil=aW,r.Draggable=bo,r.Evented=U,r.FeatureGroup=Da,r.GeoJSON=Ea,r.GridLayer=Uh,r.Handler=Zi,r.Icon=wu,r.ImageOverlay=pp,r.LatLng=ue,r.LatLngBounds=ne,r.Layer=yi,r.LayerGroup=bu,r.LineUtil=xW,r.Map=ct,r.Marker=up,r.Mixin=vW,r.Path=wo,r.Point=j,r.PolyUtil=pW,r.Polygon=Tu,r.Polyline=Ia,r.Popup=gp,r.PosAnimation=AL,r.Projection=SW,r.Rectangle=KL,r.Renderer=Na,r.SVG=$h,r.SVGOverlay=WL,r.TileLayer=Mu,r.Tooltip=mp,r.Transformation=fe,r.Util=O,r.VideoOverlay=HL,r.bind=o,r.bounds=K,r.canvas=XL,r.circle=PW,r.circleMarker=LW,r.control=Gh,r.divIcon=BW,r.extend=i,r.featureGroup=CW,r.geoJSON=GL,r.geoJson=IW,r.gridLayer=jW,r.icon=MW,r.imageOverlay=EW,r.latLng=ve,r.latLngBounds=ie,r.layerGroup=TW,r.map=lW,r.marker=AW,r.point=H,r.polygon=DW,r.polyline=kW,r.popup=OW,r.rectangle=GW,r.setOptions=g,r.stamp=l,r.svg=qL,r.svgOverlay=RW,r.tileLayer=ZL,r.tooltip=zW,r.transformation=Me,r.version=n,r.videoOverlay=NW;var WW=window.L;r.noConflict=function(){return window.L=WW,this},window.L=r})})(hC,hC.exports);var mu=hC.exports;const C8=dC(mu);function tp(t,e,r){return Object.freeze({instance:t,context:e,container:r})}function rL(t,e){return e==null?function(n,i){const a=$.useRef();return a.current||(a.current=t(n,i)),a}:function(n,i){const a=$.useRef();a.current||(a.current=t(n,i));const o=$.useRef(n),{instance:s}=a.current;return $.useEffect(function(){o.current!==n&&(e(s,n,o.current),o.current=n)},[s,n,i]),a}}function M8(t,e){$.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 vye(t){return function(r){const n=w_(),i=t(T_(r,n),n);return S8(n.map,r.attribution),tL(i.current,r.eventHandlers),M8(i.current,n),i}}function pye(t,e){const r=$.useRef();$.useEffect(function(){if(e.pathOptions!==r.current){const i=e.pathOptions??{};t.instance.setStyle(i),r.current=i}},[t,e])}function gye(t){return function(r){const n=w_(),i=t(T_(r,n),n);return tL(i.current,r.eventHandlers),M8(i.current,n),pye(i.current,r),i}}function A8(t,e){const r=rL(t),n=dye(r,e);return hye(n)}function L8(t,e){const r=rL(t,e),n=gye(r);return cye(n)}function mye(t,e){const r=rL(t,e),n=vye(r);return fye(n)}function yye(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 _ye(){return w_().map}const xye=L8(function({center:e,children:r,...n},i){const a=new mu.CircleMarker(e,n);return tp(a,b8(i,{overlayContainer:a}))},sye);function fC(){return fC=Object.assign||function(t){for(var e=1;e(d==null?void 0:d.map)??null,[d]);const g=$.useCallback(y=>{if(y!==null&&d===null){const _=new mu.Map(y,c);r!=null&&u!=null?_.setView(r,u):t!=null&&_.fitBounds(t,e),l!=null&&_.whenReady(l),p(uye(_))}},[]);$.useEffect(()=>()=>{d==null||d.map.remove()},[d]);const m=d?Bc.createElement(T8,{value:d},n):o??null;return Bc.createElement("div",fC({},f,{ref:g}),m)}const bye=$.forwardRef(Sye),wye=L8(function({positions:e,...r},n){const i=new mu.Polyline(e,r);return tp(i,b8(n,{overlayContainer:i}))},function(e,r,n){r.positions!==n.positions&&e.setLatLngs(r.positions)}),Tye=A8(function(e,r){const n=new mu.Popup(e,r.overlayContainer);return tp(n,r)},function(e,r,{position:n},i){$.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])}),Cye=mye(function({url:e,...r},n){const i=new mu.TileLayer(e,T_(r,n));return tp(i,n)},function(e,r,n){yye(e,r,n);const{url:i}=r;i!=null&&i!==n.url&&e.setUrl(i)}),Mye=A8(function(e,r){const n=new mu.Tooltip(e,r.overlayContainer);return tp(n,r)},function(e,r,{position:n},i){$.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])}),Aye="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=",Lye="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==",Pye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC";delete C8.Icon.Default.prototype._getIconUrl;C8.Icon.Default.mergeOptions({iconUrl:Aye,iconRetinaUrl:Lye,shadowUrl:Pye});const cz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],kye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Dye(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Iye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Eye(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 Nye({bounds:t}){const e=_ye();return $.useEffect(()=>{t&&e.fitBounds(t,{padding:[50,50]})},[e,t]),null}function Rye({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:Eye(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(Zd,{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(Zd,{size:10}),"OSM"]})]})]})}function Oye({nodes:t,edges:e,selectedNodeId:r,onSelectNode:n}){const i=$.useMemo(()=>t.filter(h=>h.latitude!==null&&h.longitude!==null),[t]),a=t.length-i.length,o=$.useMemo(()=>new Map(i.map(h=>[h.node_num,h])),[i]),s=$.useMemo(()=>e.filter(h=>o.has(h.from_node)&&o.has(h.to_node)),[e,o]),l=$.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=$.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(bye,{center:u,zoom:7,style:{width:"100%",height:"540px"},className:"z-0",children:[b.jsx(Cye,{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© OpenStreetMap, © CARTO'}),b.jsx(Nye,{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(wye,{positions:[[d.latitude,d.longitude],[p.latitude,p.longitude]],color:Dye(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=kye.includes(h.role),m=Iye(h.latitude),y=cz[m%cz.length];return b.jsxs(xye,{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(Mye,{direction:"top",offset:[0,-8],children:b.jsx("span",{className:"font-mono text-xs",children:h.short_name})}),b.jsx(Tye,{children:b.jsx(Rye,{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($3,{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 hz=["#3b82f6","#a78bfa","#06b6d4","#f59e0b","#22c55e","#ec4899","#8b5cf6","#14b8a6"],zye=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function fz(t){return t>12?"#22c55e":t>8?"#4ade80":t>5?"#f59e0b":t>3?"#f97316":"#ef4444"}function Bye(t){return t>12?"excellent":t>8?"good":t>5?"fair":t>3?"marginal":"poor"}function jye(t){return t===null||t>46?0:t>44.5?1:t>43?2:3}function Vye(t){return["Northern ID","Central ID","SW Idaho","SC Idaho"][t]||"Unknown"}function Fye(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 Gye(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 Hye({node:t,edges:e,nodes:r,onSelectNode:n}){const i=$.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(Zc,{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=zye.includes(t.role),o=jye(t.latitude),s=hz[o%hz.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:Vye(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(v2,{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 ${Gye(t.last_heard)}`}),b.jsx("span",{className:"text-sm text-slate-300",children:Fye(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(Zd,{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(Zd,{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:fz(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:fz(h.snr)},children:[h.snr.toFixed(1)," dB"]}),b.jsx("div",{className:"text-xs text-slate-500",children:Bye(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 dz=["ROUTER","ROUTER_LATE","REPEATER","TRACKER"];function Wye(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 Uye(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 Zye(t){return t.battery_level===null?"—":t.battery_level>100||t.voltage&&t.voltage>4.1?"USB ⚡":`${t.battery_level.toFixed(0)}%`}function vz(t){return t===null?"—":t>46?"Northern":t>44.5?"Central":t>43?"SW Idaho":"SC Idaho"}function $ye({nodes:t,selectedNodeId:e,onSelectNode:r}){const[n,i]=$.useState(""),[a,o]=$.useState("short_name"),[s,l]=$.useState("asc"),[u,c]=$.useState("all"),h=$.useMemo(()=>{let p=[...t];if(u==="infra"?p=p.filter(g=>dz.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)||vz(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(BZ,{size:14,className:"inline ml-1"}):b.jsx(Iv,{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(QZ,{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(f2,{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=dz.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 ${Wye(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:vz(p.latitude)}),b.jsx("td",{className:"px-3 py-2 font-mono text-slate-300",children:Zye(p)}),b.jsx("td",{className:"px-3 py-2 text-slate-400",children:Uye(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 Yye(){const[t,e]=$.useState([]),[r,n]=$.useState([]),[i,a]=$.useState([]),[o,s]=$.useState(null),[l,u]=$.useState("topo"),[c,h]=$.useState(!0),[f,d]=$.useState(null);$.useEffect(()=>{document.title="Mesh — MeshAI",Promise.all([a$(),o$(),_$()]).then(([m,y,_])=>{e(m),n(y),a(_),h(!1)}).catch(m=>{d(m.message),h(!1)})},[]);const p=$.useMemo(()=>t.find(m=>m.node_num===o)||null,[t,o]),g=$.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($Z,{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(WZ,{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(oye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g}):b.jsx(Oye,{nodes:t,edges:r,selectedNodeId:o,onSelectNode:g})}),b.jsx(Hye,{node:p,edges:r,nodes:t,onSelectNode:g})]}),b.jsx($ye,{nodes:t,selectedNodeId:o,onSelectNode:g})]})}function Xye({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 qye({event:t}){const r=(a=>{switch(a.toLowerCase()){case"extreme":case"severe":return{bg:"bg-red-500/10",border:"border-red-500",icon:E0,iconColor:"text-red-500"};case"moderate":case"warning":return{bg:"bg-amber-500/10",border:"border-amber-500",icon:ms,iconColor:"text-amber-500"};case"minor":return{bg:"bg-yellow-500/10",border:"border-yellow-500",icon:iy,iconColor:"text-yellow-500"};default:return{bg:"bg-slate-500/10",border:"border-slate-500",icon:iy,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 Kye({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(Mk,{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(Mk,{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 Qye({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(Ak,{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(Ak,{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 Jye(){var D;const[t,e]=$.useState(null),[r,n]=$.useState([]),[i,a]=$.useState(null),[o,s]=$.useState(null),[l,u]=$.useState([]),[c,h]=$.useState(null),[f,d]=$.useState([]),[p,g]=$.useState([]),[m,y]=$.useState([]),[_,S]=$.useState([]),[T,C]=$.useState(0),[M,A]=$.useState(!0),[k,E]=$.useState(null);return $.useEffect(()=>{document.title="Environment — MeshAI",Promise.all([K3().catch(()=>null),u$().catch(()=>[]),h$().catch(()=>null),f$().catch(()=>null),d$().catch(()=>[]),v$().catch(()=>null),p$().catch(()=>[]),g$().catch(()=>[]),m$().catch(()=>[]),y$().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(h2,{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(Xye,{feed:I},I.source))})]}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[b.jsx(Kye,{swpc:i}),b.jsx(Qye,{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(GZ,{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(sd,{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(ZZ,{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(sd,{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(VZ,{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(OZ,{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(qZ,{size:14}),"Satellite Hotspots (",_.length,")",T>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:[T," 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(ms,{size:14}),"Active Events (",r.length,")"]}),r.length>0?b.jsx("div",{className:"space-y-3",children:r.map(I=>b.jsx(qye,{event:I},I.event_id))}):b.jsxs("div",{className:"flex items-center gap-2 text-slate-500 py-4",children:[b.jsx(sd,{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(Ud,{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 pz=[{key:"bot",label:"Bot",icon:NZ},{key:"connection",label:"Connection",icon:X3},{key:"response",label:"Response",icon:UZ},{key:"history",label:"History",icon:jZ},{key:"memory",label:"Memory",icon:RZ},{key:"context",label:"Context",icon:U3},{key:"commands",label:"Commands",icon:e$},{key:"llm",label:"LLM",icon:W3},{key:"weather",label:"Weather",icon:Ud},{key:"meshmonitor",label:"MeshMonitor",icon:Zc},{key:"knowledge",label:"Knowledge",icon:EZ},{key:"mesh_sources",label:"Mesh Sources",icon:HZ},{key:"mesh_intelligence",label:"Intelligence",icon:h2},{key:"environmental",label:"Environmental",icon:t$},{key:"notifications",label:"Notifications",icon:Wd},{key:"dashboard",label:"Dashboard",icon:Z3}],qr={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.",notifications:"Alert delivery system. Configure where alerts get sent (mesh, email, webhooks) and which conditions trigger them.",dashboard:"Web dashboard settings. You're looking at it right now."},e0e=[{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"}],t0e=[{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 kr({info:t,link:e,linkText:r="Learn more"}){const[n,i]=$.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(Zd,{size:10})]})]})]})]})}function Kr({text:t}){return b.jsx("p",{className:"text-sm text-slate-500 mb-6 pb-4 border-b border-[#1e2a3a]",children:t})}function Je({label:t,value:e,onChange:r,type:n="text",placeholder:i="",helper:a="",info:o="",infoLink:s=""}){const[l,u]=$.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(kr,{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(FZ,{size:16}):b.jsx(U3,{size:16})})]}),a&&b.jsx("p",{className:"text-xs text-slate-600",children:a})]})}function Oe({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(kr,{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 ht({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(kr,{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 ii({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(kr,{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 r0e({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(kr,{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 pa({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=$.useState(e.join(", "));$.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(kr,{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 P8({label:t,value:e,onChange:r,helper:n="",info:i="",infoLink:a=""}){const[o,s]=$.useState(e.join(", "));$.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(kr,{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 Gr({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 n0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.bot}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Je,{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(Je,{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(ht,{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(ht,{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 i0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.connection}),b.jsx(ii,{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(Je,{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(Je,{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(Oe,{label:"TCP Port",value:t.tcp_port,onChange:r=>e({...t,tcp_port:r}),min:1,max:65535,helper:"Default 4403 for meshtasticd"})]})]})}function a0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.response}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(Oe,{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(Oe,{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(Oe,{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(Oe,{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 o0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.history}),b.jsx(Je,{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(Oe,{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(Oe,{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(ht,{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(Oe,{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(Oe,{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 s0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.memory}),b.jsx(ht,{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(Oe,{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(Oe,{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 l0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.context}),b.jsx(ht,{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(P8,{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(pa,{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(Oe,{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(Oe,{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 u0e({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(Kr,{text:qr.commands}),b.jsx(ht,{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(Je,{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(kr,{info:"Toggle commands on or off. Disabled commands won't respond when users invoke them."})]}),b.jsx("div",{className:"grid gap-1",children:e0e.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 c0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.llm}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(ii,{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(Je,{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(Je,{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(Je,{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(Oe,{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(Oe,{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(ht,{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(r0e,{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(ht,{label:"Web Search",checked:t.web_search,onChange:r=>e({...t,web_search:r}),helper:"Enable web search tool (Open WebUI feature)"}),b.jsx(ht,{label:"Google Grounding",checked:t.google_grounding,onChange:r=>e({...t,google_grounding:r}),helper:"Ground responses in web search (Gemini only)"})]})}function h0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.weather}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsx(ii,{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(ii,{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(Je,{label:"Default Location",value:t.default_location,onChange:r=>e({...t,default_location:r}),placeholder:"Your city, state",helper:"Location when none specified"})]})}function f0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.meshmonitor}),b.jsx(ht,{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(Je,{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(ht,{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(Oe,{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(ht,{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 d0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.knowledge}),b.jsx(ht,{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(ii,{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(Je,{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(Oe,{label:"Qdrant Port",value:t.qdrant_port,onChange:r=>e({...t,qdrant_port:r}),helper:"Default 6333"})]}),b.jsx(Je,{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(Je,{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(Oe,{label:"TEI Port",value:t.tei_port,onChange:r=>e({...t,tei_port:r}),helper:"Default 8090"})]}),b.jsx(ht,{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(Je,{label:"SQLite DB Path",value:t.db_path,onChange:r=>e({...t,db_path:r}),helper:"Local knowledge database file"}),b.jsx(Oe,{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 v0e({source:t,onChange:e,onDelete:r}){const[n,i]=$.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(Iv,{size:16}):b.jsx(Ev,{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(N0,{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(Je,{label:"Name",value:t.name,onChange:o=>e({...t,name:o}),helper:"Friendly name for this source"}),b.jsx(ii,{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(Je,{label:"URL",value:t.url,onChange:o=>e({...t,url:o}),helper:"Full URL including protocol"}),t.type==="meshmonitor"&&b.jsx(Je,{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(Je,{label:"Host",value:t.host||"",onChange:o=>e({...t,host:o}),helper:"MQTT broker hostname"}),b.jsx(Oe,{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(Je,{label:"Username",value:t.username||"",onChange:o=>e({...t,username:o})}),b.jsx(Je,{label:"Password",value:t.password||"",onChange:o=>e({...t,password:o}),type:"password"})]}),b.jsx(Je,{label:"Topic Root",value:t.topic_root||"msh/US",onChange:o=>e({...t,topic_root:o}),helper:"Base topic to subscribe to"}),b.jsx(ht,{label:"Use TLS",checked:t.use_tls||!1,onChange:o=>e({...t,use_tls:o}),helper:"Encrypt MQTT connection"})]}),b.jsx(Oe,{label:"Refresh Interval (sec)",value:t.refresh_interval,onChange:o=>e({...t,refresh_interval:o}),min:10,helper:"Polling frequency"}),b.jsx(ht,{label:"Enabled",checked:t.enabled,onChange:o=>e({...t,enabled:o})}),b.jsx(ht,{label:"Polite Mode",checked:t.polite_mode,onChange:o=>e({...t,polite_mode:o}),helper:"Reduce polling for shared instances"})]})]})}function p0e({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(Kr,{text:qr.mesh_sources}),t.map((n,i)=>b.jsx(v0e,{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(ay,{size:16})," Add Source"]})]})}function g0e({data:t,onChange:e}){const[r,n]=$.useState(null);return b.jsxs("div",{className:"space-y-6",children:[b.jsx(Kr,{text:qr.mesh_intelligence}),b.jsx(ht,{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(Oe,{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(Oe,{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(Oe,{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(Oe,{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(pa,{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(Oe,{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(Oe,{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(kr,{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(Iv,{size:16}):b.jsx(Ev,{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(N0,{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(Je,{label:"Name",value:i.name,onChange:o=>{const s=[...t.regions];s[a]={...i,name:o},e({...t,regions:s})}}),b.jsx(Je,{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(Oe,{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(Oe,{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(Je,{label:"Description",value:i.description,onChange:o=>{const s=[...t.regions];s[a]={...i,description:o},e({...t,regions:s})}}),b.jsx(pa,{label:"Aliases",value:i.aliases,onChange:o=>{const s=[...t.regions];s[a]={...i,aliases:o},e({...t,regions:s})}}),b.jsx(pa,{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(ay,{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(kr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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(Gr,{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 m0e({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(Kr,{text:qr.environmental}),b.jsx(ht,{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(pa,{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(ht,{label:"",checked:t.nws.enabled,onChange:_=>e({...t,nws:{...t.nws,enabled:_}})})]}),t.nws.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Je,{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(Oe,{label:"Tick Seconds",value:t.nws.tick_seconds,onChange:_=>e({...t,nws:{...t.nws,tick_seconds:_}}),min:30,helper:"Polling interval"}),b.jsx(ii,{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(ht,{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(ht,{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(Oe,{label:"Tick Seconds",value:t.ducting.tick_seconds,onChange:_=>e({...t,ducting:{...t.ducting,tick_seconds:_}}),min:60}),b.jsx(Oe,{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(Oe,{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(ht,{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(Oe,{label:"Tick Seconds",value:t.fires.tick_seconds,onChange:_=>e({...t,fires:{...t.fires,tick_seconds:_}}),min:60}),b.jsx(ii,{label:"State",value:t.fires.state,onChange:_=>e({...t,fires:{...t.fires,state:_}}),options:t0e,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(ht,{label:"",checked:t.avalanche.enabled,onChange:_=>e({...t,avalanche:{...t.avalanche,enabled:_}})})]}),t.avalanche.enabled&&b.jsxs(b.Fragment,{children:[b.jsx(Oe,{label:"Tick Seconds",value:t.avalanche.tick_seconds,onChange:_=>e({...t,avalanche:{...t.avalanche,tick_seconds:_}}),min:60}),b.jsx(pa,{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(P8,{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(ht,{label:"",checked:((r=t.usgs)==null?void 0:r.enabled)||!1,onChange:_=>{var S,T;return e({...t,usgs:{...t.usgs,enabled:_,tick_seconds:((S=t.usgs)==null?void 0:S.tick_seconds)||900,sites:((T=t.usgs)==null?void 0:T.sites)||[]}})}})]}),((n=t.usgs)==null?void 0:n.enabled)&&b.jsxs(b.Fragment,{children:[b.jsx(Oe,{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(pa,{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(ht,{label:"",checked:((i=t.traffic)==null?void 0:i.enabled)||!1,onChange:_=>{var S,T,C;return e({...t,traffic:{...t.traffic,enabled:_,tick_seconds:((S=t.traffic)==null?void 0:S.tick_seconds)||300,api_key:((T=t.traffic)==null?void 0:T.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(Je,{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(Oe,{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(Je,{label:"Name",value:_.name,onChange:T=>{const C=[...t.traffic.corridors];C[S]={..._,name:T},e({...t,traffic:{...t.traffic,corridors:C}})}}),b.jsx(Oe,{label:"Lat",value:_.lat,onChange:T=>{const C=[...t.traffic.corridors];C[S]={..._,lat:T},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),b.jsx(Oe,{label:"Lon",value:_.lon,onChange:T=>{const C=[...t.traffic.corridors];C[S]={..._,lon:T},e({...t,traffic:{...t.traffic,corridors:C}})},step:.01}),b.jsx("button",{onClick:()=>e({...t,traffic:{...t.traffic,corridors:t.traffic.corridors.filter((T,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(ht,{label:"",checked:((o=t.roads511)==null?void 0:o.enabled)||!1,onChange:_=>{var S,T,C,M,A;return e({...t,roads511:{...t.roads511,enabled:_,tick_seconds:((S=t.roads511)==null?void 0:S.tick_seconds)||300,api_key:((T=t.roads511)==null?void 0:T.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(Je,{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(Je,{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(Oe,{label:"Tick Seconds",value:t.roads511.tick_seconds,onChange:_=>e({...t,roads511:{...t.roads511,tick_seconds:_}}),min:60}),b.jsx(pa,{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(Oe,{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(Oe,{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(Oe,{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(Oe,{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(ht,{label:"",checked:((f=t.firms)==null?void 0:f.enabled)||!1,onChange:_=>{var S,T,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:((T=t.firms)==null?void 0:T.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(Je,{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(Oe,{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(ii,{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(Oe,{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(ii,{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(Oe,{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(Oe,{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(Oe,{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(Oe,{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(Oe,{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 y0e({channel:t,onChange:e,onDelete:r,onTest:n}){var h;const[i,a]=$.useState(!1),[o,s]=$.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(Iv,{size:16}):b.jsx(Ev,{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,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(JZ,{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(N0,{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(Je,{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(ii,{label:"Type",value:t.type,onChange:f=>e({...t,type:f}),options:l,info:u[t.type]||"Select a channel type"})]}),b.jsx(ht,{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(Oe,{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(pa,{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(Je,{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(Oe,{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(Je,{label:"SMTP User",value:t.smtp_user,onChange:f=>e({...t,smtp_user:f}),placeholder:"you@gmail.com",helper:"Login username"}),b.jsx(Je,{label:"SMTP Password",value:t.smtp_password,onChange:f=>e({...t,smtp_password:f}),type:"password",helper:"App password recommended",info:"SMTP server for sending alert emails. Gmail users: use an App Password, not your regular password. Generate one at myaccount.google.com/apppasswords"})]}),b.jsx(ht,{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(Je,{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(pa,{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(Je,{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(kr,{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 _0e({rule:t,categories:e,channels:r,onChange:n,onDelete:i}){var c,h,f,d;const[a,o]=$.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(Iv,{size:16}):b.jsx(Ev,{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(N0,{size:14})})]}),a&&b.jsxs("div",{className:"p-4 space-y-4 border-t border-[#1e2a3a]",children:[b.jsx(Je,{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(ii,{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(kr,{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(kr,{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(ht,{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 x0e({data:t,onChange:e}){const[r,n]=$.useState([]),[i,a]=$.useState(null);$.useEffect(()=>{fetch("/api/notifications/categories").then(u=>u.json()).then(n).catch(()=>n([]))},[]);const o=()=>{const u={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||[],u]})},s=()=>{const u={name:"",categories:[],min_severity:"warning",channel_ids:[],override_quiet:!1};e({...t,rules:[...t.rules||[],u]})},l=async u=>{try{const h=await(await fetch(`/api/notifications/channels/${u}/test`,{method:"POST"})).json();a(h),setTimeout(()=>a(null),5e3)}catch{a({success:!1,message:"Test failed"}),setTimeout(()=>a(null),5e3)}};return b.jsxs("div",{className:"space-y-6",children:[b.jsx(Kr,{text:qr.notifications}),b.jsx(ht,{label:"Enable Notifications",checked:t.enabled,onChange:u=>e({...t,enabled:u}),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."}),i&&b.jsxs("div",{className:`p-3 rounded-lg text-sm ${i.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:[i.success?b.jsx(H3,{size:14,className:"inline mr-2"}):b.jsx(d2,{size:14,className:"inline mr-2"}),i.message]}),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(kr,{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((u,c)=>b.jsx(y0e,{channel:u,onChange:h=>{const f=[...t.channels||[]];f[c]=h,e({...t,channels:f})},onDelete:()=>{confirm(`Delete channel "${u.id||"New Channel"}"?`)&&e({...t,channels:(t.channels||[]).filter((h,f)=>f!==c)})},onTest:()=>l(u.id)},c)),b.jsxs("button",{onClick:o,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(ay,{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(kr,{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((u,c)=>b.jsx(_0e,{rule:u,categories:r,channels:t.channels||[],onChange:h=>{const f=[...t.rules||[]];f[c]=h,e({...t,rules:f})},onDelete:()=>{confirm(`Delete rule "${u.name||"New Rule"}"?`)&&e({...t,rules:(t.rules||[]).filter((h,f)=>f!==c)})}},c)),b.jsxs("button",{onClick:s,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(ay,{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(kr,{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(Je,{label:"Start Time",value:t.quiet_hours_start||"22:00",onChange:u=>e({...t,quiet_hours_start:u}),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(Je,{label:"End Time",value:t.quiet_hours_end||"06:00",onChange:u=>e({...t,quiet_hours_end:u}),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(kr,{info:"Prevents alert spam. If the same condition fires multiple times within this window, only the first one is delivered."})]}),b.jsx(Oe,{label:"Dedup Window (seconds)",value:t.dedup_seconds||600,onChange:u=>e({...t,dedup_seconds:u}),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)."})]})]})]})}function S0e({data:t,onChange:e}){return b.jsxs("div",{className:"space-y-4",children:[b.jsx(Kr,{text:qr.dashboard}),b.jsx(ht,{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(Je,{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(Oe,{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 b0e(){var E;const[t,e]=$.useState(null),[r,n]=$.useState(null),[i,a]=$.useState("bot"),[o,s]=$.useState(!0),[l,u]=$.useState(!1),[c,h]=$.useState(null),[f,d]=$.useState(null),[p,g]=$.useState(!1),[m,y]=$.useState(!1),_=$.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)}},[]);$.useEffect(()=>{document.title="Config — MeshAI",_()},[_]),$.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)}}},T=()=>{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(n0e,{data:t.bot,onChange:D=>M("bot",D)});case"connection":return b.jsx(i0e,{data:t.connection,onChange:D=>M("connection",D)});case"response":return b.jsx(a0e,{data:t.response,onChange:D=>M("response",D)});case"history":return b.jsx(o0e,{data:t.history,onChange:D=>M("history",D)});case"memory":return b.jsx(s0e,{data:t.memory,onChange:D=>M("memory",D)});case"context":return b.jsx(l0e,{data:t.context,onChange:D=>M("context",D)});case"commands":return b.jsx(u0e,{data:t.commands,onChange:D=>M("commands",D)});case"llm":return b.jsx(c0e,{data:t.llm,onChange:D=>M("llm",D)});case"weather":return b.jsx(h0e,{data:t.weather,onChange:D=>M("weather",D)});case"meshmonitor":return b.jsx(f0e,{data:t.meshmonitor,onChange:D=>M("meshmonitor",D)});case"knowledge":return b.jsx(d0e,{data:t.knowledge,onChange:D=>M("knowledge",D)});case"mesh_sources":return b.jsx(p0e,{data:t.mesh_sources,onChange:D=>M("mesh_sources",D)});case"mesh_intelligence":return b.jsx(g0e,{data:t.mesh_intelligence,onChange:D=>M("mesh_intelligence",D)});case"environmental":return b.jsx(m0e,{data:t.environmental,onChange:D=>M("environmental",D)});case"notifications":return b.jsx(x0e,{data:t.notifications,onChange:D=>M("notifications",D)});case"dashboard":return b.jsx(S0e,{data:t.dashboard,onChange:D=>M("dashboard",D)});default:return null}},k=((E=pz.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:pz.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(Y3,{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:T,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(XZ,{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(YZ,{size:14,className:"animate-spin"}):b.jsx(KZ,{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(ms,{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(d2,{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(H3,{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 gz={infra_offline:n$,infra_recovery:X3,battery_warning:Lx,battery_critical:Lx,battery_emergency:Lx,hf_blackout:v2,uhf_ducting:Zc,weather_warning:Ud,weather_watch:Ud,new_router:Zc,packet_flood:ms,sustained_high_util:ms,region_blackout:E0,default:Wd};function w0e(t){return gz[t]||gz.default}function k8(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 T0e(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 C0e(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 M0e(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 A0e({alert:t,onAcknowledge:e}){var i;const r=k8(t.severity),n=w0e(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(ny,{size:12}),t.timestamp?T0e(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 L0e({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(f2,{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=k8(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:C0e(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?M0e(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(zZ,{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(Ev,{size:16})})]})]})]})}function P0e({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 Wd;case"daily":return ny;case"weekly":return ny;default:return Wd}})();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 k0e(){const[t,e]=$.useState([]),[r,n]=$.useState([]),[i,a]=$.useState([]),[o,s]=$.useState(!0),[l,u]=$.useState(null),[c,h]=$.useState("all"),[f,d]=$.useState("all"),[p,g]=$.useState(1),[m,y]=$.useState(1),_=20,[S,T]=$.useState(new Set),{lastAlert:C}=p2();$.useEffect(()=>{document.title="Alerts — MeshAI"},[]),$.useEffect(()=>{Promise.all([q3().catch(()=>[]),Pk(_,0).catch(()=>({items:[],total:0})),l$().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)})},[]),$.useEffect(()=>{C&&e(k=>k.some(D=>D.type===C.type&&D.message===C.message)?k:[C,...k])},[C]),$.useEffect(()=>{const k=(p-1)*_;Pk(_,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=$.useCallback(k=>{const E=`${k.type}-${k.message}-${k.timestamp}`;T(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(ms,{size:14}),"Active Alerts (",A.length,")"]}),A.length>0?b.jsx("div",{className:"space-y-3",children:A.map((k,E)=>b.jsx(A0e,{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(sd,{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(ny,{size:14}),"Alert History"]}),b.jsx(L0e,{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(r$,{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(P0e,{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 D0e(){return b.jsx(w$,{children:b.jsx(M$,{children:b.jsxs(yZ,{children:[b.jsx(rc,{path:"/",element:b.jsx(D$,{})}),b.jsx(rc,{path:"/mesh",element:b.jsx(Yye,{})}),b.jsx(rc,{path:"/environment",element:b.jsx(Jye,{})}),b.jsx(rc,{path:"/config",element:b.jsx(b0e,{})}),b.jsx(rc,{path:"/alerts",element:b.jsx(k0e,{})})]})})})}rb.createRoot(document.getElementById("root")).render(b.jsx(Bc.StrictMode,{children:b.jsx(CZ,{children:b.jsx(D0e,{})})})); diff --git a/meshai/dashboard/static/assets/index-CnMjjlvK.css b/meshai/dashboard/static/assets/index-D0QU4dPJ.css similarity index 52% rename from meshai/dashboard/static/assets/index-CnMjjlvK.css rename to meshai/dashboard/static/assets/index-D0QU4dPJ.css index d12a196..9e37751 100644 --- a/meshai/dashboard/static/assets/index-CnMjjlvK.css +++ b/meshai/dashboard/static/assets/index-D0QU4dPJ.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}.-ml-4{margin-left:-1rem}.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}.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}.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-\[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}.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\/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\/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-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-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}.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-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-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-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}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.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-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}.-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-\[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}.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-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\: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 d6caae0..75214fd 100644 --- a/meshai/dashboard/static/index.html +++ b/meshai/dashboard/static/index.html @@ -8,8 +8,8 @@ - - + +