diff --git a/alphatrion/server/graphql/resolvers.py b/alphatrion/server/graphql/resolvers.py index b6aadccf..88adfef9 100644 --- a/alphatrion/server/graphql/resolvers.py +++ b/alphatrion/server/graphql/resolvers.py @@ -16,6 +16,7 @@ ArtifactTag, CreateTeamInput, CreateUserInput, + DailyTokenUsage, Experiment, GraphQLExperimentType, GraphQLExperimentTypeEnum, @@ -572,6 +573,7 @@ def list_spans(run_id: strawberry.ID) -> list[Span]: parent_span_id=t["ParentSpanId"], span_name=t["SpanName"], span_kind=t["SpanKind"], + semantic_kind=t["SemanticKind"], service_name=t["ServiceName"], duration=t["Duration"], status_code=t["StatusCode"], @@ -593,6 +595,42 @@ def list_spans(run_id: strawberry.ID) -> list[Span]: print(f"Failed to fetch traces: {e}") return [] + # Alias for list_spans + list_traces = list_spans + + @staticmethod + def get_daily_token_usage( + team_id: strawberry.ID, days: int = 7 + ) -> list[DailyTokenUsage]: + """Get daily token usage from LLM calls for a team.""" + from alphatrion import envs + + # Check if tracing is enabled + if os.getenv(envs.ENABLE_TRACING, "false").lower() != "true": + return [] + + try: + trace_store = runtime.storage_runtime().tracestore + daily_usage = trace_store.get_daily_token_usage( + team_id=uuid.UUID(team_id), days=days + ) + trace_store.close() + + # Convert to GraphQL DailyTokenUsage objects + return [ + DailyTokenUsage( + date=item["date"], + total_tokens=item["total_tokens"], + input_tokens=item["input_tokens"], + output_tokens=item["output_tokens"], + ) + for item in daily_usage + ] + except Exception as e: + # Log error and return empty list - don't fail the GraphQL query + print(f"Failed to fetch daily token usage: {e}") + return [] + class GraphQLMutations: @staticmethod diff --git a/alphatrion/server/graphql/schema.py b/alphatrion/server/graphql/schema.py index d5fcebb2..016ec46f 100644 --- a/alphatrion/server/graphql/schema.py +++ b/alphatrion/server/graphql/schema.py @@ -8,6 +8,7 @@ ArtifactTag, CreateTeamInput, CreateUserInput, + DailyTokenUsage, Experiment, Project, RemoveUserFromTeamInput, @@ -90,6 +91,12 @@ def runs( def traces(self, run_id: strawberry.ID) -> list[Span]: return GraphQLResolvers.list_traces(run_id=run_id) + @strawberry.field + def daily_token_usage( + self, team_id: strawberry.ID, days: int = 7 + ) -> list[DailyTokenUsage]: + return GraphQLResolvers.get_daily_token_usage(team_id=team_id, days=days) + # Artifact queries @strawberry.field async def artifact_repos(self) -> list[ArtifactRepository]: diff --git a/alphatrion/server/graphql/types.py b/alphatrion/server/graphql/types.py index 48a15f0f..0d6e42b5 100644 --- a/alphatrion/server/graphql/types.py +++ b/alphatrion/server/graphql/types.py @@ -233,6 +233,7 @@ class Span: parent_span_id: str span_name: str span_kind: str + semantic_kind: str service_name: str duration: float # nanoseconds (using float to support large int64 values) status_code: str @@ -247,3 +248,11 @@ class Span: resource_attributes: JSON events: list[TraceEvent] links: list[TraceLink] + + +@strawberry.type +class DailyTokenUsage: + date: str + total_tokens: int + input_tokens: int + output_tokens: int diff --git a/alphatrion/storage/tracestore.py b/alphatrion/storage/tracestore.py index df5278f9..770d6c9b 100644 --- a/alphatrion/storage/tracestore.py +++ b/alphatrion/storage/tracestore.py @@ -79,6 +79,7 @@ def _create_tables(self) -> None: ParentSpanId String CODEC(ZSTD(1)), SpanName LowCardinality(String) CODEC(ZSTD(1)), SpanKind LowCardinality(String) CODEC(ZSTD(1)), + SemanticKind LowCardinality(String) CODEC(ZSTD(1)), ServiceName LowCardinality(String) CODEC(ZSTD(1)), Duration UInt64 CODEC(ZSTD(1)), StatusCode LowCardinality(String) CODEC(ZSTD(1)), @@ -104,6 +105,7 @@ def _create_tables(self) -> None: INDEX idx_run_id RunId TYPE bloom_filter(0.001) GRANULARITY 1, INDEX idx_project_id ProjectId TYPE bloom_filter(0.001) GRANULARITY 1, INDEX idx_team_id TeamId TYPE bloom_filter(0.001) GRANULARITY 1, + INDEX idx_semantic_kind SemanticKind TYPE set(0) GRANULARITY 1, INDEX idx_attr_keys mapKeys(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1 ) ENGINE = MergeTree() PARTITION BY toDate(Timestamp) @@ -140,6 +142,7 @@ def insert_spans(self, spans: list[dict[str, Any]]) -> None: span.get("ParentSpanId", ""), span.get("SpanName", ""), span.get("SpanKind", ""), + span.get("SemanticKind", ""), span.get("ServiceName", ""), span.get("Duration", 0), span.get("StatusCode", ""), @@ -170,6 +173,7 @@ def insert_spans(self, spans: list[dict[str, Any]]) -> None: "ParentSpanId", "SpanName", "SpanKind", + "SemanticKind", "ServiceName", "Duration", "StatusCode", @@ -212,6 +216,7 @@ def get_spans_by_run_id(self, run_id: uuid.UUID) -> list[dict[str, Any]]: ParentSpanId, SpanName, SpanKind, + SemanticKind, ServiceName, Duration, StatusCode, @@ -244,25 +249,26 @@ def get_spans_by_run_id(self, run_id: uuid.UUID) -> list[dict[str, Any]]: "ParentSpanId": row[3], "SpanName": row[4], "SpanKind": row[5], - "ServiceName": row[6], - "Duration": row[7], - "StatusCode": row[8], - "StatusMessage": row[9], - "TeamId": row[10], - "ProjectId": row[11], - "RunId": row[12], - "ExperimentId": row[13], - "SpanAttributes": row[14], - "ResourceAttributes": row[15], + "SemanticKind": row[6], + "ServiceName": row[7], + "Duration": row[8], + "StatusCode": row[9], + "StatusMessage": row[10], + "TeamId": row[11], + "ProjectId": row[12], + "RunId": row[13], + "ExperimentId": row[14], + "SpanAttributes": row[15], + "ResourceAttributes": row[16], "Events": { - "Timestamp": row[16], - "Name": row[17], - "Attributes": row[18], + "Timestamp": row[17], + "Name": row[18], + "Attributes": row[19], }, "Links": { - "TraceId": row[19], - "SpanId": row[20], - "Attributes": row[21], + "TraceId": row[20], + "SpanId": row[21], + "Attributes": row[22], }, } ) @@ -271,6 +277,50 @@ def get_spans_by_run_id(self, run_id: uuid.UUID) -> list[dict[str, Any]]: logger.error(f"Failed to get traces by run_id: {e}") return [] + def get_daily_token_usage( + self, team_id: uuid.UUID, days: int = 30 + ) -> list[dict[str, Any]]: + """Get daily token usage from LLM calls for a team. + + Args: + team_id: The team ID to filter by + days: Number of days to look back (default: 30) + + Returns: + List of dicts with keys: date, total_tokens, input_tokens, output_tokens + """ + with self._lock: + try: + query = f""" + SELECT + toDate(Timestamp) as date, + SUM(toInt64OrZero(SpanAttributes['llm.usage.total_tokens'])) as total_tokens, + SUM(toInt64OrZero(SpanAttributes['gen_ai.usage.input_tokens'])) as input_tokens, + SUM(toInt64OrZero(SpanAttributes['gen_ai.usage.output_tokens'])) as output_tokens + FROM {self.database}.otel_spans + WHERE TeamId = '{team_id}' + AND Timestamp >= now() - INTERVAL {days} DAY + AND SemanticKind = 'llm' + GROUP BY date + ORDER BY date ASC + """ + + result = self.client.query(query) + daily_usage = [] + for row in result.result_rows: + daily_usage.append( + { + "date": row[0].strftime("%Y-%m-%d"), + "total_tokens": int(row[1]), + "input_tokens": int(row[2]), + "output_tokens": int(row[3]), + } + ) + return daily_usage + except Exception as e: + logger.error(f"Failed to get daily token usage: {e}") + return [] + def close(self) -> None: """Close the ClickHouse connection.""" try: diff --git a/alphatrion/tracing/clickhouse_exporter.py b/alphatrion/tracing/clickhouse_exporter.py index ca477a2a..c6a7ed6e 100644 --- a/alphatrion/tracing/clickhouse_exporter.py +++ b/alphatrion/tracing/clickhouse_exporter.py @@ -118,6 +118,16 @@ def _convert_span(self, span: ReadableSpan) -> dict[str, Any]: run_id = span_attributes.get("run_id", "") experiment_id = span_attributes.get("experiment_id", "") + # Determine semantic kind (application-level span type) + # Priority: LLM calls > Traceloop span kind > unknown + if "llm.usage.total_tokens" in span_attributes: + semantic_kind = "llm" + elif "traceloop.span.kind" in span_attributes: + # Values: "workflow", "task", "agent", "tool", "unknown" + semantic_kind = span_attributes["traceloop.span.kind"] + else: + raise ValueError("Span is missing required semantic kind attributes") + # Convert events to nested structure event_timestamps = [] event_names = [] @@ -151,6 +161,7 @@ def _convert_span(self, span: ReadableSpan) -> dict[str, Any]: "ParentSpanId": parent_span_id, "SpanName": span.name, "SpanKind": span_kind, + "SemanticKind": semantic_kind, "ServiceName": service_name, "Duration": duration, "StatusCode": status_code, diff --git a/dashboard/src/components/dashboard/daily-token-usage-chart.tsx b/dashboard/src/components/dashboard/daily-token-usage-chart.tsx new file mode 100644 index 00000000..303a1f4a --- /dev/null +++ b/dashboard/src/components/dashboard/daily-token-usage-chart.tsx @@ -0,0 +1,189 @@ +import { useMemo } from 'react'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + ResponsiveContainer, +} from 'recharts'; +import { format, subDays, startOfDay } from 'date-fns'; +import type { DailyTokenUsage } from '../../hooks/use-token-usage'; + +interface DailyTokenUsageChartProps { + data: DailyTokenUsage[]; + timeRange: '7days' | '1month' | '3months'; +} + +type TimeRange = '7days' | '1month' | '3months'; + +const TIME_RANGE_OPTIONS: { value: TimeRange; label: string; days: number }[] = [ + { value: '7days', label: '7 Days', days: 7 }, + { value: '1month', label: '1 Month', days: 30 }, + { value: '3months', label: '3 Months', days: 90 }, +]; + +export function DailyTokenUsageChart({ data, timeRange }: DailyTokenUsageChartProps) { + const chartData = useMemo(() => { + const selectedRange = TIME_RANGE_OPTIONS.find((r) => r.value === timeRange); + if (!selectedRange) return []; + + const now = new Date(); + + // Create date map for aggregation - fill all dates with 0 + const dateMap = new Map(); + + // Initialize all dates in range with 0 + for (let i = 0; i < selectedRange.days; i++) { + const date = subDays(now, selectedRange.days - 1 - i); + const dateKey = format(startOfDay(date), 'yyyy-MM-dd'); + dateMap.set(dateKey, { totalTokens: 0, inputTokens: 0, outputTokens: 0 }); + } + + // Fill in actual data + data.forEach((item) => { + const dateKey = format(new Date(item.date), 'yyyy-MM-dd'); + if (dateMap.has(dateKey)) { + dateMap.set(dateKey, { + totalTokens: item.totalTokens, + inputTokens: item.inputTokens, + outputTokens: item.outputTokens, + }); + } + }); + + // Convert to array and format for chart + return Array.from(dateMap.entries()) + .map(([date, tokens]) => ({ + date, + displayDate: format(new Date(date), 'MMM dd'), + totalTokens: tokens.totalTokens, + inputTokens: tokens.inputTokens, + outputTokens: tokens.outputTokens, + })) + .sort((a, b) => a.date.localeCompare(b.date)); + }, [data, timeRange]); + + // Calculate total tokens across all days + const totalTokens = useMemo(() => { + return chartData.reduce((sum, item) => sum + item.totalTokens, 0); + }, [chartData]); + + const totalInputTokens = useMemo(() => { + return chartData.reduce((sum, item) => sum + item.inputTokens, 0); + }, [chartData]); + + const totalOutputTokens = useMemo(() => { + return chartData.reduce((sum, item) => sum + item.outputTokens, 0); + }, [chartData]); + + return ( +
+
+

Token Usage

+
+ Total: {totalTokens.toLocaleString()} ({totalInputTokens.toLocaleString()}↓ {totalOutputTokens.toLocaleString()}↑) +
+
+ + + + + + + value >= 1000000 + ? `${(value / 1000000).toFixed(1)}M` + : value >= 1000 + ? `${(value / 1000).toFixed(1)}K` + : value.toString() + } + label={{ + value: 'Tokens', + angle: -90, + position: 'insideLeft', + offset: 8, + style: { textAnchor: 'middle', fontSize: 11 } + }} + /> + { + if (!active || !payload || !payload.length) return null; + const data = payload[0].payload; + return ( +
+
{label}
+
+
+
+ Total: + {data.totalTokens.toLocaleString()} +
+
+
+ Input: + {data.inputTokens.toLocaleString()} +
+
+
+ Output: + {data.outputTokens.toLocaleString()} +
+
+
+ ); + }} + /> + + + + +
+
+
+ ); +} diff --git a/dashboard/src/components/dashboard/experiments-timeline-chart.tsx b/dashboard/src/components/dashboard/experiments-timeline-chart.tsx index 615151ef..d321362b 100644 --- a/dashboard/src/components/dashboard/experiments-timeline-chart.tsx +++ b/dashboard/src/components/dashboard/experiments-timeline-chart.tsx @@ -61,9 +61,19 @@ export function ExperimentsTimelineChart({ experiments, timeRange }: Experiments .sort((a, b) => a.date.localeCompare(b.date)); }, [experiments, timeRange]); + // Calculate total experiments in the time range + const totalExperiments = useMemo(() => { + return experiments.length; + }, [experiments]); + return (
-

Experiments Timeline

+
+

Experiments Timeline

+
+ Total: {totalExperiments} +
+
@@ -93,9 +103,28 @@ export function ExperimentsTimelineChart({ experiments, timeRange }: Experiments borderRadius: '6px', fontSize: '12px', }} - labelFormatter={(label) => `Date: ${label}`} + content={({ active, payload, label }) => { + if (!active || !payload || !payload.length) return null; + const data = payload[0].payload; + return ( +
+
{label}
+
+
+
+ Launched: + {data.experiments} +
+
+
+ ); + }} + /> + -
diff --git a/dashboard/src/hooks/use-token-usage.ts b/dashboard/src/hooks/use-token-usage.ts new file mode 100644 index 00000000..571da75e --- /dev/null +++ b/dashboard/src/hooks/use-token-usage.ts @@ -0,0 +1,32 @@ +import { useQuery } from '@tanstack/react-query'; +import { graphqlQuery, queries } from '../lib/graphql-client'; + +export interface DailyTokenUsage { + date: string; + totalTokens: number; + inputTokens: number; + outputTokens: number; +} + +interface GetDailyTokenUsageResponse { + dailyTokenUsage: DailyTokenUsage[]; +} + +/** + * Hook to fetch daily token usage for a team + * Only includes LLM calls (spans with llm.usage.total_tokens) + */ +export function useDailyTokenUsage(teamId: string, days = 30) { + return useQuery({ + queryKey: ['dailyTokenUsage', teamId, days], + queryFn: async () => { + const data = await graphqlQuery( + queries.getDailyTokenUsage, + { teamId, days } + ); + return data.dailyTokenUsage; + }, + enabled: !!teamId, + staleTime: 5 * 60 * 1000, // 5 minutes + }); +} diff --git a/dashboard/src/lib/graphql-client.ts b/dashboard/src/lib/graphql-client.ts index d4ebe3fe..fd45fbbf 100644 --- a/dashboard/src/lib/graphql-client.ts +++ b/dashboard/src/lib/graphql-client.ts @@ -311,6 +311,7 @@ export const queries = { parentSpanId spanName spanKind + semanticKind serviceName duration statusCode @@ -335,4 +336,15 @@ export const queries = { } `, + getDailyTokenUsage: ` + query GetDailyTokenUsage($teamId: ID!, $days: Int = 30) { + dailyTokenUsage(teamId: $teamId, days: $days) { + date + totalTokens + inputTokens + outputTokens + } + } + `, + }; diff --git a/dashboard/src/pages/dashboard/index.tsx b/dashboard/src/pages/dashboard/index.tsx index ae4e6575..74bfc1f4 100644 --- a/dashboard/src/pages/dashboard/index.tsx +++ b/dashboard/src/pages/dashboard/index.tsx @@ -2,6 +2,7 @@ import { useState, useMemo } from 'react'; import { useTeamContext } from '../../context/team-context'; import { useTeam } from '../../hooks/use-teams'; import { useTeamExperiments } from '../../hooks/use-team-experiments'; +import { useDailyTokenUsage } from '../../hooks/use-token-usage'; import { Card, CardContent, @@ -10,6 +11,7 @@ import { Button } from '../../components/ui/button'; import { Skeleton } from '../../components/ui/skeleton'; import { ExperimentsTimelineChart } from '../../components/dashboard/experiments-timeline-chart'; import { ExperimentsStatusChart } from '../../components/dashboard/experiments-status-chart'; +import { DailyTokenUsageChart } from '../../components/dashboard/daily-token-usage-chart'; import { subDays, subMonths } from 'date-fns'; import { FolderKanban, FlaskConical, Play } from 'lucide-react'; @@ -32,6 +34,14 @@ export function DashboardPage() { { enabled: !!selectedTeamId } ); + // Get days for selected time range + const days = TIME_RANGE_OPTIONS.find((opt) => opt.value === timeRange)?.days || 30; + + const { data: dailyTokenUsage, isLoading: tokenUsageLoading } = useDailyTokenUsage( + selectedTeamId || '', + days + ); + // Filter experiments based on selected time range const filteredExperiments = useMemo(() => { if (!teamExperiments) return []; @@ -178,6 +188,21 @@ export function DashboardPage() {
+ + {/* Token Usage Chart */} + + + {tokenUsageLoading ? ( + + ) : dailyTokenUsage ? ( + + ) : ( +
+ No token usage data available for this time range +
+ )} +
+
); diff --git a/dashboard/src/pages/experiments/[id].tsx b/dashboard/src/pages/experiments/[id].tsx index 768ef499..20f66de3 100644 --- a/dashboard/src/pages/experiments/[id].tsx +++ b/dashboard/src/pages/experiments/[id].tsx @@ -172,7 +172,7 @@ export function ExperimentDetailPage() {
{experiment.duration > 0 ? `${experiment.duration.toFixed(2)}s` - : 'N/A'} + : '-'}
diff --git a/dashboard/src/pages/experiments/compare.tsx b/dashboard/src/pages/experiments/compare.tsx index 9c7b3e79..63a6f145 100644 --- a/dashboard/src/pages/experiments/compare.tsx +++ b/dashboard/src/pages/experiments/compare.tsx @@ -89,7 +89,7 @@ export function ExperimentComparePage() {
{experiment.duration > 0 ? `${experiment.duration.toFixed(2)}s` - : 'N/A'} + : '-'}
diff --git a/dashboard/src/types/index.ts b/dashboard/src/types/index.ts index 47ee60eb..b3895e79 100644 --- a/dashboard/src/types/index.ts +++ b/dashboard/src/types/index.ts @@ -163,6 +163,7 @@ export interface Span { parentSpanId: string; spanName: string; spanKind: string; + semanticKind: string; serviceName: string; duration: number; // nanoseconds (received as float from GraphQL) statusCode: string; diff --git a/dashboard/static/assets/index-CvEzrI53.js b/dashboard/static/assets/index-CvEzrI53.js deleted file mode 100644 index 1d3d5f37..00000000 --- a/dashboard/static/assets/index-CvEzrI53.js +++ /dev/null @@ -1,578 +0,0 @@ -var aw=e=>{throw TypeError(e)};var hm=(e,t,r)=>t.has(e)||aw("Cannot "+r);var $=(e,t,r)=>(hm(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?aw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(hm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(hm(e,t,"access private method"),r);var Gc=(e,t,r,n)=>({set _(i){X(e,t,i,r)},get _(){return $(e,t,n)}});function rM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 Yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var HE={exports:{}},Bh={},KE={exports:{}},me={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ac=Symbol.for("react.element"),nM=Symbol.for("react.portal"),iM=Symbol.for("react.fragment"),aM=Symbol.for("react.strict_mode"),oM=Symbol.for("react.profiler"),sM=Symbol.for("react.provider"),lM=Symbol.for("react.context"),uM=Symbol.for("react.forward_ref"),cM=Symbol.for("react.suspense"),fM=Symbol.for("react.memo"),dM=Symbol.for("react.lazy"),ow=Symbol.iterator;function hM(e){return e===null||typeof e!="object"?null:(e=ow&&e[ow]||e["@@iterator"],typeof e=="function"?e:null)}var qE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},VE=Object.assign,GE={};function tl(e,t,r){this.props=e,this.context=t,this.refs=GE,this.updater=r||qE}tl.prototype.isReactComponent={};tl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};tl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function YE(){}YE.prototype=tl.prototype;function k0(e,t,r){this.props=e,this.context=t,this.refs=GE,this.updater=r||qE}var C0=k0.prototype=new YE;C0.constructor=k0;VE(C0,tl.prototype);C0.isPureReactComponent=!0;var sw=Array.isArray,XE=Object.prototype.hasOwnProperty,$0={current:null},QE={key:!0,ref:!0,__self:!0,__source:!0};function JE(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)XE.call(t,n)&&!QE.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=C[V];if(0>>1;Vi(xe,W))Kei(Se,xe)?(C[V]=Se,C[Ke]=W,V=Ke):(C[V]=xe,C[re]=W,V=re);else if(Kei(Se,W))C[V]=Se,C[Ke]=W,V=Ke;else break e}}return F}function i(C,F){var W=C.sortIndex-F.sortIndex;return W!==0?W:C.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],f=1,c=null,h=3,p=!1,v=!1,m=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(C){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=C)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function S(C){if(m=!1,x(C),!v)if(r(l)!==null)v=!0,D(w);else{var F=r(u);F!==null&&z(S,F.startTime-C)}}function w(C,F){v=!1,m&&(m=!1,y(E),E=-1),p=!0;var W=h;try{for(x(F),c=r(l);c!==null&&(!(c.expirationTime>F)||C&&!_());){var V=c.callback;if(typeof V=="function"){c.callback=null,h=c.priorityLevel;var H=V(c.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?c.callback=H:c===r(l)&&n(l),x(F)}else n(l);c=r(l)}if(c!==null)var Y=!0;else{var re=r(u);re!==null&&z(S,re.startTime-F),Y=!1}return Y}finally{c=null,h=W,p=!1}}var O=!1,j=null,E=-1,A=5,T=-1;function _(){return!(e.unstable_now()-TC||125V?(C.sortIndex=W,t(u,C),r(l)===null&&C===r(u)&&(m?(y(E),E=-1):m=!0,z(S,W-V))):(C.sortIndex=H,t(l,C),v||p||(v=!0,D(w))),C},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(C){var F=h;return function(){var W=h;h=F;try{return C.apply(this,arguments)}finally{h=W}}}})(nA);rA.exports=nA;var jM=rA.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var PM=P,Sr=jM;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cv=Object.prototype.hasOwnProperty,EM=/^[: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]*$/,uw={},cw={};function AM(e){return Cv.call(cw,e)?!0:Cv.call(uw,e)?!1:EM.test(e)?cw[e]=!0:(uw[e]=!0,!1)}function _M(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function TM(e,t,r,n){if(t===null||typeof t>"u"||_M(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Qt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Qt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Qt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new Qt(e,2,!1,e,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(e){kt[e]=new Qt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Qt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new Qt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new Qt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new Qt(e,5,!1,e.toLowerCase(),null,!1,!1)});var D0=/[\-:]([a-z])/g;function R0(e){return e[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(e){var t=e.replace(D0,R0);kt[t]=new Qt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(D0,R0);kt[t]=new Qt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(D0,R0);kt[t]=new Qt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new Qt(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new Qt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new Qt(e,1,!1,e.toLowerCase(),null,!0,!0)});function L0(e,t,r,n){var i=kt.hasOwnProperty(t)?kt[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{vm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Kl(e):""}function NM(e){switch(e.tag){case 5:return Kl(e.type);case 16:return Kl("Lazy");case 13:return Kl("Suspense");case 19:return Kl("SuspenseList");case 0:case 2:case 15:return e=ym(e.type,!1),e;case 11:return e=ym(e.type.render,!1),e;case 1:return e=ym(e.type,!0),e;default:return""}}function Dv(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Do:return"Fragment";case Io:return"Portal";case $v:return"Profiler";case F0:return"StrictMode";case Mv:return"Suspense";case Iv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oA:return(e.displayName||"Context")+".Consumer";case aA:return(e._context.displayName||"Context")+".Provider";case B0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z0:return t=e.displayName||null,t!==null?t:Dv(e.type)||"Memo";case pi:t=e._payload,e=e._init;try{return Dv(e(t))}catch{}}return null}function kM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dv(t);case 8:return t===F0?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ki(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CM(e){var t=lA(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jc(e){e._valueTracker||(e._valueTracker=CM(e))}function uA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=lA(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function rd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Rv(e,t){var r=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function dw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ki(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cA(e,t){t=t.checked,t!=null&&L0(e,"checked",t,!1)}function Lv(e,t){cA(e,t);var r=Ki(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Fv(e,t.type,Ki(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Fv(e,t,r){(t!=="number"||rd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ql=Array.isArray;function Jo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Zc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ql={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},$M=["Webkit","ms","Moz","O"];Object.keys(Ql).forEach(function(e){$M.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ql[t]=Ql[e]})});function pA(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ql.hasOwnProperty(e)&&Ql[e]?(""+t).trim():t+"px"}function mA(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=pA(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var MM=Je({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 Uv(e,t){if(t){if(MM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Wv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Hv=null;function U0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kv=null,Zo=null,es=null;function vw(e){if(e=Nc(e)){if(typeof Kv!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Kh(t),Kv(e.stateNode,e.type,t))}}function vA(e){Zo?es?es.push(e):es=[e]:Zo=e}function yA(){if(Zo){var e=Zo,t=es;if(es=Zo=null,vw(e),t)for(e=0;e>>=0,e===0?32:31-(KM(e)/qM|0)|0}var ef=64,tf=4194304;function Vl(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function od(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Vl(s):(a&=o,a!==0&&(n=Vl(a)))}else o=r&~i,o!==0?n=Vl(o):a!==0&&(n=Vl(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function _c(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=r}function XM(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Zl),Pw=" ",Ew=!1;function RA(e,t){switch(e){case"keyup":return jI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ro=!1;function EI(e,t){switch(e){case"compositionend":return LA(t);case"keypress":return t.which!==32?null:(Ew=!0,Pw);case"textInput":return e=t.data,e===Pw&&Ew?null:e;default:return null}}function AI(e,t){if(Ro)return e==="compositionend"||!X0&&RA(e,t)?(e=IA(),Bf=V0=_i=null,Ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Nw(r)}}function UA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?UA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function WA(){for(var e=window,t=rd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=rd(e.document)}return t}function Q0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function DI(e){var t=WA(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&UA(r.ownerDocument.documentElement,r)){if(n!==null&&Q0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=kw(r,a);var o=kw(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Lo=null,Qv=null,tu=null,Jv=!1;function Cw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Jv||Lo==null||Lo!==rd(n)||(n=Lo,"selectionStart"in n&&Q0(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}),tu&&Ou(tu,n)||(tu=n,n=ud(Qv,"onSelect"),0zo||(e.current=iy[zo],iy[zo]=null,zo--)}function Fe(e,t){zo++,iy[zo]=e.current,e.current=t}var qi={},zt=Ji(qi),ar=Ji(!1),Ua=qi;function ws(e,t){var r=e.type.contextTypes;if(!r)return qi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function or(e){return e=e.childContextTypes,e!=null}function fd(){He(ar),He(zt)}function Fw(e,t,r){if(zt.current!==qi)throw Error(K(168));Fe(zt,t),Fe(ar,r)}function JA(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(K(108,kM(e)||"Unknown",i));return Je({},r,n)}function dd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qi,Ua=zt.current,Fe(zt,e),Fe(ar,ar.current),!0}function Bw(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=JA(e,t,Ua),n.__reactInternalMemoizedMergedChildContext=e,He(ar),He(zt),Fe(zt,e)):He(ar),Fe(ar,r)}var Rn=null,qh=!1,km=!1;function ZA(e){Rn===null?Rn=[e]:Rn.push(e)}function GI(e){qh=!0,ZA(e)}function Zi(){if(!km&&Rn!==null){km=!0;var e=0,t=Ne;try{var r=Rn;for(Ne=1;e>=o,i-=o,Bn=1<<32-tn(t)+i|r<E?(A=j,j=null):A=j.sibling;var T=h(y,j,x[E],S);if(T===null){j===null&&(j=A);break}e&&j&&T.alternate===null&&t(y,j),b=a(T,b,E),O===null?w=T:O.sibling=T,O=T,j=A}if(E===x.length)return r(y,j),qe&&fa(y,E),w;if(j===null){for(;EE?(A=j,j=null):A=j.sibling;var _=h(y,j,T.value,S);if(_===null){j===null&&(j=A);break}e&&j&&_.alternate===null&&t(y,j),b=a(_,b,E),O===null?w=_:O.sibling=_,O=_,j=A}if(T.done)return r(y,j),qe&&fa(y,E),w;if(j===null){for(;!T.done;E++,T=x.next())T=c(y,T.value,S),T!==null&&(b=a(T,b,E),O===null?w=T:O.sibling=T,O=T);return qe&&fa(y,E),w}for(j=n(y,j);!T.done;E++,T=x.next())T=p(j,y,E,T.value,S),T!==null&&(e&&T.alternate!==null&&j.delete(T.key===null?E:T.key),b=a(T,b,E),O===null?w=T:O.sibling=T,O=T);return e&&j.forEach(function(N){return t(y,N)}),qe&&fa(y,E),w}function g(y,b,x,S){if(typeof x=="object"&&x!==null&&x.type===Do&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Qc:e:{for(var w=x.key,O=b;O!==null;){if(O.key===w){if(w=x.type,w===Do){if(O.tag===7){r(y,O.sibling),b=i(O,x.props.children),b.return=y,y=b;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===pi&&Ww(w)===O.type){r(y,O.sibling),b=i(O,x.props),b.ref=_l(y,O,x),b.return=y,y=b;break e}r(y,O);break}else t(y,O);O=O.sibling}x.type===Do?(b=Ra(x.props.children,y.mode,S,x.key),b.return=y,y=b):(S=Gf(x.type,x.key,x.props,null,y.mode,S),S.ref=_l(y,b,x),S.return=y,y=S)}return o(y);case Io:e:{for(O=x.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else t(y,b);b=b.sibling}b=Fm(x,y.mode,S),b.return=y,y=b}return o(y);case pi:return O=x._init,g(y,b,O(x._payload),S)}if(ql(x))return v(y,b,x,S);if(Ol(x))return m(y,b,x,S);uf(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,x),b.return=y,y=b):(r(y,b),b=Lm(x,y.mode,S),b.return=y,y=b),o(y)):r(y,b)}return g}var Os=n_(!0),i_=n_(!1),md=Ji(null),vd=null,Ho=null,tb=null;function rb(){tb=Ho=vd=null}function nb(e){var t=md.current;He(md),e._currentValue=t}function sy(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function rs(e,t){vd=e,tb=Ho=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nr=!0),e.firstContext=null)}function Fr(e){var t=e._currentValue;if(tb!==e)if(e={context:e,memoizedValue:t,next:null},Ho===null){if(vd===null)throw Error(K(308));Ho=e,vd.dependencies={lanes:0,firstContext:e}}else Ho=Ho.next=e;return t}var ba=null;function ib(e){ba===null?ba=[e]:ba.push(e)}function a_(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,ib(t)):(r.next=i.next,i.next=r),t.interleaved=r,Xn(e,n)}function Xn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var mi=!1;function ab(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function o_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Kn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ri(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,be&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Xn(e,r)}return i=n.interleaved,i===null?(t.next=t,ib(n)):(t.next=i.next,i.next=t),n.interleaved=t,Xn(e,r)}function Uf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,H0(e,r)}}function Hw(e,t){var r=e.updateQueue,n=e.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=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function yd(e,t,r,n){var i=e.updateQueue;mi=!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 f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==o&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=l))}if(a!==null){var c=i.baseState;o=0,f=u=l=null,s=a;do{var h=s.lane,p=s.eventTime;if((n&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(h=t,p=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){c=v.call(p,c,h);break e}c=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,h=typeof v=="function"?v.call(p,c,h):v,h==null)break e;c=Je({},c,h);break e;case 2:mi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=p,l=c):f=f.next=p,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(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ka|=o,e.lanes=o,e.memoizedState=c}}function Kw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=$m.transition;$m.transition={};try{e(!1),t()}finally{Ne=r,$m.transition=n}}function O_(){return Br().memoizedState}function JI(e,t,r){var n=Fi(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},j_(e))P_(t,r);else if(r=a_(e,t,r,n),r!==null){var i=Gt();rn(r,e,n,i),E_(r,t,n)}}function ZI(e,t,r){var n=Fi(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(j_(e))P_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,sn(s,o)){var l=t.interleaved;l===null?(i.next=i,ib(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=a_(e,t,i,n),r!==null&&(i=Gt(),rn(r,e,n,i),E_(r,t,n))}}function j_(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function P_(e,t){ru=bd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function E_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,H0(e,r)}}var xd={readContext:Fr,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},eD={readContext:Fr,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:Fr,useEffect:Vw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Hf(4194308,4,g_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Hf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hf(4,2,e,t)},useMemo:function(e,t){var r=vn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=vn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=JI.bind(null,Qe,e),[n.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:qw,useDebugValue:hb,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=qw(!1),t=e[0];return e=QI.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Qe,i=vn();if(qe){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),Ot===null)throw Error(K(349));Ha&30||c_(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Vw(d_.bind(null,n,a,e),[e]),n.flags|=2048,ku(9,f_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=vn(),t=Ot.identifierPrefix;if(qe){var r=zn,n=Bn;r=(n&~(1<<32-tn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Tu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[xn]=t,e[Eu]=n,D_(e,t,!1,!1),t.stateNode=e;e:{switch(o=Wv(r,n),r){case"dialog":ze("cancel",e),ze("close",e),i=n;break;case"iframe":case"object":case"embed":ze("load",e),i=n;break;case"video":case"audio":for(i=0;iEs&&(t.flags|=128,n=!0,Tl(a,!1),t.lanes=4194304)}else{if(!n)if(e=gd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Tl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!qe)return $t(t),null}else 2*it()-a.renderingStartTime>Es&&r!==1073741824&&(t.flags|=128,n=!0,Tl(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=it(),t.sibling=null,r=Ye.current,Fe(Ye,n?r&1|2:r&1),t):($t(t),null);case 22:case 23:return bb(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?vr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function lD(e,t){switch(Z0(t),t.tag){case 1:return or(t.type)&&fd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return js(),He(ar),He(zt),lb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sb(t),null;case 13:if(He(Ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(Ye),null;case 4:return js(),null;case 10:return nb(t.type._context),null;case 22:case 23:return bb(),null;case 24:return null;default:return null}}var ff=!1,Dt=!1,uD=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Ko(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){tt(e,t,n)}else r.current=null}function vy(e,t,r){try{r()}catch(n){tt(e,t,n)}}var i1=!1;function cD(e,t){if(Zv=sd,e=WA(),Q0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.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,f=0,c=e,h=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(s=o+i),c!==a||n!==0&&c.nodeType!==3||(l=o+n),c.nodeType===3&&(o+=c.nodeValue.length),(p=c.firstChild)!==null;)h=c,c=p;for(;;){if(c===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++f===n&&(l=o),(p=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ey={focusedElem:e,selectionRange:r},sd=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,g=v.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Vr(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){tt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return v=i1,i1=!1,v}function nu(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&vy(t,r,a)}i=i.next}while(i!==n)}}function Yh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function yy(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function F_(e){var t=e.alternate;t!==null&&(e.alternate=null,F_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xn],delete t[Eu],delete t[ny],delete t[qI],delete t[VI])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function B_(e){return e.tag===5||e.tag===3||e.tag===4}function a1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||B_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cd));else if(n!==4&&(e=e.child,e!==null))for(gy(e,t,r),e=e.sibling;e!==null;)gy(e,t,r),e=e.sibling}function by(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(by(e,t,r),e=e.sibling;e!==null;)by(e,t,r),e=e.sibling}var At=null,Xr=!1;function li(e,t,r){for(r=r.child;r!==null;)z_(e,t,r),r=r.sibling}function z_(e,t,r){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(zh,r)}catch{}switch(r.tag){case 5:Dt||Ko(r,t);case 6:var n=At,i=Xr;At=null,li(e,t,r),At=n,Xr=i,At!==null&&(Xr?(e=At,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):At.removeChild(r.stateNode));break;case 18:At!==null&&(Xr?(e=At,r=r.stateNode,e.nodeType===8?Nm(e.parentNode,r):e.nodeType===1&&Nm(e,r),wu(e)):Nm(At,r.stateNode));break;case 4:n=At,i=Xr,At=r.stateNode.containerInfo,Xr=!0,li(e,t,r),At=n,Xr=i;break;case 0:case 11:case 14:case 15:if(!Dt&&(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)&&vy(r,t,o),i=i.next}while(i!==n)}li(e,t,r);break;case 1:if(!Dt&&(Ko(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){tt(r,t,s)}li(e,t,r);break;case 21:li(e,t,r);break;case 22:r.mode&1?(Dt=(n=Dt)||r.memoizedState!==null,li(e,t,r),Dt=n):li(e,t,r);break;default:li(e,t,r)}}function o1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new uD),t.forEach(function(n){var i=bD.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Kr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=it()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*dD(n/1960))-n,10e?16:e,Ti===null)var n=!1;else{if(e=Ti,Ti=null,Od=0,be&6)throw Error(K(331));var i=be;for(be|=4,Q=e.current;Q!==null;){var a=Q,o=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lit()-yb?Da(e,0):vb|=r),sr(e,t)}function Y_(e,t){t===0&&(e.mode&1?(t=tf,tf<<=1,!(tf&130023424)&&(tf=4194304)):t=1);var r=Gt();e=Xn(e,t),e!==null&&(_c(e,t,r),sr(e,r))}function gD(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Y_(e,r)}function bD(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(K(314))}n!==null&&n.delete(t),Y_(e,r)}var X_;X_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ar.current)nr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return nr=!1,oD(e,t,r);nr=!!(e.flags&131072)}else nr=!1,qe&&t.flags&1048576&&e_(t,pd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Kf(e,t),e=t.pendingProps;var i=ws(t,zt.current);rs(t,r),i=cb(null,t,n,e,i,r);var a=fb();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,or(n)?(a=!0,dd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ab(t),i.updater=Gh,t.stateNode=i,i._reactInternals=t,uy(t,n,e,r),t=dy(null,t,n,!0,a,r)):(t.tag=0,qe&&a&&J0(t),Ht(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Kf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=wD(n),e=Vr(n,e),i){case 0:t=fy(null,t,n,e,r);break e;case 1:t=t1(null,t,n,e,r);break e;case 11:t=Zw(null,t,n,e,r);break e;case 14:t=e1(null,t,n,Vr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),fy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),t1(e,t,n,i,r);case 3:e:{if($_(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,o_(e,t),yd(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Ps(Error(K(423)),t),t=r1(e,t,n,r,i);break e}else if(n!==i){i=Ps(Error(K(424)),t),t=r1(e,t,n,r,i);break e}else for(br=Di(t.stateNode.containerInfo.firstChild),xr=t,qe=!0,Zr=null,r=i_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ss(),n===i){t=Qn(e,t,r);break e}Ht(e,t,n,r)}t=t.child}return t;case 5:return s_(t),e===null&&oy(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,ty(n,i)?o=null:a!==null&&ty(n,a)&&(t.flags|=32),C_(e,t),Ht(e,t,o,r),t.child;case 6:return e===null&&oy(t),null;case 13:return M_(e,t,r);case 4:return ob(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Os(t,null,n,r):Ht(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),Zw(e,t,n,i,r);case 7:return Ht(e,t,t.pendingProps,r),t.child;case 8:return Ht(e,t,t.pendingProps.children,r),t.child;case 12:return Ht(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Fe(md,n._currentValue),n._currentValue=o,a!==null)if(sn(a.value,o)){if(a.children===i.children&&!ar.current){t=Qn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);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=Kn(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),sy(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),sy(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Ht(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,rs(t,r),i=Fr(i),n=n(i),t.flags|=1,Ht(e,t,n,r),t.child;case 14:return n=t.type,i=Vr(n,t.pendingProps),i=Vr(n.type,i),e1(e,t,n,i,r);case 15:return N_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Vr(n,i),Kf(e,t),t.tag=1,or(n)?(e=!0,dd(t)):e=!1,rs(t,r),A_(t,n,i),uy(t,n,i,r),dy(null,t,n,!0,e,r);case 19:return I_(e,t,r);case 22:return k_(e,t,r)}throw Error(K(156,t.tag))};function Q_(e,t){return jA(e,t)}function xD(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Dr(e,t,r,n){return new xD(e,t,r,n)}function wb(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wD(e){if(typeof e=="function")return wb(e)?1:0;if(e!=null){if(e=e.$$typeof,e===B0)return 11;if(e===z0)return 14}return 2}function Bi(e,t){var r=e.alternate;return r===null?(r=Dr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")wb(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Do:return Ra(r.children,i,a,t);case F0:o=8,i|=8;break;case $v:return e=Dr(12,r,t,i|2),e.elementType=$v,e.lanes=a,e;case Mv:return e=Dr(13,r,t,i),e.elementType=Mv,e.lanes=a,e;case Iv:return e=Dr(19,r,t,i),e.elementType=Iv,e.lanes=a,e;case sA:return Qh(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case aA:o=10;break e;case oA:o=9;break e;case B0:o=11;break e;case z0:o=14;break e;case pi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Dr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ra(e,t,r,n){return e=Dr(7,e,n,t),e.lanes=r,e}function Qh(e,t,r,n){return e=Dr(22,e,n,t),e.elementType=sA,e.lanes=r,e.stateNode={isHidden:!1},e}function Lm(e,t,r){return e=Dr(6,e,null,t),e.lanes=r,e}function Fm(e,t,r){return t=Dr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SD(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bm(0),this.expirationTimes=bm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Sb(e,t,r,n,i,a,o,s,l){return e=new SD(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Dr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ab(a),e}function OD(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tT)}catch(e){console.error(e)}}tT(),tA.exports=Pr;var Eb=tA.exports;const _D=Ee(Eb);var p1=Eb;kv.createRoot=p1.createRoot,kv.hydrateRoot=p1.hydrateRoot;var Cc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},TD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xi,N0,ME,ND=(ME=class{constructor(){ne(this,xi,TD);ne(this,N0,!1)}setTimeoutProvider(e){X(this,xi,e)}setTimeout(e,t){return $(this,xi).setTimeout(e,t)}clearTimeout(e){$(this,xi).clearTimeout(e)}setInterval(e,t){return $(this,xi).setInterval(e,t)}clearInterval(e){$(this,xi).clearInterval(e)}},xi=new WeakMap,N0=new WeakMap,ME),wa=new ND;function kD(e){setTimeout(e,0)}var Va=typeof window>"u"||"Deno"in globalThis;function tr(){}function CD(e,t){return typeof e=="function"?e(t):e}function jy(e){return typeof e=="number"&&e>=0&&e!==1/0}function rT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zi(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function m1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Ab(o,t.options))return!1}else if(!Mu(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function v1(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if($u(t.options.mutationKey)!==$u(a))return!1}else if(!Mu(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ab(e,t){return((t==null?void 0:t.queryKeyHashFn)||$u)(e)}function $u(e){return JSON.stringify(e,(t,r)=>Ey(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Mu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Mu(e[r],t[r])):!1}var $D=Object.prototype.hasOwnProperty;function nT(e,t){if(e===t)return e;const r=y1(e)&&y1(t);if(!r&&!(Ey(e)&&Ey(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u{wa.setTimeout(t,e)})}function Ay(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?nT(e,t):t}function ID(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function DD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var _b=Symbol();function iT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===_b?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function RD(e,t){return typeof e=="function"?e(...t):!!e}var Aa,wi,ls,IE,LD=(IE=class extends Cc{constructor(){super();ne(this,Aa);ne(this,wi);ne(this,ls);X(this,ls,t=>{if(!Va&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,wi)||this.setEventListener($(this,ls))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,wi))==null||t.call(this),X(this,wi,void 0))}setEventListener(t){var r;X(this,ls,t),(r=$(this,wi))==null||r.call(this),X(this,wi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,Aa)!==t&&(X(this,Aa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,Aa)=="boolean"?$(this,Aa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Aa=new WeakMap,wi=new WeakMap,ls=new WeakMap,IE),Tb=new LD;function _y(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var FD=kD;function BD(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=FD;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var _t=BD(),us,Si,cs,DE,zD=(DE=class extends Cc{constructor(){super();ne(this,us,!0);ne(this,Si);ne(this,cs);X(this,cs,t=>{if(!Va&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){$(this,Si)||this.setEventListener($(this,cs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Si))==null||t.call(this),X(this,Si,void 0))}setEventListener(t){var r;X(this,cs,t),(r=$(this,Si))==null||r.call(this),X(this,Si,t(this.setOnline.bind(this)))}setOnline(t){$(this,us)!==t&&(X(this,us,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,us)}},us=new WeakMap,Si=new WeakMap,cs=new WeakMap,DE),Ed=new zD;function UD(e){return Math.min(1e3*2**e,3e4)}function aT(e){return(e??"online")==="online"?Ed.isOnline():!0}var Ty=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function oT(e){let t=!1,r=0,n;const i=_y(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const y=new Ty(m);h(y),(g=e.onCancel)==null||g.call(e,y)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>Tb.isFocused()&&(e.networkMode==="always"||Ed.isOnline())&&e.canRun(),f=()=>aT(e.networkMode)&&e.canRun(),c=m=>{a()||(n==null||n(),i.resolve(m))},h=m=>{a()||(n==null||n(),i.reject(m))},p=()=>new Promise(m=>{var g;n=y=>{(a()||u())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;n=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const g=r===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(c).catch(y=>{var O;if(a())return;const b=e.retry??(Va?0:3),x=e.retryDelay??UD,S=typeof x=="function"?x(r,y):x,w=b===!0||typeof b=="number"&&ru()?void 0:p()).then(()=>{t?h(y):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:f,start:()=>(f()?v():p().then(v),i)}}var _a,RE,sT=(RE=class{constructor(){ne(this,_a)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),jy(this.gcTime)&&X(this,_a,wa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Va?1/0:5*60*1e3))}clearGcTimeout(){$(this,_a)&&(wa.clearTimeout($(this,_a)),X(this,_a,void 0))}},_a=new WeakMap,RE),Ta,fs,kr,Na,bt,Sc,ka,Gr,Mn,LE,WD=(LE=class extends sT{constructor(t){super();ne(this,Gr);ne(this,Ta);ne(this,fs);ne(this,kr);ne(this,Na);ne(this,bt);ne(this,Sc);ne(this,ka);X(this,ka,!1),X(this,Sc,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,Na,t.client),X(this,kr,$(this,Na).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Ta,b1(this.options)),this.state=t.state??$(this,Ta),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,bt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,Sc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=b1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),X(this,Ta,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,kr).remove(this)}setData(t,r){const n=Ay(this.state.data,t,this.options);return ve(this,Gr,Mn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ve(this,Gr,Mn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=$(this,bt))==null?void 0:n.promise;return(i=$(this,bt))==null||i.cancel(t),r?r.then(tr).catch(tr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,Ta))}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_b||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!rT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,kr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,bt)&&($(this,ka)?$(this,bt).cancel({revert:!0}):$(this,bt).cancelRetry()),this.scheduleGc()),$(this,kr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,Gr,Mn).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,f,c,h,p,v,m,g,y,b,x;if(this.state.fetchStatus!=="idle"&&((l=$(this,bt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,bt))return $(this,bt).continueRetry(),$(this,bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,ka,!0),n.signal)})},a=()=>{const S=iT(this.options,r),O=(()=>{const j={client:$(this,Na),queryKey:this.queryKey,meta:this.meta};return i(j),j})();return X(this,ka,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,Na),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,fs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=s.fetchOptions)==null?void 0:f.meta))&&ve(this,Gr,Mn).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta}),X(this,bt,oT({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof Ty&&S.revert&&this.setState({...$(this,fs),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{ve(this,Gr,Mn).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{ve(this,Gr,Mn).call(this,{type:"pause"})},onContinue:()=>{ve(this,Gr,Mn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await $(this,bt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(h=$(this,kr).config).onSuccess)==null||p.call(h,S,this),(m=(v=$(this,kr).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof Ty){if(S.silent)return $(this,bt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw ve(this,Gr,Mn).call(this,{type:"error",error:S}),(y=(g=$(this,kr).config).onError)==null||y.call(g,S,this),(x=(b=$(this,kr).config).onSettled)==null||x.call(b,this.state.data,S,this),S}finally{this.scheduleGc()}}},Ta=new WeakMap,fs=new WeakMap,kr=new WeakMap,Na=new WeakMap,bt=new WeakMap,Sc=new WeakMap,ka=new WeakMap,Gr=new WeakSet,Mn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...lT(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,fs,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),_t.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,kr).notify({query:this,type:"updated",action:t})})},LE);function lT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function b1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var er,ye,Oc,Ut,Ca,ds,Ln,Oi,jc,hs,ps,$a,Ma,ji,ms,Pe,Yl,Ny,ky,Cy,$y,My,Iy,Dy,uT,FE,HD=(FE=class extends Cc{constructor(t,r){super();ne(this,Pe);ne(this,er);ne(this,ye);ne(this,Oc);ne(this,Ut);ne(this,Ca);ne(this,ds);ne(this,Ln);ne(this,Oi);ne(this,jc);ne(this,hs);ne(this,ps);ne(this,$a);ne(this,Ma);ne(this,ji);ne(this,ms,new Set);this.options=r,X(this,er,t),X(this,Oi,null),X(this,Ln,_y()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,ye).addObserver(this),x1($(this,ye),this.options)?ve(this,Pe,Yl).call(this):this.updateResult(),ve(this,Pe,$y).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ry($(this,ye),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ry($(this,ye),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Pe,My).call(this),ve(this,Pe,Iy).call(this),$(this,ye).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,ye);if(this.options=$(this,er).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,$(this,ye))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Pe,Dy).call(this),$(this,ye).setOptions(this.options),r._defaulted&&!Py(this.options,r)&&$(this,er).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,ye),observer:this});const i=this.hasListeners();i&&w1($(this,ye),n,this.options,r)&&ve(this,Pe,Yl).call(this),this.updateResult(),i&&($(this,ye)!==n||Cr(this.options.enabled,$(this,ye))!==Cr(r.enabled,$(this,ye))||zi(this.options.staleTime,$(this,ye))!==zi(r.staleTime,$(this,ye)))&&ve(this,Pe,Ny).call(this);const a=ve(this,Pe,ky).call(this);i&&($(this,ye)!==n||Cr(this.options.enabled,$(this,ye))!==Cr(r.enabled,$(this,ye))||a!==$(this,ji))&&ve(this,Pe,Cy).call(this,a)}getOptimisticResult(t){const r=$(this,er).getQueryCache().build($(this,er),t),n=this.createResult(r,t);return qD(this,n)&&(X(this,Ut,n),X(this,ds,this.options),X(this,Ca,$(this,ye).state)),n}getCurrentResult(){return $(this,Ut)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Ln).status==="pending"&&$(this,Ln).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,ms).add(t)}getCurrentQuery(){return $(this,ye)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,er).defaultQueryOptions(t),n=$(this,er).getQueryCache().build($(this,er),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,Pe,Yl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,Ut)))}createResult(t,r){var A;const n=$(this,ye),i=this.options,a=$(this,Ut),o=$(this,Ca),s=$(this,ds),u=t!==n?t.state:$(this,Oc),{state:f}=t;let c={...f},h=!1,p;if(r._optimisticResults){const T=this.hasListeners(),_=!T&&x1(t,r),N=T&&w1(t,n,r,i);(_||N)&&(c={...c,...lT(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:g}=c;p=c.data;let y=!1;if(r.placeholderData!==void 0&&p===void 0&&g==="pending"){let T;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(T=a.data,y=!0):T=typeof r.placeholderData=="function"?r.placeholderData((A=$(this,ps))==null?void 0:A.state.data,$(this,ps)):r.placeholderData,T!==void 0&&(g="success",p=Ay(a==null?void 0:a.data,T,r),h=!0)}if(r.select&&p!==void 0&&!y)if(a&&p===(o==null?void 0:o.data)&&r.select===$(this,jc))p=$(this,hs);else try{X(this,jc,r.select),p=r.select(p),p=Ay(a==null?void 0:a.data,p,r),X(this,hs,p),X(this,Oi,null)}catch(T){X(this,Oi,T)}$(this,Oi)&&(v=$(this,Oi),p=$(this,hs),m=Date.now(),g="error");const b=c.fetchStatus==="fetching",x=g==="pending",S=g==="error",w=x&&b,O=p!==void 0,E={status:g,fetchStatus:c.fetchStatus,isPending:x,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:c.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&O,isStale:Nb(t,r),refetch:this.refetch,promise:$(this,Ln),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=M=>{E.status==="error"?M.reject(E.error):E.data!==void 0&&M.resolve(E.data)},_=()=>{const M=X(this,Ln,E.promise=_y());T(M)},N=$(this,Ln);switch(N.status){case"pending":t.queryHash===n.queryHash&&T(N);break;case"fulfilled":(E.status==="error"||E.data!==N.value)&&_();break;case"rejected":(E.status!=="error"||E.error!==N.reason)&&_();break}}return E}updateResult(){const t=$(this,Ut),r=this.createResult($(this,ye),this.options);if(X(this,Ca,$(this,ye).state),X(this,ds,this.options),$(this,Ca).data!==void 0&&X(this,ps,$(this,ye)),Py(r,t))return;X(this,Ut,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!$(this,ms).size)return!0;const o=new Set(a??$(this,ms));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Ut)).some(s=>{const l=s;return $(this,Ut)[l]!==t[l]&&o.has(l)})};ve(this,Pe,uT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Pe,$y).call(this)}},er=new WeakMap,ye=new WeakMap,Oc=new WeakMap,Ut=new WeakMap,Ca=new WeakMap,ds=new WeakMap,Ln=new WeakMap,Oi=new WeakMap,jc=new WeakMap,hs=new WeakMap,ps=new WeakMap,$a=new WeakMap,Ma=new WeakMap,ji=new WeakMap,ms=new WeakMap,Pe=new WeakSet,Yl=function(t){ve(this,Pe,Dy).call(this);let r=$(this,ye).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(tr)),r},Ny=function(){ve(this,Pe,My).call(this);const t=zi(this.options.staleTime,$(this,ye));if(Va||$(this,Ut).isStale||!jy(t))return;const n=rT($(this,Ut).dataUpdatedAt,t)+1;X(this,$a,wa.setTimeout(()=>{$(this,Ut).isStale||this.updateResult()},n))},ky=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,ye)):this.options.refetchInterval)??!1},Cy=function(t){ve(this,Pe,Iy).call(this),X(this,ji,t),!(Va||Cr(this.options.enabled,$(this,ye))===!1||!jy($(this,ji))||$(this,ji)===0)&&X(this,Ma,wa.setInterval(()=>{(this.options.refetchIntervalInBackground||Tb.isFocused())&&ve(this,Pe,Yl).call(this)},$(this,ji)))},$y=function(){ve(this,Pe,Ny).call(this),ve(this,Pe,Cy).call(this,ve(this,Pe,ky).call(this))},My=function(){$(this,$a)&&(wa.clearTimeout($(this,$a)),X(this,$a,void 0))},Iy=function(){$(this,Ma)&&(wa.clearInterval($(this,Ma)),X(this,Ma,void 0))},Dy=function(){const t=$(this,er).getQueryCache().build($(this,er),this.options);if(t===$(this,ye))return;const r=$(this,ye);X(this,ye,t),X(this,Oc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},uT=function(t){_t.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,Ut))}),$(this,er).getQueryCache().notify({query:$(this,ye),type:"observerResultsUpdated"})})},FE);function KD(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function x1(e,t){return KD(e,t)||e.state.data!==void 0&&Ry(e,t,t.refetchOnMount)}function Ry(e,t,r){if(Cr(t.enabled,e)!==!1&&zi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Nb(e,t)}return!1}function w1(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Nb(e,r)}function Nb(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(zi(t.staleTime,e))}function qD(e,t){return!Py(e.getCurrentResult(),t)}function S1(e){return{onFetch:(t,r)=>{var f,c,h,p,v;const n=t.options,i=(h=(c=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=iT(t.options,t.fetchOptions),b=async(x,S,w)=>{if(m)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const j=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(_),_})(),E=await y(j),{maxPages:A}=t.options,T=w?DD:ID;return{pages:T(x.pages,E,A),pageParams:T(x.pageParams,S,A)}};if(i&&a.length){const x=i==="backward",S=x?VD:O1,w={pages:a,pageParams:o},O=S(n,w);s=await b(w,O,x)}else{const x=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:O1(n,s);if(l>0&&S==null)break;s=await b(s,S),l++}while(l{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function O1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function VD(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Pc,yn,Wt,Ia,gn,di,BE,GD=(BE=class extends sT{constructor(t){super();ne(this,gn);ne(this,Pc);ne(this,yn);ne(this,Wt);ne(this,Ia);X(this,Pc,t.client),this.mutationId=t.mutationId,X(this,Wt,t.mutationCache),X(this,yn,[]),this.state=t.state||YD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,yn).includes(t)||($(this,yn).push(t),this.clearGcTimeout(),$(this,Wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,yn,$(this,yn).filter(r=>r!==t)),this.scheduleGc(),$(this,Wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,yn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Wt).remove(this))}continue(){var t;return((t=$(this,Ia))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,f,c,h,p,v,m,g,y,b,x,S,w,O,j,E,A;const r=()=>{ve(this,gn,di).call(this,{type:"continue"})},n={client:$(this,Pc),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,Ia,oT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(T,_)=>{ve(this,gn,di).call(this,{type:"failed",failureCount:T,error:_})},onPause:()=>{ve(this,gn,di).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Wt).canRun(this)}));const i=this.state.status==="pending",a=!$(this,Ia).canStart();try{if(i)r();else{ve(this,gn,di).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(o=$(this,Wt).config).onMutate)==null?void 0:s.call(o,t,this,n));const _=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));_!==this.state.context&&ve(this,gn,di).call(this,{type:"pending",context:_,variables:t,isPaused:a})}const T=await $(this,Ia).start();return await((c=(f=$(this,Wt).config).onSuccess)==null?void 0:c.call(f,T,t,this.state.context,this,n)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,T,t,this.state.context,n)),await((m=(v=$(this,Wt).config).onSettled)==null?void 0:m.call(v,T,null,this.state.variables,this.state.context,this,n)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,T,null,t,this.state.context,n)),ve(this,gn,di).call(this,{type:"success",data:T}),T}catch(T){try{throw await((x=(b=$(this,Wt).config).onError)==null?void 0:x.call(b,T,t,this.state.context,this,n)),await((w=(S=this.options).onError)==null?void 0:w.call(S,T,t,this.state.context,n)),await((j=(O=$(this,Wt).config).onSettled)==null?void 0:j.call(O,void 0,T,this.state.variables,this.state.context,this,n)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,T,t,this.state.context,n)),T}finally{ve(this,gn,di).call(this,{type:"error",error:T})}}finally{$(this,Wt).runNext(this)}}},Pc=new WeakMap,yn=new WeakMap,Wt=new WeakMap,Ia=new WeakMap,gn=new WeakSet,di=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),_t.batch(()=>{$(this,yn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Wt).notify({mutation:this,type:"updated",action:t})})},BE);function YD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fn,Yr,Ec,zE,XD=(zE=class extends Cc{constructor(t={}){super();ne(this,Fn);ne(this,Yr);ne(this,Ec);this.config=t,X(this,Fn,new Set),X(this,Yr,new Map),X(this,Ec,0)}build(t,r,n){const i=new GD({client:t,mutationCache:this,mutationId:++Gc(this,Ec)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,Fn).add(t);const r=pf(t);if(typeof r=="string"){const n=$(this,Yr).get(r);n?n.push(t):$(this,Yr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Fn).delete(t)){const r=pf(t);if(typeof r=="string"){const n=$(this,Yr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,Yr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=pf(t);if(typeof r=="string"){const n=$(this,Yr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=pf(t);if(typeof r=="string"){const i=(n=$(this,Yr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_t.batch(()=>{$(this,Fn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Fn).clear(),$(this,Yr).clear()})}getAll(){return Array.from($(this,Fn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>v1(r,n))}findAll(t={}){return this.getAll().filter(r=>v1(t,r))}notify(t){_t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return _t.batch(()=>Promise.all(t.map(r=>r.continue().catch(tr))))}},Fn=new WeakMap,Yr=new WeakMap,Ec=new WeakMap,zE);function pf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var bn,UE,QD=(UE=class extends Cc{constructor(t={}){super();ne(this,bn);this.config=t,X(this,bn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ab(i,r);let o=this.get(a);return o||(o=new WD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,bn).has(t.queryHash)||($(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,bn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,bn).get(t)}getAll(){return[...$(this,bn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>m1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>m1(t,n)):r}notify(t){_t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){_t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,UE),et,Pi,Ei,vs,ys,Ai,gs,bs,WE,JD=(WE=class{constructor(e={}){ne(this,et);ne(this,Pi);ne(this,Ei);ne(this,vs);ne(this,ys);ne(this,Ai);ne(this,gs);ne(this,bs);X(this,et,e.queryCache||new QD),X(this,Pi,e.mutationCache||new XD),X(this,Ei,e.defaultOptions||{}),X(this,vs,new Map),X(this,ys,new Map),X(this,Ai,0)}mount(){Gc(this,Ai)._++,$(this,Ai)===1&&(X(this,gs,Tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,et).onFocus())})),X(this,bs,Ed.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,et).onOnline())})))}unmount(){var e,t;Gc(this,Ai)._--,$(this,Ai)===0&&((e=$(this,gs))==null||e.call(this),X(this,gs,void 0),(t=$(this,bs))==null||t.call(this),X(this,bs,void 0))}isFetching(e){return $(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Pi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,et).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,et).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(zi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,et).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=$(this,et).get(n.queryHash),a=i==null?void 0:i.state.data,o=CD(t,a);if(o!==void 0)return $(this,et).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return _t.batch(()=>$(this,et).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,et).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,et);_t.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,et);return _t.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=_t.batch(()=>$(this,et).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(tr).catch(tr)}invalidateQueries(e,t={}){return _t.batch(()=>($(this,et).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=_t.batch(()=>$(this,et).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(tr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(tr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,et).build(this,t);return r.isStaleByTime(zi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(tr).catch(tr)}fetchInfiniteQuery(e){return e.behavior=S1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(tr).catch(tr)}ensureInfiniteQueryData(e){return e.behavior=S1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ed.isOnline()?$(this,Pi).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,et)}getMutationCache(){return $(this,Pi)}getDefaultOptions(){return $(this,Ei)}setDefaultOptions(e){X(this,Ei,e)}setQueryDefaults(e,t){$(this,vs).set($u(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,vs).values()],r={};return t.forEach(n=>{Mu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,ys).set($u(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ys).values()],r={};return t.forEach(n=>{Mu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ei).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ab(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===_b&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ei).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,et).clear(),$(this,Pi).clear()}},et=new WeakMap,Pi=new WeakMap,Ei=new WeakMap,vs=new WeakMap,ys=new WeakMap,Ai=new WeakMap,gs=new WeakMap,bs=new WeakMap,WE),cT=P.createContext(void 0),fT=e=>{const t=P.useContext(cT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ZD=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(cT.Provider,{value:e,children:t})),dT=P.createContext(!1),eR=()=>P.useContext(dT);dT.Provider;function tR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var rR=P.createContext(tR()),nR=()=>P.useContext(rR),iR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},aR=e=>{P.useEffect(()=>{e.clearReset()},[e])},oR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||RD(r,[e.error,n])),sR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},lR=(e,t)=>e.isLoading&&e.isFetching&&!t,uR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,j1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function cR(e,t,r){var c,h,p,v,m;const n=eR(),i=nR(),a=fT(),o=a.defaultQueryOptions(e);(h=(c=a.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||h.call(c,o),o._optimisticResults=n?"isRestoring":"optimistic",sR(o),iR(o,i),aR(i);const s=!a.getQueryCache().get(o.queryHash),[l]=P.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),f=!n&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(g=>{const y=f?l.subscribe(_t.batchCalls(g)):tr;return l.updateResult(),y},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),P.useEffect(()=>{l.setOptions(o)},[o,l]),uR(o,u))throw j1(o,l,i);if(oR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,u),o.experimental_prefetchInRender&&!Va&&lR(u,n)){const g=s?j1(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(tr).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function Ur(e,t){return cR(e,HD)}/** - * @remix-run/router v1.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Iu(){return Iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function hT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dR(){return Math.random().toString(36).substr(2,8)}function E1(e,t){return{usr:e.state,key:e.key,idx:t}}function Ly(e,t,r,n){return r===void 0&&(r=null),Iu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?il(t):t,{state:r,key:t&&t.key||n||dR()})}function Ad(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function il(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function hR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=Ni.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Iu({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function c(){s=Ni.Pop;let g=f(),y=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:y})}function h(g,y){s=Ni.Push;let b=Ly(m.location,g,y);u=f()+1;let x=E1(b,u),S=m.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function p(g,y){s=Ni.Replace;let b=Ly(m.location,g,y);u=f();let x=E1(b,u),S=m.createHref(b);o.replaceState(x,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function v(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof g=="string"?g:Ad(g);return b=b.replace(/ $/,"%20"),st(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(P1,c),l=g,()=>{i.removeEventListener(P1,c),l=null}},createHref(g){return t(i,g)},createURL:v,encodeLocation(g){let y=v(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(g){return o.go(g)}};return m}var A1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(A1||(A1={}));function pR(e,t,r){return r===void 0&&(r="/"),mR(e,t,r)}function mR(e,t,r,n){let i=typeof t=="string"?il(t):t,a=kb(i.pathname||"/",r);if(a==null)return null;let o=pT(e);vR(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("/")&&(st(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=Ui([n,l.relativePath]),f=r.concat(l);a.children&&a.children.length>0&&(st(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),pT(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:OR(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of mT(a.path))i(a,o,l)}),t}function mT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=mT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function vR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:jR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const yR=/^:[\w-]+$/,gR=3,bR=2,xR=1,wR=10,SR=-2,_1=e=>e==="*";function OR(e,t){let r=e.split("/"),n=r.length;return r.some(_1)&&(n+=SR),t&&(n+=bR),r.filter(i=>!_1(i)).reduce((i,a)=>i+(yR.test(a)?gR:a===""?xR:wR),n)}function jR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function PR(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:p}=f;if(h==="*"){let m=s[c]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[c];return p&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function AR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),hT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function _R(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function kb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function TR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?il(e):e;return{pathname:r?r.startsWith("/")?r:NR(r,t):t,search:$R(n),hash:MR(i)}}function NR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Bm(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` 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 kR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function vT(e,t){let r=kR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function yT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=il(e):(i=Iu({},e),st(!i.pathname||!i.pathname.includes("?"),Bm("?","pathname","search",i)),st(!i.pathname||!i.pathname.includes("#"),Bm("#","pathname","hash",i)),st(!i.search||!i.search.includes("#"),Bm("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let c=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),c-=1;i.pathname=h.join("/")}s=c>=0?t[c]:"/"}let l=TR(i,s),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Ui=e=>e.join("/").replace(/\/\/+/g,"/"),CR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$R=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function IR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gT=["post","put","patch","delete"];new Set(gT);const DR=["get",...gT];new Set(DR);/** - * React Router v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Du(){return Du=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),P.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let c=yT(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ui([t,c.pathname])),(f.replace?n.replace:n.push)(c,f.state,f)},[t,n,o,a,e])}const BR=P.createContext(null);function zR(e){let t=P.useContext(ri).outlet;return t&&P.createElement(BR.Provider,{value:e},t)}function np(){let{matches:e}=P.useContext(ri),t=e[e.length-1];return t?t.params:{}}function wT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=P.useContext(so),{matches:i}=P.useContext(ri),{pathname:a}=lo(),o=JSON.stringify(vT(i,n.v7_relativeSplatPath));return P.useMemo(()=>yT(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function UR(e,t){return WR(e,t)}function WR(e,t,r,n){$c()||st(!1);let{navigator:i}=P.useContext(so),{matches:a}=P.useContext(ri),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=lo(),f;if(t){var c;let g=typeof t=="string"?il(t):t;l==="/"||(c=g.pathname)!=null&&c.startsWith(l)||st(!1),f=g}else f=u;let h=f.pathname||"/",p=h;if(l!=="/"){let g=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=pR(e,{pathname:p}),m=GR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Ui([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Ui([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,r,n);return t&&m?P.createElement(rp.Provider,{value:{location:Du({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Ni.Pop}},m):m}function HR(){let e=JR(),t=IR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),r?P.createElement("pre",{style:i},r):null,null)}const KR=P.createElement(HR,null);class qR extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?P.createElement(ri.Provider,{value:this.props.routeContext},P.createElement(bT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function VR(e){let{routeContext:t,match:r,children:n}=e,i=P.useContext(Cb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),P.createElement(ri.Provider,{value:t},n)}function GR(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=(i=r)==null?void 0:i.errors;if(s!=null){let f=o.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);f>=0||st(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,h)=>{let p,v=!1,m=null,g=null;r&&(p=s&&c.route.id?s[c.route.id]:void 0,m=c.route.errorElement||KR,l&&(u<0&&h===0?(eL("route-fallback"),v=!0,g=null):u===h&&(v=!0,g=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,h+1)),b=()=>{let x;return p?x=m:v?x=g:c.route.Component?x=P.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=f,P.createElement(VR,{match:c,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?P.createElement(qR,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var ST=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ST||{}),OT=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(OT||{});function YR(e){let t=P.useContext(Cb);return t||st(!1),t}function XR(e){let t=P.useContext(RR);return t||st(!1),t}function QR(e){let t=P.useContext(ri);return t||st(!1),t}function jT(e){let t=QR(),r=t.matches[t.matches.length-1];return r.route.id||st(!1),r.route.id}function JR(){var e;let t=P.useContext(bT),r=XR(),n=jT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ZR(){let{router:e}=YR(ST.UseNavigateStable),t=jT(OT.UseNavigateStable),r=P.useRef(!1);return xT(()=>{r.current=!0}),P.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Du({fromRouteId:t},a)))},[e,t])}const T1={};function eL(e,t,r){T1[e]||(T1[e]=!0)}function tL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function rL(e){return zR(e.context)}function Zt(e){st(!1)}function nL(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Ni.Pop,navigator:a,static:o=!1,future:s}=e;$c()&&st(!1);let l=t.replace(/^\/*/,"/"),u=P.useMemo(()=>({basename:l,navigator:a,static:o,future:Du({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=il(n));let{pathname:f="/",search:c="",hash:h="",state:p=null,key:v="default"}=n,m=P.useMemo(()=>{let g=kb(f,l);return g==null?null:{location:{pathname:g,search:c,hash:h,state:p,key:v},navigationType:i}},[l,f,c,h,p,v,i]);return m==null?null:P.createElement(so.Provider,{value:u},P.createElement(rp.Provider,{children:r,value:m}))}function iL(e){let{children:t,location:r}=e;return UR(Fy(t),r)}new Promise(()=>{});function Fy(e,t){t===void 0&&(t=[]);let r=[];return P.Children.forEach(e,(n,i)=>{if(!P.isValidElement(n))return;let a=[...t,i];if(n.type===P.Fragment){r.push.apply(r,Fy(n.props.children,a));return}n.type!==Zt&&st(!1),!n.props.index||!n.props.children||st(!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=Fy(n.props.children,a)),r.push(o)}),r}/** - * React Router DOM v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function By(){return By=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function oL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sL(e,t){return e.button===0&&(!t||t==="_self")&&!oL(e)}function zy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function lL(e,t){let r=zy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const uL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],cL="6";try{window.__reactRouterVersion=cL}catch{}const fL="startTransition",N1=I0[fL];function dL(e){let{basename:t,children:r,future:n,window:i}=e,a=P.useRef();a.current==null&&(a.current=fR({window:i,v5Compat:!0}));let o=a.current,[s,l]=P.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},f=P.useCallback(c=>{u&&N1?N1(()=>l(c)):l(c)},[l,u]);return P.useLayoutEffect(()=>o.listen(f),[o,f]),P.useEffect(()=>tL(n),[n]),P.createElement(nL,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const hL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_n=P.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:f,viewTransition:c}=t,h=aL(t,uL),{basename:p}=P.useContext(so),v,m=!1;if(typeof u=="string"&&pL.test(u)&&(v=u,hL))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=kb(S.pathname,p);S.origin===x.origin&&w!=null?u=w+S.search+S.hash:m=!0}catch{}let g=LR(u,{relative:i}),y=mL(u,{replace:o,state:s,target:l,preventScrollReset:f,relative:i,viewTransition:c});function b(x){n&&n(x),x.defaultPrevented||y(x)}return P.createElement("a",By({},h,{href:v||g,onClick:m||a?n:b,ref:r,target:l}))});var k1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(k1||(k1={}));var C1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(C1||(C1={}));function mL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=$b(),u=lo(),f=wT(e,{relative:o});return P.useCallback(c=>{if(sL(c,r)){c.preventDefault();let h=n!==void 0?n:Ad(u)===Ad(f);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,f,n,i,r,e,a,o,s])}function vL(e){let t=P.useRef(zy(e)),r=P.useRef(!1),n=lo(),i=P.useMemo(()=>lL(n.search,r.current?null:t.current),[n.search]),a=$b(),o=P.useCallback((s,l)=>{const u=zy(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const yL=new JD({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0}}});function Mb(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}function PT(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}const ET=P.createContext(void 0);function gL({children:e}){const[t,r]=P.useState(null),n=(i,a)=>{if(r(i),typeof window<"u"&&a){const o=`alphatrion_selected_team_${a}`;localStorage.setItem(o,i)}};return d.jsx(ET.Provider,{value:{selectedTeamId:t,setSelectedTeamId:n},children:e})}function uo(){const e=P.useContext(ET);if(!e)throw new Error("useTeamContext must be used within TeamProvider");return e}async function bL(){const e=await fetch("/api/config",{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!e.ok)throw new Error("Failed to load configuration");return await e.json()}async function xL(){return(await bL()).userId}function AT(e,t){return function(){return e.apply(t,arguments)}}const{toString:wL}=Object.prototype,{getPrototypeOf:Ib}=Object,{iterator:ip,toStringTag:_T}=Symbol,ap=(e=>t=>{const r=wL.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),cn=e=>(e=e.toLowerCase(),t=>ap(t)===e),op=e=>t=>typeof t===e,{isArray:al}=Array,As=op("undefined");function Mc(e){return e!==null&&!As(e)&&e.constructor!==null&&!As(e.constructor)&&lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const TT=cn("ArrayBuffer");function SL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&TT(e.buffer),t}const OL=op("string"),lr=op("function"),NT=op("number"),Ic=e=>e!==null&&typeof e=="object",jL=e=>e===!0||e===!1,Yf=e=>{if(ap(e)!=="object")return!1;const t=Ib(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(_T in e)&&!(ip in e)},PL=e=>{if(!Ic(e)||Mc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},EL=cn("Date"),AL=cn("File"),_L=cn("Blob"),TL=cn("FileList"),NL=e=>Ic(e)&&lr(e.pipe),kL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||lr(e.append)&&((t=ap(e))==="formdata"||t==="object"&&lr(e.toString)&&e.toString()==="[object FormData]"))},CL=cn("URLSearchParams"),[$L,ML,IL,DL]=["ReadableStream","Request","Response","Headers"].map(cn),RL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Dc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),al(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Sa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,CT=e=>!As(e)&&e!==Sa;function Uy(){const{caseless:e,skipUndefined:t}=CT(this)&&this||{},r={},n=(i,a)=>{const o=e&&kT(r,a)||a;Yf(r[o])&&Yf(i)?r[o]=Uy(r[o],i):Yf(i)?r[o]=Uy({},i):al(i)?r[o]=i.slice():(!t||!As(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Dc(t,(i,a)=>{r&&lr(i)?e[a]=AT(i,r):e[a]=i},{allOwnKeys:n}),e),FL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),BL=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},zL=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Ib(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},UL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},WL=e=>{if(!e)return null;if(al(e))return e;let t=e.length;if(!NT(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},HL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ib(Uint8Array)),KL=(e,t)=>{const n=(e&&e[ip]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},qL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},VL=cn("HTMLFormElement"),GL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),$1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),YL=cn("RegExp"),$T=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Dc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},XL=e=>{$T(e,(t,r)=>{if(lr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(lr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},QL=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return al(e)?n(e):n(String(e).split(t)),r},JL=()=>{},ZL=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function e3(e){return!!(e&&lr(e.append)&&e[_T]==="FormData"&&e[ip])}const t3=e=>{const t=new Array(10),r=(n,i)=>{if(Ic(n)){if(t.indexOf(n)>=0)return;if(Mc(n))return n;if(!("toJSON"in n)){t[i]=n;const a=al(n)?[]:{};return Dc(n,(o,s)=>{const l=r(o,i+1);!As(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},r3=cn("AsyncFunction"),n3=e=>e&&(Ic(e)||lr(e))&&lr(e.then)&&lr(e.catch),MT=((e,t)=>e?setImmediate:t?((r,n)=>(Sa.addEventListener("message",({source:i,data:a})=>{i===Sa&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Sa.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",lr(Sa.postMessage)),i3=typeof queueMicrotask<"u"?queueMicrotask.bind(Sa):typeof process<"u"&&process.nextTick||MT,a3=e=>e!=null&&lr(e[ip]),L={isArray:al,isArrayBuffer:TT,isBuffer:Mc,isFormData:kL,isArrayBufferView:SL,isString:OL,isNumber:NT,isBoolean:jL,isObject:Ic,isPlainObject:Yf,isEmptyObject:PL,isReadableStream:$L,isRequest:ML,isResponse:IL,isHeaders:DL,isUndefined:As,isDate:EL,isFile:AL,isBlob:_L,isRegExp:YL,isFunction:lr,isStream:NL,isURLSearchParams:CL,isTypedArray:HL,isFileList:TL,forEach:Dc,merge:Uy,extend:LL,trim:RL,stripBOM:FL,inherits:BL,toFlatObject:zL,kindOf:ap,kindOfTest:cn,endsWith:UL,toArray:WL,forEachEntry:KL,matchAll:qL,isHTMLForm:VL,hasOwnProperty:$1,hasOwnProp:$1,reduceDescriptors:$T,freezeMethods:XL,toObjectSet:QL,toCamelCase:GL,noop:JL,toFiniteNumber:ZL,findKey:kT,global:Sa,isContextDefined:CT,isSpecCompliantForm:e3,toJSONObject:t3,isAsyncFn:r3,isThenable:n3,setImmediate:MT,asap:i3,isIterable:a3};function ce(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const IT=ce.prototype,DT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{DT[e]={value:e}});Object.defineProperties(ce,DT);Object.defineProperty(IT,"isAxiosError",{value:!0});ce.from=(e,t,r,n,i,a)=>{const o=Object.create(IT);L.toFlatObject(e,o,function(f){return f!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,s,l,r,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const o3=null;function Wy(e){return L.isPlainObject(e)||L.isArray(e)}function RT(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function M1(e,t,r){return e?e.concat(t).map(function(i,a){return i=RT(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function s3(e){return L.isArray(e)&&!e.some(Wy)}const l3=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function sp(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!L.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||f,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(L.isDate(v))return v.toISOString();if(L.isBoolean(v))return v.toString();if(!l&&L.isBlob(v))throw new ce("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(v)||L.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function f(v,m,g){let y=v;if(v&&!g&&typeof v=="object"){if(L.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(L.isArray(v)&&s3(v)||(L.isFileList(v)||L.endsWith(m,"[]"))&&(y=L.toArray(v)))return m=RT(m),y.forEach(function(x,S){!(L.isUndefined(x)||x===null)&&t.append(o===!0?M1([m],S,a):o===null?m:m+"[]",u(x))}),!1}return Wy(v)?!0:(t.append(M1(g,m,a),u(v)),!1)}const c=[],h=Object.assign(l3,{defaultVisitor:f,convertValue:u,isVisitable:Wy});function p(v,m){if(!L.isUndefined(v)){if(c.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(v),L.forEach(v,function(y,b){(!(L.isUndefined(y)||y===null)&&i.call(t,y,L.isString(b)?b.trim():b,m,h))===!0&&p(y,m?m.concat(b):[b])}),c.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function I1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Db(e,t){this._pairs=[],e&&sp(e,this,t)}const LT=Db.prototype;LT.append=function(t,r){this._pairs.push([t,r])};LT.toString=function(t){const r=t?function(n){return t.call(this,n,I1)}:I1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function u3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function FT(e,t,r){if(!t)return e;const n=r&&r.encode||u3;L.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=L.isURLSearchParams(t)?t.toString():new Db(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class D1{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const BT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},c3=typeof URLSearchParams<"u"?URLSearchParams:Db,f3=typeof FormData<"u"?FormData:null,d3=typeof Blob<"u"?Blob:null,h3={isBrowser:!0,classes:{URLSearchParams:c3,FormData:f3,Blob:d3},protocols:["http","https","file","blob","url","data"]},Rb=typeof window<"u"&&typeof document<"u",Hy=typeof navigator=="object"&&navigator||void 0,p3=Rb&&(!Hy||["ReactNative","NativeScript","NS"].indexOf(Hy.product)<0),m3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v3=Rb&&window.location.href||"http://localhost",y3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rb,hasStandardBrowserEnv:p3,hasStandardBrowserWebWorkerEnv:m3,navigator:Hy,origin:v3},Symbol.toStringTag,{value:"Module"})),Lt={...y3,...h3};function g3(e,t){return sp(e,new Lt.classes.URLSearchParams,{visitor:function(r,n,i,a){return Lt.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function b3(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function x3(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&L.isArray(i)?i.length:o,l?(L.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!L.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&L.isArray(i[o])&&(i[o]=x3(i[o])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,i)=>{t(b3(n),i,r,0)}),r}return null}function w3(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Rc={transitional:BT,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=L.isObject(t);if(a&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return i?JSON.stringify(zT(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return g3(t,this.formSerializer).toString();if((s=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),w3(t)):t}],transformResponse:[function(t){const r=this.transitional||Rc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?ce.from(s,ce.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Rc.headers[e]={}});const S3=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),O3=e=>{const t={};let r,n,i;return e&&e.split(` -`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&S3[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},R1=Symbol("internals");function kl(e){return e&&String(e).trim().toLowerCase()}function Xf(e){return e===!1||e==null?e:L.isArray(e)?e.map(Xf):String(e)}function j3(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const P3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zm(e,t,r,n,i){if(L.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!L.isString(t)){if(L.isString(n))return t.indexOf(n)!==-1;if(L.isRegExp(n))return n.test(t)}}function E3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function A3(e,t){const r=L.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let ur=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const f=kl(l);if(!f)throw new Error("header name must be a non-empty string");const c=L.findKey(i,f);(!c||i[c]===void 0||u===!0||u===void 0&&i[c]!==!1)&&(i[c||l]=Xf(s))}const o=(s,l)=>L.forEach(s,(u,f)=>a(u,f,l));if(L.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(L.isString(t)&&(t=t.trim())&&!P3(t))o(O3(t),r);else if(L.isObject(t)&&L.isIterable(t)){let s={},l,u;for(const f of t){if(!L.isArray(f))throw TypeError("Object iterator must return a key-value pair");s[u=f[0]]=(l=s[u])?L.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=kl(t),t){const n=L.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return j3(i);if(L.isFunction(r))return r.call(this,i,n);if(L.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=kl(t),t){const n=L.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||zm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=kl(o),o){const s=L.findKey(n,o);s&&(!r||zm(n,n[s],s,r))&&(delete n[s],i=!0)}}return L.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||zm(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return L.forEach(this,(i,a)=>{const o=L.findKey(n,a);if(o){r[o]=Xf(i),delete r[a];return}const s=t?E3(a):String(a).trim();s!==a&&delete r[a],r[s]=Xf(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return L.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&L.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[R1]=this[R1]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=kl(o);n[s]||(A3(i,o),n[s]=!0)}return L.isArray(t)?t.forEach(a):a(t),this}};ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(ur.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});L.freezeMethods(ur);function Um(e,t){const r=this||Rc,n=t||r,i=ur.from(n.headers);let a=n.data;return L.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function UT(e){return!!(e&&e.__CANCEL__)}function ol(e,t,r){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(ol,ce,{__CANCEL__:!0});function WT(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ce("Request failed with status code "+r.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function _3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function T3(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=n[a];o||(o=u),r[i]=l,n[i]=u;let c=a,h=0;for(;c!==i;)h+=r[c++],c=c%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=f,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const f=Date.now(),c=f-r;c>=n?o(u,f):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-c)))},()=>i&&o(i)]}const _d=(e,t,r=3)=>{let n=0;const i=T3(50,250);return N3(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),f=o<=s;n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&f?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(c)},r)},L1=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},F1=e=>(...t)=>L.asap(()=>e(...t)),k3=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,C3=Lt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];L.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),L.isString(n)&&o.push("path="+n),L.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function M3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function HT(e,t,r){let n=!$3(t);return e&&(n||r==!1)?M3(e,t):t}const B1=e=>e instanceof ur?{...e}:e;function Ga(e,t){t=t||{};const r={};function n(u,f,c,h){return L.isPlainObject(u)&&L.isPlainObject(f)?L.merge.call({caseless:h},u,f):L.isPlainObject(f)?L.merge({},f):L.isArray(f)?f.slice():f}function i(u,f,c,h){if(L.isUndefined(f)){if(!L.isUndefined(u))return n(void 0,u,c,h)}else return n(u,f,c,h)}function a(u,f){if(!L.isUndefined(f))return n(void 0,f)}function o(u,f){if(L.isUndefined(f)){if(!L.isUndefined(u))return n(void 0,u)}else return n(void 0,f)}function s(u,f,c){if(c in t)return n(u,f);if(c in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,f,c)=>i(B1(u),B1(f),c,!0)};return L.forEach(Object.keys({...e,...t}),function(f){const c=l[f]||i,h=c(e[f],t[f],f);L.isUndefined(h)&&c!==s||(r[f]=h)}),r}const KT=e=>{const t=Ga({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=ur.from(o),t.url=FT(HT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),L.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(L.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([f,c])=>{u.includes(f.toLowerCase())&&o.set(f,c)})}}if(Lt.hasStandardBrowserEnv&&(n&&L.isFunction(n)&&(n=n(t)),n||n!==!1&&k3(t.url))){const l=i&&a&&C3.read(a);l&&o.set(i,l)}return t},I3=typeof XMLHttpRequest<"u",D3=I3&&function(e){return new Promise(function(r,n){const i=KT(e);let a=i.data;const o=ur.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,f,c,h,p,v;function m(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function y(){if(!g)return;const x=ur.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:e,request:g};WT(function(j){r(j),m()},function(j){n(j),m()},w),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(n(new ce("Request aborted",ce.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new ce(w,ce.ERR_NETWORK,e,g);O.event=S||null,n(O),g=null},g.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||BT;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new ce(S,w.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&L.forEach(o.toJSON(),function(S,w){g.setRequestHeader(w,S)}),L.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([h,v]=_d(u,!0),g.addEventListener("progress",h)),l&&g.upload&&([c,p]=_d(l),g.upload.addEventListener("progress",c),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(f=x=>{g&&(n(!x||x.type?new ol(null,e,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const b=_3(i.url);if(b&&Lt.protocols.indexOf(b)===-1){n(new ce("Unsupported protocol "+b+":",ce.ERR_BAD_REQUEST,e));return}g.send(a||null)})},R3=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const f=u instanceof Error?u:this.reason;n.abort(f instanceof ce?f:new ol(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,a(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>L.asap(s),l}},L3=function*(e,t){let r=e.byteLength;if(r{const i=F3(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await i.next();if(u){s(),l.close();return}let c=f.byteLength;if(r){let h=a+=c;r(h)}l.enqueue(new Uint8Array(f))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},U1=64*1024,{isFunction:mf}=L,z3=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:W1,TextEncoder:H1}=L.global,K1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},U3=e=>{e=L.merge.call({skipUndefined:!0},z3,e);const{fetch:t,Request:r,Response:n}=e,i=t?mf(t):typeof fetch=="function",a=mf(r),o=mf(n);if(!i)return!1;const s=i&&mf(W1),l=i&&(typeof H1=="function"?(v=>m=>v.encode(m))(new H1):async v=>new Uint8Array(await new r(v).arrayBuffer())),u=a&&s&&K1(()=>{let v=!1;const m=new r(Lt.origin,{body:new W1,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!m}),f=o&&s&&K1(()=>L.isReadableStream(new n("").body)),c={stream:f&&(v=>v.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!c[v]&&(c[v]=(m,g)=>{let y=m&&m[v];if(y)return y.call(m);throw new ce(`Response type '${v}' is not supported`,ce.ERR_NOT_SUPPORT,g)})});const h=async v=>{if(v==null)return 0;if(L.isBlob(v))return v.size;if(L.isSpecCompliantForm(v))return(await new r(Lt.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(L.isArrayBufferView(v)||L.isArrayBuffer(v))return v.byteLength;if(L.isURLSearchParams(v)&&(v=v+""),L.isString(v))return(await l(v)).byteLength},p=async(v,m)=>{const g=L.toFiniteNumber(v.getContentLength());return g??h(m)};return async v=>{let{url:m,method:g,data:y,signal:b,cancelToken:x,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:j,headers:E,withCredentials:A="same-origin",fetchOptions:T}=KT(v),_=t||fetch;j=j?(j+"").toLowerCase():"text";let N=R3([b,x&&x.toAbortSignal()],S),M=null;const R=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let I;try{if(O&&u&&g!=="get"&&g!=="head"&&(I=await p(E,y))!==0){let V=new r(m,{method:"POST",body:y,duplex:"half"}),H;if(L.isFormData(y)&&(H=V.headers.get("content-type"))&&E.setContentType(H),V.body){const[Y,re]=L1(I,_d(F1(O)));y=z1(V.body,U1,Y,re)}}L.isString(A)||(A=A?"include":"omit");const D=a&&"credentials"in r.prototype,z={...T,signal:N,method:g.toUpperCase(),headers:E.normalize().toJSON(),body:y,duplex:"half",credentials:D?A:void 0};M=a&&new r(m,z);let C=await(a?_(M,T):_(m,z));const F=f&&(j==="stream"||j==="response");if(f&&(w||F&&R)){const V={};["status","statusText","headers"].forEach(xe=>{V[xe]=C[xe]});const H=L.toFiniteNumber(C.headers.get("content-length")),[Y,re]=w&&L1(H,_d(F1(w),!0))||[];C=new n(z1(C.body,U1,Y,()=>{re&&re(),R&&R()}),V)}j=j||"text";let W=await c[L.findKey(c,j)||"text"](C,v);return!F&&R&&R(),await new Promise((V,H)=>{WT(V,H,{data:W,headers:ur.from(C.headers),status:C.status,statusText:C.statusText,config:v,request:M})})}catch(D){throw R&&R(),D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,v,M),{cause:D.cause||D}):ce.from(D,D&&D.code,v,M)}}},W3=new Map,qT=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,f=W3;for(;s--;)l=a[s],u=f.get(l),u===void 0&&f.set(l,u=s?new Map:U3(t)),f=u;return u};qT();const Ky={http:o3,xhr:D3,fetch:{get:qT}};L.forEach(Ky,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const q1=e=>`- ${e}`,H3=e=>L.isFunction(e)||e===null||e===!1,VT={getAdapter:(e,t)=>{e=L.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : -`+o.map(q1).join(` -`):" "+q1(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Ky};function Wm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ol(null,e)}function V1(e){return Wm(e),e.headers=ur.from(e.headers),e.data=Um.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),VT.getAdapter(e.adapter||Rc.adapter,e)(e).then(function(n){return Wm(e),n.data=Um.call(e,e.transformResponse,n),n.headers=ur.from(n.headers),n},function(n){return UT(n)||(Wm(e),n&&n.response&&(n.response.data=Um.call(e,e.transformResponse,n.response),n.response.headers=ur.from(n.response.headers))),Promise.reject(n)})}const GT="1.12.2",lp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lp[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const G1={};lp.transitional=function(t,r,n){function i(a,o){return"[Axios v"+GT+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new ce(i(o," has been removed"+(r?" in "+r:"")),ce.ERR_DEPRECATED);return r&&!G1[o]&&(G1[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};lp.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function K3(e,t,r){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ce("option "+a+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const Qf={assertOptions:K3,validators:lp},mn=Qf.validators;let La=class{constructor(t){this.defaults=t||{},this.interceptors={request:new D1,response:new D1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ga(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Qf.assertOptions(n,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean)},!1),i!=null&&(L.isFunction(i)?r.paramsSerializer={serialize:i}:Qf.assertOptions(i,{encode:mn.function,serialize:mn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Qf.assertOptions(r,{baseUrl:mn.spelling("baseURL"),withXsrfToken:mn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&L.merge(a.common,a[r.method]);a&&L.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),r.headers=ur.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let f,c=0,h;if(!l){const v=[V1.bind(this),void 0];for(v.unshift(...s),v.push(...u),h=v.length,f=Promise.resolve(r);c{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new ol(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new YT(function(i){t=i}),cancel:t}}};function V3(e){return function(r){return e.apply(null,r)}}function G3(e){return L.isObject(e)&&e.isAxiosError===!0}const qy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(qy).forEach(([e,t])=>{qy[t]=e});function XT(e){const t=new La(e),r=AT(La.prototype.request,t);return L.extend(r,La.prototype,t,{allOwnKeys:!0}),L.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return XT(Ga(e,i))},r}const nt=XT(Rc);nt.Axios=La;nt.CanceledError=ol;nt.CancelToken=q3;nt.isCancel=UT;nt.VERSION=GT;nt.toFormData=sp;nt.AxiosError=ce;nt.Cancel=nt.CanceledError;nt.all=function(t){return Promise.all(t)};nt.spread=V3;nt.isAxiosError=G3;nt.mergeConfig=Ga;nt.AxiosHeaders=ur;nt.formToJSON=e=>zT(L.isHTMLForm(e)?new FormData(e):e);nt.getAdapter=VT.getAdapter;nt.HttpStatusCode=qy;nt.default=nt;const{Axios:Ohe,AxiosError:jhe,CanceledError:Phe,isCancel:Ehe,CancelToken:Ahe,VERSION:_he,all:The,Cancel:Nhe,isAxiosError:khe,spread:Che,toFormData:$he,AxiosHeaders:Mhe,HttpStatusCode:Ihe,formToJSON:Dhe,getAdapter:Rhe,mergeConfig:Lhe}=nt,Y3="/graphql";async function cr(e,t){try{const r=await nt.post(Y3,{query:e,variables:t},{headers:{"Content-Type":"application/json"}});if(r.data.errors)throw new Error(r.data.errors.map(n=>n.message).join(", "));if(!r.data.data)throw new Error("No data returned from GraphQL query");return r.data.data}catch(r){throw nt.isAxiosError(r)?new Error(`GraphQL request failed: ${r.message}`):r}}const fr={listTeams:` - query ListTeams($userId: ID!) { - teams(userId: $userId) { - id - name - description - meta - createdAt - updatedAt - } - } - `,getUser:` - query GetUser($id: ID!) { - user(id: $id) { - id - username - email - avatarUrl - meta - createdAt - updatedAt - } - } - `,getTeam:` - query GetTeam($id: ID!) { - team(id: $id) { - id - name - description - meta - createdAt - updatedAt - totalProjects - totalExperiments - totalRuns - } - } - `,getTeamWithExperiments:` - query GetTeamWithExperiments($id: ID!, $startTime: DateTime!, $endTime: DateTime!) { - team(id: $id) { - id - name - listExpsByTimeframe(startTime: $startTime, endTime: $endTime) { - id - teamId - userId - projectId - name - status - createdAt - } - } - } - `,listProjects:` - query ListProjects($teamId: ID!, $page: Int, $pageSize: Int) { - projects(teamId: $teamId, page: $page, pageSize: $pageSize) { - id - teamId - creatorId - name - description - meta - createdAt - updatedAt - } - } - `,getProject:` - query GetProject($id: ID!) { - project(id: $id) { - id - teamId - creatorId - name - description - meta - createdAt - updatedAt - } - } - `,listExperiments:` - query ListExperiments($projectId: ID!, $page: Int, $pageSize: Int) { - experiments(projectId: $projectId, page: $page, pageSize: $pageSize) { - id - teamId - userId - projectId - name - description - kind - meta - params - duration - status - createdAt - updatedAt - } - } - `,getExperiment:` - query GetExperiment($id: ID!) { - experiment(id: $id) { - id - teamId - userId - projectId - name - description - kind - meta - params - duration - status - createdAt - updatedAt - metrics { - id - key - value - teamId - projectId - experimentId - runId - createdAt - } - } - } - `,listRuns:` - query ListRuns($experimentId: ID!, $page: Int, $pageSize: Int) { - runs(experimentId: $experimentId, page: $page, pageSize: $pageSize) { - id - teamId - userId - projectId - experimentId - meta - status - createdAt - } - } - `,getRun:` - query GetRun($id: ID!) { - run(id: $id) { - id - teamId - userId - projectId - experimentId - meta - status - createdAt - metrics { - id - key - value - teamId - projectId - experimentId - runId - createdAt - } - spans { - timestamp - traceId - spanId - parentSpanId - spanName - spanKind - serviceName - duration - statusCode - statusMessage - teamId - projectId - runId - experimentId - spanAttributes - resourceAttributes - events { - timestamp - name - attributes - } - links { - traceId - spanId - attributes - } - } - } - } - `,listArtifactRepositories:` - query ListArtifactRepositories { - artifactRepos { - name - } - } - `,listArtifactTags:` - query ListArtifactTags($team_id: ID!, $project_id: ID!, $repo_type: String) { - artifactTags(teamId: $team_id, projectId: $project_id, repoType: $repo_type) { - name - } - } - `,getArtifactContent:` - query GetArtifactContent($team_id: ID!, $project_id: ID!, $tag: String!, $repo_type: String) { - artifactContent(teamId: $team_id, projectId: $project_id, tag: $tag, repoType: $repo_type) { - filename - content - contentType - } - } - `,listTraces:` - query ListTraces($runId: ID!) { - traces(runId: $runId) { - timestamp - traceId - spanId - parentSpanId - spanName - spanKind - serviceName - duration - statusCode - statusMessage - teamId - projectId - runId - experimentId - spanAttributes - resourceAttributes - events { - timestamp - name - attributes - } - links { - traceId - spanId - attributes - } - } - } - `},QT=P.createContext(null);function X3({user:e,children:t}){const[r,n]=P.useState(e),i=a=>{n(o=>({...o,...a}))};return d.jsx(QT.Provider,{value:{user:r,updateUser:i},children:t})}function Lb(){const e=P.useContext(QT);if(!e)throw new Error("useCurrentUser must be used within UserProvider");return e.user}/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Y1=e=>{const t=J3(e);return t.charAt(0).toUpperCase()+t.slice(1)},JT=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Z3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var eF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tF=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>P.createElement("svg",{ref:l,...eF,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:JT("lucide",i),...!a&&!Z3(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,f])=>P.createElement(u,f)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ge=(e,t)=>{const r=P.forwardRef(({className:n,...i},a)=>P.createElement(tF,{ref:a,iconNode:t,className:JT(`lucide-${Q3(Y1(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Y1(e),r};/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rF=[["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"}]],nF=Ge("bot",rF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iF=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],X1=Ge("building-2",iF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fb=Ge("check",aF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],up=Ge("chevron-down",oF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vi=Ge("chevron-right",sF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lF=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],cp=Ge("chevron-left",lF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Vy=Ge("clock",uF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cF=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ZT=Ge("copy",cF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fF=[["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"}]],eN=Ge("database",fF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dF=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tN=Ge("eye",dF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],pF=Ge("file-text",hF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mF=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],vF=Ge("flask-conical",mF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yF=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],rN=Ge("folder-kanban",yF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gF=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],bF=Ge("github",gF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],wF=Ge("globe",xF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SF=[["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:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],nN=Ge("layers",SF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OF=[["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"}]],jF=Ge("layout-dashboard",OF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PF=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],EF=Ge("package",PF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AF=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],_F=Ge("play",AF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TF=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],NF=Ge("route",TF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ya=Ge("search",kF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CF=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Q1=Ge("user",CF);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $F=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],iN=Ge("x",$F);/** - * @license lucide-react v0.555.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MF=[["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"}]],IF=Ge("zap",MF);function aN(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),oN=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",J1=[],LF="arbitrary..",FF=e=>{const t=zF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return BF(o);const s=o.split(Td),l=s[0]===""&&s.length>1?1:0;return sN(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?DF(u,l):l:u||J1}return r[o]||J1}}},sN=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=sN(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Td):e.slice(t).join(Td),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?LF+n:void 0})(),zF=e=>{const{theme:t,classGroups:r}=e;return UF(r,t)},UF=(e,t)=>{const r=oN();for(const n in e){const i=e[n];Bb(i,r,n,t)}return r},Bb=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){HF(e,t,r);return}if(typeof e=="function"){KF(e,t,r,n);return}qF(e,t,r,n)},HF=(e,t,r)=>{const n=e===""?t:lN(t,e);n.classGroupId=r},KF=(e,t,r,n)=>{if(VF(e)){Bb(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(RF(r,e))},qF=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,GF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Gy="!",Z1=":",YF=[],eS=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),XF=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const f=i.length;for(let m=0;ml?u-l:void 0;return eS(a,p,h,v)};if(t){const i=t+Z1,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):eS(YF,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},QF=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},JF=e=>({cache:GF(e.cacheSize),parseClassName:XF(e),sortModifiers:QF(e),...FF(e)}),ZF=/\s+/,e5=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(ZF);let l="";for(let u=s.length-1;u>=0;u-=1){const f=s[u],{isExternal:c,modifiers:h,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=r(f);if(c){l=f+(l.length>0?" "+l:l);continue}let g=!!m,y=n(g?v.substring(0,m):v);if(!y){if(!g){l=f+(l.length>0?" "+l:l);continue}if(y=n(v),!y){l=f+(l.length>0?" "+l:l);continue}g=!1}const b=h.length===0?"":h.length===1?h[0]:a(h).join(":"),x=p?b+Gy:b,S=x+y;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(y,g);for(let O=0;O0?" "+l:l)}return l},t5=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((f,c)=>c(f),e());return r=JF(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const f=e5(l,r);return i(l,f),f};return a=o,(...l)=>a(t5(...l))},n5=[],dt=e=>{const t=r=>r[e]||n5;return t.isThemeGetter=!0,t},cN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i5=/^\d+\/\d+$/,a5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,o5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,s5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,u5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=e=>i5.test(e),fe=e=>!!e&&!Number.isNaN(Number(e)),ui=e=>!!e&&Number.isInteger(Number(e)),Hm=e=>e.endsWith("%")&&fe(e.slice(0,-1)),Cn=e=>a5.test(e),c5=()=>!0,f5=e=>o5.test(e)&&!s5.test(e),dN=()=>!1,d5=e=>l5.test(e),h5=e=>u5.test(e),p5=e=>!Z(e)&&!ee(e),m5=e=>sl(e,mN,dN),Z=e=>cN.test(e),sa=e=>sl(e,vN,f5),Km=e=>sl(e,x5,fe),tS=e=>sl(e,hN,dN),v5=e=>sl(e,pN,h5),vf=e=>sl(e,yN,d5),ee=e=>fN.test(e),Cl=e=>ll(e,vN),y5=e=>ll(e,w5),rS=e=>ll(e,hN),g5=e=>ll(e,mN),b5=e=>ll(e,pN),yf=e=>ll(e,yN,!0),sl=(e,t,r)=>{const n=cN.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ll=(e,t,r=!1)=>{const n=fN.exec(e);return n?n[1]?t(n[1]):r:!1},hN=e=>e==="position"||e==="percentage",pN=e=>e==="image"||e==="url",mN=e=>e==="length"||e==="size"||e==="bg-size",vN=e=>e==="length",x5=e=>e==="number",w5=e=>e==="family-name",yN=e=>e==="shadow",S5=()=>{const e=dt("color"),t=dt("font"),r=dt("text"),n=dt("font-weight"),i=dt("tracking"),a=dt("leading"),o=dt("breakpoint"),s=dt("container"),l=dt("spacing"),u=dt("radius"),f=dt("shadow"),c=dt("inset-shadow"),h=dt("text-shadow"),p=dt("drop-shadow"),v=dt("blur"),m=dt("perspective"),g=dt("aspect"),y=dt("ease"),b=dt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],E=()=>[ee,Z,l],A=()=>[Po,"full","auto",...E()],T=()=>[ui,"none","subgrid",ee,Z],_=()=>["auto",{span:["full",ui,ee,Z]},ui,ee,Z],N=()=>[ui,"auto",ee,Z],M=()=>["auto","min","max","fr",ee,Z],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...E()],z=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],C=()=>[e,ee,Z],F=()=>[...S(),rS,tS,{position:[ee,Z]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",g5,m5,{size:[ee,Z]}],H=()=>[Hm,Cl,sa],Y=()=>["","none","full",u,ee,Z],re=()=>["",fe,Cl,sa],xe=()=>["solid","dashed","dotted","double"],Ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[fe,Hm,rS,tS],Pt=()=>["","none",v,ee,Z],G=()=>["none",fe,ee,Z],se=()=>["none",fe,ee,Z],le=()=>[fe,ee,Z],U=()=>[Po,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cn],breakpoint:[Cn],color:[c5],container:[Cn],"drop-shadow":[Cn],ease:["in","out","in-out"],font:[p5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cn],shadow:[Cn],spacing:["px",fe],text:[Cn],"text-shadow":[Cn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,Z,ee,g]}],container:["container"],columns:[{columns:[fe,Z,ee,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[ui,"auto",ee,Z]}],basis:[{basis:[Po,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[fe,Po,"auto","initial","none",Z]}],grow:[{grow:["",fe,ee,Z]}],shrink:[{shrink:["",fe,ee,Z]}],order:[{order:[ui,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Cl,sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ee,Km]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hm,Z]}],"font-family":[{font:[y5,Z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,Z]}],"line-clamp":[{"line-clamp":[fe,"none",ee,Km]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[fe,"from-font","auto",ee,sa]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[fe,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ui,ee,Z],radial:["",ee,Z],conic:[ui,ee,Z]},b5,v5]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[fe,ee,Z]}],"outline-w":[{outline:["",fe,Cl,sa]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",f,yf,vf]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",c,yf,vf]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[fe,sa]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,yf,vf]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[fe,ee,Z]}],"mix-blend":[{"mix-blend":[...Ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ke()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:Pt()}],brightness:[{brightness:[fe,ee,Z]}],contrast:[{contrast:[fe,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",p,yf,vf]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",fe,ee,Z]}],"hue-rotate":[{"hue-rotate":[fe,ee,Z]}],invert:[{invert:["",fe,ee,Z]}],saturate:[{saturate:[fe,ee,Z]}],sepia:[{sepia:["",fe,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[fe,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[fe,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",fe,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[fe,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",fe,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[fe,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[fe,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",fe,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[fe,"initial",ee,Z]}],ease:[{ease:["linear","initial",y,ee,Z]}],delay:[{delay:[fe,ee,Z]}],animate:[{animate:["none",b,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Z]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[fe,Cl,sa,Km]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},O5=r5(S5);function Oe(...e){return O5(ue(e))}const j5="/static/assets/logo-D6hHn9pX.png",P5=[{title:"Dashboard",href:"/",icon:jF},{title:"Projects",href:"/projects",icon:rN},{title:"Artifacts",href:"/artifacts",icon:EF}];function E5(){const e=lo(),t=Lb(),[r,n]=P.useState(!1);return d.jsxs("div",{className:"flex h-screen w-48 flex-col bg-card",children:[d.jsxs(_n,{to:"/",className:"flex h-14 items-center gap-2 px-3 hover:bg-accent/50 transition-colors",children:[d.jsx("img",{src:j5,alt:"AlphaTrion Logo",className:"h-6 w-6"}),d.jsx("h1",{className:"text-base font-bold text-foreground",children:"AlphaTrion"})]}),d.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 py-4",children:P5.map(i=>{const a=i.icon;let o=e.pathname===i.href||i.href!=="/"&&e.pathname.startsWith(i.href);return i.href==="/projects"&&(o=o||e.pathname.startsWith("/experiments")||e.pathname.startsWith("/runs")),d.jsxs(_n,{to:i.href,className:Oe("flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm font-medium transition-colors relative",o?"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[o&&d.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-600 dark:bg-blue-400 rounded-r"}),d.jsx(a,{className:Oe("h-4 w-4 ml-1",o&&"text-blue-600 dark:text-blue-400")}),i.title]},i.href)})}),d.jsxs("div",{className:"relative p-3 mt-auto",children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 hover:bg-accent/50 rounded-lg px-2 py-2 transition-colors",children:[d.jsx("button",{onClick:()=>n(!r),className:"flex items-center",title:"User menu",children:t.avatarUrl?d.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-7 w-7 rounded-full object-cover flex-shrink-0"}):d.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0",children:d.jsx(Q1,{className:"h-3.5 w-3.5"})})}),d.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[d.jsx("a",{href:"https://github.com/InftyAI/alphatrion",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center h-6 w-6 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"View on GitHub",children:d.jsx(bF,{className:"h-3.5 w-3.5"})}),d.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:"v0.1.1"})]})]}),r&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),d.jsx("div",{className:"absolute bottom-full left-4 mb-2 z-50 w-72 rounded-lg border bg-card shadow-lg overflow-hidden",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[t.avatarUrl?d.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-12 w-12 rounded-full object-cover"}):d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground",children:d.jsx(Q1,{className:"h-6 w-6"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground break-words",children:t.username}),d.jsx("p",{className:"text-xs text-muted-foreground break-words",children:t.email})]})]})})})]})]})]})}function A5(e=0,t=100){const r=Lb();return Ur({queryKey:["teams",r.id,e,t],queryFn:async()=>(await cr(fr.listTeams,{userId:r.id})).teams,staleTime:10*60*1e3})}function _5(e){return Ur({queryKey:["team",e],queryFn:async()=>(await cr(fr.getTeam,{id:e})).team,enabled:!!e,staleTime:10*60*1e3})}const lt=P.forwardRef(({className:e,variant:t="default",size:r="default",...n},i)=>{const a={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},o={default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"};return d.jsx("button",{className:Oe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a[t],o[r],e),ref:i,...n})});lt.displayName="Button";function $e({className:e,...t}){return d.jsx("div",{className:Oe("animate-pulse rounded-md bg-muted",e),...t})}function T5(){const e=$b(),{data:t,isLoading:r}=A5(),{selectedTeamId:n,setSelectedTeamId:i}=uo(),a=Lb(),[o,s]=P.useState(!1);if(r)return d.jsx($e,{className:"h-9 w-40 rounded-lg"});if(!t||t.length===0)return d.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 px-3 py-1.5 text-xs text-muted-foreground",children:[d.jsx(X1,{className:"h-4 w-4"}),"No teams available"]});const l=t.find(u=>u.id===n);return d.jsxs("div",{className:"relative",children:[d.jsxs(lt,{variant:"outline",onClick:()=>s(!o),className:"h-9 px-3 gap-2 border-border/40 hover:border-border hover:bg-accent/50",children:[d.jsx(X1,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-medium",children:(l==null?void 0:l.name)||"Select team"}),d.jsx(up,{className:Oe("h-3.5 w-3.5 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),d.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-52 z-50 rounded-lg border bg-card shadow-lg overflow-hidden",children:d.jsx("div",{className:"p-1.5",children:t.map((u,f)=>{const c=u.id===n;return d.jsxs("button",{onClick:()=>{i(u.id,a.id),s(!1),e("/")},className:Oe("flex w-full items-center justify-between gap-2 px-2.5 py-2 rounded-md transition-colors",c?"bg-accent/50 text-foreground":"hover:bg-accent/30 text-foreground"),children:[d.jsx("div",{className:"flex-1 text-left",children:d.jsx("div",{className:"text-xs font-medium break-words",children:u.name||"Unnamed Team"})}),c&&d.jsx(Fb,{className:"h-3 w-3 flex-shrink-0 text-primary"})]},u.id)})})})]})]})}function fp(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Ur({queryKey:["projects",e,r,n],queryFn:async()=>(await cr(fr.listProjects,{teamId:e,page:r,pageSize:n})).projects,enabled:i&&!!e,staleTime:60*60*1e3})}function gN(e,t){const{enabled:r=!0}=t||{};return Ur({queryKey:["project",e],queryFn:async()=>(await cr(fr.getProject,{id:e})).project,enabled:r&&!!e,staleTime:60*60*1e3})}function Nd(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Ur({queryKey:["experiments",e,r,n],queryFn:async()=>(await cr(fr.listExperiments,{projectId:e,page:r,pageSize:n})).experiments,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return Mb(s)}})}function dp(e,t){const{enabled:r=!0}=t||{};return Ur({queryKey:["experiment",e],queryFn:async()=>(await cr(fr.getExperiment,{id:e})).experiment,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?Mb([i.status]):!1}})}function N5(e){return Ur({queryKey:["experiments","by-ids",e],queryFn:async()=>(await Promise.all(e.map(async r=>(await cr(fr.getExperiment,{id:r})).experiment))).filter(r=>r!==null),enabled:e.length>0,refetchInterval:t=>{const r=t.state.data;if(!r)return!1;const n=r.map(i=>i.status);return Mb(n)}})}function Yy(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Ur({queryKey:["runs",e,r,n],queryFn:async()=>(await cr(fr.listRuns,{experimentId:e,page:r,pageSize:n})).runs,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return PT(s)}})}function bN(e,t){const{enabled:r=!0}=t||{};return Ur({queryKey:["run",e],queryFn:async()=>(await cr(fr.getRun,{id:e})).run,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?PT([i.status]):!1}})}function Eo(e,t=4,r=4){return!e||e.length<=t+r?e:`${e.slice(0,t)}....${e.slice(-r)}`}function k5(){const e=lo();np();const t=e.pathname.split("/").filter(Boolean),r=t[0]==="projects"&&t[1]&&t[1]!=="projects"?t[1]:void 0,n=t[0]==="experiments"&&t[1]&&t[1]!=="compare"?t[1]:void 0,i=t[0]==="runs"&&t[1]?t[1]:void 0,{data:a}=gN(r||"",{enabled:!!r}),{data:o}=dp(n||"",{enabled:!!n}),{data:s}=bN(i||"",{enabled:!!i}),u=(()=>{const f=e.pathname.split("/").filter(Boolean);if(f.length===0)return[{label:"Home"}];const c=[{label:"Home",href:"/"}];return f[0]==="projects"?(c.push({label:"Projects",href:"/projects"}),r&&a&&c.push({label:Eo(a.id),href:`/projects/${a.id}`})):f[0]==="experiments"?n&&o?(c.push({label:"Projects",href:"/projects"}),c.push({label:Eo(o.projectId),href:`/projects/${o.projectId}`}),c.push({label:"Experiments",href:`/projects/${o.projectId}`}),c.push({label:Eo(o.id),href:f.length===2?void 0:`/experiments/${o.id}`})):c.push({label:"Experiments",href:void 0}):f[0]==="runs"?i&&s?(c.push({label:"Projects",href:"/projects"}),c.push({label:Eo(s.projectId),href:`/projects/${s.projectId}`}),c.push({label:"Experiments",href:`/projects/${s.projectId}`}),c.push({label:Eo(s.experimentId),href:`/experiments/${s.experimentId}`}),c.push({label:"Runs",href:`/experiments/${s.experimentId}`}),c.push({label:Eo(s.id),href:void 0})):c.push({label:"Runs",href:void 0}):f.forEach((h,p)=>{const v="/"+f.slice(0,p+1).join("/"),m=p===f.length-1,g=h.charAt(0).toUpperCase()+h.slice(1);c.push({label:g,href:m?void 0:v})}),c})();return d.jsxs("header",{className:"flex h-14 items-center justify-between bg-card px-6",children:[d.jsx("nav",{className:"flex items-center space-x-2 text-sm",children:u.map((f,c)=>{const h=c===u.length-1;return d.jsxs("div",{className:"flex items-center",children:[c>0&&d.jsx(Vi,{className:"mx-2 h-4 w-4 text-muted-foreground"}),f.href&&!h?d.jsx(_n,{to:f.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:f.label}):d.jsx("span",{className:"text-foreground font-medium",children:f.label})]},c)})}),d.jsx(T5,{})]})}function C5(){return d.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[d.jsx("div",{className:"shadow-sm",children:d.jsx(E5,{})}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx("div",{className:"shadow-sm",children:d.jsx(k5,{})}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6 bg-muted/20",children:d.jsx(rL,{})})]})]})}function kd(e){"@babel/helpers - typeof";return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function ln(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Ae(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Te(e){Ae(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||kd(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function $5(e,t){Ae(2,arguments);var r=Te(e),n=ln(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function M5(e,t){Ae(2,arguments);var r=Te(e),n=ln(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function I5(e,t){Ae(2,arguments);var r=Te(e).getTime(),n=ln(t);return new Date(r+n)}var D5={};function Lc(){return D5}function Xy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function nS(e){Ae(1,arguments);var t=Te(e);return t.setHours(0,0,0,0),t}function Jf(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function R5(e){return Ae(1,arguments),e instanceof Date||kd(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function L5(e){if(Ae(1,arguments),!R5(e)&&typeof e!="number")return!1;var t=Te(e);return!isNaN(Number(t))}function F5(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function B5(e,t){return Ae(2,arguments),Te(e).getTime()-Te(t).getTime()}var z5={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},U5="trunc";function W5(e){return z5[U5]}function H5(e){Ae(1,arguments);var t=Te(e);return t.setHours(23,59,59,999),t}function K5(e){Ae(1,arguments);var t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function q5(e){Ae(1,arguments);var t=Te(e);return H5(t).getTime()===K5(t).getTime()}function V5(e,t){Ae(2,arguments);var r=Te(e),n=Te(t),i=Jf(r,n),a=Math.abs(F5(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=Jf(r,n)===-i;q5(Te(e))&&a===1&&Jf(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function G5(e,t,r){Ae(2,arguments);var n=B5(e,t)/1e3;return W5()(n)}function Y5(e,t){Ae(2,arguments);var r=ln(t);return I5(e,-r)}var X5=864e5;function Q5(e){Ae(1,arguments);var t=Te(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/X5)+1}function Cd(e){Ae(1,arguments);var t=1,r=Te(e),n=r.getUTCDay(),i=(n=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function J5(e){Ae(1,arguments);var t=xN(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Cd(r);return n}var Z5=6048e5;function e4(e){Ae(1,arguments);var t=Te(e),r=Cd(t).getTime()-J5(t).getTime();return Math.round(r/Z5)+1}function $d(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var f=Lc(),c=ln((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&n!==void 0?n:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Te(e),p=h.getUTCDay(),v=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(c+1,0,p),v.setUTCHours(0,0,0,0);var m=$d(v,t),g=new Date(0);g.setUTCFullYear(c,0,p),g.setUTCHours(0,0,0,0);var y=$d(g,t);return f.getTime()>=m.getTime()?c+1:f.getTime()>=y.getTime()?c:c-1}function t4(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var f=Lc(),c=ln((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&n!==void 0?n:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=wN(e,t),p=new Date(0);p.setUTCFullYear(h,0,c),p.setUTCHours(0,0,0,0);var v=$d(p,t);return v}var r4=6048e5;function n4(e,t){Ae(1,arguments);var r=Te(e),n=$d(r,t).getTime()-t4(r,t).getTime();return Math.round(n/r4)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return _e(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return _e(a,r.length)}},Ao={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},i4={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return ci.y(t,r)},Y:function(t,r,n,i){var a=wN(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=xN(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return _e(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return _e(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return ci.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return _e(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=n4(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},I:function(t,r,n){var i=e4(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):ci.d(t,r)},D:function(t,r,n){var i=Q5(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_e(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return _e(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=Ao.noon:i===0?a=Ao.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=Ao.evening:i>=12?a=Ao.afternoon:i>=4?a=Ao.morning:a=Ao.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return ci.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ci.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):ci.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ci.s(t,r)},S:function(t,r){return ci.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return aS(o);case"XXXX":case"XX":return ha(o);case"XXXXX":case"XXX":default:return ha(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return aS(o);case"xxxx":case"xx":return ha(o);case"xxxxx":case"xxx":default:return ha(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+iS(o,":");case"OOOO":default:return"GMT"+ha(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+iS(o,":");case"zzzz":default:return"GMT"+ha(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return _e(o,r.length)}};function iS(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+_e(a,2)}function aS(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return ha(e,t)}function ha(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=_e(Math.floor(i/60),2),o=_e(i%60,2);return n+a+r+o}var oS=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},SN=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},a4=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return oS(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",oS(i,r)).replace("{{time}}",SN(a,r))},o4={p:SN,P:a4},s4=["D","DD"],l4=["YY","YYYY"];function u4(e){return s4.indexOf(e)!==-1}function c4(e){return l4.indexOf(e)!==-1}function sS(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var f4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},d4=function(t,r,n){var i,a=f4[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function qm(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var h4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},p4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},v4={date:qm({formats:h4,defaultWidth:"full"}),time:qm({formats:p4,defaultWidth:"full"}),dateTime:qm({formats:m4,defaultWidth:"full"})},y4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},g4=function(t,r,n,i){return y4[t]};function $l(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var b4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},x4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},w4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},S4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},O4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},j4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P4=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},E4={ordinalNumber:P4,era:$l({values:b4,defaultWidth:"wide"}),quarter:$l({values:x4,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:$l({values:w4,defaultWidth:"wide"}),day:$l({values:S4,defaultWidth:"wide"}),dayPeriod:$l({values:O4,defaultWidth:"wide",formattingValues:j4,defaultFormattingWidth:"wide"})};function Ml(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?_4(s,function(c){return c.test(o)}):A4(s,function(c){return c.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var f=t.slice(o.length);return{value:u,rest:f}}}function A4(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function _4(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var N4=/^(\d+)(th|st|nd|rd)?/i,k4=/\d+/i,C4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$4={any:[/^b/i,/^(a|c)/i]},M4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},I4={any:[/1/i,/2/i,/3/i,/4/i]},D4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},R4={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},L4={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},F4={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},B4={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},z4={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},U4={ordinalNumber:T4({matchPattern:N4,parsePattern:k4,valueCallback:function(t){return parseInt(t,10)}}),era:Ml({matchPatterns:C4,defaultMatchWidth:"wide",parsePatterns:$4,defaultParseWidth:"any"}),quarter:Ml({matchPatterns:M4,defaultMatchWidth:"wide",parsePatterns:I4,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ml({matchPatterns:D4,defaultMatchWidth:"wide",parsePatterns:R4,defaultParseWidth:"any"}),day:Ml({matchPatterns:L4,defaultMatchWidth:"wide",parsePatterns:F4,defaultParseWidth:"any"}),dayPeriod:Ml({matchPatterns:B4,defaultMatchWidth:"any",parsePatterns:z4,defaultParseWidth:"any"})},ON={code:"en-US",formatDistance:d4,formatLong:v4,formatRelative:g4,localize:E4,match:U4,options:{weekStartsOn:0,firstWeekContainsDate:1}},W4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,K4=/^'([^]*?)'?$/,q4=/''/g,V4=/[a-zA-Z]/;function ou(e,t,r){var n,i,a,o,s,l,u,f,c,h,p,v,m,g;Ae(2,arguments);var y=String(t),b=Lc(),x=(n=(i=void 0)!==null&&i!==void 0?i:b.locale)!==null&&n!==void 0?n:ON,S=ln((a=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:b.firstWeekContainsDate)!==null&&o!==void 0?o:(u=b.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=ln((c=(h=(p=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&p!==void 0?p:b.weekStartsOn)!==null&&h!==void 0?h:(m=b.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&c!==void 0?c:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!x.localize)throw new RangeError("locale must contain localize property");if(!x.formatLong)throw new RangeError("locale must contain formatLong property");var O=Te(e);if(!L5(O))throw new RangeError("Invalid time value");var j=Xy(O),E=Y5(O,j),A={firstWeekContainsDate:S,weekStartsOn:w,locale:x,_originalDate:O},T=y.match(H4).map(function(_){var N=_[0];if(N==="p"||N==="P"){var M=o4[N];return M(_,x.formatLong)}return _}).join("").match(W4).map(function(_){if(_==="''")return"'";var N=_[0];if(N==="'")return G4(_);var M=i4[N];if(M)return c4(_)&&sS(_,t,String(e)),u4(_)&&sS(_,t,String(e)),M(E,_,x.localize,A);if(N.match(V4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return _}).join("");return T}function G4(e){var t=e.match(K4);return t?t[1].replace(q4,"'"):e}function jN(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Y4(e){return jN({},e)}var lS=1440,X4=2520,Vm=43200,Q4=86400;function J4(e,t,r){var n,i;Ae(2,arguments);var a=Lc(),o=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:ON;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Jf(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=jN(Y4(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,f;s>0?(u=Te(t),f=Te(e)):(u=Te(e),f=Te(t));var c=G5(f,u),h=(Xy(f)-Xy(u))/1e3,p=Math.round((c-h)/60),v;if(p<2)return r!=null&&r.includeSeconds?c<5?o.formatDistance("lessThanXSeconds",5,l):c<10?o.formatDistance("lessThanXSeconds",10,l):c<20?o.formatDistance("lessThanXSeconds",20,l):c<40?o.formatDistance("halfAMinute",0,l):c<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p{const n=new Date,i=Qy(n,3);return(await cr(fr.getTeamWithExperiments,{id:e,startTime:i.toISOString(),endTime:n.toISOString()})).team.listExpsByTimeframe},enabled:r&&!!e,staleTime:5*60*1e3})}const de=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));de.displayName="Card";const Ft=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("flex flex-col space-y-1.5 p-6",e),...t}));Ft.displayName="CardHeader";const Bt=P.forwardRef(({className:e,...t},r)=>d.jsx("h3",{ref:r,className:Oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));Bt.displayName="CardTitle";const dr=P.forwardRef(({className:e,...t},r)=>d.jsx("p",{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));dr.displayName="CardDescription";const he=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("p-6 pt-0",e),...t}));he.displayName="CardContent";const eB=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("flex items-center p-6 pt-0",e),...t}));eB.displayName="CardFooter";var tB=Array.isArray,hr=tB,rB=typeof Yc=="object"&&Yc&&Yc.Object===Object&&Yc,EN=rB,nB=EN,iB=typeof self=="object"&&self&&self.Object===Object&&self,aB=nB||iB||Function("return this")(),Nn=aB,oB=Nn,sB=oB.Symbol,Fc=sB,uS=Fc,AN=Object.prototype,lB=AN.hasOwnProperty,uB=AN.toString,Il=uS?uS.toStringTag:void 0;function cB(e){var t=lB.call(e,Il),r=e[Il];try{e[Il]=void 0;var n=!0}catch{}var i=uB.call(e);return n&&(t?e[Il]=r:delete e[Il]),i}var fB=cB,dB=Object.prototype,hB=dB.toString;function pB(e){return hB.call(e)}var mB=pB,cS=Fc,vB=fB,yB=mB,gB="[object Null]",bB="[object Undefined]",fS=cS?cS.toStringTag:void 0;function xB(e){return e==null?e===void 0?bB:gB:fS&&fS in Object(e)?vB(e):yB(e)}var ni=xB;function wB(e){return e!=null&&typeof e=="object"}var ii=wB,SB=ni,OB=ii,jB="[object Symbol]";function PB(e){return typeof e=="symbol"||OB(e)&&SB(e)==jB}var ul=PB,EB=hr,AB=ul,_B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TB=/^\w*$/;function NB(e,t){if(EB(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||AB(e)?!0:TB.test(e)||!_B.test(e)||t!=null&&e in Object(t)}var zb=NB;function kB(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ea=kB;const cl=Ee(ea);var CB=ni,$B=ea,MB="[object AsyncFunction]",IB="[object Function]",DB="[object GeneratorFunction]",RB="[object Proxy]";function LB(e){if(!$B(e))return!1;var t=CB(e);return t==IB||t==DB||t==MB||t==RB}var Ub=LB;const oe=Ee(Ub);var FB=Nn,BB=FB["__core-js_shared__"],zB=BB,Gm=zB,dS=function(){var e=/[^.]+$/.exec(Gm&&Gm.keys&&Gm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function UB(e){return!!dS&&dS in e}var WB=UB,HB=Function.prototype,KB=HB.toString;function qB(e){if(e!=null){try{return KB.call(e)}catch{}try{return e+""}catch{}}return""}var _N=qB,VB=Ub,GB=WB,YB=ea,XB=_N,QB=/[\\^$.*+?()[\]{}|]/g,JB=/^\[object .+?Constructor\]$/,ZB=Function.prototype,ez=Object.prototype,tz=ZB.toString,rz=ez.hasOwnProperty,nz=RegExp("^"+tz.call(rz).replace(QB,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function iz(e){if(!YB(e)||GB(e))return!1;var t=VB(e)?nz:JB;return t.test(XB(e))}var az=iz;function oz(e,t){return e==null?void 0:e[t]}var sz=oz,lz=az,uz=sz;function cz(e,t){var r=uz(e,t);return lz(r)?r:void 0}var co=cz,fz=co,dz=fz(Object,"create"),hp=dz,hS=hp;function hz(){this.__data__=hS?hS(null):{},this.size=0}var pz=hz;function mz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vz=mz,yz=hp,gz="__lodash_hash_undefined__",bz=Object.prototype,xz=bz.hasOwnProperty;function wz(e){var t=this.__data__;if(yz){var r=t[e];return r===gz?void 0:r}return xz.call(t,e)?t[e]:void 0}var Sz=wz,Oz=hp,jz=Object.prototype,Pz=jz.hasOwnProperty;function Ez(e){var t=this.__data__;return Oz?t[e]!==void 0:Pz.call(t,e)}var Az=Ez,_z=hp,Tz="__lodash_hash_undefined__";function Nz(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_z&&t===void 0?Tz:t,this}var kz=Nz,Cz=pz,$z=vz,Mz=Sz,Iz=Az,Dz=kz;function fl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var Zz=Jz,eU=pp;function tU(e,t){var r=this.__data__,n=eU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var rU=tU,nU=Fz,iU=Vz,aU=Xz,oU=Zz,sU=rU;function dl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Oa=function(t){return Xa(t)&&t.indexOf("%")===t.length-1},q=function(t){return A8(t)&&!Bc(t)},k8=function(t){return ae(t)},yt=function(t){return q(t)||Xa(t)},C8=0,fo=function(t){var r=++C8;return"".concat(t||"").concat(r)},qt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&!Xa(t))return n;var a;if(Oa(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Bc(a)&&(a=n),i&&a>r&&(a=r),a},bi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},$8=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function z8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Zy(e){"@babel/helpers - typeof";return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zy(e)}var xS={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},qn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},wS=null,Xm=null,Jb=function e(t){if(t===wS&&Array.isArray(Xm))return Xm;var r=[];return P.Children.forEach(t,function(n){ae(n)||(S8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Xm=r,wS=t,r};function Yt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return qn(i)}):n=[qn(t)],Jb(e).forEach(function(i){var a=wr(i,"type.displayName")||wr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function yr(e,t){var r=Yt(e,t);return r&&r[0]}var SS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!q(n)||n<=0||!q(i)||i<=0)},U8=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],W8=function(t){return t&&t.type&&Xa(t.type)&&U8.indexOf(t.type)>=0},H8=function(t){return t&&Zy(t)==="object"&&"clipDot"in t},K8=function(t,r,n,i){var a,o=(a=Ym==null?void 0:Ym[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!oe(t)&&(i&&o.includes(r)||R8.includes(r))||n&&Qb.includes(r)},te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(P.isValidElement(t)&&(i=t.props),!cl(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;K8((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},eg=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return OS(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rg(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=Y8(e,G8),f=i||{width:r,height:n,x:0,y:0},c=ue("recharts-surface",a);return k.createElement("svg",tg({},te(u,!0,"svg"),{className:c,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),k.createElement("title",null,s),k.createElement("desc",null,l),t)}var Q8=["children","className"];function ng(){return ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var pe=k.forwardRef(function(e,t){var r=e.children,n=e.className,i=J8(e,Q8),a=ue("recharts-layer",n);return k.createElement("g",ng({className:a},te(i,!0),{ref:t}),r)}),an=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:r6(e,t,r)}var i6=n6,a6="\\ud800-\\udfff",o6="\\u0300-\\u036f",s6="\\ufe20-\\ufe2f",l6="\\u20d0-\\u20ff",u6=o6+s6+l6,c6="\\ufe0e\\ufe0f",f6="\\u200d",d6=RegExp("["+f6+a6+u6+c6+"]");function h6(e){return d6.test(e)}var LN=h6;function p6(e){return e.split("")}var m6=p6,FN="\\ud800-\\udfff",v6="\\u0300-\\u036f",y6="\\ufe20-\\ufe2f",g6="\\u20d0-\\u20ff",b6=v6+y6+g6,x6="\\ufe0e\\ufe0f",w6="["+FN+"]",ig="["+b6+"]",ag="\\ud83c[\\udffb-\\udfff]",S6="(?:"+ig+"|"+ag+")",BN="[^"+FN+"]",zN="(?:\\ud83c[\\udde6-\\uddff]){2}",UN="[\\ud800-\\udbff][\\udc00-\\udfff]",O6="\\u200d",WN=S6+"?",HN="["+x6+"]?",j6="(?:"+O6+"(?:"+[BN,zN,UN].join("|")+")"+HN+WN+")*",P6=HN+WN+j6,E6="(?:"+[BN+ig+"?",ig,zN,UN,w6].join("|")+")",A6=RegExp(ag+"(?="+ag+")|"+E6+P6,"g");function _6(e){return e.match(A6)||[]}var T6=_6,N6=m6,k6=LN,C6=T6;function $6(e){return k6(e)?C6(e):N6(e)}var M6=$6,I6=i6,D6=LN,R6=M6,L6=CN;function F6(e){return function(t){t=L6(t);var r=D6(t)?R6(t):void 0,n=r?r[0]:t.charAt(0),i=r?I6(r,1).join(""):t.slice(1);return n[e]()+i}}var B6=F6,z6=B6,U6=z6("toUpperCase"),W6=U6;const _p=Ee(W6);function De(e){return function(){return e}}const KN=Math.cos,Dd=Math.sin,fn=Math.sqrt,Rd=Math.PI,Tp=2*Rd,og=Math.PI,sg=2*og,pa=1e-6,H6=sg-pa;function qN(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qN;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;ipa)if(!(Math.abs(c*l-u*f)>pa)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=i-s,m=l*l+u*u,g=p*p+v*v,y=Math.sqrt(m),b=Math.sqrt(h),x=a*Math.tan((og-Math.acos((m+h-g)/(2*y*b)))/2),S=x/b,w=x/y;Math.abs(S-1)>pa&&this._append`L${t+S*f},${r+S*c}`,this._append`A${a},${a},0,0,${+(c*p>f*v)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,f=r+l,c=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>pa||Math.abs(this._y1-f)>pa)&&this._append`L${u},${f}`,n&&(h<0&&(h=h%sg+sg),h>H6?this._append`A${n},${n},0,1,${c},${t-s},${r-l}A${n},${n},0,1,${c},${this._x1=u},${this._y1=f}`:h>pa&&this._append`A${n},${n},0,${+(h>=og)},${c},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Zb(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new q6(t)}function ex(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function VN(e){this._context=e}VN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Np(e){return new VN(e)}function GN(e){return e[0]}function YN(e){return e[1]}function XN(e,t){var r=De(!0),n=null,i=Np,a=null,o=Zb(s);e=typeof e=="function"?e:e===void 0?GN:De(e),t=typeof t=="function"?t:t===void 0?YN:De(t);function s(l){var u,f=(l=ex(l)).length,c,h=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=f;++u)!(u=p;--v)s.point(x[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(x[h]=+e(g,h,c),S[h]=+t(g,h,c),s.point(n?+n(g,h,c):x[h],r?+r(g,h,c):S[h]))}if(b)return s=null,b+""||null}function f(){return XN().defined(i).curve(o).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:De(+c),n=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:De(+c),u):e},u.x1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:De(+c),u):n},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:De(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:De(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:De(+c),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(c){return arguments.length?(i=typeof c=="function"?c:De(!!c),u):i},u.curve=function(c){return arguments.length?(o=c,a!=null&&(s=o(a)),u):o},u.context=function(c){return arguments.length?(c==null?a=s=null:s=o(a=c),u):a},u}class QN{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function V6(e){return new QN(e,!0)}function G6(e){return new QN(e,!1)}const tx={draw(e,t){const r=fn(t/Rd);e.moveTo(r,0),e.arc(0,0,r,0,Tp)}},Y6={draw(e,t){const r=fn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},JN=fn(1/3),X6=JN*2,Q6={draw(e,t){const r=fn(t/X6),n=r*JN;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},J6={draw(e,t){const r=fn(t),n=-r/2;e.rect(n,n,r,r)}},Z6=.8908130915292852,ZN=Dd(Rd/10)/Dd(7*Rd/10),eW=Dd(Tp/10)*ZN,tW=-KN(Tp/10)*ZN,rW={draw(e,t){const r=fn(t*Z6),n=eW*r,i=tW*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Tp*a/5,s=KN(o),l=Dd(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Qm=fn(3),nW={draw(e,t){const r=-fn(t/(Qm*3));e.moveTo(0,r*2),e.lineTo(-Qm*r,-r),e.lineTo(Qm*r,-r),e.closePath()}},Ar=-.5,_r=fn(3)/2,lg=1/fn(12),iW=(lg/2+1)*3,aW={draw(e,t){const r=fn(t/iW),n=r/2,i=r*lg,a=n,o=r*lg+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Ar*n-_r*i,_r*n+Ar*i),e.lineTo(Ar*a-_r*o,_r*a+Ar*o),e.lineTo(Ar*s-_r*l,_r*s+Ar*l),e.lineTo(Ar*n+_r*i,Ar*i-_r*n),e.lineTo(Ar*a+_r*o,Ar*o-_r*a),e.lineTo(Ar*s+_r*l,Ar*l-_r*s),e.closePath()}};function oW(e,t){let r=null,n=Zb(i);e=typeof e=="function"?e:De(e||tx),t=typeof t=="function"?t:De(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:De(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:De(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Ld(){}function Fd(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ek(e){this._context=e}ek.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Fd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sW(e){return new ek(e)}function tk(e){this._context=e}tk.prototype={areaStart:Ld,areaEnd:Ld,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lW(e){return new tk(e)}function rk(e){this._context=e}rk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uW(e){return new rk(e)}function nk(e){this._context=e}nk.prototype={areaStart:Ld,areaEnd:Ld,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cW(e){return new nk(e)}function PS(e){return e<0?-1:1}function ES(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(PS(a)+PS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function AS(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Jm(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Bd(e){this._context=e}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Jm(this,this._t0,AS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Jm(this,AS(this,r=ES(this,e,t)),r);break;default:Jm(this,this._t0,r=ES(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ik(e){this._context=new ak(e)}(ik.prototype=Object.create(Bd.prototype)).point=function(e,t){Bd.prototype.point.call(this,t,e)};function ak(e){this._context=e}ak.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function fW(e){return new Bd(e)}function dW(e){return new ik(e)}function ok(e){this._context=e}ok.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=_S(e),i=_S(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function pW(e){return new kp(e,.5)}function mW(e){return new kp(e,0)}function vW(e){return new kp(e,1)}function _s(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function yW(e,t){return e[t]}function gW(e){const t=[];return t.key=e,t}function bW(){var e=De([]),t=ug,r=_s,n=yW;function i(a){var o=Array.from(e.apply(this,arguments),gW),s,l=o.length,u=-1,f;for(const c of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _W(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var sk={symbolCircle:tx,symbolCross:Y6,symbolDiamond:Q6,symbolSquare:J6,symbolStar:rW,symbolTriangle:nW,symbolWye:aW},TW=Math.PI/180,NW=function(t){var r="symbol".concat(_p(t));return sk[r]||tx},kW=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*TW;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},CW=function(t,r){sk["symbol".concat(_p(t))]=r},Cp=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=AW(t,OW),u=NS(NS({},l),{},{type:n,size:a,sizeType:s}),f=function(){var g=NW(n),y=oW().type(g).size(kW(a,s,n));return y()},c=u.className,h=u.cx,p=u.cy,v=te(u,!0);return h===+h&&p===+p&&a===+a?k.createElement("path",cg({},v,{className:ue("recharts-symbols",c),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};Cp.registerSymbol=CW;function Ts(e){"@babel/helpers - typeof";return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function fg(){return fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=p.inactive?u:p.color;return k.createElement("li",fg({className:g,style:c,key:"legend-item-".concat(v)},Gi(n.props,p,v)),k.createElement(rg,{width:o,height:o,viewBox:f,style:h},n.renderIcon(p)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(y,p,v):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return k.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(P.PureComponent);Lu(rx,"displayName","Legend");Lu(rx,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UW=mp;function WW(){this.__data__=new UW,this.size=0}var HW=WW;function KW(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var qW=KW;function VW(e){return this.__data__.get(e)}var GW=VW;function YW(e){return this.__data__.has(e)}var XW=YW,QW=mp,JW=Hb,ZW=Kb,eH=200;function tH(e,t){var r=this.__data__;if(r instanceof QW){var n=r.__data__;if(!JW||n.lengths))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var c=-1,h=!0,p=r&OH?new bH:void 0;for(a.set(e,t),a.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=A9}var ox=_9,T9=ni,N9=ox,k9=ii,C9="[object Arguments]",$9="[object Array]",M9="[object Boolean]",I9="[object Date]",D9="[object Error]",R9="[object Function]",L9="[object Map]",F9="[object Number]",B9="[object Object]",z9="[object RegExp]",U9="[object Set]",W9="[object String]",H9="[object WeakMap]",K9="[object ArrayBuffer]",q9="[object DataView]",V9="[object Float32Array]",G9="[object Float64Array]",Y9="[object Int8Array]",X9="[object Int16Array]",Q9="[object Int32Array]",J9="[object Uint8Array]",Z9="[object Uint8ClampedArray]",e7="[object Uint16Array]",t7="[object Uint32Array]",Ue={};Ue[V9]=Ue[G9]=Ue[Y9]=Ue[X9]=Ue[Q9]=Ue[J9]=Ue[Z9]=Ue[e7]=Ue[t7]=!0;Ue[C9]=Ue[$9]=Ue[K9]=Ue[M9]=Ue[q9]=Ue[I9]=Ue[D9]=Ue[R9]=Ue[L9]=Ue[F9]=Ue[B9]=Ue[z9]=Ue[U9]=Ue[W9]=Ue[H9]=!1;function r7(e){return k9(e)&&N9(e.length)&&!!Ue[T9(e)]}var n7=r7;function i7(e){return function(t){return e(t)}}var gk=i7,Hd={exports:{}};Hd.exports;(function(e,t){var r=EN,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Hd,Hd.exports);var a7=Hd.exports,o7=n7,s7=gk,RS=a7,LS=RS&&RS.isTypedArray,l7=LS?s7(LS):o7,bk=l7,u7=d9,c7=ix,f7=hr,d7=yk,h7=ax,p7=bk,m7=Object.prototype,v7=m7.hasOwnProperty;function y7(e,t){var r=f7(e),n=!r&&c7(e),i=!r&&!n&&d7(e),a=!r&&!n&&!i&&p7(e),o=r||n||i||a,s=o?u7(e.length,String):[],l=s.length;for(var u in e)(t||v7.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||h7(u,l)))&&s.push(u);return s}var g7=y7,b7=Object.prototype;function x7(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||b7;return e===r}var w7=x7;function S7(e,t){return function(r){return e(t(r))}}var xk=S7,O7=xk,j7=O7(Object.keys,Object),P7=j7,E7=w7,A7=P7,_7=Object.prototype,T7=_7.hasOwnProperty;function N7(e){if(!E7(e))return A7(e);var t=[];for(var r in Object(e))T7.call(e,r)&&r!="constructor"&&t.push(r);return t}var k7=N7,C7=Ub,$7=ox;function M7(e){return e!=null&&$7(e.length)&&!C7(e)}var zc=M7,I7=g7,D7=k7,R7=zc;function L7(e){return R7(e)?I7(e):D7(e)}var $p=L7,F7=e9,B7=c9,z7=$p;function U7(e){return F7(e,z7,B7)}var W7=U7,FS=W7,H7=1,K7=Object.prototype,q7=K7.hasOwnProperty;function V7(e,t,r,n,i,a){var o=r&H7,s=FS(e),l=s.length,u=FS(t),f=u.length;if(l!=f&&!o)return!1;for(var c=l;c--;){var h=s[c];if(!(o?h in t:q7.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++c-1}var Kq=Hq;function qq(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=sV){var u=t?null:aV(e);if(u)return oV(u);o=!1,i=iV,l=new tV}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jV(e){return e.value}function PV(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var r=SV(t,pV);return k.createElement(rx,r)}var tO=1,on=function(e){function t(){var r;mV(this,t);for(var n=arguments.length,i=new Array(n),a=0;atO||Math.abs(i.height-this.lastBoundingBox.height)>tO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?$n({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,c,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();c={left:((u||0)-p.width)/2}}else c=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((f||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return $n($n({},c),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,c=$n($n({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return k.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(p){n.wrapperNode=p}},PV(a,$n($n({},this.props),{},{payload:Ak(f,u,jV)})))}}],[{key:"getWithHeight",value:function(n,i){var a=$n($n({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(P.PureComponent);Mp(on,"displayName","Legend");Mp(on,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var rO=Fc,EV=ix,AV=hr,nO=rO?rO.isConcatSpreadable:void 0;function _V(e){return AV(e)||EV(e)||!!(nO&&e&&e[nO])}var TV=_V,NV=mk,kV=TV;function Nk(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=kV),i||(i=[]);++a0&&r(s)?t>1?Nk(s,t-1,r,n,i):NV(i,s):n||(i[i.length]=s)}return i}var kk=Nk;function CV(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var $V=CV,MV=$V,IV=MV(),DV=IV,RV=DV,LV=$p;function FV(e,t){return e&&RV(e,t,LV)}var Ck=FV,BV=zc;function zV(e,t){return function(r,n){if(r==null)return r;if(!BV(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var tG=eG,rv=Vb,rG=Gb,nG=kn,iG=$k,aG=XV,oG=gk,sG=tG,lG=vl,uG=hr;function cG(e,t,r){t.length?t=rv(t,function(a){return uG(a)?function(o){return rG(o,a.length===1?a[0]:a)}:a}):t=[lG];var n=-1;t=rv(t,oG(nG));var i=iG(e,function(a,o,s){var l=rv(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return aG(i,function(a,o){return sG(a,o,r)})}var fG=cG;function dG(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var hG=dG,pG=hG,aO=Math.max;function mG(e,t,r){return t=aO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=aO(n.length-t,0),o=Array(a);++i0){if(++t>=PG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var TG=_G,NG=jG,kG=TG,CG=kG(NG),$G=CG,MG=vl,IG=vG,DG=$G;function RG(e,t){return DG(IG(e,t,MG),e+"")}var LG=RG,FG=Wb,BG=zc,zG=ax,UG=ea;function WG(e,t,r){if(!UG(r))return!1;var n=typeof t;return(n=="number"?BG(r)&&zG(t,r.length):n=="string"&&t in r)?FG(r[t],e):!1}var Ip=WG,HG=kk,KG=fG,qG=LG,sO=Ip,VG=qG(function(e,t){if(e==null)return[];var r=t.length;return r>1&&sO(e,t[0],t[1])?t=[]:r>2&&sO(t[0],t[1],t[2])&&(t=[t[0]]),KG(e,HG(t,1),[])}),GG=VG;const ux=Ee(GG);function Fu(e){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Dl,"-left"),q(r)&&t&&q(t.x)&&r=t.y),"".concat(Dl,"-top"),q(n)&&t&&q(t.y)&&nm?Math.max(f,l[n]):Math.max(c,l[n])}function uY(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function cY(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,c;return o.height>0&&o.width>0&&r?(f=cO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),c=cO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=uY({translateX:f,translateY:c,useTranslate3d:s})):u=sY,{cssProperties:u,cssClasses:lY({translateX:f,translateY:c,coordinate:r})}}function ks(e){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ks(e)}function fO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dO(e){for(var t=1;thO||Math.abs(n.height-this.state.lastBoundingBox.height)>hO)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,c=i.hasPayload,h=i.isAnimationActive,p=i.offset,v=i.position,m=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,b=i.wrapperStyle,x=cY({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),S=x.cssClasses,w=x.cssProperties,O=dO(dO({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&c?"visible":"hidden",position:"absolute",top:0,left:0},b);return k.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){n.wrapperNode=E}},u)}}])}(P.PureComponent),xY=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ta={isSsr:xY()};function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function pO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mO(e){for(var t=1;t0;return k.createElement(bY,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:f,hasPayload:O,offset:p,position:g,reverseDirection:y,useTranslate3d:b,viewBox:x,wrapperStyle:S},NY(u,mO(mO({},this.props),{},{payload:w})))}}])}(P.PureComponent);cx(It,"displayName","Tooltip");cx(It,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ta.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var kY=Nn,CY=function(){return kY.Date.now()},$Y=CY,MY=/\s/;function IY(e){for(var t=e.length;t--&&MY.test(e.charAt(t)););return t}var DY=IY,RY=DY,LY=/^\s+/;function FY(e){return e&&e.slice(0,RY(e)+1).replace(LY,"")}var BY=FY,zY=BY,vO=ea,UY=ul,yO=NaN,WY=/^[-+]0x[0-9a-f]+$/i,HY=/^0b[01]+$/i,KY=/^0o[0-7]+$/i,qY=parseInt;function VY(e){if(typeof e=="number")return e;if(UY(e))return yO;if(vO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zY(e);var r=HY.test(e);return r||KY.test(e)?qY(e.slice(2),r?2:8):WY.test(e)?yO:+e}var Fk=VY,GY=ea,iv=$Y,gO=Fk,YY="Expected a function",XY=Math.max,QY=Math.min;function JY(e,t,r){var n,i,a,o,s,l,u=0,f=!1,c=!1,h=!0;if(typeof e!="function")throw new TypeError(YY);t=gO(t)||0,GY(r)&&(f=!!r.leading,c="maxWait"in r,a=c?XY(gO(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(O){var j=n,E=i;return n=i=void 0,u=O,o=e.apply(E,j),o}function v(O){return u=O,s=setTimeout(y,t),f?p(O):o}function m(O){var j=O-l,E=O-u,A=t-j;return c?QY(A,a-E):A}function g(O){var j=O-l,E=O-u;return l===void 0||j>=t||j<0||c&&E>=a}function y(){var O=iv();if(g(O))return b(O);s=setTimeout(y,m(O))}function b(O){return s=void 0,h&&n?p(O):(n=i=void 0,o)}function x(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:b(iv())}function w(){var O=iv(),j=g(O);if(n=arguments,i=this,l=O,j){if(s===void 0)return v(l);if(c)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),o}return w.cancel=x,w.flush=S,w}var ZY=JY,eX=ZY,tX=ea,rX="Expected a function";function nX(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(rX);return tX(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),eX(e,t,{leading:n,maxWait:t,trailing:i})}var iX=nX;const Bk=Ee(iX);function zu(e){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(e)}function bO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(M=Bk(M,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(M),I=w.current.getBoundingClientRect(),D=I.width,z=I.height;return _(D,z),R.observe(w.current),function(){R.disconnect()}},[_,m]);var N=P.useMemo(function(){var M=A.containerWidth,R=A.containerHeight;if(M<0||R<0)return null;an(Oa(o)||Oa(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),an(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=Oa(o)?M:o,D=Oa(l)?R:l;r&&r>0&&(I?D=I/r:D&&(I=D*r),h&&D>h&&(D=h)),an(I>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,I,D,o,l,f,c,r);var z=!Array.isArray(p)&&qn(p.type).endsWith("Chart");return k.Children.map(p,function(C){return k.isValidElement(C)?P.cloneElement(C,wf({width:I,height:D},z?{style:wf({height:"100%",width:"100%",maxHeight:D,maxWidth:I},C.props.style)}:{})):C})},[r,p,l,h,c,f,A,o]);return k.createElement("div",{id:g?"".concat(g):void 0,className:ue("recharts-responsive-container",y),style:wf(wf({},S),{},{width:o,height:l,minWidth:f,minHeight:c,maxHeight:h}),ref:w},N)}),ho=function(t){return null};ho.displayName="Cell";function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function wO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Og(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ta.isSsr)return{width:0,height:0};var n=gX(r),i=JSON.stringify({text:t,copyStyle:n});if(_o.widthCache[i])return _o.widthCache[i];try{var a=document.getElementById(SO);a||(a=document.createElement("span"),a.setAttribute("id",SO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Og(Og({},yX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return _o.widthCache[i]=l,++_o.cacheCount>vX&&(_o.cacheCount=0,_o.widthCache={}),l}catch{return{width:0,height:0}}},bX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wu(e){"@babel/helpers - typeof";return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function Gd(e,t){return OX(e)||SX(e,t)||wX(e,t)||xX()}function xX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wX(e,t){if(e){if(typeof e=="string")return OO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OO(e,t)}}function OO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function RX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function TO(e,t){return zX(e)||BX(e,t)||FX(e,t)||LX()}function LX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FX(e,t){if(e){if(typeof e=="string")return NO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return NO(e,t)}}function NO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(D,z){var C=z.word,F=z.width,W=D[D.length-1];if(W&&(i==null||a||W.width+F+nz.width?D:z})};if(!f)return p;for(var m="…",g=function(I){var D=c.slice(0,I),z=Hk({breakAll:u,style:l,children:D+m}).wordsWithComputedWidth,C=h(z),F=C.length>o||v(C).width>Number(i);return[F,C]},y=0,b=c.length-1,x=0,S;y<=b&&x<=c.length-1;){var w=Math.floor((y+b)/2),O=w-1,j=g(O),E=TO(j,2),A=E[0],T=E[1],_=g(w),N=TO(_,1),M=N[0];if(!A&&!M&&(y=w+1),A&&M&&(b=w-1),!A&&M){S=T;break}x++}return S||p},kO=function(t){var r=ae(t)?[]:t.toString().split(Wk);return[{words:r}]},WX=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!ta.isSsr){var l,u,f=Hk({breakAll:o,children:i,style:a});if(f){var c=f.wordsWithComputedWidth,h=f.spaceWidth;l=c,u=h}else return kO(i);return UX({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return kO(i)},CO="#808080",Ja=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,c=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,v=t.verticalAnchor,m=v===void 0?"end":v,g=t.fill,y=g===void 0?CO:g,b=_O(t,IX),x=P.useMemo(function(){return WX({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:c,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,c,b.style,b.width]),S=b.dx,w=b.dy,O=b.angle,j=b.className,E=b.breakAll,A=_O(b,DX);if(!yt(n)||!yt(a))return null;var T=n+(q(S)?S:0),_=a+(q(w)?w:0),N;switch(m){case"start":N=av("calc(".concat(u,")"));break;case"middle":N=av("calc(".concat((x.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=av("calc(".concat(x.length-1," * -").concat(s,")"));break}var M=[];if(c){var R=x[0].width,I=b.width;M.push("scale(".concat((q(I)?I/R:1)/R,")"))}return O&&M.push("rotate(".concat(O,", ").concat(T,", ").concat(_,")")),M.length&&(A.transform=M.join(" ")),k.createElement("text",jg({},te(A,!0),{x:T,y:_,className:ue("recharts-text",j),textAnchor:p,fill:y.includes("url")?CO:y}),x.map(function(D,z){var C=D.words.join(E?"":" ");return k.createElement("tspan",{x:T,dy:z===0?N:s,key:"".concat(C,"-").concat(z)},C)}))};function Wi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function HX(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function fx(e){let t,r,n;e.length!==2?(t=Wi,r=(s,l)=>Wi(e(s),l),n=(s,l)=>e(s)-l):(t=e===Wi||e===HX?e:KX,r=e,n=e);function i(s,l,u=0,f=s.length){if(u>>1;r(s[c],l)<0?u=c+1:f=c}while(u>>1;r(s[c],l)<=0?u=c+1:f=c}while(uu&&n(s[c-1],l)>-n(s[c],l)?c-1:c}return{left:i,center:o,right:a}}function KX(){return 0}function Kk(e){return e===null?NaN:+e}function*qX(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const VX=fx(Wi),Uc=VX.right;fx(Kk).center;class $O extends Map{constructor(t,r=XX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(MO(this,t))}has(t){return super.has(MO(this,t))}set(t,r){return super.set(GX(this,t),r)}delete(t){return super.delete(YX(this,t))}}function MO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function GX({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function YX({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function XX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function QX(e=Wi){if(e===Wi)return qk;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function qk(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const JX=Math.sqrt(50),ZX=Math.sqrt(10),eQ=Math.sqrt(2);function Yd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=JX?10:a>=ZX?5:a>=eQ?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function DO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Vk(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?qk:QX(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,f=Math.log(l),c=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*c*(l-c)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*c/l+h)),v=Math.min(n,Math.floor(t+(l-u)*c/l+h));Vk(e,t,p,v,i)}const a=e[t];let o=r,s=n;for(Rl(e,r,t),i(e[n],a)>0&&Rl(e,r,n);o0;)--s}i(e[r],a)===0?Rl(e,r,s):(++s,Rl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Rl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function tQ(e,t,r){if(e=Float64Array.from(qX(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return DO(e);if(t>=1)return IO(e);var n,i=(n-1)*t,a=Math.floor(i),o=IO(Vk(e,a).subarray(0,a+1)),s=DO(e.subarray(a+1));return o+(s-o)*(i-a)}}function rQ(e,t,r=Kk){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function nQ(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Of(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Of(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=aQ.exec(e))?new ir(t[1],t[2],t[3],1):(t=oQ.exec(e))?new ir(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sQ.exec(e))?Of(t[1],t[2],t[3],t[4]):(t=lQ.exec(e))?Of(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=uQ.exec(e))?WO(t[1],t[2]/100,t[3]/100,1):(t=cQ.exec(e))?WO(t[1],t[2]/100,t[3]/100,t[4]):RO.hasOwnProperty(e)?BO(RO[e]):e==="transparent"?new ir(NaN,NaN,NaN,0):null}function BO(e){return new ir(e>>16&255,e>>8&255,e&255,1)}function Of(e,t,r,n){return n<=0&&(e=t=r=NaN),new ir(e,t,r,n)}function hQ(e){return e instanceof Wc||(e=Vu(e)),e?(e=e.rgb(),new ir(e.r,e.g,e.b,e.opacity)):new ir}function Tg(e,t,r,n){return arguments.length===1?hQ(e):new ir(e,t,r,n??1)}function ir(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}hx(ir,Tg,Yk(Wc,{brighter(e){return e=e==null?Xd:Math.pow(Xd,e),new ir(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ku:Math.pow(Ku,e),new ir(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ir(Fa(this.r),Fa(this.g),Fa(this.b),Qd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zO,formatHex:zO,formatHex8:pQ,formatRgb:UO,toString:UO}));function zO(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}`}function pQ(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}${ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function UO(){const e=Qd(this.opacity);return`${e===1?"rgb(":"rgba("}${Fa(this.r)}, ${Fa(this.g)}, ${Fa(this.b)}${e===1?")":`, ${e})`}`}function Qd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ja(e){return e=Fa(e),(e<16?"0":"")+e.toString(16)}function WO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new en(e,t,r,n)}function Xk(e){if(e instanceof en)return new en(e.h,e.s,e.l,e.opacity);if(e instanceof Wc||(e=Vu(e)),!e)return new en;if(e instanceof en)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new en(o,s,l,e.opacity)}function mQ(e,t,r,n){return arguments.length===1?Xk(e):new en(e,t,r,n??1)}function en(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}hx(en,mQ,Yk(Wc,{brighter(e){return e=e==null?Xd:Math.pow(Xd,e),new en(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ku:Math.pow(Ku,e),new en(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ir(ov(e>=240?e-240:e+120,i,n),ov(e,i,n),ov(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new en(HO(this.h),jf(this.s),jf(this.l),Qd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qd(this.opacity);return`${e===1?"hsl(":"hsla("}${HO(this.h)}, ${jf(this.s)*100}%, ${jf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function HO(e){return e=(e||0)%360,e<0?e+360:e}function jf(e){return Math.max(0,Math.min(1,e||0))}function ov(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const px=e=>()=>e;function vQ(e,t){return function(r){return e+r*t}}function yQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function gQ(e){return(e=+e)==1?Qk:function(t,r){return r-t?yQ(t,r,e):px(isNaN(t)?r:t)}}function Qk(e,t){var r=t-e;return r?vQ(e,r):px(isNaN(e)?t:e)}const KO=function e(t){var r=gQ(t);function n(i,a){var o=r((i=Tg(i)).r,(a=Tg(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=Qk(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return n.gamma=e,n}(1);function bQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Jd(n,i)})),r=sv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function NQ(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?kQ:NQ,l=u=null,c}function c(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return c.invert=function(h){return o(i((u||(u=s(t,e.map(n),Jd)))(h)))},c.domain=function(h){return arguments.length?(e=Array.from(h,Zd),f()):e.slice()},c.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},c.rangeRound=function(h){return t=Array.from(h),r=mx,f()},c.clamp=function(h){return arguments.length?(o=h?!0:Vt,f()):o!==Vt},c.interpolate=function(h){return arguments.length?(r=h,f()):r},c.unknown=function(h){return arguments.length?(a=h,c):a},function(h,p){return n=h,i=p,f()}}function vx(){return Dp()(Vt,Vt)}function CQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eh(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $s(e){return e=eh(Math.abs(e)),e?e[1]:NaN}function $Q(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function MQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var IQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gu(e){if(!(t=IQ.exec(e)))throw new Error("invalid format: "+e);var t;return new yx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Gu.prototype=yx.prototype;function yx(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}yx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function DQ(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Jk;function RQ(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(Jk=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+eh(e,Math.max(0,t+a-1))[0]}function VO(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const GO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:CQ,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>VO(e*100,t),r:VO,s:RQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function YO(e){return e}var XO=Array.prototype.map,QO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LQ(e){var t=e.grouping===void 0||e.thousands===void 0?YO:$Q(XO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?YO:MQ(XO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(c){c=Gu(c);var h=c.fill,p=c.align,v=c.sign,m=c.symbol,g=c.zero,y=c.width,b=c.comma,x=c.precision,S=c.trim,w=c.type;w==="n"?(b=!0,w="g"):GO[w]||(x===void 0&&(x=12),S=!0,w="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var O=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",j=m==="$"?n:/[%p]/.test(w)?o:"",E=GO[w],A=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function T(_){var N=O,M=j,R,I,D;if(w==="c")M=E(_)+M,_="";else{_=+_;var z=_<0||1/_<0;if(_=isNaN(_)?l:E(Math.abs(_),x),S&&(_=DQ(_)),z&&+_==0&&v!=="+"&&(z=!1),N=(z?v==="("?v:s:v==="-"||v==="("?"":v)+N,M=(w==="s"?QO[8+Jk/3]:"")+M+(z&&v==="("?")":""),A){for(R=-1,I=_.length;++RD||D>57){M=(D===46?i+_.slice(R+1):_.slice(R))+M,_=_.slice(0,R);break}}}b&&!g&&(_=t(_,1/0));var C=N.length+_.length+M.length,F=C>1)+N+_+M+F.slice(C);break;default:_=F+N+_+M;break}return a(_)}return T.toString=function(){return c+""},T}function f(c,h){var p=u((c=Gu(c),c.type="f",c)),v=Math.max(-8,Math.min(8,Math.floor($s(h)/3)))*3,m=Math.pow(10,-v),g=QO[8+v/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:f}}var Pf,gx,Zk;FQ({thousands:",",grouping:[3],currency:["$",""]});function FQ(e){return Pf=LQ(e),gx=Pf.format,Zk=Pf.formatPrefix,Pf}function BQ(e){return Math.max(0,-$s(Math.abs(e)))}function zQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($s(t)/3)))*3-$s(Math.abs(e)))}function UQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$s(t)-$s(e))+1}function eC(e,t,r,n){var i=Ag(e,t,r),a;switch(n=Gu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=zQ(i,o))&&(n.precision=a),Zk(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=UQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=BQ(i))&&(n.precision=a-(n.type==="%")*2);break}}return gx(n)}function ra(e){var t=e.domain;return e.ticks=function(r){var n=t();return Pg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return eC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,f=10;for(s0;){if(u=Eg(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function th(){var e=vx();return e.copy=function(){return Hc(e,th())},Hr.apply(e,arguments),ra(e)}function tC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Zd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return tC(e).unknown(t)},e=arguments.length?Array.from(e,Zd):[0,1],ra(r)}function rC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function VQ(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ej(e){return(t,r)=>-e(-t,r)}function bx(e){const t=e(JO,ZO),r=t.domain;let n=10,i,a;function o(){return i=VQ(n),a=qQ(n),r()[0]<0?(i=ej(i),a=ej(a),e(WQ,HQ)):e(JO,ZO),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],f=l[l.length-1];const c=f0){for(;h<=p;++h)for(v=1;vf)break;y.push(m)}}else for(;h<=p;++h)for(v=n-1;v>=1;--v)if(m=h>0?v/a(-h):v*a(h),!(mf)break;y.push(m)}y.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Gu(l)).precision==null&&(l.trim=!0),l=gx(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return f=>{let c=f/a(Math.round(i(f)));return c*nr(rC(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function nC(){const e=bx(Dp()).domain([1,10]);return e.copy=()=>Hc(e,nC()).base(e.base()),Hr.apply(e,arguments),e}function tj(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function rj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xx(e){var t=1,r=e(tj(t),rj(t));return r.constant=function(n){return arguments.length?e(tj(t=+n),rj(t)):t},ra(r)}function iC(){var e=xx(Dp());return e.copy=function(){return Hc(e,iC()).constant(e.constant())},Hr.apply(e,arguments)}function nj(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function GQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function YQ(e){return e<0?-e*e:e*e}function wx(e){var t=e(Vt,Vt),r=1;function n(){return r===1?e(Vt,Vt):r===.5?e(GQ,YQ):e(nj(r),nj(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ra(t)}function Sx(){var e=wx(Dp());return e.copy=function(){return Hc(e,Sx()).exponent(e.exponent())},Hr.apply(e,arguments),e}function XQ(){return Sx.apply(null,arguments).exponent(.5)}function ij(e){return Math.sign(e)*e*e}function QQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function aC(){var e=vx(),t=[0,1],r=!1,n;function i(a){var o=QQ(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(ij(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Zd)).map(ij)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return aC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Hr.apply(i,arguments),ra(i)}function oC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return sC().domain([e,t]).range(i).unknown(a)},Hr.apply(ra(o),arguments)}function lC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Uc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return lC().domain(e).range(t).unknown(r)},Hr.apply(i,arguments)}const lv=new Date,uv=new Date;function gt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(ugt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(lv.setTime(+a),uv.setTime(+o),e(lv),e(uv),Math.floor(r(lv,uv))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const rh=gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);rh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):rh);rh.range;const Un=1e3,Rr=Un*60,Wn=Rr*60,Jn=Wn*24,Ox=Jn*7,aj=Jn*30,cv=Jn*365,Pa=gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Un)},(e,t)=>(t-e)/Un,e=>e.getUTCSeconds());Pa.range;const jx=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Un)},(e,t)=>{e.setTime(+e+t*Rr)},(e,t)=>(t-e)/Rr,e=>e.getMinutes());jx.range;const Px=gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Rr)},(e,t)=>(t-e)/Rr,e=>e.getUTCMinutes());Px.range;const Ex=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Un-e.getMinutes()*Rr)},(e,t)=>{e.setTime(+e+t*Wn)},(e,t)=>(t-e)/Wn,e=>e.getHours());Ex.range;const Ax=gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Wn)},(e,t)=>(t-e)/Wn,e=>e.getUTCHours());Ax.range;const Kc=gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Rr)/Jn,e=>e.getDate()-1);Kc.range;const Rp=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jn,e=>e.getUTCDate()-1);Rp.range;const uC=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jn,e=>Math.floor(e/Jn));uC.range;function po(e){return gt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Rr)/Ox)}const Lp=po(0),nh=po(1),JQ=po(2),ZQ=po(3),Ms=po(4),eJ=po(5),tJ=po(6);Lp.range;nh.range;JQ.range;ZQ.range;Ms.range;eJ.range;tJ.range;function mo(e){return gt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ox)}const Fp=mo(0),ih=mo(1),rJ=mo(2),nJ=mo(3),Is=mo(4),iJ=mo(5),aJ=mo(6);Fp.range;ih.range;rJ.range;nJ.range;Is.range;iJ.range;aJ.range;const _x=gt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());_x.range;const Tx=gt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Tx.range;const Zn=gt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Zn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Zn.range;const ei=gt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ei.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ei.range;function cC(e,t,r,n,i,a){const o=[[Pa,1,Un],[Pa,5,5*Un],[Pa,15,15*Un],[Pa,30,30*Un],[a,1,Rr],[a,5,5*Rr],[a,15,15*Rr],[a,30,30*Rr],[i,1,Wn],[i,3,3*Wn],[i,6,6*Wn],[i,12,12*Wn],[n,1,Jn],[n,2,2*Jn],[r,1,Ox],[t,1,aj],[t,3,3*aj],[e,1,cv]];function s(u,f,c){const h=fg).right(o,h);if(p===o.length)return e.every(Ag(u/cv,f/cv,c));if(p===0)return rh.every(Math.max(Ag(u,f,c),1));const[v,m]=o[h/o[p-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(ge=dv(Ll(U.y,0,1)),ct=ge.getUTCDay(),ge=ct>4||ct===0?ih.ceil(ge):ih(ge),ge=Rp.offset(ge,(U.V-1)*7),U.y=ge.getUTCFullYear(),U.m=ge.getUTCMonth(),U.d=ge.getUTCDate()+(U.w+6)%7):(ge=fv(Ll(U.y,0,1)),ct=ge.getDay(),ge=ct>4||ct===0?nh.ceil(ge):nh(ge),ge=Kc.offset(ge,(U.V-1)*7),U.y=ge.getFullYear(),U.m=ge.getMonth(),U.d=ge.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),ct="Z"in U?dv(Ll(U.y,0,1)).getUTCDay():fv(Ll(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(ct+5)%7:U.w+U.U*7-(ct+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,dv(U)):fv(U)}}function E(G,se,le,U){for(var Ze=0,ge=se.length,ct=le.length,ft,Jt;Ze=ct)return-1;if(ft=se.charCodeAt(Ze++),ft===37){if(ft=se.charAt(Ze++),Jt=w[ft in oj?se.charAt(Ze++):ft],!Jt||(U=Jt(G,le,U))<0)return-1}else if(ft!=le.charCodeAt(U++))return-1}return U}function A(G,se,le){var U=u.exec(se.slice(le));return U?(G.p=f.get(U[0].toLowerCase()),le+U[0].length):-1}function T(G,se,le){var U=p.exec(se.slice(le));return U?(G.w=v.get(U[0].toLowerCase()),le+U[0].length):-1}function _(G,se,le){var U=c.exec(se.slice(le));return U?(G.w=h.get(U[0].toLowerCase()),le+U[0].length):-1}function N(G,se,le){var U=y.exec(se.slice(le));return U?(G.m=b.get(U[0].toLowerCase()),le+U[0].length):-1}function M(G,se,le){var U=m.exec(se.slice(le));return U?(G.m=g.get(U[0].toLowerCase()),le+U[0].length):-1}function R(G,se,le){return E(G,t,se,le)}function I(G,se,le){return E(G,r,se,le)}function D(G,se,le){return E(G,n,se,le)}function z(G){return o[G.getDay()]}function C(G){return a[G.getDay()]}function F(G){return l[G.getMonth()]}function W(G){return s[G.getMonth()]}function V(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function Y(G){return o[G.getUTCDay()]}function re(G){return a[G.getUTCDay()]}function xe(G){return l[G.getUTCMonth()]}function Ke(G){return s[G.getUTCMonth()]}function Se(G){return i[+(G.getUTCHours()>=12)]}function Pt(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",x);return se.toString=function(){return G},se},parse:function(G){var se=j(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=j(G+="",!0);return se.toString=function(){return G},se}}}var oj={"-":"",_:" ",0:"0"},jt=/^\s*\d+/,fJ=/^%/,dJ=/[\\^$*+?|[\]().{}]/g;function we(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function pJ(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function mJ(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function vJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function yJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function gJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function sj(e,t,r){var n=jt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function lj(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function bJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function xJ(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function wJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function uj(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function SJ(e,t,r){var n=jt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function cj(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function OJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function jJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function PJ(e,t,r){var n=jt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function EJ(e,t,r){var n=jt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function AJ(e,t,r){var n=fJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _J(e,t,r){var n=jt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function TJ(e,t,r){var n=jt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function fj(e,t){return we(e.getDate(),t,2)}function NJ(e,t){return we(e.getHours(),t,2)}function kJ(e,t){return we(e.getHours()%12||12,t,2)}function CJ(e,t){return we(1+Kc.count(Zn(e),e),t,3)}function fC(e,t){return we(e.getMilliseconds(),t,3)}function $J(e,t){return fC(e,t)+"000"}function MJ(e,t){return we(e.getMonth()+1,t,2)}function IJ(e,t){return we(e.getMinutes(),t,2)}function DJ(e,t){return we(e.getSeconds(),t,2)}function RJ(e){var t=e.getDay();return t===0?7:t}function LJ(e,t){return we(Lp.count(Zn(e)-1,e),t,2)}function dC(e){var t=e.getDay();return t>=4||t===0?Ms(e):Ms.ceil(e)}function FJ(e,t){return e=dC(e),we(Ms.count(Zn(e),e)+(Zn(e).getDay()===4),t,2)}function BJ(e){return e.getDay()}function zJ(e,t){return we(nh.count(Zn(e)-1,e),t,2)}function UJ(e,t){return we(e.getFullYear()%100,t,2)}function WJ(e,t){return e=dC(e),we(e.getFullYear()%100,t,2)}function HJ(e,t){return we(e.getFullYear()%1e4,t,4)}function KJ(e,t){var r=e.getDay();return e=r>=4||r===0?Ms(e):Ms.ceil(e),we(e.getFullYear()%1e4,t,4)}function qJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+we(t/60|0,"0",2)+we(t%60,"0",2)}function dj(e,t){return we(e.getUTCDate(),t,2)}function VJ(e,t){return we(e.getUTCHours(),t,2)}function GJ(e,t){return we(e.getUTCHours()%12||12,t,2)}function YJ(e,t){return we(1+Rp.count(ei(e),e),t,3)}function hC(e,t){return we(e.getUTCMilliseconds(),t,3)}function XJ(e,t){return hC(e,t)+"000"}function QJ(e,t){return we(e.getUTCMonth()+1,t,2)}function JJ(e,t){return we(e.getUTCMinutes(),t,2)}function ZJ(e,t){return we(e.getUTCSeconds(),t,2)}function eZ(e){var t=e.getUTCDay();return t===0?7:t}function tZ(e,t){return we(Fp.count(ei(e)-1,e),t,2)}function pC(e){var t=e.getUTCDay();return t>=4||t===0?Is(e):Is.ceil(e)}function rZ(e,t){return e=pC(e),we(Is.count(ei(e),e)+(ei(e).getUTCDay()===4),t,2)}function nZ(e){return e.getUTCDay()}function iZ(e,t){return we(ih.count(ei(e)-1,e),t,2)}function aZ(e,t){return we(e.getUTCFullYear()%100,t,2)}function oZ(e,t){return e=pC(e),we(e.getUTCFullYear()%100,t,2)}function sZ(e,t){return we(e.getUTCFullYear()%1e4,t,4)}function lZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Is(e):Is.ceil(e),we(e.getUTCFullYear()%1e4,t,4)}function uZ(){return"+0000"}function hj(){return"%"}function pj(e){return+e}function mj(e){return Math.floor(+e/1e3)}var To,mC,vC;cZ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function cZ(e){return To=cJ(e),mC=To.format,To.parse,vC=To.utcFormat,To.utcParse,To}function fZ(e){return new Date(e)}function dZ(e){return e instanceof Date?+e:+new Date(+e)}function Nx(e,t,r,n,i,a,o,s,l,u){var f=vx(),c=f.invert,h=f.domain,p=u(".%L"),v=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),b=u("%b %d"),x=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>tQ(e,a/n))},r.copy=function(){return xC(t).domain(e)},ai.apply(r,arguments)}function zp(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Vt,f,c=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+f(m))-a)*(n*mt}var jC=bZ,xZ=Up,wZ=jC,SZ=vl;function OZ(e){return e&&e.length?xZ(e,SZ,wZ):void 0}var jZ=OZ;const Wp=Ee(jZ);function PZ(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*We;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Vn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return Me(Vn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return ut(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(gr))throw Error(zr+"NaN");if(r.s<1)throw Error(zr+(r.s?"NaN":"-Infinity"));return r.eq(gr)?new n(0):(Ve=!1,t=Vn(Yu(r,a),Yu(e,a),a),Ve=!0,Me(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?TC(t,e):AC(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(zr+"NaN");return r.s?(Ve=!1,t=Vn(r,e,0,1).times(e),Ve=!0,r.minus(t)):Me(new n(r),i)};J.naturalExponential=J.exp=function(){return _C(this)};J.naturalLogarithm=J.ln=function(){return Yu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?AC(t,e):TC(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ba+e);if(t=ut(i)+1,n=i.d.length-1,r=n*We+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(zr+"NaN")}for(e=ut(s),Ve=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Sn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=xl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Vn(s,a,o+2)).times(.5),Sn(a.d).slice(0,o)===(t=Sn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Me(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ve=!0,Me(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,f=this,c=f.constructor,h=f.d,p=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,r=f.e+e.e,l=h.length,u=p.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+p[n]*h[i-n-1]+t,a[i--]=s%xt|0,t=s/xt|0;a[i]=(a[i]+t)%xt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ve?Me(e,c.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Tn(e,0,bl),t===void 0?t=n.rounding:Tn(t,0,8),Me(r,e+ut(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Za(n,!0):(Tn(e,0,bl),t===void 0?t=i.rounding:Tn(t,0,8),n=Me(new i(n),e+1,t),r=Za(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Za(i):(Tn(e,0,bl),t===void 0?t=a.rounding:Tn(t,0,8),n=Me(new a(i),e+ut(i)+1,t),r=Za(n.abs(),!1,e+ut(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return Me(new t(e),ut(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(gr);if(s=new l(s),!s.s){if(e.s<1)throw Error(zr+"Infinity");return s}if(s.eq(gr))return s;if(n=l.precision,e.eq(gr))return Me(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=f<0?-f:f)<=EC){for(i=new l(gr),t=Math.ceil(n/We+4),Ve=!1;r%2&&(i=i.times(s),gj(i.d,t)),r=xl(r/2),r!==0;)s=s.times(s),gj(s.d,t);return Ve=!0,e.s<0?new l(gr).div(i):Me(i,n)}}else if(a<0)throw Error(zr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ve=!1,i=e.times(Yu(s,n+u)),Ve=!0,i=_C(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ut(i),n=Za(i,r<=a.toExpNeg||r>=a.toExpPos)):(Tn(e,1,bl),t===void 0?t=a.rounding:Tn(t,0,8),i=Me(new a(i),e,t),r=ut(i),n=Za(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Tn(e,1,bl),t===void 0?t=n.rounding:Tn(t,0,8)),Me(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ut(e),r=e.constructor;return Za(e,t<=r.toExpNeg||t>=r.toExpPos)};function AC(e,t){var r,n,i,a,o,s,l,u,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ve?Me(t,c):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(c/We),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/xt|0,l[a]%=xt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ve?Me(t,c):t}function Tn(e,t,r){if(e!==~~e||er)throw Error(Ba+e)}function Sn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,f,c,h,p,v,m,g,y,b,x,S,w,O,j,E,A=n.constructor,T=n.s==i.s?1:-1,_=n.d,N=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(zr+"Division by zero");for(l=n.e-i.e,j=N.length,w=_.length,p=new A(T),v=p.d=[],u=0;N[u]==(_[u]||0);)++u;if(N[u]>(_[u]||0)&&--l,a==null?b=a=A.precision:o?b=a+(ut(n)-ut(i))+1:b=a,b<0)return new A(0);if(b=b/We+2|0,u=0,j==1)for(f=0,N=N[0],b++;(u1&&(N=e(N,f),_=e(_,f),j=N.length,w=_.length),S=j,m=_.slice(0,j),g=m.length;g=xt/2&&++O;do f=0,s=t(N,m,j,g),s<0?(y=m[0],j!=g&&(y=y*xt+(m[1]||0)),f=y/O|0,f>1?(f>=xt&&(f=xt-1),c=e(N,f),h=c.length,g=m.length,s=t(c,m,h,g),s==1&&(f--,r(c,j16)throw Error($x+ut(e));if(!e.s)return new f(gr);for(Ve=!1,s=c,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(va(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new f(gr),f.precision=s;;){if(i=Me(i.times(e),s),r=r.times(++l),o=a.plus(Vn(i,r,s)),Sn(o.d).slice(0,s)===Sn(a.d).slice(0,s)){for(;u--;)a=Me(a.times(a),s);return f.precision=c,t==null?(Ve=!0,Me(a,c)):a}a=o}}function ut(e){for(var t=e.e*We,r=e.d[0];r>=10;r/=10)t++;return t}function hv(e,t,r){if(t>e.LN10.sd())throw Ve=!0,r&&(e.precision=r),Error(zr+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function vi(e){for(var t="";e--;)t+="0";return t}function Yu(e,t){var r,n,i,a,o,s,l,u,f,c=1,h=10,p=e,v=p.d,m=p.constructor,g=m.precision;if(p.s<1)throw Error(zr+(p.s?"NaN":"-Infinity"));if(p.eq(gr))return new m(0);if(t==null?(Ve=!1,u=g):u=t,p.eq(10))return t==null&&(Ve=!0),hv(m,u);if(u+=h,m.precision=u,r=Sn(v),n=r.charAt(0),a=ut(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Sn(p.d),n=r.charAt(0),c++;a=ut(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=hv(m,u+2,g).times(a+""),p=Yu(new m(n+"."+r.slice(1)),u-h).plus(l),m.precision=g,t==null?(Ve=!0,Me(p,g)):p;for(s=o=p=Vn(p.minus(gr),p.plus(gr),u),f=Me(p.times(p),u),i=3;;){if(o=Me(o.times(f),u),l=s.plus(Vn(o,new m(i),u)),Sn(l.d).slice(0,u)===Sn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(hv(m,u+2,g).times(a+""))),s=Vn(s,new m(c),u),m.precision=g,t==null?(Ve=!0,Me(s,g)):s;s=l,i+=2}}function yj(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=xl(r/We),e.d=[],n=(r+1)%We,r<0&&(n+=We),nah||e.e<-ah))throw Error($x+r)}else e.s=0,e.e=0,e.d=[0];return e}function Me(e,t,r){var n,i,a,o,s,l,u,f,c=e.d;for(o=1,a=c[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=We,i=t,u=c[f=0];else{if(f=Math.ceil((n+1)/We),a=c.length,f>=a)return e;for(u=a=c[f],o=1;a>=10;a/=10)o++;n%=We,i=n-We+o}if(r!==void 0&&(a=va(10,o-i-1),s=u/a%10|0,l=t<0||c[f+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/va(10,o-i):0:c[f-1])%10&1||r==(e.s<0?8:7))),t<1||!c[0])return l?(a=ut(e),c.length=1,t=t-a-1,c[0]=va(10,(We-t%We)%We),e.e=xl(-t/We)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(n==0?(c.length=f,a=1,f--):(c.length=f+1,a=va(10,We-n),c[f]=i>0?(u/va(10,o-i)%va(10,i)|0)*a:0),l)for(;;)if(f==0){(c[0]+=a)==xt&&(c[0]=1,++e.e);break}else{if(c[f]+=a,c[f]!=xt)break;c[f--]=0,a=1}for(n=c.length;c[--n]===0;)c.pop();if(Ve&&(e.e>ah||e.e<-ah))throw Error($x+ut(e));return e}function TC(e,t){var r,n,i,a,o,s,l,u,f,c,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ve?Me(t,p):t;if(l=e.d,c=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(f=o<0,f?(r=l,o=-o,s=c.length):(r=c,n=u,s=l.length),i=Math.max(Math.ceil(p/We),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=c.length,f=i0;--i)l[s++]=0;for(i=c.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+vi(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+vi(-i-1)+a,r&&(n=r-o)>0&&(a+=vi(n))):i>=o?(a+=vi(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+vi(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=vi(n))),e.s<0?"-"+a:a}function gj(e,t){if(e.length>t)return e.length=t,!0}function NC(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ba+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return yj(o,a.toString())}else if(typeof a!="string")throw Error(Ba+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,qZ.test(a))yj(o,a);else throw Error(Ba+a)}if(i.prototype=J,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=NC,i.config=i.set=VZ,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ba+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ba+r+": "+n);return this}var Mx=NC(KZ);gr=new Mx(1);const Ce=Mx;function GZ(e){return JZ(e)||QZ(e)||XZ(e)||YZ()}function YZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XZ(e,t){if(e){if(typeof e=="string")return Cg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cg(e,t)}}function QZ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function JZ(e){if(Array.isArray(e))return Cg(e)}function Cg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,bj(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function hee(e){if(Array.isArray(e))return e}function IC(e){var t=Xu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function DC(e,t,r){if(e.lte(0))return new Ce(0);var n=qp.getDigitCount(e.toNumber()),i=new Ce(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Ce(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new Ce(Math.ceil(l))}function pee(e,t,r){var n=1,i=new Ce(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Ce(10).pow(qp.getDigitCount(e)-1),i=new Ce(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ce(Math.floor(e)))}else e===0?i=new Ce(Math.floor((t-1)/2)):r||(i=new Ce(Math.floor(e)));var o=Math.floor((t-1)/2),s=ree(tee(function(l){return i.add(new Ce(l-o).mul(n)).toNumber()}),$g);return s(0,t)}function RC(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ce(0),tickMin:new Ce(0),tickMax:new Ce(0)};var a=DC(new Ce(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new Ce(0):(o=new Ce(e).add(t).div(2),o=o.sub(new Ce(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Ce(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?RC(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new Ce(s).mul(a)),tickMax:o.add(new Ce(l).mul(a))})}function mee(e){var t=Xu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=IC([r,n]),l=Xu(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var c=f===1/0?[u].concat(Ig($g(0,i-1).map(function(){return 1/0}))):[].concat(Ig($g(0,i-1).map(function(){return-1/0})),[f]);return r>n?Mg(c):c}if(u===f)return pee(u,i,a);var h=RC(u,f,o,a),p=h.step,v=h.tickMin,m=h.tickMax,g=qp.rangeStep(v,m.add(new Ce(.1).mul(p)),p);return r>n?Mg(g):g}function vee(e,t){var r=Xu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=IC([n,i]),s=Xu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var f=Math.max(t,2),c=DC(new Ce(u).sub(l).div(f-1),a,0),h=[].concat(Ig(qp.rangeStep(new Ce(l),new Ce(u).sub(new Ce(.99).mul(c)),c)),[u]);return n>i?Mg(h):h}var yee=$C(mee),gee=$C(vee),bee="Invariant failed";function eo(e,t){throw new Error(bee)}var xee=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ds(e){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(e)}function oh(){return oh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Aee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,c=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Kt(c-f)!==Kt(h-c)){var v=[];if(Kt(h-c)===Kt(l[1]-l[0])){p=h;var m=c+l[1]-l[0];v[0]=Math.min(m,(m+f)/2),v[1]=Math.max(m,(m+f)/2)}else{p=f;var g=h+l[1]-l[0];v[0]=Math.min(c,(g+c)/2),v[1]=Math.max(c,(g+c)/2)}var y=[Math.min(c,(p+c)/2),Math.max(c,(p+c)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var b=Math.min(f,h),x=Math.max(f,h);if(t>(b+c)/2&&t<=(x+c)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Ix=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?rt(rt({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},qee=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(y&&y.length){var b=y[0].type.defaultProps,x=b!==void 0?rt(rt({},b),y[0].props):y[0].props,S=x.barSize,w=x[g];o[w]||(o[w]=[]);var O=ae(S)?r:S;o[w].push({item:y[0],stackList:y.slice(1),barSize:ae(O)?void 0:qt(O,n,0)})}}return o},Vee=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=qt(r,i,0,!0),f,c=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/l,v=o.reduce(function(S,w){return S+w.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&p>0&&(h=!0,p*=.9,v=l*p);var m=(i-v)/2>>0,g={offset:m-u,size:0};f=o.reduce(function(S,w){var O={item:w.item,position:{offset:g.offset+g.size+u,size:h?p:w.barSize}},j=[].concat(Sj(S),[O]);return g=j[j.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){j.push({item:E,position:g})}),j},c)}else{var y=qt(n,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var b=(i-2*y-(l-1)*u)/l;b>1&&(b>>=0);var x=s===+s?Math.min(b,s):b;f=o.reduce(function(S,w,O){var j=[].concat(Sj(S),[{item:w.item,position:{offset:y+(b+u)*O+(b-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){j.push({item:E,position:j[j.length-1].position})}),j},c)}return f},Gee=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=zC({children:a,legendWidth:l});if(u){var f=i||{},c=f.width,h=f.height,p=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&p!=="center"&&q(t[p]))return rt(rt({},t),{},os({},p,t[p]+(c||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&v!=="middle"&&q(t[v]))return rt(rt({},t),{},os({},v,t[v]+(h||0)))}return t},Yee=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},UC=function(t,r,n,i,a){var o=r.props.children,s=Yt(o,wl).filter(function(u){return Yee(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var c=Xe(f,n);if(ae(c))return u;var h=Array.isArray(c)?[Hp(c),Wp(c)]:[c,c],p=l.reduce(function(v,m){var g=Xe(f,m,0),y=h[0]-Math.abs(Array.isArray(g)?g[0]:g),b=h[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,v[0]),Math.max(b,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},Xee=function(t,r,n,i,a){var o=r.map(function(s){return UC(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},WC=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&UC(t,l,u,i)||uu(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var f=0,c=u.length;f=2?Kt(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var h=a?a.indexOf(c):c;return{coordinate:i(h)+u,value:c,offset:u}});return f.filter(function(c){return!Bc(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,h){return{coordinate:i(c)+u,value:c,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(c){return{coordinate:i(c)+u,value:c,offset:u}}):i.domain().map(function(c,h){return{coordinate:i(c)+u,value:a?a[c]:c,index:h,offset:u}})},pv=new WeakMap,Ef=function(t,r){if(typeof r!="function")return t;pv.has(t)||pv.set(t,new WeakMap);var n=pv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},qC=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Hu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:th(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:lu(),realScaleType:"point"}:a==="category"?{scale:Hu(),realScaleType:"band"}:{scale:th(),realScaleType:"linear"};if(Xa(i)){var l="scale".concat(_p(i));return{scale:(vj[l]||lu)(),realScaleType:vj[l]?l:"point"}}return oe(i)?{scale:i}:{scale:lu(),realScaleType:"point"}},jj=1e-4,VC=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-jj,o=Math.max(i[0],i[1])+jj,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},Qee=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},ete=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},tte={sign:Zee,expand:xW,none:_s,silhouette:wW,wiggle:SW,positive:ete},rte=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=tte[n],o=bW().keys(i).value(function(s,l){return+Xe(s,l,0)}).order(ug).offset(a);return o(t)},nte=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(c,h){var p,v=(p=h.type)!==null&&p!==void 0&&p.defaultProps?rt(rt({},h.type.defaultProps),h.props):h.props,m=v.stackId,g=v.hide;if(g)return c;var y=v[n],b=c[y]||{hasStack:!1,stackGroups:{}};if(yt(m)){var x=b.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};x.items.push(h),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[fo("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return rt(rt({},c),{},os({},y,b))},l),f={};return Object.keys(u).reduce(function(c,h){var p=u[h];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,g){var y=p.stackGroups[g];return rt(rt({},m),{},os({},g,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:rte(t,y.items,a)}))},v)}return rt(rt({},c),{},os({},h,p))},f)},GC=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=yee(u,a,s);return t.domain([Hp(f),Wp(f)]),{niceTicks:f}}if(a&&i==="number"){var c=t.domain(),h=gee(c,a,s);return{niceTicks:h}}return null};function lh(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=Md(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Xe(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var Pj=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Xe(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},ite=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},ate=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?rt(rt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(yt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},ote=function(t){return t.reduce(function(r,n){return[Hp(n.concat([r[0]]).filter(q)),Wp(n.concat([r[1]]).filter(q))]},[1/0,-1/0])},YC=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,f){var c=ote(f.slice(r,n+1));return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Ej=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Aj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fg=function(t,r,n){if(oe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(Ej.test(t[0])){var a=+Ej.exec(t[0])[1];i[0]=r[0]-a}else oe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(Aj.test(t[1])){var o=+Aj.exec(t[1])[1];i[1]=r[1]+o}else oe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},uh=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=ux(r,function(c){return c.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},mte=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=qt(t.cx,o,o/2),c=qt(t.cy,s,s/2),h=JC(o,s,n),p=qt(t.innerRadius,h,0),v=qt(t.outerRadius,h,h*.8),m=Object.keys(r);return m.reduce(function(g,y){var b=r[y],x=b.domain,S=b.reversed,w;if(ae(b.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[p,v]),S&&(w=[w[1],w[0]]);else{w=b.range;var O=w,j=ute(O,2);l=j[0],u=j[1]}var E=qC(b,a),A=E.realScaleType,T=E.scale;T.domain(x).range(w),VC(T);var _=GC(T,Dn(Dn({},b),{},{realScaleType:A})),N=Dn(Dn(Dn({},b),_),{},{range:w,radius:v,realScaleType:A,scale:T,cx:f,cy:c,innerRadius:p,outerRadius:v,startAngle:l,endAngle:u});return Dn(Dn({},g),{},QC({},y,N))},{})},vte=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},yte=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=vte({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:pte(u),angleInRadian:u}},gte=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},bte=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},kj=function(t,r){var n=t.x,i=t.y,a=yte({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var f=gte(r),c=f.startAngle,h=f.endAngle,p=s,v;if(c<=h){for(;p>h;)p-=360;for(;p=c&&p<=h}else{for(;p>c;)p-=360;for(;p=h&&p<=c}return v?Dn(Dn({},r),{},{radius:o,angle:bte(p,r)}):null},ZC=function(t){return!P.isValidElement(t)&&!oe(t)&&typeof t!="boolean"?t.className:""};function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}var xte=["offset"];function wte(e){return Pte(e)||jte(e)||Ote(e)||Ste()}function Ste(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ote(e,t){if(e){if(typeof e=="string")return Bg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bg(e,t)}}function jte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pte(e){if(Array.isArray(e))return Bg(e)}function Bg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ate(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Cj(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pt(e){for(var t=1;t=0?1:-1,x,S;i==="insideStart"?(x=p+b*o,S=m):i==="insideEnd"?(x=v-b*o,S=!m):i==="end"&&(x=v+b*o,S=m),S=y<=0?S:!S;var w=Be(u,f,g,x),O=Be(u,f,g,x+(S?1:-1)*359),j="M".concat(w.x,",").concat(w.y,` - A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`, - `).concat(O.x,",").concat(O.y),E=ae(t.id)?fo("recharts-radial-line-"):t.id;return k.createElement("text",tc({},n,{dominantBaseline:"central",className:ue("recharts-radial-bar-label",s)}),k.createElement("defs",null,k.createElement("path",{id:E,d:j})),k.createElement("textPath",{xlinkHref:"#".concat(E)},r))},Mte=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,c=a.endAngle,h=(f+c)/2;if(i==="outside"){var p=Be(o,s,u+n,h),v=p.x,m=p.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=Be(o,s,g,h),b=y.x,x=y.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},Ite=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,f=o.height,c=f>=0?1:-1,h=c*i,p=c>0?"end":"start",v=c>0?"start":"end",m=u>=0?1:-1,g=m*i,y=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var x={x:s+u/2,y:l-c*i,textAnchor:"middle",verticalAnchor:p};return pt(pt({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+f+h,textAnchor:"middle",verticalAnchor:v};return pt(pt({},S),n?{height:Math.max(n.y+n.height-(l+f),0),width:u}:{})}if(a==="left"){var w={x:s-g,y:l+f/2,textAnchor:y,verticalAnchor:"middle"};return pt(pt({},w),n?{width:Math.max(w.x-n.x,0),height:f}:{})}if(a==="right"){var O={x:s+u+g,y:l+f/2,textAnchor:b,verticalAnchor:"middle"};return pt(pt({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:f}:{})}var j=n?{width:u,height:f}:{};return a==="insideLeft"?pt({x:s+g,y:l+f/2,textAnchor:b,verticalAnchor:"middle"},j):a==="insideRight"?pt({x:s+u-g,y:l+f/2,textAnchor:y,verticalAnchor:"middle"},j):a==="insideTop"?pt({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:v},j):a==="insideBottom"?pt({x:s+u/2,y:l+f-h,textAnchor:"middle",verticalAnchor:p},j):a==="insideTopLeft"?pt({x:s+g,y:l+h,textAnchor:b,verticalAnchor:v},j):a==="insideTopRight"?pt({x:s+u-g,y:l+h,textAnchor:y,verticalAnchor:v},j):a==="insideBottomLeft"?pt({x:s+g,y:l+f-h,textAnchor:b,verticalAnchor:p},j):a==="insideBottomRight"?pt({x:s+u-g,y:l+f-h,textAnchor:y,verticalAnchor:p},j):cl(a)&&(q(a.x)||Oa(a.x))&&(q(a.y)||Oa(a.y))?pt({x:s+qt(a.x,u),y:l+qt(a.y,f),textAnchor:"end",verticalAnchor:"end"},j):pt({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},j)},Dte=function(t){return"cx"in t&&q(t.cx)};function St(e){var t=e.offset,r=t===void 0?5:t,n=Ete(e,xte),i=pt({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,f=i.className,c=f===void 0?"":f,h=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!P.isValidElement(u)&&!oe(u))return null;if(P.isValidElement(u))return P.cloneElement(u,i);var p;if(oe(u)){if(p=P.createElement(u,i),P.isValidElement(p))return p}else p=kte(i);var v=Dte(a),m=te(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return $te(i,p,m);var g=v?Mte(i):Ite(i);return k.createElement(Ja,tc({className:ue("recharts-label",c)},m,g,{breakAll:h}),p)}St.displayName="Label";var e$=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,c=t.x,h=t.y,p=t.top,v=t.left,m=t.width,g=t.height,y=t.clockWise,b=t.labelViewBox;if(b)return b;if(q(m)&&q(g)){if(q(c)&&q(h))return{x:c,y:h,width:m,height:g};if(q(p)&&q(v))return{x:p,y:v,width:m,height:g}}return q(c)&&q(h)?{x:c,y:h,width:0,height:0}:q(r)&&q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},Rte=function(t,r){return t?t===!0?k.createElement(St,{key:"label-implicit",viewBox:r}):yt(t)?k.createElement(St,{key:"label-implicit",viewBox:r,value:t}):P.isValidElement(t)?t.type===St?P.cloneElement(t,{key:"label-implicit",viewBox:r}):k.createElement(St,{key:"label-implicit",content:t,viewBox:r}):oe(t)?k.createElement(St,{key:"label-implicit",content:t,viewBox:r}):cl(t)?k.createElement(St,tc({viewBox:r},t,{key:"label-implicit"})):null:null},Lte=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=e$(t),o=Yt(i,St).map(function(l,u){return P.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Rte(t.label,r||a);return[s].concat(wte(o))};St.parseViewBox=e$;St.renderCallByParent=Lte;function Fte(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Bte=Fte;const zte=Ee(Bte);function rc(e){"@babel/helpers - typeof";return rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}var Ute=["valueAccessor"],Wte=["data","dataKey","clockWise","id","textBreakAll"];function Hte(e){return Gte(e)||Vte(e)||qte(e)||Kte()}function Kte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qte(e,t){if(e){if(typeof e=="string")return zg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zg(e,t)}}function Vte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gte(e){if(Array.isArray(e))return zg(e)}function zg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Zte=function(t){return Array.isArray(t.value)?zte(t.value):t.value};function En(e){var t=e.valueAccessor,r=t===void 0?Zte:t,n=Ij(e,Ute),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=Ij(n,Wte);return!i||!i.length?null:k.createElement(pe,{className:"recharts-label-list"},i.map(function(f,c){var h=ae(a)?r(f,c):Xe(f&&f.payload,a),p=ae(s)?{}:{id:"".concat(s,"-").concat(c)};return k.createElement(St,fh({},te(f,!0),u,p,{parentViewBox:f.parentViewBox,value:h,textBreakAll:l,viewBox:St.parseViewBox(ae(o)?f:Mj(Mj({},f),{},{clockWise:o})),key:"label-".concat(c),index:c}))}))}En.displayName="LabelList";function ere(e,t){return e?e===!0?k.createElement(En,{key:"labelList-implicit",data:t}):k.isValidElement(e)||oe(e)?k.createElement(En,{key:"labelList-implicit",data:t,content:e}):cl(e)?k.createElement(En,fh({data:t},e,{key:"labelList-implicit"})):null:null}function tre(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Yt(n,En).map(function(o,s){return P.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=ere(e.label,t);return[a].concat(Hte(i))}En.renderCallByParent=tre;function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, - `).concat(c.x,",").concat(c.y,` - `);if(i>0){var p=Be(r,n,i,o),v=Be(r,n,i,u);h+="L ".concat(v.x,",").concat(v.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, - `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},ore=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,c=Kt(f-u),h=Af({cx:r,cy:n,radius:a,angle:u,sign:c,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,v=h.lineTangency,m=h.theta,g=Af({cx:r,cy:n,radius:a,angle:f,sign:-c,cornerRadius:o,cornerIsExternal:l}),y=g.circleTangency,b=g.lineTangency,x=g.theta,S=l?Math.abs(u-f):Math.abs(u-f)-m-x;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):t$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var w="M ".concat(v.x,",").concat(v.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(p.x,",").concat(p.y,` - A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(c<0),",").concat(y.x,",").concat(y.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(b.x,",").concat(b.y,` - `);if(i>0){var O=Af({cx:r,cy:n,radius:i,angle:u,sign:c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=O.circleTangency,E=O.lineTangency,A=O.theta,T=Af({cx:r,cy:n,radius:i,angle:f,sign:-c,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=T.circleTangency,N=T.lineTangency,M=T.theta,R=l?Math.abs(u-f):Math.abs(u-f)-A-M;if(R<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(N.x,",").concat(N.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(_.x,",").concat(_.y,` - A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(c>0),",").concat(j.x,",").concat(j.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(c<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},sre={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},r$=function(t){var r=Rj(Rj({},sre),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,c=r.endAngle,h=r.className;if(o0&&Math.abs(f-c)<360?g=ore({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:c}):g=t$({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:c}),k.createElement("path",Ug({},te(r,!0),{className:p,d:g,role:"img"}))};function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;txre.call(e,t));function vo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Ore="__v",jre="__o",Pre="_owner",{getOwnPropertyDescriptor:Uj,keys:Wj}=Object;function Ere(e,t){return e.byteLength===t.byteLength&&dh(new Uint8Array(e),new Uint8Array(t))}function Are(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function _re(e,t){return e.byteLength===t.byteLength&&dh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Tre(e,t){return vo(e.getTime(),t.getTime())}function Nre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function kre(e,t){return e===t}function Hj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let f=!1,c=0;for(;(s=u.next())&&!s.done;){if(i[c]){c++;continue}const h=o.value,p=s.value;if(r.equals(h[0],p[0],l,c,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){f=i[c]=!0;break}c++}if(!f)return!1;l++}return!0}const Cre=vo;function $re(e,t,r){const n=Wj(e);let i=n.length;if(Wj(t).length!==i)return!1;for(;i-- >0;)if(!o$(e,t,r,n[i]))return!1;return!0}function Wl(e,t,r){const n=zj(e);let i=n.length;if(zj(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!o$(e,t,r,a)||(o=Uj(e,a),s=Uj(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Mre(e,t){return vo(e.valueOf(),t.valueOf())}function Ire(e,t){return e.source===t.source&&e.flags===t.flags}function Kj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,f=0;for(;(s=l.next())&&!s.done;){if(!i[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function dh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Dre(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function o$(e,t,r,n){return(n===Pre||n===jre||n===Ore)&&(e.$$typeof||t.$$typeof)?!0:Sre(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const Rre="[object ArrayBuffer]",Lre="[object Arguments]",Fre="[object Boolean]",Bre="[object DataView]",zre="[object Date]",Ure="[object Error]",Wre="[object Map]",Hre="[object Number]",Kre="[object Object]",qre="[object RegExp]",Vre="[object Set]",Gre="[object String]",Yre={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Xre="[object URL]",Qre=Object.prototype.toString;function Jre({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:v}){return function(g,y,b){if(g===y)return!0;if(g==null||y==null)return!1;const x=typeof g;if(x!==typeof y)return!1;if(x!=="object")return x==="number"?s(g,y,b):x==="function"?a(g,y,b):!1;const S=g.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(g,y,b);if(Array.isArray(g))return t(g,y,b);if(S===Date)return n(g,y,b);if(S===RegExp)return f(g,y,b);if(S===Map)return o(g,y,b);if(S===Set)return c(g,y,b);const w=Qre.call(g);if(w===zre)return n(g,y,b);if(w===qre)return f(g,y,b);if(w===Wre)return o(g,y,b);if(w===Vre)return c(g,y,b);if(w===Kre)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,b);if(w===Xre)return p(g,y,b);if(w===Ure)return i(g,y,b);if(w===Lre)return l(g,y,b);if(Yre[w])return h(g,y,b);if(w===Rre)return e(g,y,b);if(w===Bre)return r(g,y,b);if(w===Fre||w===Hre||w===Gre)return u(g,y,b);if(v){let O=v[w];if(!O){const j=wre(g);j&&(O=v[j])}if(O)return O(g,y,b)}return!1}}function Zre({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:Ere,areArraysEqual:r?Wl:Are,areDataViewsEqual:_re,areDatesEqual:Tre,areErrorsEqual:Nre,areFunctionsEqual:kre,areMapsEqual:r?mv(Hj,Wl):Hj,areNumbersEqual:Cre,areObjectsEqual:r?Wl:$re,arePrimitiveWrappersEqual:Mre,areRegExpsEqual:Ire,areSetsEqual:r?mv(Kj,Wl):Kj,areTypedArraysEqual:r?mv(dh,Wl):dh,areUrlsEqual:Dre,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Tf(n.areArraysEqual),a=Tf(n.areMapsEqual),o=Tf(n.areObjectsEqual),s=Tf(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function ene(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function tne({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:f}=r();return t(s,l,{cache:u,equals:n,meta:f,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const rne=ia();ia({strict:!0});ia({circular:!0});ia({circular:!0,strict:!0});ia({createInternalComparator:()=>vo});ia({strict:!0,createInternalComparator:()=>vo});ia({circular:!0,createInternalComparator:()=>vo});ia({circular:!0,createInternalComparator:()=>vo,strict:!0});function ia(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=Zre(e),o=Jre(a),s=r?r(o):ene(o);return tne({circular:t,comparator:o,createState:n,equals:s,strict:i})}function nne(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function qj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):nne(i)};requestAnimationFrame(n)}function Hg(e){"@babel/helpers - typeof";return Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hg(e)}function ine(e){return lne(e)||sne(e)||one(e)||ane()}function ane(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function one(e,t){if(e){if(typeof e=="string")return Vj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vj(e,t)}}function Vj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:y<0?0:y},m=function(y){for(var b=y>1?1:y,x=b,S=0;S<8;++S){var w=c(x)-b,O=p(x);if(Math.abs(w-b)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(f,c,h){var p=-(f-c)*n,v=h*a,m=h+(p-v)*s/1e3,g=h*s/1e3+f;return Math.abs(g-c)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Fne(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function vv(e){return Wne(e)||Une(e)||zne(e)||Bne()}function Bne(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zne(e,t){if(e){if(typeof e=="string")return Yg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yg(e,t)}}function Une(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wne(e){if(Array.isArray(e))return Yg(e)}function Yg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mh(e){return mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mh(e)}var un=function(e){Gne(r,e);var t=Yne(r);function r(n,i){var a;Hne(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,f=o.to,c=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Jg(a)),a.changeStyle=a.changeStyle.bind(Jg(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),Qg(a);if(c&&c.length)a.state={style:c[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Qg(a);a.state={style:l?Xl({},l,u):u}}else a.state={style:{}};return a}return qne(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,c=a.from,h=this.state.style;if(s){if(!o){var p={style:l?Xl({},l,f):f};this.state&&h&&(l&&h[l]!==f||!l&&h!==f)&&this.setState(p);return}if(!(rne(i.to,f)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?c:i.to;if(this.state&&h){var g={style:l?Xl({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(g)}this.runAnimation(qr(qr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,c=i.onAnimationEnd,h=i.onAnimationStart,p=Dne(o,s,Pne(u),l,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([h,f,v,l,c])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],f=u.style,c=u.duration,h=c===void 0?0:c,p=function(m,g,y){if(y===0)return m;var b=g.duration,x=g.easing,S=x===void 0?"ease":x,w=g.style,O=g.properties,j=g.onAnimationEnd,E=y>0?o[y-1]:g,A=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(vv(m),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:b,easing:S}),b]);var T=Xj(A,b,S),_=qr(qr(qr({},E.style),w),{},{transition:T});return[].concat(vv(m),[_,b,j]).filter(hne)};return this.manager.start([l].concat(vv(o.reduce(p,[f,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=une());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,c=i.onAnimationEnd,h=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?Xl({},s,l):l,g=Xj(Object.keys(m),o,u);v.start([f,a,qr(qr({},m),{},{transition:g}),o,c])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Lne(i,Rne),u=P.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||o<=0)return a;var c=function(p){var v=p.props,m=v.style,g=m===void 0?{}:m,y=v.className,b=P.cloneElement(p,qr(qr({},l),{},{style:qr(qr({},g),f),className:y}));return b};return u===1?c(P.Children.only(a)):k.createElement("div",null,P.Children.map(a,function(h){return c(h)}))}}]),r}(P.PureComponent);un.displayName="Animate";un.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};un.propTypes={from:je.oneOfType([je.object,je.string]),to:je.oneOfType([je.object,je.string]),attributeName:je.string,duration:je.number,begin:je.number,easing:je.oneOfType([je.string,je.func]),steps:je.arrayOf(je.shape({duration:je.number.isRequired,style:je.object.isRequired,easing:je.oneOfType([je.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),je.func]),properties:je.arrayOf("string"),onAnimationEnd:je.func})),children:je.oneOfType([je.node,je.func]),isActive:je.bool,canBegin:je.bool,onAnimationEnd:je.func,shouldReAnimate:je.bool,onAnimationStart:je.func,onAnimationReStart:je.func};function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function vh(){return vh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,f;if(o>0&&a instanceof Array){for(var c=[0,0,0,0],h=0,p=4;ho?o:a[h];f="M".concat(t,",").concat(r+s*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(u,",").concat(t+l*c[0],",").concat(r)),f+="L ".concat(t+n-l*c[1],",").concat(r),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(u,`, - `).concat(t+n,",").concat(r+s*c[1])),f+="L ".concat(t+n,",").concat(r+i-s*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(u,`, - `).concat(t+n-l*c[2],",").concat(r+i)),f+="L ".concat(t+l*c[3],",").concat(r+i),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(u,`, - `).concat(t,",").concat(r+i-s*c[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);f="M ".concat(t,",").concat(r+s*v,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,` - L `).concat(t+n-l*v,",").concat(r,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,` - L `).concat(t+n,",").concat(r+i-s*v,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,` - L `).concat(t+l*v,",").concat(r+i,` - A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return f},aie=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),c=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=f&&i>=c&&i<=h}return!1},oie={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Dx=function(t){var r=iP(iP({},oie),t),n=P.useRef(),i=P.useState(-1),a=Qne(i,2),o=a[0],s=a[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,f=r.width,c=r.height,h=r.radius,p=r.className,v=r.animationEasing,m=r.animationDuration,g=r.animationBegin,y=r.isAnimationActive,b=r.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||c!==+c||f===0||c===0)return null;var x=ue("recharts-rectangle",p);return b?k.createElement(un,{canBegin:o>0,from:{width:f,height:c,x:l,y:u},to:{width:f,height:c,x:l,y:u},duration:m,animationEasing:v,isActive:b},function(S){var w=S.width,O=S.height,j=S.x,E=S.y;return k.createElement(un,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:y,easing:v},k.createElement("path",vh({},te(r,!0),{className:x,d:aP(j,E,w,O,h),ref:n})))}):k.createElement("path",vh({},te(r,!0),{className:x,d:aP(l,u,f,c,h)}))},sie=["points","className","baseLinePoints","connectNulls"];function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function oP(e){return hie(e)||die(e)||fie(e)||cie()}function cie(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fie(e,t){if(e){if(typeof e=="string")return Zg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zg(e,t)}}function die(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hie(e){if(Array.isArray(e))return Zg(e)}function Zg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){sP(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),sP(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},fu=function(t,r){var n=pie(t);r&&(n=[n.reduce(function(a,o){return[].concat(oP(a),oP(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},mie=function(t,r,n){var i=fu(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(fu(r.reverse(),n).slice(1))},vie=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=lie(t,sie);if(!r||!r.length)return null;var s=ue("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=mie(r,i,a);return k.createElement("g",{className:s},k.createElement("path",Go({},te(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?k.createElement("path",Go({},te(o,!0),{fill:"none",d:fu(r,a)})):null,l?k.createElement("path",Go({},te(o,!0),{fill:"none",d:fu(i,a)})):null)}var f=fu(r,a);return k.createElement("path",Go({},te(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:s,d:f}))};function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Oie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var jie=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Pie=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,f=t.width,c=f===void 0?0:f,h=t.height,p=h===void 0?0:h,v=t.className,m=Sie(t,yie),g=gie({x:n,y:a,top:s,left:u,width:c,height:p},m);return!q(n)||!q(a)||!q(c)||!q(p)||!q(s)||!q(u)?null:k.createElement("path",t0({},te(g,!0),{className:ue("recharts-cross",v),d:jie(n,a,c,p,s,u)}))},Eie=Up,Aie=jC,_ie=kn;function Tie(e,t){return e&&e.length?Eie(e,_ie(t),Aie):void 0}var Nie=Tie;const kie=Ee(Nie);var Cie=Up,$ie=kn,Mie=PC;function Iie(e,t){return e&&e.length?Cie(e,$ie(t),Mie):void 0}var Die=Iie;const Rie=Ee(Die);var Lie=["cx","cy","angle","ticks","axisLine"],Fie=["ticks","tick","angle","tickFormatter","stroke"];function Ls(e){"@babel/helpers - typeof";return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function du(){return du=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Bie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function zie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fP(e,t){for(var r=0;rpP?o=i==="outer"?"start":"end":a<-pP?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=ca(ca({},te(this.props,!1)),{},{fill:"none"},te(s,!1));if(l==="circle")return k.createElement(Vp,ya({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,c=f.map(function(h){return Be(i,a,o,h.coordinate)});return k.createElement(vie,ya({className:"recharts-polar-angle-axis-line"},u,{points:c}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,f=te(this.props,!1),c=te(o,!1),h=ca(ca({},f),{},{fill:"none"},te(s,!1)),p=a.map(function(v,m){var g=n.getTickLineCoord(v),y=n.getTickTextAnchor(v),b=ca(ca(ca({textAnchor:y},f),{},{stroke:"none",fill:u},c),{},{index:m,payload:v,x:g.x2,y:g.y2});return k.createElement(pe,ya({className:ue("recharts-polar-angle-axis-tick",ZC(o)),key:"tick-".concat(v.coordinate)},Gi(n.props,v,m)),s&&k.createElement("line",ya({className:"recharts-polar-angle-axis-tick-line"},h,g)),o&&t.renderTickItem(o,b,l?l(v.value,m):v.value))});return k.createElement(pe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:k.createElement(pe,{className:ue("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return k.isValidElement(n)?o=k.cloneElement(n,i):oe(n)?o=n(i):o=k.createElement(Ja,ya({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(P.PureComponent);Xp(Qp,"displayName","PolarAngleAxis");Xp(Qp,"axisType","angleAxis");Xp(Qp,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var rae=xk,nae=rae(Object.getPrototypeOf,Object),iae=nae,aae=ni,oae=iae,sae=ii,lae="[object Object]",uae=Function.prototype,cae=Object.prototype,y$=uae.toString,fae=cae.hasOwnProperty,dae=y$.call(Object);function hae(e){if(!sae(e)||aae(e)!=lae)return!1;var t=oae(e);if(t===null)return!0;var r=fae.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&y$.call(r)==dae}var pae=hae;const mae=Ee(pae);var vae=ni,yae=ii,gae="[object Boolean]";function bae(e){return e===!0||e===!1||yae(e)&&vae(e)==gae}var xae=bae;const wae=Ee(xae);function cc(e){"@babel/helpers - typeof";return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:f,lowerWidth:c,height:h,x:l,y:u},duration:m,animationEasing:v,isActive:y},function(x){var S=x.upperWidth,w=x.lowerWidth,O=x.height,j=x.x,E=x.y;return k.createElement(un,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:v},k.createElement("path",bh({},te(r,!0),{className:b,d:gP(j,E,S,w,O),ref:n})))}):k.createElement("g",null,k.createElement("path",bh({},te(r,!0),{className:b,d:gP(l,u,f,c,h)})))},Cae=["option","shapeType","propTransformer","activeClassName","isActive"];function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function $ae(e,t){if(e==null)return{};var r=Mae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function bP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xh(e){for(var t=1;t0?wr(x,"paddingAngle",0):0;if(w){var j=Tt(w.endAngle-w.startAngle,x.endAngle-x.startAngle),E=Ie(Ie({},x),{},{startAngle:b+O,endAngle:b+j(m)+O});g.push(E),b=E.endAngle}else{var A=x.endAngle,T=x.startAngle,_=Tt(0,A-T),N=_(m),M=Ie(Ie({},x),{},{startAngle:b+O,endAngle:b+N+O});g.push(M),b=M.endAngle}}),k.createElement(pe,null,n.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!gl(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,f=i.cy,c=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,v=this.state.isAnimationFinished;if(a||!o||!o.length||!q(u)||!q(f)||!q(c)||!q(h))return null;var m=ue("recharts-pie",s);return k.createElement(pe,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),l&&this.renderLabels(o),St.renderCallByParent(this.props,null,!1),(!p||v)&&En.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?b:b-1)*l,S=g-b*p-x,w=i.reduce(function(E,A){var T=Xe(A,y,0);return E+(q(T)?T:0)},0),O;if(w>0){var j;O=i.map(function(E,A){var T=Xe(E,y,0),_=Xe(E,f,A),N=(q(T)?T:0)/w,M;A?M=j.endAngle+Kt(m)*l*(T!==0?1:0):M=o;var R=M+Kt(m)*((T!==0?p:0)+N*S),I=(M+R)/2,D=(v.innerRadius+v.outerRadius)/2,z=[{name:_,value:T,payload:E,dataKey:y,type:h}],C=Be(v.cx,v.cy,D,I);return j=Ie(Ie(Ie({percent:N,cornerRadius:a,name:_,tooltipPayload:z,midAngle:I,middleRadius:D,tooltipPosition:C},E),v),{},{value:Xe(E,y),startAngle:M,endAngle:R,payload:E,paddingAngle:Kt(m)*l}),j})}return Ie(Ie({},v),{},{sectors:O,data:i})});var toe=Math.ceil,roe=Math.max;function noe(e,t,r,n){for(var i=-1,a=roe(toe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var ioe=noe,aoe=Fk,OP=1/0,ooe=17976931348623157e292;function soe(e){if(!e)return e===0?e:0;if(e=aoe(e),e===OP||e===-OP){var t=e<0?-1:1;return t*ooe}return e===e?e:0}var x$=soe,loe=ioe,uoe=Ip,yv=x$;function coe(e){return function(t,r,n){return n&&typeof n!="number"&&uoe(t,r,n)&&(r=n=void 0),t=yv(t),r===void 0?(r=t,t=0):r=yv(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),mr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),mr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),mr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),mr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),mr(n,"handleSlideDragStart",function(i){var a=_P(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return joe(t,e),xoe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,c=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,c),v=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:v===f?f:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Xe(a[n],s,n);return oe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,c=l.travellerWidth,h=l.startIndex,p=l.endIndex,v=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+f-c-s,u+f-c-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==h||g.endIndex!==p)&&v&&v(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=_P(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],f=this.props,c=f.x,h=f.width,p=f.travellerWidth,v=f.onChange,m=f.gap,g=f.data,y={startX:this.state.startX,endX:this.state.endX},b=n.pageX-a;b>0?b=Math.min(b,c+h-p-u):b<0&&(b=Math.max(b,c-u)),y[o]=u+b;var x=this.getIndex(y),S=x.startIndex,w=x.endIndex,O=function(){var E=g.length-1;return o==="startX"&&(s>l?S%m===0:w%m===0)||sl?w%m===0:S%m===0)||s>l&&w===E};this.setState(mr(mr({},o,u+b),"brushMoveStartX",n.pageX),function(){v&&O()&&v(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,f=this.state[i],c=s.indexOf(f);if(c!==-1){var h=c+n;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(mr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return k.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,f=n.padding,c=P.Children.only(u);return c?k.cloneElement(c,{x:i,y:a,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,f=l.travellerWidth,c=l.height,h=l.traveller,p=l.ariaLabel,v=l.data,m=l.startIndex,g=l.endIndex,y=Math.max(n,this.props.x),b=gv(gv({},te(this.props,!1)),{},{x:y,y:u,width:f,height:c}),x=p||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[g])===null||o===void 0?void 0:o.name);return k.createElement(pe,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,f=Math.min(n,i)+u,c=Math.max(Math.abs(i-n)-u,0);return k.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:c,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,f=this.state,c=f.startX,h=f.endX,p=5,v={pointerEvents:"none",fill:u};return k.createElement(pe,{className:"recharts-brush-texts"},k.createElement(Ja,jh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,h)-p,y:o+s/2},v),this.getTextOfTick(i)),k.createElement(Ja,jh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,h)+l+p,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,f=n.height,c=n.alwaysShowText,h=this.state,p=h.startX,v=h.endX,m=h.isTextActive,g=h.isSlideMoving,y=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!q(s)||!q(l)||!q(u)||!q(f)||u<=0||f<=0)return null;var x=ue("recharts-brush",a),S=k.Children.count(o)===1,w=goe("userSelect","none");return k.createElement(pe,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(m||g||y||b||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),k.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),k.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return k.isValidElement(n)?a=k.cloneElement(n,i):oe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,f=n.startIndex,c=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return gv({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?Eoe({data:a,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(P.PureComponent);mr(Us,"displayName","Brush");mr(Us,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Aoe=lx;function _oe(e,t){var r;return Aoe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var Toe=_oe,Noe=dk,koe=kn,Coe=Toe,$oe=hr,Moe=Ip;function Ioe(e,t,r){var n=$oe(e)?Noe:Coe;return r&&Moe(e,t,r)&&(t=void 0),n(e,koe(t))}var Doe=Ioe;const Roe=Ee(Doe);var An=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},TP=Mk;function Loe(e,t,r){t=="__proto__"&&TP?TP(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Foe=Loe,Boe=Foe,zoe=Ck,Uoe=kn;function Woe(e,t){var r={};return t=Uoe(t),zoe(e,function(n,i,a){Boe(r,i,t(n,i,a))}),r}var Hoe=Woe;const Koe=Ee(Hoe);function qoe(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function use(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function cse(e,t){var r=e.x,n=e.y,i=lse(e,ise),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),c="".concat(t.width||i.width),h=parseInt(c,10);return Hl(Hl(Hl(Hl(Hl({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function kP(e){return k.createElement(wh,o0({shapeType:"rectangle",propTransformer:cse,activeClassName:"recharts-active-bar"},e))}var fse=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=q(n)||k8(n);return a?t(n,i):(a||eo(),r)}},dse=["value","background"],P$;function Ws(e){"@babel/helpers - typeof";return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(e)}function hse(e,t){if(e==null)return{};var r=pse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(R)0&&(M=Math.min((re||0)-(R[xe-1]||0),M))}),Number.isFinite(M)){var I=M/N,D=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(j=I*D/2),m.padding==="no-gap"){var z=qt(t.barCategoryGap,I*D),C=I*D/2;j=C-z-(C-z)/D*z}}}i==="xAxis"?E=[n.left+(x.left||0)+(j||0),n.left+n.width-(x.right||0)-(j||0)]:i==="yAxis"?E=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(j||0),n.top+n.height-(x.bottom||0)-(j||0)]:E=m.range,w&&(E=[E[1],E[0]]);var F=qC(m,a,h),W=F.scale,V=F.realScaleType;W.domain(y).range(E),VC(W);var H=GC(W,Qr(Qr({},m),{},{realScaleType:V}));i==="xAxis"?(_=g==="top"&&!S||g==="bottom"&&S,A=n.left,T=c[O]-_*m.height):i==="yAxis"&&(_=g==="left"&&!S||g==="right"&&S,A=c[O]-_*m.width,T=n.top);var Y=Qr(Qr(Qr({},m),H),{},{realScaleType:V,x:A,y:T,scale:W,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Y.bandSize=uh(Y,H),!m.hide&&i==="xAxis"?c[O]+=(_?-1:1)*Y.height:m.hide||(c[O]+=(_?-1:1)*Y.width),Qr(Qr({},p),{},em({},v,Y))},{})},N$=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Pse=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return N$({x:r,y:n},{x:i,y:a})},k$=function(){function e(t){Sse(this,e),this.scale=t}return Ose(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();em(k$,"EPS",1e-4);var Rx=function(t){var r=Object.keys(t).reduce(function(n,i){return Qr(Qr({},n),{},em({},i,k$.create(t[i])))},{});return Qr(Qr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return Koe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return j$(i,function(a,o){return r[o].isInRange(a)})}})};function Ese(e){return(e%180+180)%180}var Ase=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Ese(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Cse=kse,$se=x$;function Mse(e){var t=$se(e),r=t%1;return t===t?r?t-r:t:0}var Ise=Mse,Dse=Ek,Rse=kn,Lse=Ise,Fse=Math.max;function Bse(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Lse(r);return i<0&&(i=Fse(n+i,0)),Dse(e,Rse(t),i)}var zse=Bse,Use=Cse,Wse=zse,Hse=Use(Wse),Kse=Hse;const qse=Ee(Kse);var Vse=RU(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Lx=P.createContext(void 0),Fx=P.createContext(void 0),C$=P.createContext(void 0),$$=P.createContext({}),M$=P.createContext(void 0),I$=P.createContext(0),D$=P.createContext(0),DP=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,f=Vse(a);return k.createElement(Lx.Provider,{value:n},k.createElement(Fx.Provider,{value:i},k.createElement($$.Provider,{value:a},k.createElement(C$.Provider,{value:f},k.createElement(M$.Provider,{value:o},k.createElement(I$.Provider,{value:u},k.createElement(D$.Provider,{value:l},s)))))))},Gse=function(){return P.useContext(M$)},R$=function(t){var r=P.useContext(Lx);r==null&&eo();var n=r[t];return n==null&&eo(),n},Yse=function(){var t=P.useContext(Lx);return bi(t)},Xse=function(){var t=P.useContext(Fx),r=qse(t,function(n){return j$(n.domain,Number.isFinite)});return r||bi(t)},L$=function(t){var r=P.useContext(Fx);r==null&&eo();var n=r[t];return n==null&&eo(),n},Qse=function(){var t=P.useContext(C$);return t},Jse=function(){return P.useContext($$)},Bx=function(){return P.useContext(D$)},zx=function(){return P.useContext(I$)};function Hs(e){"@babel/helpers - typeof";return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function Zse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ele(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Ile(e,t){return K$(e,t+1)}function Dle(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,f=o,c=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:K$(n,u)};var m=l,g,y=function(){return g===void 0&&(g=r(v,m)),g},b=v.coordinate,x=l===0||kh(e,b,y,f,s);x||(l=0,f=o,u+=1),x&&(f=b+e*(y()/2+i),l+=u)},h;u<=a.length;)if(h=c(),h)return h.v;return[]}function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function HP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t0?p.coordinate-g*e:p.coordinate})}else a[h]=p=Mt(Mt({},p),{},{tickCoord:p.coordinate});var y=kh(e,p.tickCoord,m,s,l);y&&(l=p.tickCoord-e*(m()/2+i),a[h]=Mt(Mt({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function zle(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var f=n[s-1],c=r(f,s-1),h=e*(f.coordinate+e*c/2-u);o[s-1]=f=Mt(Mt({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var p=kh(e,f.tickCoord,function(){return c},l,u);p&&(u=f.tickCoord-e*(c/2+i),o[s-1]=Mt(Mt({},f),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(b){var x=o[b],S,w=function(){return S===void 0&&(S=r(x,b)),S};if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Mt(Mt({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Mt(Mt({},x),{},{tickCoord:x.coordinate});var j=kh(e,x.tickCoord,w,l,u);j&&(l=x.tickCoord+e*(w()/2+i),o[b]=Mt(Mt({},x),{},{isShow:!0}))},g=0;g=2?Kt(i[1].coordinate-i[0].coordinate):1,y=Mle(a,g,p);return l==="equidistantPreserveStart"?Dle(g,y,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=zle(g,y,m,i,o,l==="preserveStartEnd"):h=Ble(g,y,m,i,o),h.filter(function(b){return b.isShow}))}var Ule=["viewBox"],Wle=["viewBox"],Hle=["ticks"];function Vs(e){"@babel/helpers - typeof";return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function qle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qP(e,t){for(var r=0;r0?l(this.props):l(p)),o<=0||s<=0||!v||!v.length?null:k.createElement(pe,{className:ue("recharts-cartesian-axis",u),ref:function(g){n.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),St.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ue(i.className,"recharts-cartesian-axis-tick-value");return k.isValidElement(n)?o=k.cloneElement(n,ht(ht({},i),{},{className:s})):oe(n)?o=n(ht(ht({},i),{},{className:s})):o=k.createElement(Ja,Xo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(P.Component);Kx(Sl,"displayName","CartesianAxis");Kx(Sl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Zle=["x1","y1","x2","y2","key"],eue=["offset"];function to(e){"@babel/helpers - typeof";return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},to(e)}function VP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function iue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var aue=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return k.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function G$(e,t){var r;if(k.isValidElement(e))r=k.cloneElement(e,t);else if(oe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=GP(t,Zle),u=te(l,!1);u.offset;var f=GP(u,eue);r=k.createElement("line",Ea({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function oue(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Rt(Rt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return G$(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function sue(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Rt(Rt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return G$(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function lue(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==f[0]&&f.unshift(0);var c=f.map(function(h,p){var v=!f[p+1],m=v?i+o-h:f[p+1]-h;if(m<=0)return null;var g=p%t.length;return k.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function uue(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==f[0]&&f.unshift(0);var c=f.map(function(h,p){var v=!f[p+1],m=v?a+s-h:f[p+1]-h;if(m<=0)return null;var g=p%n.length;return k.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:m,height:l,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var cue=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return KC(Hx(Rt(Rt(Rt({},Sl.defaultProps),n),{},{ticks:Hn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},fue=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return KC(Hx(Rt(Rt(Rt({},Sl.defaultProps),n),{},{ticks:Hn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},No={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function yc(e){var t,r,n,i,a,o,s=Bx(),l=zx(),u=Jse(),f=Rt(Rt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:No.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:No.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:No.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:No.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:No.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:No.verticalFill,x:q(e.x)?e.x:u.left,y:q(e.y)?e.y:u.top,width:q(e.width)?e.width:u.width,height:q(e.height)?e.height:u.height}),c=f.x,h=f.y,p=f.width,v=f.height,m=f.syncWithTicks,g=f.horizontalValues,y=f.verticalValues,b=Yse(),x=Xse();if(!q(p)||p<=0||!q(v)||v<=0||!q(c)||c!==+c||!q(h)||h!==+h)return null;var S=f.verticalCoordinatesGenerator||cue,w=f.horizontalCoordinatesGenerator||fue,O=f.horizontalPoints,j=f.verticalPoints;if((!O||!O.length)&&oe(w)){var E=g&&g.length,A=w({yAxis:x?Rt(Rt({},x),{},{ticks:E?g:x.ticks}):void 0,width:s,height:l,offset:u},E?!0:m);an(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(to(A),"]")),Array.isArray(A)&&(O=A)}if((!j||!j.length)&&oe(S)){var T=y&&y.length,_=S({xAxis:b?Rt(Rt({},b),{},{ticks:T?y:b.ticks}):void 0,width:s,height:l,offset:u},T?!0:m);an(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(to(_),"]")),Array.isArray(_)&&(j=_)}return k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(aue,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),k.createElement(oue,Ea({},f,{offset:u,horizontalPoints:O,xAxis:b,yAxis:x})),k.createElement(sue,Ea({},f,{offset:u,verticalPoints:j,xAxis:b,yAxis:x})),k.createElement(lue,Ea({},f,{horizontalPoints:O})),k.createElement(uue,Ea({},f,{verticalPoints:j})))}yc.displayName="CartesianGrid";var due=["type","layout","connectNulls","ref"],hue=["key"];function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function YP(e,t){if(e==null)return{};var r=pue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rc){p=[].concat(ko(l.slice(0,v)),[c-m]);break}var g=p.length%2===0?[0,h]:[h];return[].concat(ko(t.repeat(l,f)),ko(p),g).map(function(y){return"".concat(y,"px")}).join(", ")}),Jr(r,"id",fo("recharts-line-")),Jr(r,"pathRef",function(o){r.mainCurve=o}),Jr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Jr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return jue(t,e),xue(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,c=Yt(f,wl);if(!c)return null;var h=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:Xe(m.payload,g)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(pe,p,c.map(function(v){return k.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,c=te(this.props,!1),h=te(l,!0),p=u.map(function(m,g){var y=pr(pr(pr({key:"dot-".concat(g),r:3},c),h),{},{index:g,cx:m.x,cy:m.y,value:m.value,dataKey:f,payload:m.payload,points:u});return t.renderDotItem(l,y)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(pe,hu({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var c=YP(s,due),h=pr(pr(pr({},te(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:f});return k.createElement(ac,hu({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,h=o.animationEasing,p=o.animationId,v=o.animateNewValues,m=o.width,g=o.height,y=this.state,b=y.prevPoints,x=y.totalLength;return k.createElement(un,{begin:f,duration:c,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var w=S.t;if(b){var O=b.length/s.length,j=s.map(function(N,M){var R=Math.floor(M*O);if(b[R]){var I=b[R],D=Tt(I.x,N.x),z=Tt(I.y,N.y);return pr(pr({},N),{},{x:D(w),y:z(w)})}if(v){var C=Tt(m*2,N.x),F=Tt(g/2,N.y);return pr(pr({},N),{},{x:C(w),y:F(w)})}return pr(pr({},N),{},{x:N.x,y:N.y})});return a.renderCurveStatically(j,n,i)}var E=Tt(0,x),A=E(w),T;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});T=a.getStrokeDasharray(A,x,_)}else T=a.generateSimpleStrokeDasharray(x,A);return a.renderCurveStatically(s,n,i,{strokeDasharray:T})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!u&&f>0||!gl(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,f=i.yAxis,c=i.top,h=i.left,p=i.width,v=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,b=s.length===1,x=ue("recharts-line",l),S=u&&u.allowDataOverflow,w=f&&f.allowDataOverflow,O=S||w,j=ae(g)?this.id:g,E=(n=te(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=E.r,T=A===void 0?3:A,_=E.strokeWidth,N=_===void 0?2:_,M=H8(o)?o:{},R=M.clipDot,I=R===void 0?!0:R,D=T*2+N;return k.createElement(pe,{className:x},S||w?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(j)},k.createElement("rect",{x:S?h:h-p/2,y:w?c:c-v/2,width:S?p:p*2,height:w?v:v*2})),!I&&k.createElement("clipPath",{id:"clipPath-dots-".concat(j)},k.createElement("rect",{x:h-D/2,y:c-D/2,width:p+D,height:v+D}))):null,!b&&this.renderCurve(O,j),this.renderErrorBar(O,j),(b||o)&&this.renderDots(O,I,j),(!m||y)&&En.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(ko(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Due(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Rue(e){var t=e.option,r=e.isActive,n=Iue(e,Mue);return typeof t=="string"?P.createElement(wh,pu({option:P.createElement(Cp,pu({type:t},n)),isActive:r,shapeType:"symbols"},n)):P.createElement(wh,pu({option:t,isActive:r,shapeType:"symbols"},n))}function Xs(e){"@babel/helpers - typeof";return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xs(e)}function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mce(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&q(i)&&q(a)?t.slice(i,a+1):[]};function m2(e){return e==="number"?[0,"auto"]:void 0}var A0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=om(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var f,c=(f=u.props.data)!==null&&f!==void 0?f:r;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=c===void 0?s:c;h=Md(p,o.dataKey,i)}else h=c&&c[n]||s[n];return h?[].concat(el(l),[XC(u,h)]):l},[])},aE=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=qce(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=Kee(o,s,u,l);if(f>=0&&u){var c=u[f]&&u[f].value,h=A0(t,r,f,c),p=Vce(n,s,f,a);return{activeTooltipIndex:f,activeLabel:c,activePayload:h,activeCoordinate:p}}return null},Gce=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,h=t.stackOffset,p=HC(f,a);return n.reduce(function(v,m){var g,y=m.type.defaultProps!==void 0?B(B({},m.type.defaultProps),m.props):m.props,b=y.type,x=y.dataKey,S=y.allowDataOverflow,w=y.allowDuplicatedCategory,O=y.scale,j=y.ticks,E=y.includeHidden,A=y[o];if(v[A])return v;var T=om(t.data,{graphicalItems:i.filter(function(H){var Y,re=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o];return re===A}),dataStartIndex:l,dataEndIndex:u}),_=T.length,N,M,R;xce(y.domain,S,b)&&(N=Fg(y.domain,null,S),p&&(b==="number"||O!=="auto")&&(R=uu(T,x,"category")));var I=m2(b);if(!N||N.length===0){var D,z=(D=y.domain)!==null&&D!==void 0?D:I;if(x){if(N=uu(T,x,b),b==="category"&&p){var C=$8(N);w&&C?(M=N,N=Oh(0,_)):w||(N=_j(z,N,m).reduce(function(H,Y){return H.indexOf(Y)>=0?H:[].concat(el(H),[Y])},[]))}else if(b==="category")w?N=N.filter(function(H){return H!==""&&!ae(H)}):N=_j(z,N,m).reduce(function(H,Y){return H.indexOf(Y)>=0||Y===""||ae(Y)?H:[].concat(el(H),[Y])},[]);else if(b==="number"){var F=Xee(T,i.filter(function(H){var Y,re,xe=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o],Ke="hide"in H.props?H.props.hide:(re=H.type.defaultProps)===null||re===void 0?void 0:re.hide;return xe===A&&(E||!Ke)}),x,a,f);F&&(N=F)}p&&(b==="number"||O!=="auto")&&(R=uu(T,x,"category"))}else p?N=Oh(0,_):s&&s[A]&&s[A].hasStack&&b==="number"?N=h==="expand"?[0,1]:YC(s[A].stackGroups,l,u):N=WC(T,i.filter(function(H){var Y=o in H.props?H.props[o]:H.type.defaultProps[o],re="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return Y===A&&(E||!re)}),b,f,!0);if(b==="number")N=j0(c,N,A,a,j),z&&(N=Fg(z,N,S));else if(b==="category"&&z){var W=z,V=N.every(function(H){return W.indexOf(H)>=0});V&&(N=W)}}return B(B({},v),{},ie({},A,B(B({},y),{},{axisType:a,domain:N,categoricalDomain:R,duplicateDomain:M,originalDomain:(g=y.domain)!==null&&g!==void 0?g:I,isCategorical:p,layout:f})))},{})},Yce=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,c=t.children,h=om(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=h.length,v=HC(f,a),m=-1;return n.reduce(function(g,y){var b=y.type.defaultProps!==void 0?B(B({},y.type.defaultProps),y.props):y.props,x=b[o],S=m2("number");if(!g[x]){m++;var w;return v?w=Oh(0,p):s&&s[x]&&s[x].hasStack?(w=YC(s[x].stackGroups,l,u),w=j0(c,w,x,a)):(w=Fg(S,WC(h,n.filter(function(O){var j,E,A=o in O.props?O.props[o]:(j=O.type.defaultProps)===null||j===void 0?void 0:j[o],T="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return A===x&&!T}),"number",f),i.defaultProps.allowDataOverflow),w=j0(c,w,x,a)),B(B({},g),{},ie({},x,B(B({axisType:a},i.defaultProps),{},{hide:!0,orientation:wr(Hce,"".concat(a,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:v,layout:f})))}return g},{})},Xce=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,f=t.children,c="".concat(i,"Id"),h=Yt(f,a),p={};return h&&h.length?p=Gce(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=Yce(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:c,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},Qce=function(t){var r=bi(t),n=Hn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:ux(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:uh(r,n)}},oE=function(t){var r=t.children,n=t.defaultShowTooltip,i=yr(r,Us),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},Jce=function(t){return!t||!t.length?!1:t.some(function(r){var n=qn(r&&r.type);return n&&n.indexOf("Bar")>=0})},sE=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Zce=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,f=n.height,c=n.children,h=n.margin||{},p=yr(c,Us),v=yr(c,on),m=Object.keys(l).reduce(function(w,O){var j=l[O],E=j.orientation;return!j.mirror&&!j.hide?B(B({},w),{},ie({},E,w[E]+j.width)):w},{left:h.left||0,right:h.right||0}),g=Object.keys(o).reduce(function(w,O){var j=o[O],E=j.orientation;return!j.mirror&&!j.hide?B(B({},w),{},ie({},E,wr(w,"".concat(E))+j.height)):w},{top:h.top||0,bottom:h.bottom||0}),y=B(B({},g),m),b=y.bottom;p&&(y.bottom+=p.props.height||Us.defaultProps.height),v&&r&&(y=Gee(y,i,n,r));var x=u-y.left-y.right,S=f-y.top-y.bottom;return B(B({brushBottom:b},y),{},{width:Math.max(x,0),height:Math.max(S,0)})},efe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},qx=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,h=function(y,b){var x=b.graphicalItems,S=b.stackGroups,w=b.offset,O=b.updateId,j=b.dataStartIndex,E=b.dataEndIndex,A=y.barSize,T=y.layout,_=y.barGap,N=y.barCategoryGap,M=y.maxBarSize,R=sE(T),I=R.numericAxisName,D=R.cateAxisName,z=Jce(x),C=[];return x.forEach(function(F,W){var V=om(y.data,{graphicalItems:[F],dataStartIndex:j,dataEndIndex:E}),H=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Y=H.dataKey,re=H.maxBarSize,xe=H["".concat(I,"Id")],Ke=H["".concat(D,"Id")],Se={},Pt=l.reduce(function(aa,oa){var dm=b["".concat(oa.axisType,"Map")],nw=H["".concat(oa.axisType,"Id")];dm&&dm[nw]||oa.axisType==="zAxis"||eo();var iw=dm[nw];return B(B({},aa),{},ie(ie({},oa.axisType,iw),"".concat(oa.axisType,"Ticks"),Hn(iw)))},Se),G=Pt[D],se=Pt["".concat(D,"Ticks")],le=S&&S[xe]&&S[xe].hasStack&&ate(F,S[xe].stackGroups),U=qn(F.type).indexOf("Bar")>=0,Ze=uh(G,se),ge=[],ct=z&&qee({barSize:A,stackGroups:S,totalSize:efe(Pt,D)});if(U){var ft,Jt,si=ae(re)?M:re,Oo=(ft=(Jt=uh(G,se,!0))!==null&&Jt!==void 0?Jt:si)!==null&&ft!==void 0?ft:0;ge=Vee({barGap:_,barCategoryGap:N,bandSize:Oo!==Ze?Oo:Ze,sizeList:ct[Ke],maxBarSize:si}),Oo!==Ze&&(ge=ge.map(function(aa){return B(B({},aa),{},{position:B(B({},aa.position),{},{offset:aa.position.offset-Oo/2})})}))}var Vc=F&&F.type&&F.type.getComposedData;Vc&&C.push({props:B(B({},Vc(B(B({},Pt),{},{displayedData:V,props:y,dataKey:Y,item:F,bandSize:Ze,barPosition:ge,offset:w,stackedData:le,layout:T,dataStartIndex:j,dataEndIndex:E}))),{},ie(ie(ie({key:F.key||"item-".concat(W)},I,Pt[I]),D,Pt[D]),"animationId",O)),childIndex:V8(F,y.children),item:F})}),C},p=function(y,b){var x=y.props,S=y.dataStartIndex,w=y.dataEndIndex,O=y.updateId;if(!SS({props:x}))return null;var j=x.children,E=x.layout,A=x.stackOffset,T=x.data,_=x.reverseStackOrder,N=sE(E),M=N.numericAxisName,R=N.cateAxisName,I=Yt(j,n),D=nte(T,I,"".concat(M,"Id"),"".concat(R,"Id"),A,_),z=l.reduce(function(H,Y){var re="".concat(Y.axisType,"Map");return B(B({},H),{},ie({},re,Xce(x,B(B({},Y),{},{graphicalItems:I,stackGroups:Y.axisType===M&&D,dataStartIndex:S,dataEndIndex:w}))))},{}),C=Zce(B(B({},z),{},{props:x,graphicalItems:I}),b==null?void 0:b.legendBBox);Object.keys(z).forEach(function(H){z[H]=f(x,z[H],C,H.replace("Map",""),r)});var F=z["".concat(R,"Map")],W=Qce(F),V=h(x,B(B({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:I,stackGroups:D,offset:C}));return B(B({formattedGraphicalItems:V,graphicalItems:I,offset:C,stackGroups:D},W),z)},v=function(g){function y(b){var x,S,w;return $ce(this,y),w=Dce(this,y,[b]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new bce),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var j=w.state,E=j.dataStartIndex,A=j.dataEndIndex,T=j.updateId;w.setState(B({legendBBox:O},p({props:w.props,dataStartIndex:E,dataEndIndex:A,updateId:T},B(B({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,j,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(j)}}),ie(w,"handleBrushChange",function(O){var j=O.startIndex,E=O.endIndex;if(j!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return B({dataStartIndex:j,dataEndIndex:E},p({props:w.props,dataStartIndex:j,dataEndIndex:E,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:j,dataEndIndex:E})}}),ie(w,"handleMouseEnter",function(O){var j=w.getMouseInfo(O);if(j){var E=B(B({},j),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseEnter;oe(A)&&A(E,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var j=w.getMouseInfo(O),E=j?B(B({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseMove;oe(A)&&A(E,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};w.setState(j),w.triggerSyncEvent(j);var E=w.props.onMouseLeave;oe(E)&&E(j,O)}),ie(w,"handleOuterEvent",function(O){var j=q8(O),E=wr(w.props,"".concat(j));if(j&&oe(E)){var A,T;/.*touch.*/i.test(j)?T=w.getMouseInfo(O.changedTouches[0]):T=w.getMouseInfo(O),E((A=T)!==null&&A!==void 0?A:{},O)}}),ie(w,"handleClick",function(O){var j=w.getMouseInfo(O);if(j){var E=B(B({},j),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onClick;oe(A)&&A(E,O)}}),ie(w,"handleMouseDown",function(O){var j=w.props.onMouseDown;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"handleMouseUp",function(O){var j=w.props.onMouseUp;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var j=w.props.onDoubleClick;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"handleContextMenu",function(O){var j=w.props.onContextMenu;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&xv.emit(wv,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var j=w.props,E=j.layout,A=j.syncMethod,T=w.state.updateId,_=O.dataStartIndex,N=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(B({dataStartIndex:_,dataEndIndex:N},p({props:w.props,dataStartIndex:_,dataEndIndex:N,updateId:T},w.state)));else if(O.activeTooltipIndex!==void 0){var M=O.chartX,R=O.chartY,I=O.activeTooltipIndex,D=w.state,z=D.offset,C=D.tooltipTicks;if(!z)return;if(typeof A=="function")I=A(C,O);else if(A==="value"){I=-1;for(var F=0;F=0){var le,U;if(M.dataKey&&!M.allowDuplicatedCategory){var Ze=typeof M.dataKey=="function"?se:"payload.".concat(M.dataKey.toString());le=Md(F,Ze,I),U=W&&V&&Md(V,Ze,I)}else le=F==null?void 0:F[R],U=W&&V&&V[R];if(Ke||xe){var ge=O.props.activeIndex!==void 0?O.props.activeIndex:R;return[P.cloneElement(O,B(B(B({},A.props),Pt),{},{activeIndex:ge})),null,null]}if(!ae(le))return[G].concat(el(w.renderActivePoints({item:A,activePoint:le,basePoint:U,childIndex:R,isRange:W})))}else{var ct,ft=(ct=w.getItemByXY(w.state.activeCoordinate))!==null&&ct!==void 0?ct:{graphicalItem:G},Jt=ft.graphicalItem,si=Jt.item,Oo=si===void 0?O:si,Vc=Jt.childIndex,aa=B(B(B({},A.props),Pt),{},{activeIndex:Vc});return[P.cloneElement(Oo,aa),null,null]}return W?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,j,E){return P.cloneElement(O,B(B({key:"recharts-customized-".concat(E)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:kf,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:kf},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:kf},YAxis:{handler:kf},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:fo("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=Bk(w.triggeredAfterMouseMove,(S=b.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return Fce(y,g),Ice(y,[{key:"componentDidMount",value:function(){var x,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,S=x.children,w=x.data,O=x.height,j=x.layout,E=yr(S,It);if(E){var A=E.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,_=A0(this.state,w,A,T),N=this.state.tooltipTicks[A].coordinate,M=(this.state.offset.top+O)/2,R=j==="horizontal",I=R?{x:N,y:M}:{y:N,x:M},D=this.state.formattedGraphicalItems.find(function(C){var F=C.item;return F.type.name==="Scatter"});D&&(I=B(B({},I),D.props.points[A].tooltipPosition),_=D.props.points[A].tooltipPayload);var z={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:T,activePayload:_,activeCoordinate:I};this.setState(z),this.renderCursor(E),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(x){eg([yr(x.children,It)],[yr(this.props.children,It)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=yr(this.props.children,It);if(x&&typeof x.props.shared=="boolean"){var S=x.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=bX(w),j={chartX:Math.round(x.pageX-O.left),chartY:Math.round(x.pageY-O.top)},E=w.width/S.offsetWidth||1,A=this.inRange(j.chartX,j.chartY,E);if(!A)return null;var T=this.state,_=T.xAxisMap,N=T.yAxisMap,M=this.getTooltipEventType(),R=aE(this.state,this.props.data,this.props.layout,A);if(M!=="axis"&&_&&N){var I=bi(_).scale,D=bi(N).scale,z=I&&I.invert?I.invert(j.chartX):null,C=D&&D.invert?D.invert(j.chartY):null;return B(B({},j),{},{xValue:z,yValue:C},R)}return R?B(B({},j),R):null}},{key:"inRange",value:function(x,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,j=x/w,E=S/w;if(O==="horizontal"||O==="vertical"){var A=this.state.offset,T=j>=A.left&&j<=A.left+A.width&&E>=A.top&&E<=A.top+A.height;return T?{x:j,y:E}:null}var _=this.state,N=_.angleAxisMap,M=_.radiusAxisMap;if(N&&M){var R=bi(N);return kj({x:j,y:E},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,S=this.getTooltipEventType(),w=yr(x,It),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=Id(this.props,this.handleOuterEvent);return B(B({},j),O)}},{key:"addListener",value:function(){xv.on(wv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){xv.removeListener(wv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,S,w){for(var O=this.state.formattedGraphicalItems,j=0,E=O.length;j{const n=rfe.find(o=>o.value===t);if(!n)return[];const i=new Date,a=new Map;for(let o=0;o{const s=new Date(o.createdAt),l=ou(nS(s),"yyyy-MM-dd"),u=a.get(l)||0;a.set(l,u+1)}),Array.from(a.entries()).map(([o,s])=>({date:o,experiments:s,displayDate:ou(new Date(o),"MMM dd")})).sort((o,s)=>o.date.localeCompare(s.date))},[e,t]);return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Timeline"}),d.jsx(Qa,{width:"100%",height:260,children:d.jsxs(Vx,{data:r,margin:{left:0,right:15,top:15,bottom:15},children:[d.jsx(yc,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),d.jsx(Yi,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),d.jsx(Xi,{tick:{fontSize:10},width:40,label:{value:"Count",angle:-90,position:"insideLeft",offset:8,style:{textAnchor:"middle",fontSize:11}}}),d.jsx(It,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px"},labelFormatter:n=>`Date: ${n}`}),d.jsx(on,{wrapperStyle:{fontSize:"12px"}}),d.jsx(yo,{type:"monotone",dataKey:"experiments",stroke:"#a78bfa",strokeWidth:2,dot:{fill:"#a78bfa",r:3},activeDot:{r:5},name:"Experiments Launched"})]})})]})}const lE={COMPLETED:"#22c55e",RUNNING:"#3b82f6",FAILED:"#ef4444",PENDING:"#eab308",CANCELLED:"#6b7280",UNKNOWN:"#a78bfa"};function ife({experiments:e}){const t=P.useMemo(()=>{const r=new Map;return e.forEach(n=>{const i=n.status,a=r.get(i)||0;r.set(i,a+1)}),Array.from(r.entries()).map(([n,i])=>({name:n,value:i,color:lE[n]||lE.UNKNOWN})).sort((n,i)=>i.value-n.value)},[e]);return t.length===0?d.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No data available"}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Distribution"}),d.jsx(Qa,{width:"100%",height:220,children:d.jsxs(Gx,{margin:{top:20,bottom:5},children:[d.jsx(dn,{data:t,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:58,label:({name:r,value:n})=>`${r}: ${n}`,style:{fontSize:"11px"},children:t.map((r,n)=>d.jsx(ho,{fill:r.color},`cell-${n}`))}),d.jsx(It,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"11px"}}),d.jsx(on,{wrapperStyle:{fontSize:"11px"}})]})})]})}const afe=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function ofe(){const{selectedTeamId:e}=uo(),[t,r]=P.useState("7days"),{data:n,isLoading:i}=_5(e||""),{data:a,isLoading:o}=Z4(e||"",{enabled:!!e}),s=P.useMemo(()=>{if(!a)return[];const l=new Date,u=t==="7days"?PN(l,7):t==="1month"?Qy(l,1):Qy(l,3);return a.filter(f=>{const c=new Date(f.createdAt);return c>=u&&c<=l})},[a,t]);return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"pb-2 border-b",children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),e&&d.jsxs("p",{className:"mt-0.5 text-muted-foreground font-mono text-xs",children:["TeamID: ",e]})]}),d.jsx("div",{children:d.jsx("h2",{className:"text-base font-semibold text-foreground mb-2",children:"Overview"})}),i?d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[d.jsx($e,{className:"h-14 w-full"}),d.jsx($e,{className:"h-14 w-full"}),d.jsx($e,{className:"h-14 w-full"})]}):d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[d.jsx(de,{children:d.jsx(he,{className:"p-3",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"PROJECTS"}),d.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalProjects)||0})]}),d.jsx("div",{className:"p-1.5 bg-blue-100 rounded-lg",children:d.jsx(rN,{className:"h-3.5 w-3.5 text-blue-600"})})]})})}),d.jsx(de,{children:d.jsx(he,{className:"p-3",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"EXPERIMENTS"}),d.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalExperiments)||0})]}),d.jsx("div",{className:"p-1.5 bg-purple-100 rounded-lg",children:d.jsx(vF,{className:"h-3.5 w-3.5 text-purple-600"})})]})})}),d.jsx(de,{children:d.jsx(he,{className:"p-3",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"RUNS"}),d.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalRuns)||0})]}),d.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:d.jsx(_F,{className:"h-3.5 w-3.5 text-green-600"})})]})})})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Activity"}),d.jsx("div",{className:"flex gap-1",children:afe.map(l=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>r(l.value),className:`h-8 px-2.5 text-xs transition-colors ${t===l.value?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:l.label},l.value))})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(de,{children:d.jsx(he,{className:"p-4",children:o?d.jsx($e,{className:"h-56 w-full"}):s&&s.length>0?d.jsx(ife,{experiments:s}):d.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})}),d.jsx(de,{children:d.jsx(he,{className:"p-4",children:o?d.jsx($e,{className:"h-56 w-full"}):s&&s.length>0?d.jsx(nfe,{experiments:s,timeRange:t}):d.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})})]})]})]})}const go=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:r,className:Oe("w-full caption-bottom text-sm",e),...t})}));go.displayName="Table";const bo=P.forwardRef(({className:e,...t},r)=>d.jsx("thead",{ref:r,className:Oe("[&_tr]:border-b",e),...t}));bo.displayName="TableHeader";const xo=P.forwardRef(({className:e,...t},r)=>d.jsx("tbody",{ref:r,className:Oe("[&_tr:last-child]:border-0",e),...t}));xo.displayName="TableBody";const sfe=P.forwardRef(({className:e,...t},r)=>d.jsx("tfoot",{ref:r,className:Oe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));sfe.displayName="TableFooter";const Or=P.forwardRef(({className:e,...t},r)=>d.jsx("tr",{ref:r,className:Oe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Or.displayName="TableRow";const Re=P.forwardRef(({className:e,...t},r)=>d.jsx("th",{ref:r,className:Oe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Re.displayName="TableHead";const Le=P.forwardRef(({className:e,...t},r)=>d.jsx("td",{ref:r,className:Oe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Le.displayName="TableCell";const lfe=P.forwardRef(({className:e,...t},r)=>d.jsx("caption",{ref:r,className:Oe("mt-4 text-sm text-muted-foreground",e),...t}));lfe.displayName="TableCaption";const wo=P.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,className:Oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));wo.displayName="Input";const uE=20;function ufe(){const{selectedTeamId:e}=uo(),[t,r]=P.useState(1),[n,i]=P.useState(""),{data:a,isLoading:o,error:s}=fp(e||"",{page:t-1,pageSize:uE,enabled:!!e}),l=P.useMemo(()=>{if(!a)return[];let u=[...a];if(n.trim()){const f=n.toLowerCase();u=u.filter(c=>{var h,p,v;return((h=c.name)==null?void 0:h.toLowerCase().includes(f))||((p=c.description)==null?void 0:p.toLowerCase().includes(f))||((v=c.id)==null?void 0:v.toLowerCase().includes(f))})}return u.sort((f,c)=>new Date(c.createdAt).getTime()-new Date(f.createdAt).getTime()),u},[a,n]);return o?d.jsxs("div",{className:"space-y-4",children:[d.jsx($e,{className:"h-12 w-64"}),d.jsx($e,{className:"h-64 w-full"})]}):e?s?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load projects"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:s.message})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{children:d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Projects"})}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("div",{className:"flex gap-2 mb-3 items-center",children:d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ya,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(wo,{placeholder:"Search projects...",value:n,onChange:u=>i(u.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]})}),!a||a.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No projects found"}):l.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No projects match your search"}):d.jsxs(d.Fragment,{children:[d.jsxs(go,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"UUID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Name"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"})]})}),d.jsx(xo,{children:l.map(u=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 font-mono text-sm",children:d.jsx(_n,{to:`/projects/${u.id}`,className:"text-primary font-medium hover:underline",children:u.id})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:u.name||"Unnamed Project"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:u.description||"-"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:nn(new Date(u.createdAt),{addSuffix:!0})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:nn(new Date(u.updatedAt),{addSuffix:!0})})]},u.id))})]}),d.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[d.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",t]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{r(t-1),window.scrollTo({top:0,behavior:"smooth"})},disabled:t===1,className:"h-9 w-9 p-0",children:d.jsx(cp,{className:"h-4 w-4"})}),d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{r(t+1),window.scrollTo({top:0,behavior:"smooth"})},disabled:a.lengthd.jsx(Yx.Provider,{value:{value:t,onValueChange:r},children:d.jsx("div",{ref:i,className:Oe("w-full",e),...n})}));sm.displayName="Tabs";const lm=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));lm.displayName="TabsList";const ro=P.forwardRef(({className:e,value:t,...r},n)=>{const i=P.useContext(Yx);if(!i)throw new Error("TabsTrigger must be used within Tabs");const a=i.value===t;return d.jsx("button",{ref:n,className:Oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground",e),onClick:()=>i.onValueChange(t),...r})});ro.displayName="TabsTrigger";const no=P.forwardRef(({className:e,value:t,...r},n)=>{const i=P.useContext(Yx);if(!i)throw new Error("TabsContent must be used within Tabs");return i.value!==t?null:d.jsx("div",{ref:n,className:Oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r})});no.displayName="TabsContent";const cfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},cE=20;function ffe(){const{id:e}=np(),[t,r]=P.useState("overview"),[n,i]=P.useState(1),[a,o]=P.useState(""),[s,l]=P.useState("ALL"),{data:u,isLoading:f,error:c}=gN(e),{data:h,isLoading:p,error:v}=Nd(e,{page:n-1,pageSize:cE,enabled:!!e}),{data:m}=Nd(e,{page:0,pageSize:1e3,enabled:!!e}),g=P.useMemo(()=>{if(!h)return[];let b=[...h];if(a.trim()){const x=a.toLowerCase();b=b.filter(S=>{var w,O,j;return((w=S.name)==null?void 0:w.toLowerCase().includes(x))||((O=S.description)==null?void 0:O.toLowerCase().includes(x))||((j=S.id)==null?void 0:j.toLowerCase().includes(x))})}return s!=="ALL"&&(b=b.filter(x=>x.status===s)),b.sort((x,S)=>new Date(S.createdAt).getTime()-new Date(x.createdAt).getTime()),b},[h,a,s]),y=P.useMemo(()=>!m||m.length===0?[]:[{name:"COMPLETED",value:m.filter(x=>x.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:m.filter(x=>x.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:m.filter(x=>x.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:m.filter(x=>x.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:m.filter(x=>x.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:m.filter(x=>x.status==="UNKNOWN").length,color:"#a78bfa"}].filter(x=>x.value>0),[m]);return f?d.jsxs("div",{className:"space-y-4",children:[d.jsx($e,{className:"h-12 w-64"}),d.jsx($e,{className:"h-64 w-full"})]}):c||!u?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load project"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:(c==null?void 0:c.message)||"Project not found"})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name||"Unnamed Project"}),d.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),d.jsxs(sm,{value:t,onValueChange:r,children:[d.jsxs(lm,{children:[d.jsx(ro,{value:"overview",children:"Overview"}),d.jsx(ro,{value:"experiments",children:"Experiments"})]}),d.jsx(no,{value:"overview",className:"space-y-4",children:d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),d.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:nn(new Date(u.createdAt),{addSuffix:!0})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:nn(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).map(([b,x])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:b}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof x=="string"?x:JSON.stringify(x)})]},b))})]}),m&&m.length>0&&y.length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",m.length," experiments)"]}),d.jsx(Qa,{width:"100%",height:180,children:d.jsxs(Gx,{margin:{top:20,bottom:5},children:[d.jsx(dn,{data:y,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:b,value:x})=>`${b}: ${x}`,style:{fontSize:"12px"},children:y.map((b,x)=>d.jsx(ho,{fill:b.color},`cell-${x}`))}),d.jsx(It,{}),d.jsx(on,{wrapperStyle:{fontSize:"12px"}})]})})]})]})})}),d.jsx(no,{value:"experiments",className:"space-y-4",children:d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ya,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(wo,{placeholder:"Search experiments...",value:a,onChange:b=>o(b.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(b=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>l(b),className:`h-8 px-2.5 text-xs transition-colors ${s===b?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:b},b))})]}),p?d.jsx($e,{className:"h-24 w-full"}):v?d.jsxs("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-3",children:[d.jsx("p",{className:"text-sm font-medium text-destructive",children:"Failed to load experiments"}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:v.message})]}):!h||h.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center h-24 text-center",children:[d.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"No experiments found"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Create experiments using the AlphaTrion SDK"})]}):g.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No experiments match your search"}):d.jsxs(d.Fragment,{children:[d.jsxs(go,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"UUID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Name"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(xo,{children:g.map(b=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(_n,{to:`/experiments/${b.id}`,className:"font-mono text-primary font-medium hover:underline",children:b.id})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:b.name}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:cfe[b.status],className:"text-xs px-2 py-0.5",children:b.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground tabular-nums",children:b.duration>0?`${b.duration.toFixed(2)}s`:"-"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:nn(new Date(b.createdAt),{addSuffix:!0})})]},b.id))})]}),d.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[d.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",n]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n-1),window.scrollTo({top:0,behavior:"smooth"})},disabled:n===1,className:"h-9 w-9 p-0",children:d.jsx(cp,{className:"h-4 w-4"})}),d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n+1),window.scrollTo({top:0,behavior:"smooth"})},disabled:h.length{if(!l)return[];let p=[...l];if(n.trim()){const v=n.toLowerCase();p=p.filter(m=>{var g,y,b,x;return((g=m.name)==null?void 0:g.toLowerCase().includes(v))||((y=m.description)==null?void 0:y.toLowerCase().includes(v))||((b=m.id)==null?void 0:b.toLowerCase().includes(v))||((x=m.projectId)==null?void 0:x.toLowerCase().includes(v))})}return t!=="ALL"&&(p=p.filter(v=>v.status===t)),p.sort((v,m)=>new Date(m.createdAt).getTime()-new Date(v.createdAt).getTime()),p},[l,t,n]),c=o||u;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Experiments"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiments"})]}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ya,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(wo,{placeholder:"Search experiments...",value:n,onChange:p=>i(p.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(p=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>r(p),className:`h-8 px-2.5 text-xs transition-colors ${t===p?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:p},p))})]}),c?d.jsx($e,{className:"h-24 w-full"}):!f||f.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No experiments match your search":t!=="ALL"?`No ${t} experiments found`:"No experiments found"}):d.jsxs(go,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Name"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Experiment ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Project ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(xo,{children:f.map(p=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:p.name}),d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(_n,{to:`/experiments/${p.id}`,className:"font-mono text-primary font-medium hover:underline",children:p.id})}),d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(_n,{to:`/projects/${p.projectId}`,className:"font-mono text-primary font-medium hover:underline",children:p.projectId})}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:dfe[p.status],className:"text-xs px-2 py-0.5",children:p.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground tabular-nums",children:p.duration>0?`${p.duration.toFixed(2)}s`:"-"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:nn(new Date(p.createdAt),{addSuffix:!0})})]},p.id))})]})]})})]})}function v2(e){const{data:t,...r}=dp(e),n=P.useMemo(()=>{const i={};return((t==null?void 0:t.metrics)||[]).forEach(o=>{const s=o.key||"unknown";i[s]||(i[s]=[]),i[s].push(o)}),Object.keys(i).forEach(o=>{i[o].sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime())}),i},[t==null?void 0:t.metrics]);return{...r,data:n,metricKeys:Object.keys(n)}}const pfe="modulepreload",mfe=function(e){return"/static/"+e},fE={},vfe=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=mfe(l),l in fE)return;fE[l]=!0;const u=l.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":pfe,u||(c.as="script"),c.crossOrigin="",c.href=l,s&&c.setAttribute("nonce",s),document.head.appendChild(c),u)return new Promise((h,p)=>{c.addEventListener("load",h),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function yfe(e){const{data:t,...r}=dp(e),{runMetrics:n,availableMetrics:i}=P.useMemo(()=>{const a=(t==null?void 0:t.metrics)||[];if(a.length===0)return{runMetrics:[],availableMetrics:[]};const o=new Map,s=new Set;[...a].sort((f,c)=>new Date(f.createdAt).getTime()-new Date(c.createdAt).getTime()).forEach(f=>{!f.key||f.value===null||(s.add(f.key),o.has(f.runId)||o.set(f.runId,new Map),o.get(f.runId).set(f.key,f.value))});const u=[];return o.forEach((f,c)=>{const h={};f.forEach((p,v)=>{h[v]=p}),u.push({runId:c,metrics:h})}),{runMetrics:u,availableMetrics:Array.from(s).sort()}},[t==null?void 0:t.metrics]);return{...r,runMetrics:n,availableMetrics:i}}function gfe(e,t,r){let n=!1;for(const i of r){const a=e.metrics[i.key],o=t.metrics[i.key];if(a===void 0||o===void 0)return!1;if(i.direction==="maximize"){if(ao&&(n=!0)}else{if(a>o)return!1;avfe(()=>import("./react-plotly-BtWP0KBj.js").then(e=>e.r),[])),fi=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981","#ef4444","#6366f1","#14b8a6"],dE="#10b981",hE="#9ca3af",pE="#f59e0b";function wfe({metrics:e,experimentId:t,title:r="Metrics",description:n}){const i=Object.keys(e),[a,o]=P.useState(i[0]||""),[s,l]=P.useState("timeline"),[u,f]=P.useState([]),{runMetrics:c,availableMetrics:h}=yfe(t),p=P.useMemo(()=>{const j=[];return Object.values(e).forEach(E=>{j.push(...E)}),j.length===0?null:j[0].runId},[e]),v=P.useMemo(()=>u.length===0?c:c.filter(j=>u.every(E=>j.metrics[E.key]!==void 0)),[c,u]),m=P.useMemo(()=>u.length<2||v.length<2?new Set:bfe(v,u),[v,u]),g=P.useMemo(()=>{var E;if(i.length===0||!a)return[];const j=[];return e[a]&&e[a].forEach((A,T)=>{A.value!==null&&j.push({timestamp:new Date(A.createdAt).getTime(),index:T,time:ou(new Date(A.createdAt),"MMM dd HH:mm:ss"),value:A.value,runId:A.runId})}),j.sort((A,T)=>A.timestamp-T.timestamp),j.forEach((A,T)=>{A.index=T}),console.log("[MetricsChart] Selected key:",a),console.log("[MetricsChart] Total metrics for this key:",(E=e[a])==null?void 0:E.length),console.log("[MetricsChart] Total data points after processing:",j.length),console.log("[MetricsChart] All data points:",j),j},[e,i,a]),y=P.useMemo(()=>{if(u.length<2)return{all:[],paretoLine:[]};const j=u[0],E=u[1],A=u.length>=3?u[2]:void 0,T=v.map(N=>({runId:N.runId,x:N.metrics[j.key],y:N.metrics[E.key],z:A?N.metrics[A.key]:void 0,isParetoOptimal:m.has(N.runId),metrics:N.metrics})),_=T.filter(N=>N.isParetoOptimal).sort((N,M)=>N.x-M.x);return{all:T,paretoLine:_}},[v,u,m]),b=P.useMemo(()=>{if(u.length!==3||y.all.length===0)return null;const j=[...y.paretoLine].sort((N,M)=>N.x!==M.x?N.x-M.x:N.y!==M.y?N.y-M.y:(N.z||0)-(M.z||0)),E=y.all.find(N=>N.runId===p),A=j.filter(N=>N.runId!==p),T=y.all.filter(N=>!N.isParetoOptimal&&N.runId!==p),_=[{x:T.map(N=>N.x),y:T.map(N=>N.y),z:T.map(N=>N.z),mode:"markers",type:"scatter3d",name:"Dominated",showlegend:!1,marker:{size:5,color:hE,opacity:.4,symbol:"circle",line:{color:"#6b7280",width:1,opacity:.3}},customdata:T.map(N=>[N.runId,N.x,N.y,N.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fafafa",bordercolor:"#d1d5db",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}},{x:A.map(N=>N.x),y:A.map(N=>N.y),z:A.map(N=>N.z),mode:"markers",type:"scatter3d",name:"Pareto Optimal",showlegend:!1,marker:{size:5,color:dE,symbol:"circle",opacity:.95,line:{color:"#059669",width:1,opacity:.8}},customdata:A.map(N=>[N.runId,N.x,N.y,N.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#f0fdf4",bordercolor:"#86efac",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}];return E&&_.push({x:[E.x],y:[E.y],z:[E.z],mode:"markers",type:"scatter3d",name:"Start Point",showlegend:!1,marker:{size:5,color:pE,symbol:"circle",opacity:1,line:{color:"#d97706",width:1,opacity:1}},customdata:[[E.runId,E.x,E.y,E.z]],hovertemplate:`Run: %{customdata[0]} (StartPoint)
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fef3c7",bordercolor:"#fcd34d",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}),_},[y,u,p]),x=j=>{o(j)},S=j=>{u.length>=3||u.some(E=>E.key===j)||f([...u,{key:j,direction:"maximize"}])},w=j=>{f(u.filter(E=>E.key!==j))},O=j=>{f(u.map(E=>E.key===j?{...E,direction:E.direction==="maximize"?"minimize":"maximize"}:E))};return i.length===0?d.jsxs(de,{children:[d.jsxs(Ft,{className:"pb-3",children:[d.jsx(Bt,{className:"text-sm",children:r}),n&&d.jsx(dr,{className:"text-xs",children:n})]}),d.jsx(he,{children:d.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"No metrics data available"})})]}):d.jsxs(de,{children:[d.jsxs(Ft,{className:"pb-3",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx(Bt,{className:"text-sm",children:r}),n&&d.jsx(dr,{className:"text-xs",children:n})]}),d.jsxs("div",{className:"flex gap-1",children:[d.jsx(lt,{variant:s==="timeline"?"default":"outline",size:"sm",onClick:()=>l("timeline"),className:"h-7 px-3 text-xs",children:"Timeline"}),d.jsx(lt,{variant:s==="pareto"?"default":"outline",size:"sm",onClick:()=>l("pareto"),className:"h-7 px-3 text-xs",children:"Pareto"})]})]}),s==="timeline"?d.jsx("div",{className:"flex flex-wrap gap-1.5 pt-3",children:i.map((j,E)=>d.jsx(jr,{variant:a===j?"default":"outline",className:"cursor-pointer text-xs px-2 py-0.5",style:{backgroundColor:a===j?fi[E%fi.length]:void 0},onClick:()=>x(j),children:j},j))}):d.jsxs("div",{className:"space-y-2 pt-3",children:[d.jsx("div",{className:"flex flex-wrap gap-1.5",children:h.map((j,E)=>{const A=u.find(_=>_.key===j),T=(A==null?void 0:A.direction)==="maximize";return d.jsxs(jr,{variant:A?"default":"outline",className:"cursor-pointer text-xs px-2 py-1 transition-colors relative",style:{backgroundColor:A?fi[E%fi.length]:void 0,borderColor:A?fi[E%fi.length]:void 0},onClick:()=>{A?O(j):u.length<3&&S(j)},onContextMenu:_=>{_.preventDefault(),A&&w(j)},children:[j,A&&d.jsx("span",{className:"ml-1 text-[10px] opacity-90",children:T?"↑":"↓"})]},j)})}),u.length>0&&d.jsx("div",{className:"text-xs text-gray-500 italic",children:"Click: toggle direction ↑↓ • Right-click: remove"}),d.jsx("div",{className:"text-xs text-muted-foreground",children:u.length===0?d.jsx("span",{children:"Click metrics to select (up to 3)"}):u.length<2?d.jsx("span",{children:"Select at least 2 metrics for analysis"}):d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("span",{children:["Runs: ",v.length]}),m.size>0&&d.jsxs("span",{className:"text-emerald-600 font-medium",children:["Pareto Optimal: ",m.size]})]})})]})]}),d.jsx(he,{className:"pt-0",children:s==="timeline"?a?d.jsx(Qa,{width:"100%",height:280,children:d.jsxs(Vx,{data:g,margin:{top:5,right:20,left:10,bottom:5},onClick:j=>{if(j&&j.activePayload&&j.activePayload[0]){const E=j.activePayload[0].payload;E.runId&&window.open(`/runs/${E.runId}`,"_blank")}},children:[d.jsx(yc,{strokeDasharray:"3 3"}),d.jsx(Yi,{dataKey:"index",label:{value:"Index",position:"insideBottom",offset:-5,style:{fontSize:12}},type:"number",domain:["dataMin","dataMax"],tick:{fontSize:11}}),d.jsx(Xi,{label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:12}},tick:{fontSize:11}}),d.jsx(It,{cursor:{strokeDasharray:"5 5",stroke:"#94a3b8",strokeWidth:1},contentStyle:{backgroundColor:"transparent",border:"none",padding:0},content:({active:j,payload:E})=>{if(!j||!E||E.length===0)return null;const A=E[0].payload;return A.runId?d.jsxs("div",{style:{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:"1.4"},children:[d.jsxs("div",{style:{fontWeight:600,fontSize:"12px"},children:["Run: ",A.runId]}),d.jsxs("div",{style:{fontSize:"12px"},children:[a,": ",typeof A.value=="number"?A.value.toFixed(4):A.value]})]}):null}}),d.jsx(yo,{type:"monotone",dataKey:"value",name:a,stroke:fi[i.indexOf(a)%fi.length],strokeWidth:2,dot:{r:3,style:{cursor:"pointer"}},activeDot:{r:5,style:{cursor:"pointer"}},connectNulls:!0})]})}):d.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"Select a metric to display"}):u.length<2?d.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"Select at least 2 metrics for Pareto analysis"}):y.all.length===0?d.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No runs with complete data for selected metrics"}):u.length===3?d.jsxs("div",{className:"w-full h-[550px] rounded-lg overflow-hidden",style:{background:"linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%)"},children:[d.jsx("style",{children:` - #pareto-3d-plot .nsewdrag { - cursor: default !important; - } - #pareto-3d-plot .nsewdrag.cursor-crosshair { - cursor: default !important; - } - `}),d.jsx(P.Suspense,{fallback:d.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500 mx-auto"}),d.jsx("div",{children:"Loading 3D visualization..."})]})}),children:d.jsx(xfe,{divId:"pareto-3d-plot",data:b,onInitialized:(j,E)=>{E.on("plotly_click",A=>{var T;if(A&&A.points&&A.points[0]){const N=(T=A.points[0].customdata)==null?void 0:T[0];N&&window.open(`/runs/${N}`,"_blank")}})},onUpdate:(j,E)=>{E.removeAllListeners("plotly_click"),E.on("plotly_click",A=>{var T;if(A&&A.points&&A.points[0]){const N=(T=A.points[0].customdata)==null?void 0:T[0];N&&window.open(`/runs/${N}`,"_blank")}})},layout:{autosize:!0,transition:{duration:0},scene:{xaxis:{title:{text:`${u[0].key} (${u[0].direction})`,font:{size:12,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},yaxis:{title:{text:`${u[1].key} (${u[1].direction})`,font:{size:12,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},zaxis:{title:{text:`${u[2].key} (${u[2].direction})`,font:{size:12,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},camera:{eye:{x:1.7,y:1.7,z:1.3},center:{x:0,y:0,z:0},up:{x:0,y:0,z:1}},aspectmode:"cube"},showlegend:!1,hovermode:"closest",margin:{l:10,r:10,t:10,b:10},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",dragmode:"orbit"},config:{responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[]},style:{width:"100%",height:"100%"}})})]}):d.jsx(Qa,{width:"100%",height:400,children:d.jsxs(tfe,{margin:{top:20,right:20,bottom:60,left:60},children:[d.jsx(yc,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),d.jsx(Yi,{type:"number",dataKey:"x",name:u[0].key,label:{value:`${u[0].key} (${u[0].direction})`,position:"insideBottom",offset:-10,style:{fontSize:12,fill:"#374151"}},tick:{fontSize:11,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),d.jsx(Xi,{type:"number",dataKey:"y",name:u[1].key,label:{value:`${u[1].key} (${u[1].direction})`,angle:-90,position:"insideLeft",style:{fontSize:12,fill:"#374151"}},tick:{fontSize:11,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),d.jsx(It,{cursor:{strokeDasharray:"3 3"},content:({active:j,payload:E})=>{var R,I;if(!j||!E||!E[0])return null;const A=E[0].payload,T=A.runId===p,_=A.isParetoOptimal,N=T?"#fef3c7":_?"#f0fdf4":"#fafafa",M=T?"#fcd34d":_?"#86efac":"#d1d5db";return d.jsxs("div",{style:{backgroundColor:N,border:`1px solid ${M}`,borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"12px"},children:[d.jsxs("div",{style:{fontWeight:600,marginBottom:"4px"},children:["Run: ",A.runId,T?" (StartPoint)":""]}),d.jsxs("div",{children:[u[0].key,": ",(R=A.x)==null?void 0:R.toFixed(4)]}),d.jsxs("div",{children:[u[1].key,": ",(I=A.y)==null?void 0:I.toFixed(4)]})]})}}),d.jsx(za,{name:"Dominated",data:y.all.filter(j=>!j.isParetoOptimal&&j.runId!==p),fill:hE,fillOpacity:.4,shape:"circle",onClick:j=>(j==null?void 0:j.runId)&&window.open(`/runs/${j.runId}`,"_blank")}),d.jsx(za,{name:"Pareto",data:y.all.filter(j=>j.isParetoOptimal&&j.runId!==p),fill:dE,fillOpacity:.95,shape:"circle",onClick:j=>(j==null?void 0:j.runId)&&window.open(`/runs/${j.runId}`,"_blank")}),p&&d.jsx(za,{name:"Start",data:y.all.filter(j=>j.runId===p),fill:pE,shape:"circle",onClick:j=>(j==null?void 0:j.runId)&&window.open(`/runs/${j.runId}`,"_blank")})]})})})]})}const mE={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},vE=20;function Sfe(){var x;const{id:e}=np(),[t,r]=P.useState("overview"),[n,i]=P.useState(1),[a,o]=P.useState(""),[s,l]=P.useState("ALL"),{data:u,isLoading:f,error:c}=dp(e),{data:h,isLoading:p}=Yy(e,{page:n-1,pageSize:vE}),{data:v}=Yy(e,{page:0,pageSize:1e3}),{data:m,isLoading:g}=v2(e),y=P.useMemo(()=>{if(!h)return[];let S=[...h];if(a.trim()){const w=a.toLowerCase();S=S.filter(O=>{var j;return(j=O.id)==null?void 0:j.toLowerCase().includes(w)})}return s!=="ALL"&&(S=S.filter(w=>w.status===s)),S.sort((w,O)=>new Date(O.createdAt).getTime()-new Date(w.createdAt).getTime()),S},[h,a,s]),b=P.useMemo(()=>!v||v.length===0?[]:[{name:"COMPLETED",value:v.filter(w=>w.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:v.filter(w=>w.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:v.filter(w=>w.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:v.filter(w=>w.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:v.filter(w=>w.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:v.filter(w=>w.status==="UNKNOWN").length,color:"#a78bfa"}].filter(w=>w.value>0),[v]);return f?d.jsxs("div",{className:"space-y-4",children:[d.jsx($e,{className:"h-12 w-64"}),d.jsx($e,{className:"h-96 w-full"})]}):c||!u?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load experiment"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:(c==null?void 0:c.message)||"Experiment not found"})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name}),d.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),d.jsx(jr,{variant:mE[u.status],children:u.status})]}),d.jsxs(sm,{value:t,onValueChange:r,children:[d.jsxs(lm,{children:[d.jsx(ro,{value:"overview",children:"Overview"}),d.jsx(ro,{value:"runs",children:"Runs"})]}),d.jsxs(no,{value:"overview",className:"space-y-4",children:[d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),d.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.duration>0?`${u.duration.toFixed(2)}s`:"N/A"})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Total Tokens"}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((x=u.meta)==null?void 0:x.total_tokens)!==void 0?d.jsxs(d.Fragment,{children:[Number(u.meta.total_tokens).toLocaleString(),u.meta.input_tokens!==void 0&&u.meta.output_tokens!==void 0&&d.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(u.meta.input_tokens).toLocaleString(),"↓ ",Number(u.meta.output_tokens).toLocaleString(),"↑)"]})]}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:nn(new Date(u.createdAt),{addSuffix:!0})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:nn(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).filter(S=>!["total_tokens","input_tokens","output_tokens"].includes(S)).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).filter(([S])=>!["total_tokens","input_tokens","output_tokens"].includes(S)).map(([S,w])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:S}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof w=="string"?w:JSON.stringify(w)})]},S))})]}),u.params&&Object.keys(u.params).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Parameters"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.params).map(([S,w])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:S}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof w=="string"?w:JSON.stringify(w)})]},S))})]}),v&&v.length>0&&b.length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",v.length," runs)"]}),d.jsx(Qa,{width:"100%",height:180,children:d.jsxs(Gx,{margin:{top:20,bottom:5},children:[d.jsx(dn,{data:b,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:S,value:w})=>`${S}: ${w}`,style:{fontSize:"12px"},children:b.map((S,w)=>d.jsx(ho,{fill:S.color},`cell-${w}`))}),d.jsx(It,{}),d.jsx(on,{wrapperStyle:{fontSize:"12px"}})]})})]})]})}),g?d.jsx($e,{className:"h-80 w-full"}):m&&Object.keys(m).length>0?d.jsx(wfe,{metrics:m,experimentId:e,title:"Metrics",description:"Switch between timeline and Pareto analysis views"}):d.jsxs(de,{children:[d.jsxs(Ft,{className:"pb-3",children:[d.jsx(Bt,{className:"text-sm",children:"Metrics"}),d.jsx(dr,{className:"text-xs",children:"No metrics data available"})]}),d.jsx(he,{children:d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:v&&v.length>0?"No metrics logged yet":"No runs in this experiment"})})]})]}),d.jsx(no,{value:"runs",className:"space-y-4",children:d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ya,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(wo,{placeholder:"Search runs...",value:a,onChange:S=>o(S.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(S=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>l(S),className:`h-8 px-2.5 text-xs transition-colors ${s===S?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:S},S))})]}),p?d.jsx($e,{className:"h-24 w-full"}):!h||h.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No runs found"}):y.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No runs match your search"}):d.jsxs(d.Fragment,{children:[d.jsxs(go,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Run ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(xo,{children:y.map(S=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(_n,{to:`/runs/${S.id}`,className:"font-mono text-primary font-medium hover:underline",children:S.id})}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:mE[S.status],className:"text-xs px-2 py-0.5",children:S.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:nn(new Date(S.createdAt),{addSuffix:!0})})]},S.id))})]}),d.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[d.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",n]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n-1),window.scrollTo({top:0,behavior:"smooth"})},disabled:n===1,className:"h-9 w-9 p-0",children:d.jsx(cp,{className:"h-4 w-4"})}),d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n+1),window.scrollTo({top:0,behavior:"smooth"})},disabled:h.length{const r=new Set;return e.forEach(i=>{i.params&&Object.keys(i.params).forEach(a=>r.add(a))}),Array.from(r).map(i=>{const a=e.map(l=>l.params&&i in l.params?JSON.stringify(l.params[i]):null),s=new Set(a.filter(l=>l!==null)).size>1;return{key:i,values:a,isDifferent:s}}).sort((i,a)=>i.isDifferent!==a.isDifferent?i.isDifferent?-1:1:i.key.localeCompare(a.key))},[e]);return d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Parameter Comparison"}),d.jsx(dr,{children:"Side-by-side comparison of experiment parameters"})]}),d.jsx(he,{children:t.length===0?d.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No parameters to compare"}):d.jsxs(go,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"font-semibold",children:"Parameter"}),e.map((r,n)=>d.jsx(Re,{className:"font-semibold",children:r.name},r.id))]})}),d.jsx(xo,{children:t.map(r=>d.jsxs(Or,{className:r.isDifferent?"bg-yellow-50 dark:bg-yellow-950":"",children:[d.jsx(Le,{className:"font-medium",children:r.key}),r.values.map((n,i)=>d.jsx(Le,{className:n===null?"text-muted-foreground italic":r.isDifferent?"font-medium":"",children:n===null?"-":n},i))]},r.key))})]})})]})}const yE=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981"];function jfe({experimentIds:e}){const t=e.map(a=>v2(a)),r=t.some(a=>a.isLoading),n=P.useMemo(()=>{if(r)return[];const a=new Map;return t.forEach((o,s)=>{const l=o.data||{};Object.entries(l).forEach(([u,f])=>{f.forEach(c=>{const h=c.createdAt,p=`exp${s+1}_${u}`;a.has(h)||a.set(h,{timestamp:h,time:ou(new Date(h),"HH:mm:ss")});const v=a.get(h);v[p]=c.value})})}),Array.from(a.values()).sort((o,s)=>new Date(o.timestamp).getTime()-new Date(s.timestamp).getTime())},[t,r]),i=P.useMemo(()=>{const a=new Set;return n.length>0&&Object.keys(n[0]).forEach(o=>{o!=="timestamp"&&o!=="time"&&a.add(o)}),Array.from(a)},[n]);return r?d.jsxs(de,{children:[d.jsx(Ft,{children:d.jsx(Bt,{children:"Metrics Overlay"})}),d.jsx(he,{children:d.jsx($e,{className:"h-96 w-full"})})]}):n.length===0?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Metrics Overlay"}),d.jsx(dr,{children:"Combined metrics visualization across experiments"})]}),d.jsx(he,{children:d.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No metrics data available for comparison"})})]}):d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Metrics Overlay"}),d.jsx(dr,{children:"Combined metrics from all selected experiments"})]}),d.jsx(he,{children:d.jsx(Qa,{width:"100%",height:400,children:d.jsxs(Vx,{data:n,margin:{top:5,right:30,left:20,bottom:5},children:[d.jsx(yc,{strokeDasharray:"3 3"}),d.jsx(Yi,{dataKey:"time",label:{value:"Time",position:"insideBottom",offset:-5}}),d.jsx(Xi,{label:{value:"Value",angle:-90,position:"insideLeft"}}),d.jsx(It,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem"}}),d.jsx(on,{}),i.map((a,o)=>d.jsx(yo,{type:"monotone",dataKey:a,stroke:yE[o%yE.length],strokeWidth:2,dot:{r:3},connectNulls:!0},a))]})})})]})}const Pfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function Efe(){var i;const[e]=vL(),t=((i=e.get("ids"))==null?void 0:i.split(","))||[],{data:r,isLoading:n}=N5(t);return n?d.jsxs("div",{className:"space-y-4",children:[d.jsx($e,{className:"h-12 w-64"}),d.jsx($e,{className:"h-96 w-full"})]}):!r||r.length<2?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Experiment Comparison"}),d.jsx(dr,{children:"Select at least 2 experiments to compare"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-muted-foreground",children:"No experiments selected for comparison"})})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Experiment Comparison"}),d.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Comparing ",r.length," experiments"]})]}),d.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx(Bt,{className:"text-lg",children:a.name}),d.jsx(jr,{variant:Pfe[a.status],children:a.status})]}),a.description&&d.jsx(dr,{children:a.description})]}),d.jsx(he,{children:d.jsxs("dl",{className:"space-y-2 text-sm",children:[d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-muted-foreground",children:"Duration"}),d.jsx("dd",{className:"font-medium",children:a.duration>0?`${a.duration.toFixed(2)}s`:"N/A"})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-muted-foreground",children:"Params"}),d.jsx("dd",{className:"font-medium",children:a.params?Object.keys(a.params).length:0})]})]})})]},a.id))}),d.jsx(Ofe,{experiments:r}),d.jsx(jfe,{experimentIds:t})]})}const Afe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function _fe(){var m,g;const{selectedTeamId:e}=uo(),[t,r]=P.useState("ALL"),[n,i]=P.useState(""),{data:a,isLoading:o}=fp(e||"",{page:0,pageSize:1e3,enabled:!!e}),s=((m=a==null?void 0:a[0])==null?void 0:m.id)||"",{data:l,isLoading:u}=Nd(s,{page:0,pageSize:100,enabled:!!s}),f=((g=l==null?void 0:l[0])==null?void 0:g.id)||"",{data:c,isLoading:h}=Yy(f,{page:0,pageSize:100,enabled:!!f}),p=P.useMemo(()=>{if(!c)return[];let y=[...c];if(n.trim()){const b=n.toLowerCase();y=y.filter(x=>{var S,w;return((S=x.id)==null?void 0:S.toLowerCase().includes(b))||((w=x.experimentId)==null?void 0:w.toLowerCase().includes(b))})}return t!=="ALL"&&(y=y.filter(b=>b.status===t)),y.sort((b,x)=>new Date(x.createdAt).getTime()-new Date(b.createdAt).getTime()),y},[c,t,n]),v=o||u||h;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Runs"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and monitor individual runs"})]}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ya,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(wo,{placeholder:"Search runs...",value:n,onChange:y=>i(y.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(y=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>r(y),className:`h-8 px-2.5 text-xs transition-colors ${t===y?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:y},y))})]}),v?d.jsx($e,{className:"h-24 w-full"}):!p||p.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No runs match your search":t!=="ALL"?`No ${t} runs found`:"No runs found"}):d.jsxs(go,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Run ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Experiment ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(xo,{children:p.map(y=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(_n,{to:`/runs/${y.id}`,className:"font-mono text-primary font-medium hover:underline",children:y.id})}),d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(_n,{to:`/experiments/${y.experimentId}`,className:"font-mono text-primary font-medium hover:underline",children:y.experimentId})}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:Afe[y.status],className:"text-xs px-2 py-0.5",children:y.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:nn(new Date(y.createdAt),{addSuffix:!0})})]},y.id))})]})]})})]})}async function Tfe(e,t,r){try{return(await cr(fr.listArtifactTags,{team_id:e,project_id:t,repo_type:r})).artifactTags.map(i=>i.name)}catch(n){throw new Error(`Failed to list tags for project ${t}: ${n instanceof Error?n.message:"Unknown error"}`)}}async function Nfe(e,t,r,n){try{return(await cr(fr.getArtifactContent,{team_id:e,project_id:t,tag:r,repo_type:n})).artifactContent}catch(i){throw new Error(`Failed to get artifact content: ${i instanceof Error?i.message:"Unknown error"}`)}}function kfe(e,t,r){return Ur({queryKey:["artifacts","tags",e,t,r],queryFn:()=>Tfe(e,t,r),enabled:!!(e&&t),staleTime:10*60*1e3})}function y2(e,t,r,n,i=!0){return Ur({queryKey:["artifacts","content",e,t,r,n],queryFn:()=>Nfe(e,t,r,n),enabled:!!(i&&e&&t&&r),staleTime:1/0,gcTime:30*60*1e3,retry:1})}function Hi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function gE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function g2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=gE(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:o,...s}=a,l=P.useMemo(()=>s,Object.values(s));return d.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=P.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function $fe(e,t=[]){let r=[];function n(a,o){const s=P.createContext(o),l=r.length;r=[...r,o];const u=c=>{var y;const{scope:h,children:p,...v}=c,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||s,g=P.useMemo(()=>v,Object.values(v));return d.jsx(m.Provider,{value:g,children:p})};u.displayName=a+"Provider";function f(c,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||s,v=P.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,f]}const i=()=>{const a=r.map(o=>P.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,Mfe(i,...t)]}function Mfe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...s,...c}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var xc=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},Ife=I0[" useId ".trim().toString()]||(()=>{}),Dfe=0;function Ov(e){const[t,r]=P.useState(Ife());return xc(()=>{r(n=>n??String(Dfe++))},[e]),e||(t?`radix-${t}`:"")}var Rfe=I0[" useInsertionEffect ".trim().toString()]||xc;function Lfe({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=Ffe({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const f=P.useRef(e!==void 0);P.useEffect(()=>{const c=f.current;c!==s&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,n])}const u=P.useCallback(f=>{var c;if(s){const h=Bfe(f)?f(e):f;h!==e&&((c=o.current)==null||c.call(o,h))}else a(f)},[s,e,a,o]);return[l,u]}function Ffe({defaultProp:e,onChange:t}){const[r,n]=P.useState(e),i=P.useRef(r),a=P.useRef(t);return Rfe(()=>{a.current=t},[t]),P.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Bfe(e){return typeof e=="function"}function b2(e){const t=zfe(e),r=P.forwardRef((n,i)=>{const{children:a,...o}=n,s=P.Children.toArray(a),l=s.find(Wfe);if(l){const u=l.props.children,f=s.map(c=>c===l?P.Children.count(u)>1?P.Children.only(null):P.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...o,ref:i,children:P.isValidElement(u)?P.cloneElement(u,void 0,f):null})}return d.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function zfe(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const o=Kfe(i),s=Hfe(a,i.props);return i.type!==P.Fragment&&(s.ref=n?g2(n,o):o),P.cloneElement(i,s)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ufe=Symbol("radix.slottable");function Wfe(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ufe}function Hfe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function Kfe(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oi=qfe.reduce((e,t)=>{const r=b2(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Vfe(e,t){e&&Eb.flushSync(()=>e.dispatchEvent(t))}function wc(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Gfe(e,t=globalThis==null?void 0:globalThis.document){const r=wc(e);P.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Yfe="DismissableLayer",_0="dismissableLayer.update",Xfe="dismissableLayer.pointerDownOutside",Qfe="dismissableLayer.focusOutside",bE,x2=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),w2=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=P.useContext(x2),[f,c]=P.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=P.useState({}),v=So(t,j=>c(j)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=f?m.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,w=ede(j=>{const E=j.target,A=[...u.branches].some(T=>T.contains(E));!S||A||(i==null||i(j),o==null||o(j),j.defaultPrevented||s==null||s())},h),O=tde(j=>{const E=j.target;[...u.branches].some(T=>T.contains(E))||(a==null||a(j),o==null||o(j),j.defaultPrevented||s==null||s())},h);return Gfe(j=>{b===u.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},h),P.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(bE=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),xE(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=bE)}},[f,h,r,u]),P.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),xE())},[f,u]),P.useEffect(()=>{const j=()=>p({});return document.addEventListener(_0,j),()=>document.removeEventListener(_0,j)},[]),d.jsx(oi.div,{...l,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Hi(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Hi(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Hi(e.onPointerDownCapture,w.onPointerDownCapture)})});w2.displayName=Yfe;var Jfe="DismissableLayerBranch",Zfe=P.forwardRef((e,t)=>{const r=P.useContext(x2),n=P.useRef(null),i=So(t,n);return P.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(oi.div,{...e,ref:i})});Zfe.displayName=Jfe;function ede(e,t=globalThis==null?void 0:globalThis.document){const r=wc(e),n=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){S2(Xfe,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function tde(e,t=globalThis==null?void 0:globalThis.document){const r=wc(e),n=P.useRef(!1);return P.useEffect(()=>{const i=a=>{a.target&&!n.current&&S2(Qfe,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function xE(){const e=new CustomEvent(_0);document.dispatchEvent(e)}function S2(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Vfe(i,a):i.dispatchEvent(a)}var jv="focusScope.autoFocusOnMount",Pv="focusScope.autoFocusOnUnmount",wE={bubbles:!1,cancelable:!0},rde="FocusScope",O2=P.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=P.useState(null),u=wc(i),f=wc(a),c=P.useRef(null),h=So(t,m=>l(m)),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let m=function(x){if(p.paused||!s)return;const S=x.target;s.contains(S)?c.current=S:hi(c.current,{select:!0})},g=function(x){if(p.paused||!s)return;const S=x.relatedTarget;S!==null&&(s.contains(S)||hi(c.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&hi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),b.disconnect()}}},[n,s,p.paused]),P.useEffect(()=>{if(s){OE.add(p);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(jv,wE);s.addEventListener(jv,u),s.dispatchEvent(y),y.defaultPrevented||(nde(lde(j2(s)),{select:!0}),document.activeElement===m&&hi(s))}return()=>{s.removeEventListener(jv,u),setTimeout(()=>{const y=new CustomEvent(Pv,wE);s.addEventListener(Pv,f),s.dispatchEvent(y),y.defaultPrevented||hi(m??document.body,{select:!0}),s.removeEventListener(Pv,f),OE.remove(p)},0)}}},[s,u,f,p]);const v=P.useCallback(m=>{if(!r&&!n||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const b=m.currentTarget,[x,S]=ide(b);x&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&hi(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),r&&hi(S,{select:!0})):y===b&&m.preventDefault()}},[r,n,p.paused]);return d.jsx(oi.div,{tabIndex:-1,...o,ref:h,onKeyDown:v})});O2.displayName=rde;function nde(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(hi(n,{select:t}),document.activeElement!==r)return}function ide(e){const t=j2(e),r=SE(t,e),n=SE(t.reverse(),e);return[r,n]}function j2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function SE(e,t){for(const r of e)if(!ade(r,{upTo:t}))return r}function ade(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ode(e){return e instanceof HTMLInputElement&&"select"in e}function hi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ode(e)&&t&&e.select()}}var OE=sde();function sde(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=jE(e,t),e.unshift(t)},remove(t){var r;e=jE(e,t),(r=e[0])==null||r.resume()}}}function jE(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function lde(e){return e.filter(t=>t.tagName!=="A")}var ude="Portal",P2=P.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=P.useState(!1);xc(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?_D.createPortal(d.jsx(oi.div,{...n,ref:t}),o):null});P2.displayName=ude;function cde(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var um=e=>{const{present:t,children:r}=e,n=fde(t),i=typeof r=="function"?r({present:n.isPresent}):P.Children.only(r),a=So(n.ref,dde(i));return typeof r=="function"||n.isPresent?P.cloneElement(i,{ref:a}):null};um.displayName="Presence";function fde(e){const[t,r]=P.useState(),n=P.useRef(null),i=P.useRef(e),a=P.useRef("none"),o=e?"mounted":"unmounted",[s,l]=cde(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const u=Cf(n.current);a.current=s==="mounted"?u:"none"},[s]),xc(()=>{const u=n.current,f=i.current;if(f!==e){const h=a.current,p=Cf(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),xc(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=p=>{const m=Cf(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(a.current=Cf(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:P.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Cf(e){return(e==null?void 0:e.animationName)||"none"}function dde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ev=0;function hde(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??PE()),document.body.insertAdjacentElement("beforeend",e[1]??PE()),Ev++,()=>{Ev===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ev--}},[])}function PE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var wn=function(){return wn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Nde;var t=kde(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$de=T2(),ss="data-scroll-locked",Mde=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` - .`.concat(mde,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(s,"px ").concat(n,`; - } - body[`).concat(ss,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(ed,` { - right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(td,` { - margin-right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(ed," .").concat(ed,` { - right: 0 `).concat(n,`; - } - - .`).concat(td," .").concat(td,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(ss,`] { - `).concat(vde,": ").concat(s,`px; - } -`)},AE=function(){var e=parseInt(document.body.getAttribute(ss)||"0",10);return isFinite(e)?e:0},Ide=function(){P.useEffect(function(){return document.body.setAttribute(ss,(AE()+1).toString()),function(){var e=AE()-1;e<=0?document.body.removeAttribute(ss):document.body.setAttribute(ss,e.toString())}},[])},Dde=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Ide();var a=P.useMemo(function(){return Cde(i)},[i]);return P.createElement($de,{styles:Mde(a,!t,i,r?"":"!important")})},T0=!1;if(typeof window<"u")try{var $f=Object.defineProperty({},"passive",{get:function(){return T0=!0,!0}});window.addEventListener("test",$f,$f),window.removeEventListener("test",$f,$f)}catch{T0=!1}var Co=T0?{passive:!1}:!1,Rde=function(e){return e.tagName==="TEXTAREA"},N2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Rde(e)&&r[t]==="visible")},Lde=function(e){return N2(e,"overflowY")},Fde=function(e){return N2(e,"overflowX")},_E=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=k2(e,n);if(i){var a=C2(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Bde=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},zde=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},k2=function(e,t){return e==="v"?Lde(t):Fde(t)},C2=function(e,t){return e==="v"?Bde(t):zde(t)},Ude=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wde=function(e,t,r,n,i){var a=Ude(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,f=o>0,c=0,h=0;do{if(!s)break;var p=C2(e,s),v=p[0],m=p[1],g=p[2],y=m-g-a*v;(v||y)&&k2(e,s)&&(c+=y,h+=v);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(c)<1||!f&&Math.abs(h)<1)&&(u=!0),u},Mf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},TE=function(e){return[e.deltaX,e.deltaY]},NE=function(e){return e&&"current"in e?e.current:e},Hde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kde=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},qde=0,$o=[];function Vde(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),i=P.useState(qde++)[0],a=P.useState(T2)[0],o=P.useRef(e);P.useEffect(function(){o.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=pde([e.lockRef.current],(e.shards||[]).map(NE),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=P.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Mf(m),b=r.current,x="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],w,O=m.target,j=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&j==="h"&&O.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,T=A?A===O||A.contains(O):!1;if(T)return!1;var _=_E(j,O);if(!_)return!0;if(_?w=j:(w=j==="v"?"h":"v",_=_E(j,O)),!_)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=w),!w)return!0;var N=n.current||w;return Wde(N,g,m,N==="h"?x:S)},[]),l=P.useCallback(function(m){var g=m;if(!(!$o.length||$o[$o.length-1]!==a)){var y="deltaY"in g?TE(g):Mf(g),b=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&Hde(w.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(NE).filter(Boolean).filter(function(w){return w.contains(g.target)}),S=x.length>0?s(g,x[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=P.useCallback(function(m,g,y,b){var x={name:m,delta:g,target:y,should:b,shadowParent:Gde(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),f=P.useCallback(function(m){r.current=Mf(m),n.current=void 0},[]),c=P.useCallback(function(m){u(m.type,TE(m),m.target,s(m,e.lockRef.current))},[]),h=P.useCallback(function(m){u(m.type,Mf(m),m.target,s(m,e.lockRef.current))},[]);P.useEffect(function(){return $o.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Co),document.addEventListener("touchmove",l,Co),document.addEventListener("touchstart",f,Co),function(){$o=$o.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,Co),document.removeEventListener("touchmove",l,Co),document.removeEventListener("touchstart",f,Co)}},[]);var p=e.removeScrollBar,v=e.inert;return P.createElement(P.Fragment,null,v?P.createElement(a,{styles:Kde(i)}):null,p?P.createElement(Dde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Yde=Ode(_2,Vde);var $2=P.forwardRef(function(e,t){return P.createElement(cm,wn({},e,{ref:t,sideCar:Yde}))});$2.classNames=cm.classNames;var Xde=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mo=new WeakMap,If=new WeakMap,Df={},Nv=0,M2=function(e){return e&&(e.host||M2(e.parentNode))},Qde=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=M2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Jde=function(e,t,r,n){var i=Qde(t,Array.isArray(e)?e:[e]);Df[r]||(Df[r]=new WeakMap);var a=Df[r],o=[],s=new Set,l=new Set(i),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};i.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))f(h);else try{var p=h.getAttribute(n),v=p!==null&&p!=="false",m=(Mo.get(h)||0)+1,g=(a.get(h)||0)+1;Mo.set(h,m),a.set(h,g),o.push(h),m===1&&v&&If.set(h,!0),g===1&&h.setAttribute(r,"true"),v||h.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return f(t),s.clear(),Nv++,function(){o.forEach(function(c){var h=Mo.get(c)-1,p=a.get(c)-1;Mo.set(c,h),a.set(c,p),h||(If.has(c)||c.removeAttribute(n),If.delete(c)),p||c.removeAttribute(r)}),Nv--,Nv||(Mo=new WeakMap,Mo=new WeakMap,If=new WeakMap,Df={})}},Zde=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Xde(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),Jde(n,i,r,"aria-hidden")):function(){return null}},fm="Dialog",[I2]=$fe(fm),[ehe,hn]=I2(fm),D2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=P.useRef(null),l=P.useRef(null),[u,f]=Lfe({prop:n,defaultProp:i??!1,onChange:a,caller:fm});return d.jsx(ehe,{scope:t,triggerRef:s,contentRef:l,contentId:Ov(),titleId:Ov(),descriptionId:Ov(),open:u,onOpenChange:f,onOpenToggle:P.useCallback(()=>f(c=>!c),[f]),modal:o,children:r})};D2.displayName=fm;var R2="DialogTrigger",the=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(R2,r),a=So(t,i.triggerRef);return d.jsx(oi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Jx(i.open),...n,ref:a,onClick:Hi(e.onClick,i.onOpenToggle)})});the.displayName=R2;var Xx="DialogPortal",[rhe,L2]=I2(Xx,{forceMount:void 0}),F2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=hn(Xx,t);return d.jsx(rhe,{scope:t,forceMount:r,children:P.Children.map(n,o=>d.jsx(um,{present:r||a.open,children:d.jsx(P2,{asChild:!0,container:i,children:o})}))})};F2.displayName=Xx;var Fh="DialogOverlay",B2=P.forwardRef((e,t)=>{const r=L2(Fh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=hn(Fh,e.__scopeDialog);return a.modal?d.jsx(um,{present:n||a.open,children:d.jsx(ihe,{...i,ref:t})}):null});B2.displayName=Fh;var nhe=b2("DialogOverlay.RemoveScroll"),ihe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(Fh,r);return d.jsx($2,{as:nhe,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(oi.div,{"data-state":Jx(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),io="DialogContent",z2=P.forwardRef((e,t)=>{const r=L2(io,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=hn(io,e.__scopeDialog);return d.jsx(um,{present:n||a.open,children:a.modal?d.jsx(ahe,{...i,ref:t}):d.jsx(ohe,{...i,ref:t})})});z2.displayName=io;var ahe=P.forwardRef((e,t)=>{const r=hn(io,e.__scopeDialog),n=P.useRef(null),i=So(t,r.contentRef,n);return P.useEffect(()=>{const a=n.current;if(a)return Zde(a)},[]),d.jsx(U2,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Hi(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Hi(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Hi(e.onFocusOutside,a=>a.preventDefault())})}),ohe=P.forwardRef((e,t)=>{const r=hn(io,e.__scopeDialog),n=P.useRef(!1),i=P.useRef(!1);return d.jsx(U2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),U2=P.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=hn(io,r),l=P.useRef(null),u=So(t,l);return hde(),d.jsxs(d.Fragment,{children:[d.jsx(O2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(w2,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Jx(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(she,{titleId:s.titleId}),d.jsx(uhe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Qx="DialogTitle",W2=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(Qx,r);return d.jsx(oi.h2,{id:i.titleId,...n,ref:t})});W2.displayName=Qx;var H2="DialogDescription",K2=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(H2,r);return d.jsx(oi.p,{id:i.descriptionId,...n,ref:t})});K2.displayName=H2;var q2="DialogClose",V2=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(q2,r);return d.jsx(oi.button,{type:"button",...n,ref:t,onClick:Hi(e.onClick,()=>i.onOpenChange(!1))})});V2.displayName=q2;function Jx(e){return e?"open":"closed"}var G2="DialogTitleWarning",[Fhe,Y2]=Cfe(G2,{contentName:io,titleName:Qx,docsSlug:"dialog"}),she=({titleId:e})=>{const t=Y2(G2),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},lhe="DialogDescriptionWarning",uhe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Y2(lhe).contentName}}.`;return P.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},che=D2,fhe=F2,X2=B2,Q2=z2,J2=W2,Z2=K2,dhe=V2;const eM=che,hhe=fhe,tM=P.forwardRef(({className:e,...t},r)=>d.jsx(X2,{ref:r,className:Oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));tM.displayName=X2.displayName;const Zx=P.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(hhe,{children:[d.jsx(tM,{}),d.jsxs(Q2,{ref:n,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,d.jsxs(dhe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(iN,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Zx.displayName=Q2.displayName;const ew=({className:e,...t})=>d.jsx("div",{className:Oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ew.displayName="DialogHeader";const tw=P.forwardRef(({className:e,...t},r)=>d.jsx(J2,{ref:r,className:Oe("text-lg font-semibold leading-none tracking-tight",e),...t}));tw.displayName=J2.displayName;const rw=P.forwardRef(({className:e,...t},r)=>d.jsx(Z2,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));rw.displayName=Z2.displayName;const kE={OK:"bg-green-500",ERROR:"bg-red-500",UNSET:"bg-green-500"},CE=e=>{var n,i;const t=e.spanName.toLowerCase(),r=e.spanKind;return t.includes("openai")||t.includes("chat")||t.includes("completion")?{label:"LLM",icon:d.jsx(nF,{className:"h-3 w-3"}),badgeColor:"bg-purple-100 text-purple-700 border-purple-200"}:r==="CLIENT"||t.includes("http")||t.includes("api")?{label:"API",icon:d.jsx(wF,{className:"h-3 w-3"}),badgeColor:"bg-blue-100 text-blue-700 border-blue-200"}:t.includes("db")||t.includes("database")||t.includes("query")?{label:"DB",icon:d.jsx(eN,{className:"h-3 w-3"}),badgeColor:"bg-cyan-100 text-cyan-700 border-cyan-200"}:((n=e.spanAttributes)==null?void 0:n["traceloop.span.kind"])==="workflow"?{label:"Workflow",icon:d.jsx(NF,{className:"h-3 w-3"}),badgeColor:"bg-indigo-100 text-indigo-700 border-indigo-200"}:((i=e.spanAttributes)==null?void 0:i["traceloop.span.kind"])==="task"?{label:"Task",icon:d.jsx(IF,{className:"h-3 w-3"}),badgeColor:"bg-amber-100 text-amber-700 border-amber-200"}:{label:"Span",icon:d.jsx(Vy,{className:"h-3 w-3"}),badgeColor:"bg-gray-100 text-gray-700 border-gray-200"}};function phe({spans:e}){const[t,r]=P.useState(()=>new Set(e.filter(g=>!g.parentSpanId||g.parentSpanId==="").map(g=>g.spanId))),[n,i]=P.useState(null),a=()=>{const g=new Set(e.map(y=>y.spanId));r(g)},o=()=>{r(new Set)},s=P.useMemo(()=>{if(!e||e.length===0)return[];const g=new Map,y=[];e.forEach(S=>{g.set(S.spanId,{span:S,children:[],depth:0})}),e.forEach(S=>{const w=g.get(S.spanId);if(!S.parentSpanId||S.parentSpanId==="")y.push(w);else{const O=g.get(S.parentSpanId);O?(w.depth=O.depth+1,O.children.push(w)):y.push(w)}});const b=S=>{S.sort((w,O)=>new Date(w.span.timestamp).getTime()-new Date(O.span.timestamp).getTime()),S.forEach(w=>b(w.children))},x=S=>{var _,N,M;S.children.forEach(R=>x(R));const w=parseInt((_=S.span.spanAttributes)==null?void 0:_["gen_ai.usage.input_tokens"])||0,O=parseInt((N=S.span.spanAttributes)==null?void 0:N["gen_ai.usage.output_tokens"])||0,j=parseInt((M=S.span.spanAttributes)==null?void 0:M["llm.usage.total_tokens"])||0,E=S.children.reduce((R,I)=>R+(I.inputTokens||0),0),A=S.children.reduce((R,I)=>R+(I.outputTokens||0),0),T=S.children.reduce((R,I)=>R+(I.totalTokens||0),0);S.inputTokens=w+E,S.outputTokens=O+A,S.totalTokens=j+T};return b(y),y.forEach(S=>x(S)),y},[e]),{minTimestamp:l,maxTimestamp:u,totalDuration:f}=P.useMemo(()=>{if(!e||e.length===0)return{minTimestamp:0,maxTimestamp:0,totalDuration:0};const g=e.map(w=>new Date(w.timestamp).getTime()),y=e.map(w=>new Date(w.timestamp).getTime()+w.duration/1e6),b=Math.min(...g),x=Math.max(...y),S=x-b;return{minTimestamp:b,maxTimestamp:x,totalDuration:S||1}},[e]),c=g=>{r(y=>{const b=new Set(y);return b.has(g)?b.delete(g):b.add(g),b})},h=g=>{const y=g/1e3,b=y/1e3,x=b/1e3;return x>=1?`${x.toFixed(2)}s`:b>=1?`${b.toFixed(2)}ms`:`${y.toFixed(2)}μs`},p=g=>{const{span:y}=g,b=new Date(y.timestamp).getTime(),x=b+y.duration/1e6,S=(b-l)/f*100,w=(x-b)/f*100,O=kE[y.statusCode]||kE.UNSET;return d.jsx("div",{className:`${O} absolute h-7 rounded flex items-center px-2 text-white text-[11px] font-medium overflow-hidden transition-all hover:opacity-90 hover:shadow-md cursor-pointer shadow`,style:{left:`${S}%`,width:`${Math.max(w,.8)}%`},title:`${y.spanName} -Duration: ${h(y.duration)} -Status: ${y.statusCode} -Kind: ${y.spanKind}`,children:d.jsx("span",{className:"truncate",children:h(y.duration)})})},v=g=>{const{span:y,children:b,depth:x,totalTokens:S,inputTokens:w,outputTokens:O}=g,j=b.length>0,E=t.has(y.spanId),A=CE(y),T=j&&S&&S>0;return d.jsxs("div",{children:[d.jsxs("div",{className:`flex items-center border-b border-border hover:bg-muted/30 transition-colors cursor-pointer ${(n==null?void 0:n.spanId)===y.spanId?"bg-accent":""}`,onClick:_=>{_.target.closest("button")||i(y)},children:[d.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2 py-2 min-w-0",style:{width:"360px",paddingLeft:`${x*12+12}px`,paddingRight:"12px"},children:[x>0&&d.jsx("div",{className:"absolute h-full border-l border-border/60",style:{left:`${(x-1)*12+12}px`}}),j?d.jsx("button",{onClick:()=>c(y.spanId),className:"p-0.5 hover:bg-accent rounded flex-shrink-0 transition-colors",children:E?d.jsx(up,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}):d.jsx(Vi,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})}):d.jsx("div",{className:"w-[20px] flex-shrink-0"}),d.jsxs(jr,{variant:"outline",className:`${A.badgeColor} flex items-center gap-1 px-2 py-0.5 text-xs font-medium flex-shrink-0`,children:[A.icon,d.jsx("span",{children:A.label})]}),d.jsx("span",{className:"text-sm font-medium truncate text-foreground",title:y.spanName,children:y.spanName})]}),d.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 whitespace-nowrap text-foreground py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"12px"},children:[d.jsx(Vy,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-mono",children:h(y.duration)})]}),d.jsx("div",{className:"flex-shrink-0 flex flex-col justify-center whitespace-nowrap text-foreground py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"6px"},children:S&&S>0?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"font-mono flex items-center text-xs",children:[T&&d.jsx("span",{className:"inline-block align-middle mr-1 text-muted-foreground",children:"∑"}),d.jsx("span",{children:S.toLocaleString()})]}),w&&O&&w>0&&O>0&&d.jsxs("div",{className:"text-muted-foreground text-[10px] mt-0.5 font-mono",children:[w.toLocaleString(),"↓ ",O.toLocaleString(),"↑"]})]}):d.jsx("span",{className:"text-muted-foreground/40 text-xs",children:"—"})}),d.jsx("div",{className:"flex-1 relative h-9 min-w-0 flex items-center",style:{paddingLeft:"2px",paddingRight:"12px"},children:p(g)})]}),j&&E&&d.jsx("div",{children:b.map(_=>v(_))})]},y.spanId)};if(!e||e.length===0)return d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No traces available"})})});const m=g=>{const y=CE(g),b=g.spanAttributes||{},x=b["gen_ai.request.model"]||b["gen_ai.response.model"],S=b["gen_ai.request.temperature"],w=b["gen_ai.request.max_tokens"],O=b["gen_ai.request.top_p"],j=[];let E=0;for(;b[`gen_ai.prompt.${E}.role`];)j.push({role:b[`gen_ai.prompt.${E}.role`],content:b[`gen_ai.prompt.${E}.content`]}),E++;const A=[];for(E=0;b[`gen_ai.completion.${E}.role`];)A.push({role:b[`gen_ai.completion.${E}.role`],content:b[`gen_ai.completion.${E}.content`],finishReason:b[`gen_ai.completion.${E}.finish_reason`]}),E++;return d.jsx(de,{className:"mt-3 border-2",children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex items-start justify-between mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(jr,{variant:"outline",className:`${y.badgeColor} flex items-center gap-1 px-2 py-1 text-xs`,children:[y.icon,y.label]}),d.jsx("h4",{className:"font-semibold text-sm",children:g.spanName})]}),d.jsx(lt,{variant:"ghost",size:"sm",onClick:()=>i(null),className:"h-6 w-6 p-0 hover:bg-muted",children:d.jsx(iN,{className:"h-3.5 w-3.5"})})]}),x&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h5",{className:"text-xs font-semibold mb-2 text-foreground uppercase tracking-wide",children:"Model Configuration"}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs border rounded-md p-3 bg-muted/30",children:[d.jsxs("div",{className:"col-span-2",children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Model:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:x})]}),S!==void 0&&d.jsxs("div",{children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Temperature:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:S})]}),w&&d.jsxs("div",{children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Max Tokens:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:w})]}),O!==void 0&&d.jsxs("div",{children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Top P:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:O})]})]})]}),j.length>0&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h5",{className:"text-xs font-semibold mb-2 text-foreground uppercase tracking-wide",children:"Input"}),d.jsx("div",{className:"space-y-2",children:j.map((T,_)=>d.jsxs("div",{className:"border rounded-md p-3 bg-muted/30",children:[d.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:T.role}),d.jsx("div",{className:"text-xs whitespace-pre-wrap leading-relaxed text-foreground",children:T.content})]},_))})]}),A.length>0&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h5",{className:"text-xs font-semibold mb-2 text-foreground uppercase tracking-wide",children:"Output"}),d.jsx("div",{className:"space-y-2",children:A.map((T,_)=>d.jsxs("div",{className:"border rounded-md p-3 bg-muted/30",children:[d.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:T.role}),d.jsx("div",{className:"text-xs whitespace-pre-wrap leading-relaxed text-foreground",children:T.content})]},_))})]}),d.jsxs("details",{className:"mt-3",children:[d.jsxs("summary",{className:"text-xs font-semibold cursor-pointer hover:text-foreground text-muted-foreground py-1 uppercase tracking-wide",children:["All Attributes (",Object.keys(b).length,")"]}),d.jsx("div",{className:"mt-2 text-xs space-y-1 bg-muted/30 rounded-md p-3 max-h-64 overflow-auto border",children:Object.entries(b).map(([T,_])=>d.jsxs("div",{className:"grid grid-cols-3 gap-3 py-1",children:[d.jsxs("span",{className:"text-muted-foreground truncate font-medium",title:T,children:[T,":"]}),d.jsx("span",{className:"col-span-2 font-mono break-all text-xs text-foreground",children:String(_)})]},T))})]})]})})};return d.jsx(de,{className:"shadow-sm",children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Vy,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[h(f*1e6)," · ",e.length," span",e.length!==1?"s":""]})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("button",{onClick:a,className:"text-xs px-2 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors font-medium",children:"Expand all"}),d.jsx("span",{className:"text-muted-foreground/30",children:"|"}),d.jsx("button",{onClick:o,className:"text-xs px-2 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors font-medium",children:"Collapse all"})]})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Success"})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Error"})]})]})]}),d.jsxs("div",{className:"border rounded-md overflow-hidden bg-background shadow-sm",children:[d.jsxs("div",{className:"flex items-center bg-muted/50 border-b border-border font-semibold text-[11px] text-foreground uppercase tracking-wide",children:[d.jsx("div",{className:"flex-shrink-0 py-2",style:{width:"360px",paddingLeft:"12px",paddingRight:"12px"},children:"Span Name"}),d.jsx("div",{className:"flex-shrink-0 py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"12px"},children:"Duration"}),d.jsx("div",{className:"flex-shrink-0 py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"6px"},children:"Tokens"}),d.jsx("div",{className:"flex-1 py-2",style:{paddingLeft:"2px",paddingRight:"12px"},children:"Timeline"})]}),s.map(g=>v(g))]}),n&&d.jsx("div",{className:"mt-3",children:m(n)})]})})}const mhe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function vhe(){var A,T;const{id:e}=np(),{data:t,isLoading:r,error:n}=bN(e),[i,a]=P.useState(!1),[o,s]=P.useState(!1),[l,u]=P.useState("overview"),f=(t==null?void 0:t.metrics)||[],c=(t==null?void 0:t.spans)||[],h=r,p=r,v=n,m=(A=t==null?void 0:t.meta)==null?void 0:A.execution_result,g=(m==null?void 0:m.path)&&(m==null?void 0:m.file_name);let y="";if(g){let _=m.path;if(_.includes(":")&&(_=_.split(":")[1]),_.includes("/")){const N=_.split("/");_=N[N.length-1],_.includes(":")&&(_=_.split(":")[1])}y=_}const{data:b,isLoading:x,error:S}=y2((t==null?void 0:t.teamId)||"",(t==null?void 0:t.projectId)||"",y,"execution",i&&g),w=()=>{!g||!t||(s(!1),a(!0))};S&&i&&console.error("Failed to load artifact:",S);const O=()=>{b!=null&&b.content&&(navigator.clipboard.writeText(b.content),s(!0),setTimeout(()=>s(!1),2e3))},j=()=>{if(!b)return"";const{content:_,filename:N,contentType:M}=b;if(M==="application/json"||N.endsWith(".json"))try{const R=JSON.parse(_);return JSON.stringify(R,null,2)}catch{return _}return _},E=()=>{if(!b)return"";const{filename:_,contentType:N}=b;return N==="application/json"||_.endsWith(".json")?"language-json":""};return r?d.jsxs("div",{className:"space-y-4",children:[d.jsx($e,{className:"h-12 w-64"}),d.jsx($e,{className:"h-96 w-full"})]}):n||!t?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load run"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:(n==null?void 0:n.message)||"Run not found"})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Run Details"}),d.jsx("p",{className:"mt-1 text-muted-foreground font-mono text-sm",children:t.id})]}),d.jsx(jr,{variant:mhe[t.status],children:t.status})]}),d.jsxs(sm,{value:l,onValueChange:u,children:[d.jsxs(lm,{children:[d.jsx(ro,{value:"overview",children:"Overview"}),d.jsx(ro,{value:"traces",children:"Traces"})]}),d.jsxs(no,{value:"overview",className:"space-y-4",children:[d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Overview"}),d.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Execution Result"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:g?d.jsxs("button",{onClick:w,disabled:x,className:"inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 hover:underline",children:[d.jsx(tN,{className:"h-3.5 w-3.5"}),m.file_name]}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Tokens"}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((T=t.meta)==null?void 0:T.total_tokens)!==void 0?d.jsxs(d.Fragment,{children:[Number(t.meta.total_tokens).toLocaleString(),d.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(t.meta.input_tokens||0).toLocaleString(),"↓ ",Number(t.meta.output_tokens||0).toLocaleString(),"↑)"]})]}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:nn(new Date(t.createdAt),{addSuffix:!0})})]})]}),t.meta&&Object.keys(t.meta).filter(_=>!["total_tokens","input_tokens","output_tokens","execution_result"].includes(_)).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(t.meta).filter(([_])=>!["total_tokens","input_tokens","output_tokens","execution_result"].includes(_)).map(([_,N])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:_}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof N=="string"?N:JSON.stringify(N)})]},_))})]})]})}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metrics"}),h?d.jsx($e,{className:"h-32 w-full"}):f.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No metrics logged for this run"}):d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:f.map(_=>d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:_.key}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:_.value})]},_.id))})]})})]}),d.jsx(no,{value:"traces",children:p?d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsx($e,{className:"h-64 w-full"})})}):v?d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsxs("div",{className:"text-red-500",children:["Error loading traces: ",v.message]})})}):c&&c.length>0?d.jsx(phe,{spans:c}):d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No traces available for this run"})})})})]}),d.jsx(eM,{open:i,onOpenChange:a,children:d.jsxs(Zx,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[d.jsx(ew,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx(tw,{className:"text-base",children:"Artifact Content"}),d.jsx(rw,{className:"text-xs font-mono mt-1 truncate",children:(b==null?void 0:b.filename)||"Loading..."})]}),b&&d.jsx(lt,{variant:"outline",size:"sm",onClick:O,className:"ml-2 h-8 flex-shrink-0",children:o?d.jsxs(d.Fragment,{children:[d.jsx(Fb,{className:"h-3.5 w-3.5 mr-1.5"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(ZT,{className:"h-3.5 w-3.5 mr-1.5"}),"Copy"]})})]})}),d.jsx("div",{className:"flex-1 overflow-auto border rounded-md bg-slate-950 dark:bg-slate-950",children:x&&!b?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-slate-400 text-sm",children:"Loading artifact..."})}):S?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-red-400 text-sm",children:"Failed to load artifact"})}):d.jsx("pre",{className:`text-xs p-4 overflow-auto text-slate-50 ${E()}`,children:d.jsx("code",{className:"text-slate-50",children:j()})})})]})})]})}function $E({teamId:e,projectId:t,repoType:r,icon:n,title:i,color:a}){const{data:o,isLoading:s}=kfe(e,t,r),[l,u]=P.useState(!1),[f,c]=P.useState(1),[h,p]=P.useState(!1),[v,m]=P.useState(""),[g,y]=P.useState(!1),b=10,{data:x,isLoading:S,error:w}=y2(e,t,v,r,h&&!!v),O=I=>{y(!1),m(I),p(!0)};w&&h&&console.error("Failed to load artifact:",w);const j=()=>{x!=null&&x.content&&(navigator.clipboard.writeText(x.content),y(!0),setTimeout(()=>y(!1),2e3))},E=()=>{if(!x)return"";const{content:I,filename:D,contentType:z}=x;if(z==="application/json"||D.endsWith(".json"))try{const C=JSON.parse(I);return JSON.stringify(C,null,2)}catch{return I}return I},A=()=>{if(!x)return"";const{filename:I,contentType:D}=x;return D==="application/json"||I.endsWith(".json")?"language-json":""};if(s)return d.jsxs("div",{className:"flex items-center gap-2 p-2 rounded border bg-card",children:[n,d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-xs font-medium",children:i}),d.jsx($e,{className:"h-3 w-20 mt-0.5"})]})]});const T=o?Math.ceil(o.length/b):0,_=(f-1)*b,N=_+b,M=o==null?void 0:o.slice(_,N),R=o&&o.length>b;return d.jsxs("div",{className:"rounded border bg-card hover:bg-accent/50 transition-colors",children:[d.jsxs("button",{className:"w-full flex items-center gap-2 p-2 text-left",onClick:()=>u(!l),children:[n,d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:"text-xs font-medium",children:i}),d.jsx("div",{className:"text-xs text-muted-foreground",children:!o||o.length===0?"No artifacts":`${o.length} item${o.length===1?"":"s"}`})]}),o&&o.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(jr,{variant:"secondary",className:`${a} text-xs h-5 px-1.5`,children:o.length}),l?d.jsx(up,{className:"h-3.5 w-3.5 text-muted-foreground"}):d.jsx(Vi,{className:"h-3.5 w-3.5 text-muted-foreground"})]})]}),l&&o&&o.length>0&&d.jsxs("div",{className:"px-2 pb-2",children:[d.jsx("div",{className:"h-px bg-border mb-1"}),d.jsx("div",{className:"space-y-0.5",children:M==null?void 0:M.map((I,D)=>d.jsxs("button",{onClick:z=>{z.stopPropagation(),O(I)},disabled:S,className:"w-full flex items-center gap-1.5 py-1 px-1.5 rounded hover:bg-muted/50 transition-colors cursor-pointer group text-left",children:[d.jsxs("span",{className:"text-xs text-muted-foreground font-mono w-8 flex-shrink-0",children:[_+D+1,"."]}),d.jsx("code",{className:"text-sm bg-muted px-1.5 py-0.5 rounded flex-1 truncate",children:I}),d.jsx(tN,{className:"h-3 w-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]},I))}),R&&d.jsxs("div",{className:"flex items-center justify-between gap-2 mt-2 pt-2 border-t",children:[d.jsx(lt,{variant:"ghost",size:"sm",onClick:I=>{I.stopPropagation(),c(D=>Math.max(1,D-1))},disabled:f===1,className:"h-7 w-7 p-0",children:d.jsx(cp,{className:"h-3.5 w-3.5"})}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:["Page ",f," of ",T]}),d.jsx(lt,{variant:"ghost",size:"sm",onClick:I=>{I.stopPropagation(),c(D=>Math.min(T,D+1))},disabled:f===T,className:"h-7 w-7 p-0",children:d.jsx(Vi,{className:"h-3.5 w-3.5"})})]})]}),d.jsx(eM,{open:h,onOpenChange:p,children:d.jsxs(Zx,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[d.jsx(ew,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx(tw,{className:"text-base",children:"Artifact Content"}),d.jsx(rw,{className:"text-xs font-mono mt-1 truncate",children:(x==null?void 0:x.filename)||"Loading..."})]}),x&&d.jsx(lt,{variant:"outline",size:"sm",onClick:j,className:"ml-2 h-8 flex-shrink-0",children:g?d.jsxs(d.Fragment,{children:[d.jsx(Fb,{className:"h-3.5 w-3.5 mr-1.5"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(ZT,{className:"h-3.5 w-3.5 mr-1.5"}),"Copy"]})})]})}),d.jsx("div",{className:"flex-1 overflow-auto border rounded-md bg-slate-950 dark:bg-slate-950",children:S&&!x?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-slate-400 text-sm",children:"Loading artifact..."})}):w?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-red-400 text-sm",children:"Failed to load artifact"})}):d.jsx("pre",{className:`text-xs p-4 overflow-auto text-slate-50 ${A()}`,children:d.jsx("code",{className:"text-slate-50",children:E()})})})]})})]})}function yhe({project:e,teamId:t}){const[r,n]=P.useState(!1);return d.jsxs(de,{className:"overflow-hidden hover:shadow-sm transition-shadow",children:[d.jsx(Ft,{className:"cursor-pointer hover:bg-muted/30 transition-colors p-3",onClick:()=>n(!r),children:d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[d.jsx("div",{className:"flex-shrink-0",children:r?d.jsx(up,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(Vi,{className:"h-4 w-4 text-muted-foreground"})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsxs(Bt,{className:"text-sm font-medium truncate",children:[e.name," ",d.jsxs("span",{className:"text-sm text-muted-foreground font-normal",children:["(",e.id,")"]})]})})]}),d.jsx("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:d.jsx(nN,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),r&&d.jsx(he,{className:"pt-0 pb-2 px-3",children:d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[d.jsx($E,{teamId:t,projectId:e.id,repoType:"execution",icon:d.jsx(pF,{className:"h-3.5 w-3.5 text-blue-500"}),title:"Execution Results",color:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300"}),d.jsx($E,{teamId:t,projectId:e.id,repoType:"checkpoint",icon:d.jsx(eN,{className:"h-3.5 w-3.5 text-green-500"}),title:"Checkpoints",color:"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300"})]})})]})}function ghe(){const{selectedTeamId:e}=uo(),[t,r]=P.useState(""),{data:n,isLoading:i}=fp(e||"",{pageSize:100}),a=n==null?void 0:n.filter(o=>{var s,l;return((s=o.name)==null?void 0:s.toLowerCase().includes(t.toLowerCase()))||((l=o.id)==null?void 0:l.toLowerCase().includes(t.toLowerCase()))});return d.jsxs("div",{className:"space-y-3 pb-6",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Artifacts"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Browse execution results and checkpoints across all projects"})]}),d.jsxs(jr,{variant:"secondary",className:"text-xs h-6 px-2",children:[(n==null?void 0:n.length)||0," projects"]})]}),n&&n.length>0&&d.jsxs("div",{className:"relative max-w-md",children:[d.jsx(Ya,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(wo,{placeholder:"Search projects...",value:t,onChange:o=>r(o.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),i?d.jsxs("div",{className:"space-y-2",children:[d.jsx($e,{className:"h-14 w-full"}),d.jsx($e,{className:"h-14 w-full"}),d.jsx($e,{className:"h-14 w-full"})]}):!n||n.length===0?d.jsx(de,{children:d.jsxs(he,{className:"flex flex-col items-center justify-center py-10",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 mb-3",children:d.jsx(nN,{className:"h-6 w-6 text-muted-foreground"})}),d.jsx("h3",{className:"text-xs font-semibold mb-1",children:"No Projects Found"}),d.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-sm",children:"Create a project to start managing artifacts for your experiments"})]})}):a&&a.length===0?d.jsx(de,{children:d.jsxs(he,{className:"flex flex-col items-center justify-center py-8",children:[d.jsx(Ya,{className:"h-8 w-8 text-muted-foreground mb-2"}),d.jsx("h3",{className:"text-xs font-semibold mb-0.5",children:"No matches found"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Try adjusting your search query"})]})}):d.jsx("div",{className:"space-y-2",children:a==null?void 0:a.map(o=>d.jsx(yhe,{project:o,teamId:e||""},o.id))})]})}function bhe(){const[e,t]=P.useState(null),[r,n]=P.useState(!0),[i,a]=P.useState(null),{selectedTeamId:o,setSelectedTeamId:s}=uo(),l=fT();return P.useEffect(()=>{async function u(){try{const f=await xL(),c=localStorage.getItem("alphatrion_user_id");c&&c!==f&&(console.log("User ID changed, clearing cache"),l.clear()),localStorage.setItem("alphatrion_user_id",f);const h=await cr(fr.getUser,{id:f});if(!h.user)throw new Error(`User with ID ${f} not found`);t(h.user);const p=await cr(fr.listTeams,{userId:f});if(p.teams&&p.teams.length>0){const v=`alphatrion_selected_team_${f}`,m=localStorage.getItem(v);let g;m&&p.teams.find(b=>b.id===m)?g=m:g=p.teams[0].id,s(g,f)}}catch(f){console.error("Failed to initialize app:",f),a(f)}finally{n(!1)}}u()},[s,l]),r?d.jsx("div",{className:"flex h-screen items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),d.jsx("p",{className:"text-gray-600",children:"Loading user information..."})]})}):i?d.jsx("div",{className:"flex h-screen items-center justify-center",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading User"}),d.jsx("p",{className:"text-gray-700 mb-2",children:i.message}),d.jsx("p",{className:"text-gray-500 text-sm",children:"Please verify:"}),d.jsxs("ul",{className:"text-gray-500 text-sm text-left mt-2 space-y-1",children:[d.jsx("li",{children:"• The user ID exists in the database"}),d.jsx("li",{children:"• The backend server is running"}),d.jsx("li",{children:"• The dashboard was started with correct --userid flag"})]})]})}):e?d.jsx("div",{className:"h-full",children:d.jsx(X3,{user:e,children:d.jsx(iL,{children:d.jsxs(Zt,{path:"/",element:d.jsx(C5,{}),children:[d.jsx(Zt,{index:!0,element:d.jsx(ofe,{})}),d.jsxs(Zt,{path:"projects",children:[d.jsx(Zt,{index:!0,element:d.jsx(ufe,{})}),d.jsx(Zt,{path:":id",element:d.jsx(ffe,{})})]}),d.jsxs(Zt,{path:"experiments",children:[d.jsx(Zt,{index:!0,element:d.jsx(hfe,{})}),d.jsx(Zt,{path:":id",element:d.jsx(Sfe,{})}),d.jsx(Zt,{path:"compare",element:d.jsx(Efe,{})})]}),d.jsxs(Zt,{path:"runs",children:[d.jsx(Zt,{index:!0,element:d.jsx(_fe,{})}),d.jsx(Zt,{path:":id",element:d.jsx(vhe,{})})]}),d.jsx(Zt,{path:"artifacts",element:d.jsx(ghe,{})})]})})})}):null}kv.createRoot(document.getElementById("root")).render(d.jsx(k.StrictMode,{children:d.jsx(ZD,{client:yL,children:d.jsx(dL,{children:d.jsx(gL,{children:d.jsx(bhe,{})})})})}));export{Yc as c,Ee as g,yre as p,P as r}; diff --git a/dashboard/static/assets/index-EyZydF7m.css b/dashboard/static/assets/index-EyZydF7m.css new file mode 100644 index 00000000..7091a39f --- /dev/null +++ b/dashboard/static/assets/index-EyZydF7m.css @@ -0,0 +1 @@ +*,: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:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 210 20% 98%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 93.4%;--input: 214.3 31.8% 93.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.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-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[550px\]{height:550px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-\[85vh\]{max-height:85vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[20px\]{width:20px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[4rem\]{min-width:4rem}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-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-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;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-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.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))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.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-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * 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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / 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-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(192 132 252 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.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-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-8{padding-left:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.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}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / 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-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / 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-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-yellow-600:hover{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.focus\:bg-blue-50:focus{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@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\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/dashboard/static/assets/index-WXCMotp1.css b/dashboard/static/assets/index-WXCMotp1.css deleted file mode 100644 index 7cf50ee3..00000000 --- a/dashboard/static/assets/index-WXCMotp1.css +++ /dev/null @@ -1 +0,0 @@ -*,: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:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 210 20% 98%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 93.4%;--input: 214.3 31.8% 93.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}html,body,#root{height:100%;overflow:hidden}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.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-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[550px\]{height:550px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-\[85vh\]{max-height:85vh}.w-1{width:.25rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[20px\]{width:20px}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[4rem\]{min-width:4rem}.max-w-5xl{max-width:64rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-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-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;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-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.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))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.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-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * 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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-100{--tw-bg-opacity: 1;background-color:rgb(207 250 254 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.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-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-8{padding-left:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.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}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / 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-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-600{--tw-text-opacity: 1;color:rgb(147 51 234 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / 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-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:border-border:hover{border-color:hsl(var(--border))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/30:hover{background-color:hsl(var(--accent) / .3)}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/30:hover{background-color:hsl(var(--muted) / .3)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-yellow-600:hover{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.focus\:bg-blue-50:focus{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.dark\:bg-blue-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.dark\:bg-yellow-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(66 32 6 / var(--tw-bg-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@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\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/dashboard/static/assets/index-jnqNSGCv.js b/dashboard/static/assets/index-jnqNSGCv.js new file mode 100644 index 00000000..4f16c732 --- /dev/null +++ b/dashboard/static/assets/index-jnqNSGCv.js @@ -0,0 +1,588 @@ +var sw=e=>{throw TypeError(e)};var pm=(e,t,r)=>t.has(e)||sw("Cannot "+r);var $=(e,t,r)=>(pm(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?sw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),X=(e,t,r,n)=>(pm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(pm(e,t,"access private method"),r);var Gc=(e,t,r,n)=>({set _(i){X(e,t,i,r)},get _(){return $(e,t,n)}});function nM(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 Yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qE={exports:{}},Bh={},VE={exports:{}},me={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ac=Symbol.for("react.element"),iM=Symbol.for("react.portal"),aM=Symbol.for("react.fragment"),oM=Symbol.for("react.strict_mode"),sM=Symbol.for("react.profiler"),lM=Symbol.for("react.provider"),uM=Symbol.for("react.context"),cM=Symbol.for("react.forward_ref"),fM=Symbol.for("react.suspense"),dM=Symbol.for("react.memo"),hM=Symbol.for("react.lazy"),lw=Symbol.iterator;function pM(e){return e===null||typeof e!="object"?null:(e=lw&&e[lw]||e["@@iterator"],typeof e=="function"?e:null)}var GE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YE=Object.assign,XE={};function nl(e,t,r){this.props=e,this.context=t,this.refs=XE,this.updater=r||GE}nl.prototype.isReactComponent={};nl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};nl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function QE(){}QE.prototype=nl.prototype;function $0(e,t,r){this.props=e,this.context=t,this.refs=XE,this.updater=r||GE}var M0=$0.prototype=new QE;M0.constructor=$0;YE(M0,nl.prototype);M0.isPureReactComponent=!0;var uw=Array.isArray,JE=Object.prototype.hasOwnProperty,I0={current:null},ZE={key:!0,ref:!0,__self:!0,__source:!0};function eA(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)JE.call(t,n)&&!ZE.hasOwnProperty(n)&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1>>1,H=C[V];if(0>>1;Vi(be,W))Kei(Se,be)?(C[V]=Se,C[Ke]=W,V=Ke):(C[V]=be,C[re]=W,V=re);else if(Kei(Se,W))C[V]=Se,C[Ke]=W,V=Ke;else break e}}return F}function i(C,F){var W=C.sortIndex-F.sortIndex;return W!==0?W:C.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,h=3,p=!1,v=!1,m=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(C){for(var F=r(u);F!==null;){if(F.callback===null)n(u);else if(F.startTime<=C)n(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=r(u)}}function S(C){if(m=!1,b(C),!v)if(r(l)!==null)v=!0,D(w);else{var F=r(u);F!==null&&z(S,F.startTime-C)}}function w(C,F){v=!1,m&&(m=!1,y(E),E=-1),p=!0;var W=h;try{for(b(F),f=r(l);f!==null&&(!(f.expirationTime>F)||C&&!_());){var V=f.callback;if(typeof V=="function"){f.callback=null,h=f.priorityLevel;var H=V(f.expirationTime<=F);F=e.unstable_now(),typeof H=="function"?f.callback=H:f===r(l)&&n(l),b(F)}else n(l);f=r(l)}if(f!==null)var Y=!0;else{var re=r(u);re!==null&&z(S,re.startTime-F),Y=!1}return Y}finally{f=null,h=W,p=!1}}var O=!1,j=null,E=-1,A=5,T=-1;function _(){return!(e.unstable_now()-TC||125V?(C.sortIndex=W,t(u,C),r(l)===null&&C===r(u)&&(m?(y(E),E=-1):m=!0,z(S,W-V))):(C.sortIndex=H,t(l,C),v||p||(v=!0,D(w))),C},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(C){var F=h;return function(){var W=h;h=F;try{return C.apply(this,arguments)}finally{h=W}}}})(aA);iA.exports=aA;var PM=iA.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var EM=P,Sr=PM;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$v=Object.prototype.hasOwnProperty,AM=/^[: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]*$/,fw={},dw={};function _M(e){return $v.call(dw,e)?!0:$v.call(fw,e)?!1:AM.test(e)?dw[e]=!0:(fw[e]=!0,!1)}function TM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function NM(e,t,r,n){if(t===null||typeof t>"u"||TM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Zt(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ct[e]=new Zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ct[t]=new Zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ct[e]=new Zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ct[e]=new Zt(e,2,!1,e,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(e){Ct[e]=new Zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ct[e]=new Zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ct[e]=new Zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ct[e]=new Zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ct[e]=new Zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var L0=/[\-:]([a-z])/g;function F0(e){return e[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(e){var t=e.replace(L0,F0);Ct[t]=new Zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(L0,F0);Ct[t]=new Zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(L0,F0);Ct[t]=new Zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ct[e]=new Zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ct.xlinkHref=new Zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ct[e]=new Zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function B0(e,t,r,n){var i=Ct.hasOwnProperty(t)?Ct[t]:null;(i!==null?i.type!==0:n||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{ym=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Vl(e):""}function kM(e){switch(e.tag){case 5:return Vl(e.type);case 16:return Vl("Lazy");case 13:return Vl("Suspense");case 19:return Vl("SuspenseList");case 0:case 2:case 15:return e=gm(e.type,!1),e;case 11:return e=gm(e.type.render,!1),e;case 1:return e=gm(e.type,!0),e;default:return""}}function Rv(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ro:return"Fragment";case Do:return"Portal";case Mv:return"Profiler";case z0:return"StrictMode";case Iv:return"Suspense";case Dv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lA:return(e.displayName||"Context")+".Consumer";case sA:return(e._context.displayName||"Context")+".Provider";case U0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W0:return t=e.displayName||null,t!==null?t:Rv(e.type)||"Memo";case yi:t=e._payload,e=e._init;try{return Rv(e(t))}catch{}}return null}function CM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rv(t);case 8:return t===z0?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $M(e){var t=cA(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jc(e){e._valueTracker||(e._valueTracker=$M(e))}function fA(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=cA(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function rd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Lv(e,t){var r=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function pw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Yi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dA(e,t){t=t.checked,t!=null&&B0(e,"checked",t,!1)}function Fv(e,t){dA(e,t);var r=Yi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bv(e,t.type,Yi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Bv(e,t,r){(t!=="number"||rd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Gl=Array.isArray;function Zo(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Zc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gu(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Zl={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},MM=["Webkit","ms","Moz","O"];Object.keys(Zl).forEach(function(e){MM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zl[t]=Zl[e]})});function vA(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Zl.hasOwnProperty(e)&&Zl[e]?(""+t).trim():t+"px"}function yA(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=vA(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var IM=Je({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 Wv(e,t){if(t){if(IM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Hv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Kv=null;function H0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qv=null,es=null,ts=null;function gw(e){if(e=Nc(e)){if(typeof qv!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Kh(t),qv(e.stateNode,e.type,t))}}function gA(e){es?ts?ts.push(e):ts=[e]:es=e}function xA(){if(es){var e=es,t=ts;if(ts=es=null,gw(e),t)for(e=0;e>>=0,e===0?32:31-(qM(e)/VM|0)|0}var ef=64,tf=4194304;function Yl(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function od(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~i;s!==0?n=Yl(s):(a&=o,a!==0&&(n=Yl(a)))}else o=r&~i,o!==0?n=Yl(o):a!==0&&(n=Yl(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function _c(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rn(t),e[t]=r}function QM(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=tu),Aw=" ",_w=!1;function FA(e,t){switch(e){case"keyup":return PI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Lo=!1;function AI(e,t){switch(e){case"compositionend":return BA(t);case"keypress":return t.which!==32?null:(_w=!0,Aw);case"textInput":return e=t.data,e===Aw&&_w?null:e;default:return null}}function _I(e,t){if(Lo)return e==="compositionend"||!J0&&FA(e,t)?(e=RA(),Bf=Y0=ki=null,Lo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Cw(r)}}function HA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function KA(){for(var e=window,t=rd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=rd(e.document)}return t}function Z0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RI(e){var t=KA(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HA(r.ownerDocument.documentElement,r)){if(n!==null&&Z0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=$w(r,a);var o=$w(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Fo=null,Jv=null,nu=null,Zv=!1;function Mw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Zv||Fo==null||Fo!==rd(n)||(n=Fo,"selectionStart"in n&&Z0(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}),nu&&ju(nu,n)||(nu=n,n=ud(Jv,"onSelect"),0Uo||(e.current=ay[Uo],ay[Uo]=null,Uo--)}function Fe(e,t){Uo++,ay[Uo]=e.current,e.current=t}var Xi={},zt=ta(Xi),sr=ta(!1),Ka=Xi;function Ss(e,t){var r=e.type.contextTypes;if(!r)return Xi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function lr(e){return e=e.childContextTypes,e!=null}function fd(){He(sr),He(zt)}function zw(e,t,r){if(zt.current!==Xi)throw Error(K(168));Fe(zt,t),Fe(sr,r)}function e_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(K(108,CM(e)||"Unknown",i));return Je({},r,n)}function dd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xi,Ka=zt.current,Fe(zt,e),Fe(sr,sr.current),!0}function Uw(e,t,r){var n=e.stateNode;if(!n)throw Error(K(169));r?(e=e_(e,t,Ka),n.__reactInternalMemoizedMergedChildContext=e,He(sr),He(zt),Fe(zt,e)):He(sr),Fe(sr,r)}var Ln=null,qh=!1,Cm=!1;function t_(e){Ln===null?Ln=[e]:Ln.push(e)}function YI(e){qh=!0,t_(e)}function ra(){if(!Cm&&Ln!==null){Cm=!0;var e=0,t=ke;try{var r=Ln;for(ke=1;e>=o,i-=o,zn=1<<32-rn(t)+i|r<E?(A=j,j=null):A=j.sibling;var T=h(y,j,b[E],S);if(T===null){j===null&&(j=A);break}e&&j&&T.alternate===null&&t(y,j),x=a(T,x,E),O===null?w=T:O.sibling=T,O=T,j=A}if(E===b.length)return r(y,j),qe&&pa(y,E),w;if(j===null){for(;EE?(A=j,j=null):A=j.sibling;var _=h(y,j,T.value,S);if(_===null){j===null&&(j=A);break}e&&j&&_.alternate===null&&t(y,j),x=a(_,x,E),O===null?w=_:O.sibling=_,O=_,j=A}if(T.done)return r(y,j),qe&&pa(y,E),w;if(j===null){for(;!T.done;E++,T=b.next())T=f(y,T.value,S),T!==null&&(x=a(T,x,E),O===null?w=T:O.sibling=T,O=T);return qe&&pa(y,E),w}for(j=n(y,j);!T.done;E++,T=b.next())T=p(j,y,E,T.value,S),T!==null&&(e&&T.alternate!==null&&j.delete(T.key===null?E:T.key),x=a(T,x,E),O===null?w=T:O.sibling=T,O=T);return e&&j.forEach(function(N){return t(y,N)}),qe&&pa(y,E),w}function g(y,x,b,S){if(typeof b=="object"&&b!==null&&b.type===Ro&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Qc:e:{for(var w=b.key,O=x;O!==null;){if(O.key===w){if(w=b.type,w===Ro){if(O.tag===7){r(y,O.sibling),x=i(O,b.props.children),x.return=y,y=x;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===yi&&Kw(w)===O.type){r(y,O.sibling),x=i(O,b.props),x.ref=Nl(y,O,b),x.return=y,y=x;break e}r(y,O);break}else t(y,O);O=O.sibling}b.type===Ro?(x=Ba(b.props.children,y.mode,S,b.key),x.return=y,y=x):(S=Gf(b.type,b.key,b.props,null,y.mode,S),S.ref=Nl(y,x,b),S.return=y,y=S)}return o(y);case Do:e:{for(O=b.key;x!==null;){if(x.key===O)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){r(y,x.sibling),x=i(x,b.children||[]),x.return=y,y=x;break e}else{r(y,x);break}else t(y,x);x=x.sibling}x=Bm(b,y.mode,S),x.return=y,y=x}return o(y);case yi:return O=b._init,g(y,x,O(b._payload),S)}if(Gl(b))return v(y,x,b,S);if(Pl(b))return m(y,x,b,S);uf(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(r(y,x.sibling),x=i(x,b),x.return=y,y=x):(r(y,x),x=Fm(b,y.mode,S),x.return=y,y=x),o(y)):r(y,x)}return g}var js=a_(!0),o_=a_(!1),md=ta(null),vd=null,Ko=null,nx=null;function ix(){nx=Ko=vd=null}function ax(e){var t=md.current;He(md),e._currentValue=t}function ly(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ns(e,t){vd=e,nx=Ko=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ar=!0),e.firstContext=null)}function zr(e){var t=e._currentValue;if(nx!==e)if(e={context:e,memoizedValue:t,next:null},Ko===null){if(vd===null)throw Error(K(308));Ko=e,vd.dependencies={lanes:0,firstContext:e}}else Ko=Ko.next=e;return t}var Sa=null;function ox(e){Sa===null?Sa=[e]:Sa.push(e)}function s_(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,ox(t)):(r.next=i.next,i.next=r),t.interleaved=r,Qn(e,n)}function Qn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var gi=!1;function sx(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function l_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,xe&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Qn(e,r)}return i=n.interleaved,i===null?(t.next=t,ox(n)):(t.next=i.next,i.next=t),n.interleaved=t,Qn(e,r)}function Uf(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,q0(e,r)}}function qw(e,t){var r=e.updateQueue,n=e.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=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function yd(e,t,r,n){var i=e.updateQueue;gi=!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=e.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,p=s.eventTime;if((n&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var v=e,m=s;switch(h=t,p=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(p,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,h=typeof v=="function"?v.call(p,f,h):v,h==null)break e;f=Je({},f,h);break e;case 2:gi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=f):c=c.next=p,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,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ga|=o,e.lanes=o,e.memoizedState=f}}function Vw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Mm.transition;Mm.transition={};try{e(!1),t()}finally{ke=r,Mm.transition=n}}function P_(){return Ur().memoizedState}function ZI(e,t,r){var n=Ui(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},E_(e))A_(t,r);else if(r=s_(e,t,r,n),r!==null){var i=Gt();nn(r,e,n,i),__(r,t,n)}}function eD(e,t,r){var n=Ui(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(E_(e))A_(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,r);if(i.hasEagerState=!0,i.eagerState=s,sn(s,o)){var l=t.interleaved;l===null?(i.next=i,ox(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=s_(e,t,i,n),r!==null&&(i=Gt(),nn(r,e,n,i),__(r,t,n))}}function E_(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function A_(e,t){iu=xd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function __(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,q0(e,r)}}var bd={readContext:zr,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},tD={readContext:zr,useCallback:function(e,t){return vn().memoizedState=[e,t===void 0?null:t],e},useContext:zr,useEffect:Yw,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Hf(4194308,4,b_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Hf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hf(4,2,e,t)},useMemo:function(e,t){var r=vn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=vn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ZI.bind(null,Qe,e),[n.memoizedState,e]},useRef:function(e){var t=vn();return e={current:e},t.memoizedState=e},useState:Gw,useDebugValue:mx,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=Gw(!1),t=e[0];return e=JI.bind(null,e[1]),vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Qe,i=vn();if(qe){if(r===void 0)throw Error(K(407));r=r()}else{if(r=t(),Ot===null)throw Error(K(349));Va&30||d_(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,Yw(p_.bind(null,n,a,e),[e]),n.flags|=2048,Cu(9,h_.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=vn(),t=Ot.identifierPrefix;if(qe){var r=Un,n=zn;r=(n&~(1<<32-rn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Nu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[bn]=t,e[Au]=n,L_(e,t,!1,!1),t.stateNode=e;e:{switch(o=Hv(r,n),r){case"dialog":ze("cancel",e),ze("close",e),i=n;break;case"iframe":case"object":case"embed":ze("load",e),i=n;break;case"video":case"audio":for(i=0;iAs&&(t.flags|=128,n=!0,kl(a,!1),t.lanes=4194304)}else{if(!n)if(e=gd(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),kl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!qe)return Mt(t),null}else 2*it()-a.renderingStartTime>As&&r!==1073741824&&(t.flags|=128,n=!0,kl(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=it(),t.sibling=null,r=Ye.current,Fe(Ye,n?r&1|2:r&1),t):(Mt(t),null);case 22:case 23:return wx(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?vr&1073741824&&(Mt(t),t.subtreeFlags&6&&(t.flags|=8192)):Mt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function uD(e,t){switch(tx(t),t.tag){case 1:return lr(t.type)&&fd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ps(),He(sr),He(zt),cx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ux(t),null;case 13:if(He(Ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Os()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return He(Ye),null;case 4:return Ps(),null;case 10:return ax(t.type._context),null;case 22:case 23:return wx(),null;case 24:return null;default:return null}}var ff=!1,Dt=!1,cD=typeof WeakSet=="function"?WeakSet:Set,Q=null;function qo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){tt(e,t,n)}else r.current=null}function yy(e,t,r){try{r()}catch(n){tt(e,t,n)}}var o1=!1;function fD(e,t){if(ey=sd,e=KA(),Z0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.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=e,h=null;t:for(;;){for(var p;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),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++u===i&&(s=o),h===a&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(ty={focusedElem:e,selectionRange:r},sd=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,g=v.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Gr(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(S){tt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return v=o1,o1=!1,v}function au(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&yy(t,r,a)}i=i.next}while(i!==n)}}function Yh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function gy(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function z_(e){var t=e.alternate;t!==null&&(e.alternate=null,z_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bn],delete t[Au],delete t[iy],delete t[VI],delete t[GI])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function U_(e){return e.tag===5||e.tag===3||e.tag===4}function s1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||U_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xy(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cd));else if(n!==4&&(e=e.child,e!==null))for(xy(e,t,r),e=e.sibling;e!==null;)xy(e,t,r),e=e.sibling}function by(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(by(e,t,r),e=e.sibling;e!==null;)by(e,t,r),e=e.sibling}var At=null,Qr=!1;function fi(e,t,r){for(r=r.child;r!==null;)W_(e,t,r),r=r.sibling}function W_(e,t,r){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(zh,r)}catch{}switch(r.tag){case 5:Dt||qo(r,t);case 6:var n=At,i=Qr;At=null,fi(e,t,r),At=n,Qr=i,At!==null&&(Qr?(e=At,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):At.removeChild(r.stateNode));break;case 18:At!==null&&(Qr?(e=At,r=r.stateNode,e.nodeType===8?km(e.parentNode,r):e.nodeType===1&&km(e,r),Su(e)):km(At,r.stateNode));break;case 4:n=At,i=Qr,At=r.stateNode.containerInfo,Qr=!0,fi(e,t,r),At=n,Qr=i;break;case 0:case 11:case 14:case 15:if(!Dt&&(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)&&yy(r,t,o),i=i.next}while(i!==n)}fi(e,t,r);break;case 1:if(!Dt&&(qo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){tt(r,t,s)}fi(e,t,r);break;case 21:fi(e,t,r);break;case 22:r.mode&1?(Dt=(n=Dt)||r.memoizedState!==null,fi(e,t,r),Dt=n):fi(e,t,r);break;default:fi(e,t,r)}}function l1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new cD),t.forEach(function(n){var i=bD.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function qr(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~a}if(n=i,n=it()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hD(n/1960))-n,10e?16:e,Ci===null)var n=!1;else{if(e=Ci,Ci=null,Od=0,xe&6)throw Error(K(331));var i=xe;for(xe|=4,Q=e.current;Q!==null;){var a=Q,o=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lit()-xx?Fa(e,0):gx|=r),ur(e,t)}function Q_(e,t){t===0&&(e.mode&1?(t=tf,tf<<=1,!(tf&130023424)&&(tf=4194304)):t=1);var r=Gt();e=Qn(e,t),e!==null&&(_c(e,t,r),ur(e,r))}function xD(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Q_(e,r)}function bD(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(K(314))}n!==null&&n.delete(t),Q_(e,r)}var J_;J_=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||sr.current)ar=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ar=!1,sD(e,t,r);ar=!!(e.flags&131072)}else ar=!1,qe&&t.flags&1048576&&r_(t,pd,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Kf(e,t),e=t.pendingProps;var i=Ss(t,zt.current);ns(t,r),i=dx(null,t,n,e,i,r);var a=hx();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lr(n)?(a=!0,dd(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,sx(t),i.updater=Gh,t.stateNode=i,i._reactInternals=t,cy(t,n,e,r),t=hy(null,t,n,!0,a,r)):(t.tag=0,qe&&a&&ex(t),Ht(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Kf(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=SD(n),e=Gr(n,e),i){case 0:t=dy(null,t,n,e,r);break e;case 1:t=n1(null,t,n,e,r);break e;case 11:t=t1(null,t,n,e,r);break e;case 14:t=r1(null,t,n,Gr(n.type,e),r);break e}throw Error(K(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gr(n,i),dy(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gr(n,i),n1(e,t,n,i,r);case 3:e:{if(I_(t),e===null)throw Error(K(387));n=t.pendingProps,a=t.memoizedState,i=a.element,l_(e,t),yd(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Es(Error(K(423)),t),t=i1(e,t,n,r,i);break e}else if(n!==i){i=Es(Error(K(424)),t),t=i1(e,t,n,r,i);break e}else for(xr=Fi(t.stateNode.containerInfo.firstChild),br=t,qe=!0,en=null,r=o_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Os(),n===i){t=Jn(e,t,r);break e}Ht(e,t,n,r)}t=t.child}return t;case 5:return u_(t),e===null&&sy(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,ry(n,i)?o=null:a!==null&&ry(n,a)&&(t.flags|=32),M_(e,t),Ht(e,t,o,r),t.child;case 6:return e===null&&sy(t),null;case 13:return D_(e,t,r);case 4:return lx(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=js(t,null,n,r):Ht(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gr(n,i),t1(e,t,n,i,r);case 7:return Ht(e,t,t.pendingProps,r),t.child;case 8:return Ht(e,t,t.pendingProps.children,r),t.child;case 12:return Ht(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Fe(md,n._currentValue),n._currentValue=o,a!==null)if(sn(a.value,o)){if(a.children===i.children&&!sr.current){t=Jn(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);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=qn(-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),ly(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),ly(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Ht(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,ns(t,r),i=zr(i),n=n(i),t.flags|=1,Ht(e,t,n,r),t.child;case 14:return n=t.type,i=Gr(n,t.pendingProps),i=Gr(n.type,i),r1(e,t,n,i,r);case 15:return C_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Gr(n,i),Kf(e,t),t.tag=1,lr(n)?(e=!0,dd(t)):e=!1,ns(t,r),T_(t,n,i),cy(t,n,i,r),hy(null,t,n,!0,e,r);case 19:return R_(e,t,r);case 22:return $_(e,t,r)}throw Error(K(156,t.tag))};function Z_(e,t){return EA(e,t)}function wD(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Rr(e,t,r,n){return new wD(e,t,r,n)}function Ox(e){return e=e.prototype,!(!e||!e.isReactComponent)}function SD(e){if(typeof e=="function")return Ox(e)?1:0;if(e!=null){if(e=e.$$typeof,e===U0)return 11;if(e===W0)return 14}return 2}function Wi(e,t){var r=e.alternate;return r===null?(r=Rr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gf(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Ox(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ro:return Ba(r.children,i,a,t);case z0:o=8,i|=8;break;case Mv:return e=Rr(12,r,t,i|2),e.elementType=Mv,e.lanes=a,e;case Iv:return e=Rr(13,r,t,i),e.elementType=Iv,e.lanes=a,e;case Dv:return e=Rr(19,r,t,i),e.elementType=Dv,e.lanes=a,e;case uA:return Qh(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sA:o=10;break e;case lA:o=9;break e;case U0:o=11;break e;case W0:o=14;break e;case yi:o=16,n=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Rr(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Ba(e,t,r,n){return e=Rr(7,e,n,t),e.lanes=r,e}function Qh(e,t,r,n){return e=Rr(22,e,n,t),e.elementType=uA,e.lanes=r,e.stateNode={isHidden:!1},e}function Fm(e,t,r){return e=Rr(6,e,null,t),e.lanes=r,e}function Bm(e,t,r){return t=Rr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function OD(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bm(0),this.expirationTimes=bm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jx(e,t,r,n,i,a,o,s,l){return e=new OD(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Rr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},sx(a),e}function jD(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nT)}catch(e){console.error(e)}}nT(),nA.exports=Pr;var _x=nA.exports;const TD=Ee(_x);var v1=_x;Cv.createRoot=v1.createRoot,Cv.hydrateRoot=v1.hydrateRoot;var Cc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ND={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Oi,C0,DE,kD=(DE=class{constructor(){ne(this,Oi,ND);ne(this,C0,!1)}setTimeoutProvider(e){X(this,Oi,e)}setTimeout(e,t){return $(this,Oi).setTimeout(e,t)}clearTimeout(e){$(this,Oi).clearTimeout(e)}setInterval(e,t){return $(this,Oi).setInterval(e,t)}clearInterval(e){$(this,Oi).clearInterval(e)}},Oi=new WeakMap,C0=new WeakMap,DE),ja=new kD;function CD(e){setTimeout(e,0)}var Xa=typeof window>"u"||"Deno"in globalThis;function nr(){}function $D(e,t){return typeof e=="function"?e(t):e}function Py(e){return typeof e=="number"&&e>=0&&e!==1/0}function iT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Hi(e,t){return typeof e=="function"?e(t):e}function $r(e,t){return typeof e=="function"?e(t):e}function y1(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==Tx(o,t.options))return!1}else if(!Iu(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function g1(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Mu(t.options.mutationKey)!==Mu(a))return!1}else if(!Iu(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Tx(e,t){return((t==null?void 0:t.queryKeyHashFn)||Mu)(e)}function Mu(e){return JSON.stringify(e,(t,r)=>Ay(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Iu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Iu(e[r],t[r])):!1}var MD=Object.prototype.hasOwnProperty;function aT(e,t){if(e===t)return e;const r=x1(e)&&x1(t);if(!r&&!(Ay(e)&&Ay(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?new Array(o):{};let l=0;for(let u=0;u{ja.setTimeout(t,e)})}function _y(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?aT(e,t):t}function DD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function RD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Nx=Symbol();function oT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function LD(e,t){return typeof e=="function"?e(...t):!!e}var Na,ji,us,RE,FD=(RE=class extends Cc{constructor(){super();ne(this,Na);ne(this,ji);ne(this,us);X(this,us,t=>{if(!Xa&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){$(this,ji)||this.setEventListener($(this,us))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,ji))==null||t.call(this),X(this,ji,void 0))}setEventListener(t){var r;X(this,us,t),(r=$(this,ji))==null||r.call(this),X(this,ji,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){$(this,Na)!==t&&(X(this,Na,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof $(this,Na)=="boolean"?$(this,Na):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Na=new WeakMap,ji=new WeakMap,us=new WeakMap,RE),kx=new FD;function Ty(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var BD=CD;function zD(){let e=[],t=0,r=s=>{s()},n=s=>{s()},i=BD;const a=s=>{t?e.push(s):i(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{i=s}}}var Tt=zD(),cs,Pi,fs,LE,UD=(LE=class extends Cc{constructor(){super();ne(this,cs,!0);ne(this,Pi);ne(this,fs);X(this,fs,t=>{if(!Xa&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){$(this,Pi)||this.setEventListener($(this,fs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Pi))==null||t.call(this),X(this,Pi,void 0))}setEventListener(t){var r;X(this,fs,t),(r=$(this,Pi))==null||r.call(this),X(this,Pi,t(this.setOnline.bind(this)))}setOnline(t){$(this,cs)!==t&&(X(this,cs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return $(this,cs)}},cs=new WeakMap,Pi=new WeakMap,fs=new WeakMap,LE),Ed=new UD;function WD(e){return Math.min(1e3*2**e,3e4)}function sT(e){return(e??"online")==="online"?Ed.isOnline():!0}var Ny=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function lT(e){let t=!1,r=0,n;const i=Ty(),a=()=>i.status!=="pending",o=m=>{var g;if(!a()){const y=new Ny(m);h(y),(g=e.onCancel)==null||g.call(e,y)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>kx.isFocused()&&(e.networkMode==="always"||Ed.isOnline())&&e.canRun(),c=()=>sT(e.networkMode)&&e.canRun(),f=m=>{a()||(n==null||n(),i.resolve(m))},h=m=>{a()||(n==null||n(),i.reject(m))},p=()=>new Promise(m=>{var g;n=y=>{(a()||u())&&m(y)},(g=e.onPause)==null||g.call(e)}).then(()=>{var m;n=void 0,a()||(m=e.onContinue)==null||m.call(e)}),v=()=>{if(a())return;let m;const g=r===0?e.initialPromise:void 0;try{m=g??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{var O;if(a())return;const x=e.retry??(Xa?0:3),b=e.retryDelay??WD,S=typeof b=="function"?b(r,y):b,w=x===!0||typeof x=="number"&&ru()?void 0:p()).then(()=>{t?h(y):v()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?v():p().then(v),i)}}var ka,FE,uT=(FE=class{constructor(){ne(this,ka)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Py(this.gcTime)&&X(this,ka,ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xa?1/0:5*60*1e3))}clearGcTimeout(){$(this,ka)&&(ja.clearTimeout($(this,ka)),X(this,ka,void 0))}},ka=new WeakMap,FE),Ca,ds,Cr,$a,xt,Sc,Ma,Yr,In,BE,HD=(BE=class extends uT{constructor(t){super();ne(this,Yr);ne(this,Ca);ne(this,ds);ne(this,Cr);ne(this,$a);ne(this,xt);ne(this,Sc);ne(this,Ma);X(this,Ma,!1),X(this,Sc,t.defaultOptions),this.setOptions(t.options),this.observers=[],X(this,$a,t.client),X(this,Cr,$(this,$a).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,X(this,Ca,w1(this.options)),this.state=t.state??$(this,Ca),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,xt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,Sc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=w1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),X(this,Ca,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Cr).remove(this)}setData(t,r){const n=_y(this.state.data,t,this.options);return ve(this,Yr,In).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ve(this,Yr,In).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=$(this,xt))==null?void 0:n.promise;return(i=$(this,xt))==null||i.cancel(t),r?r.then(nr).catch(nr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,Ca))}isActive(){return this.observers.some(t=>$r(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Hi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!iT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,xt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=$(this,xt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,Cr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||($(this,xt)&&($(this,Ma)?$(this,xt).cancel({revert:!0}):$(this,xt).cancelRetry()),this.scheduleGc()),$(this,Cr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,Yr,In).call(this,{type:"invalidate"})}async fetch(t,r){var l,u,c,f,h,p,v,m,g,y,x,b;if(this.state.fetchStatus!=="idle"&&((l=$(this,xt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if($(this,xt))return $(this,xt).continueRetry(),$(this,xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(w=>w.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,Ma,!0),n.signal)})},a=()=>{const S=oT(this.options,r),O=(()=>{const j={client:$(this,$a),queryKey:this.queryKey,meta:this.meta};return i(j),j})();return X(this,Ma,!1),this.options.persister?this.options.persister(S,O,this):S(O)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:$(this,$a),state:this.state,fetchFn:a};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(s,this),X(this,ds,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&ve(this,Yr,In).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta}),X(this,xt,lT({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof Ny&&S.revert&&this.setState({...$(this,ds),fetchStatus:"idle"}),n.abort()},onFail:(S,w)=>{ve(this,Yr,In).call(this,{type:"failed",failureCount:S,error:w})},onPause:()=>{ve(this,Yr,In).call(this,{type:"pause"})},onContinue:()=>{ve(this,Yr,In).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await $(this,xt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(p=(h=$(this,Cr).config).onSuccess)==null||p.call(h,S,this),(m=(v=$(this,Cr).config).onSettled)==null||m.call(v,S,this.state.error,this),S}catch(S){if(S instanceof Ny){if(S.silent)return $(this,xt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw ve(this,Yr,In).call(this,{type:"error",error:S}),(y=(g=$(this,Cr).config).onError)==null||y.call(g,S,this),(b=(x=$(this,Cr).config).onSettled)==null||b.call(x,this.state.data,S,this),S}finally{this.scheduleGc()}}},Ca=new WeakMap,ds=new WeakMap,Cr=new WeakMap,$a=new WeakMap,xt=new WeakMap,Sc=new WeakMap,Ma=new WeakMap,Yr=new WeakSet,In=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...cT(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return X(this,ds,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),$(this,Cr).notify({query:this,type:"updated",action:t})})},BE);function cT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function w1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var rr,ye,Oc,Ut,Ia,hs,Fn,Ei,jc,ps,ms,Da,Ra,Ai,vs,Pe,Ql,ky,Cy,$y,My,Iy,Dy,Ry,fT,zE,KD=(zE=class extends Cc{constructor(t,r){super();ne(this,Pe);ne(this,rr);ne(this,ye);ne(this,Oc);ne(this,Ut);ne(this,Ia);ne(this,hs);ne(this,Fn);ne(this,Ei);ne(this,jc);ne(this,ps);ne(this,ms);ne(this,Da);ne(this,Ra);ne(this,Ai);ne(this,vs,new Set);this.options=r,X(this,rr,t),X(this,Ei,null),X(this,Fn,Ty()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,ye).addObserver(this),S1($(this,ye),this.options)?ve(this,Pe,Ql).call(this):this.updateResult(),ve(this,Pe,My).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ly($(this,ye),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ly($(this,ye),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Pe,Iy).call(this),ve(this,Pe,Dy).call(this),$(this,ye).removeObserver(this)}setOptions(t){const r=this.options,n=$(this,ye);if(this.options=$(this,rr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $r(this.options.enabled,$(this,ye))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Pe,Ry).call(this),$(this,ye).setOptions(this.options),r._defaulted&&!Ey(this.options,r)&&$(this,rr).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,ye),observer:this});const i=this.hasListeners();i&&O1($(this,ye),n,this.options,r)&&ve(this,Pe,Ql).call(this),this.updateResult(),i&&($(this,ye)!==n||$r(this.options.enabled,$(this,ye))!==$r(r.enabled,$(this,ye))||Hi(this.options.staleTime,$(this,ye))!==Hi(r.staleTime,$(this,ye)))&&ve(this,Pe,ky).call(this);const a=ve(this,Pe,Cy).call(this);i&&($(this,ye)!==n||$r(this.options.enabled,$(this,ye))!==$r(r.enabled,$(this,ye))||a!==$(this,Ai))&&ve(this,Pe,$y).call(this,a)}getOptimisticResult(t){const r=$(this,rr).getQueryCache().build($(this,rr),t),n=this.createResult(r,t);return VD(this,n)&&(X(this,Ut,n),X(this,hs,this.options),X(this,Ia,$(this,ye).state)),n}getCurrentResult(){return $(this,Ut)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Fn).status==="pending"&&$(this,Fn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){$(this,vs).add(t)}getCurrentQuery(){return $(this,ye)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=$(this,rr).defaultQueryOptions(t),n=$(this,rr).getQueryCache().build($(this,rr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,Pe,Ql).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,Ut)))}createResult(t,r){var A;const n=$(this,ye),i=this.options,a=$(this,Ut),o=$(this,Ia),s=$(this,hs),u=t!==n?t.state:$(this,Oc),{state:c}=t;let f={...c},h=!1,p;if(r._optimisticResults){const T=this.hasListeners(),_=!T&&S1(t,r),N=T&&O1(t,n,r,i);(_||N)&&(f={...f,...cT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:g}=f;p=f.data;let y=!1;if(r.placeholderData!==void 0&&p===void 0&&g==="pending"){let T;a!=null&&a.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(T=a.data,y=!0):T=typeof r.placeholderData=="function"?r.placeholderData((A=$(this,ms))==null?void 0:A.state.data,$(this,ms)):r.placeholderData,T!==void 0&&(g="success",p=_y(a==null?void 0:a.data,T,r),h=!0)}if(r.select&&p!==void 0&&!y)if(a&&p===(o==null?void 0:o.data)&&r.select===$(this,jc))p=$(this,ps);else try{X(this,jc,r.select),p=r.select(p),p=_y(a==null?void 0:a.data,p,r),X(this,ps,p),X(this,Ei,null)}catch(T){X(this,Ei,T)}$(this,Ei)&&(v=$(this,Ei),p=$(this,ps),m=Date.now(),g="error");const x=f.fetchStatus==="fetching",b=g==="pending",S=g==="error",w=b&&x,O=p!==void 0,E={status:g,fetchStatus:f.fetchStatus,isPending:b,isSuccess:g==="success",isError:S,isInitialLoading:w,isLoading:w,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:S&&!O,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&O,isStale:Cx(t,r),refetch:this.refetch,promise:$(this,Fn),isEnabled:$r(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=M=>{E.status==="error"?M.reject(E.error):E.data!==void 0&&M.resolve(E.data)},_=()=>{const M=X(this,Fn,E.promise=Ty());T(M)},N=$(this,Fn);switch(N.status){case"pending":t.queryHash===n.queryHash&&T(N);break;case"fulfilled":(E.status==="error"||E.data!==N.value)&&_();break;case"rejected":(E.status!=="error"||E.error!==N.reason)&&_();break}}return E}updateResult(){const t=$(this,Ut),r=this.createResult($(this,ye),this.options);if(X(this,Ia,$(this,ye).state),X(this,hs,this.options),$(this,Ia).data!==void 0&&X(this,ms,$(this,ye)),Ey(r,t))return;X(this,Ut,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!$(this,vs).size)return!0;const o=new Set(a??$(this,vs));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Ut)).some(s=>{const l=s;return $(this,Ut)[l]!==t[l]&&o.has(l)})};ve(this,Pe,fT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Pe,My).call(this)}},rr=new WeakMap,ye=new WeakMap,Oc=new WeakMap,Ut=new WeakMap,Ia=new WeakMap,hs=new WeakMap,Fn=new WeakMap,Ei=new WeakMap,jc=new WeakMap,ps=new WeakMap,ms=new WeakMap,Da=new WeakMap,Ra=new WeakMap,Ai=new WeakMap,vs=new WeakMap,Pe=new WeakSet,Ql=function(t){ve(this,Pe,Ry).call(this);let r=$(this,ye).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(nr)),r},ky=function(){ve(this,Pe,Iy).call(this);const t=Hi(this.options.staleTime,$(this,ye));if(Xa||$(this,Ut).isStale||!Py(t))return;const n=iT($(this,Ut).dataUpdatedAt,t)+1;X(this,Da,ja.setTimeout(()=>{$(this,Ut).isStale||this.updateResult()},n))},Cy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,ye)):this.options.refetchInterval)??!1},$y=function(t){ve(this,Pe,Dy).call(this),X(this,Ai,t),!(Xa||$r(this.options.enabled,$(this,ye))===!1||!Py($(this,Ai))||$(this,Ai)===0)&&X(this,Ra,ja.setInterval(()=>{(this.options.refetchIntervalInBackground||kx.isFocused())&&ve(this,Pe,Ql).call(this)},$(this,Ai)))},My=function(){ve(this,Pe,ky).call(this),ve(this,Pe,$y).call(this,ve(this,Pe,Cy).call(this))},Iy=function(){$(this,Da)&&(ja.clearTimeout($(this,Da)),X(this,Da,void 0))},Dy=function(){$(this,Ra)&&(ja.clearInterval($(this,Ra)),X(this,Ra,void 0))},Ry=function(){const t=$(this,rr).getQueryCache().build($(this,rr),this.options);if(t===$(this,ye))return;const r=$(this,ye);X(this,ye,t),X(this,Oc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},fT=function(t){Tt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r($(this,Ut))}),$(this,rr).getQueryCache().notify({query:$(this,ye),type:"observerResultsUpdated"})})},zE);function qD(e,t){return $r(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function S1(e,t){return qD(e,t)||e.state.data!==void 0&&Ly(e,t,t.refetchOnMount)}function Ly(e,t,r){if($r(t.enabled,e)!==!1&&Hi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Cx(e,t)}return!1}function O1(e,t,r,n){return(e!==t||$r(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Cx(e,r)}function Cx(e,t){return $r(t.enabled,e)!==!1&&e.isStaleByTime(Hi(t.staleTime,e))}function VD(e,t){return!Ey(e.getCurrentResult(),t)}function j1(e){return{onFetch:(t,r)=>{var c,f,h,p,v;const n=t.options,i=(h=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const g=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=oT(t.options,t.fetchOptions),x=async(b,S,w)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const j=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(_),_})(),E=await y(j),{maxPages:A}=t.options,T=w?RD:DD;return{pages:T(b.pages,E,A),pageParams:T(b.pageParams,S,A)}};if(i&&a.length){const b=i==="backward",S=b?GD:P1,w={pages:a,pageParams:o},O=S(n,w);s=await x(w,O,b)}else{const b=e??a.length;do{const S=l===0?o[0]??n.initialPageParam:P1(n,s);if(l>0&&S==null)break;s=await x(s,S),l++}while(l{var m,g;return(g=(m=t.options).persister)==null?void 0:g.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function P1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function GD(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Pc,yn,Wt,La,gn,mi,UE,YD=(UE=class extends uT{constructor(t){super();ne(this,gn);ne(this,Pc);ne(this,yn);ne(this,Wt);ne(this,La);X(this,Pc,t.client),this.mutationId=t.mutationId,X(this,Wt,t.mutationCache),X(this,yn,[]),this.state=t.state||XD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,yn).includes(t)||($(this,yn).push(t),this.clearGcTimeout(),$(this,Wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){X(this,yn,$(this,yn).filter(r=>r!==t)),this.scheduleGc(),$(this,Wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,yn).length||(this.state.status==="pending"?this.scheduleGc():$(this,Wt).remove(this))}continue(){var t;return((t=$(this,La))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,u,c,f,h,p,v,m,g,y,x,b,S,w,O,j,E,A;const r=()=>{ve(this,gn,mi).call(this,{type:"continue"})},n={client:$(this,Pc),meta:this.options.meta,mutationKey:this.options.mutationKey};X(this,La,lT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(T,_)=>{ve(this,gn,mi).call(this,{type:"failed",failureCount:T,error:_})},onPause:()=>{ve(this,gn,mi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Wt).canRun(this)}));const i=this.state.status==="pending",a=!$(this,La).canStart();try{if(i)r();else{ve(this,gn,mi).call(this,{type:"pending",variables:t,isPaused:a}),await((s=(o=$(this,Wt).config).onMutate)==null?void 0:s.call(o,t,this,n));const _=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,n));_!==this.state.context&&ve(this,gn,mi).call(this,{type:"pending",context:_,variables:t,isPaused:a})}const T=await $(this,La).start();return await((f=(c=$(this,Wt).config).onSuccess)==null?void 0:f.call(c,T,t,this.state.context,this,n)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,T,t,this.state.context,n)),await((m=(v=$(this,Wt).config).onSettled)==null?void 0:m.call(v,T,null,this.state.variables,this.state.context,this,n)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,T,null,t,this.state.context,n)),ve(this,gn,mi).call(this,{type:"success",data:T}),T}catch(T){try{throw await((b=(x=$(this,Wt).config).onError)==null?void 0:b.call(x,T,t,this.state.context,this,n)),await((w=(S=this.options).onError)==null?void 0:w.call(S,T,t,this.state.context,n)),await((j=(O=$(this,Wt).config).onSettled)==null?void 0:j.call(O,void 0,T,this.state.variables,this.state.context,this,n)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,T,t,this.state.context,n)),T}finally{ve(this,gn,mi).call(this,{type:"error",error:T})}}finally{$(this,Wt).runNext(this)}}},Pc=new WeakMap,yn=new WeakMap,Wt=new WeakMap,La=new WeakMap,gn=new WeakSet,mi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Tt.batch(()=>{$(this,yn).forEach(n=>{n.onMutationUpdate(t)}),$(this,Wt).notify({mutation:this,type:"updated",action:t})})},UE);function XD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,Xr,Ec,WE,QD=(WE=class extends Cc{constructor(t={}){super();ne(this,Bn);ne(this,Xr);ne(this,Ec);this.config=t,X(this,Bn,new Set),X(this,Xr,new Map),X(this,Ec,0)}build(t,r,n){const i=new YD({client:t,mutationCache:this,mutationId:++Gc(this,Ec)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){$(this,Bn).add(t);const r=pf(t);if(typeof r=="string"){const n=$(this,Xr).get(r);n?n.push(t):$(this,Xr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Bn).delete(t)){const r=pf(t);if(typeof r=="string"){const n=$(this,Xr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&$(this,Xr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=pf(t);if(typeof r=="string"){const n=$(this,Xr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=pf(t);if(typeof r=="string"){const i=(n=$(this,Xr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Tt.batch(()=>{$(this,Bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Bn).clear(),$(this,Xr).clear()})}getAll(){return Array.from($(this,Bn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>g1(r,n))}findAll(t={}){return this.getAll().filter(r=>g1(t,r))}notify(t){Tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Tt.batch(()=>Promise.all(t.map(r=>r.continue().catch(nr))))}},Bn=new WeakMap,Xr=new WeakMap,Ec=new WeakMap,WE);function pf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var xn,HE,JD=(HE=class extends Cc{constructor(t={}){super();ne(this,xn);this.config=t,X(this,xn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Tx(i,r);let o=this.get(a);return o||(o=new HD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,xn).has(t.queryHash)||($(this,xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=$(this,xn).get(t.queryHash);r&&(t.destroy(),r===t&&$(this,xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,xn).get(t)}getAll(){return[...$(this,xn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>y1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>y1(t,n)):r}notify(t){Tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xn=new WeakMap,HE),et,_i,Ti,ys,gs,Ni,xs,bs,KE,ZD=(KE=class{constructor(e={}){ne(this,et);ne(this,_i);ne(this,Ti);ne(this,ys);ne(this,gs);ne(this,Ni);ne(this,xs);ne(this,bs);X(this,et,e.queryCache||new JD),X(this,_i,e.mutationCache||new QD),X(this,Ti,e.defaultOptions||{}),X(this,ys,new Map),X(this,gs,new Map),X(this,Ni,0)}mount(){Gc(this,Ni)._++,$(this,Ni)===1&&(X(this,xs,kx.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,et).onFocus())})),X(this,bs,Ed.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,et).onOnline())})))}unmount(){var e,t;Gc(this,Ni)._--,$(this,Ni)===0&&((e=$(this,xs))==null||e.call(this),X(this,xs,void 0),(t=$(this,bs))==null||t.call(this),X(this,bs,void 0))}isFetching(e){return $(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,_i).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,et).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=$(this,et).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Hi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return $(this,et).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=$(this,et).get(n.queryHash),a=i==null?void 0:i.state.data,o=$D(t,a);if(o!==void 0)return $(this,et).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Tt.batch(()=>$(this,et).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=$(this,et).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=$(this,et);Tt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=$(this,et);return Tt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Tt.batch(()=>$(this,et).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(nr).catch(nr)}invalidateQueries(e,t={}){return Tt.batch(()=>($(this,et).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Tt.batch(()=>$(this,et).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(nr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(nr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=$(this,et).build(this,t);return r.isStaleByTime(Hi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(nr).catch(nr)}fetchInfiniteQuery(e){return e.behavior=j1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(nr).catch(nr)}ensureInfiniteQueryData(e){return e.behavior=j1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ed.isOnline()?$(this,_i).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,et)}getMutationCache(){return $(this,_i)}getDefaultOptions(){return $(this,Ti)}setDefaultOptions(e){X(this,Ti,e)}setQueryDefaults(e,t){$(this,ys).set(Mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,ys).values()],r={};return t.forEach(n=>{Iu(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){$(this,gs).set(Mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,gs).values()],r={};return t.forEach(n=>{Iu(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ti).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Tx(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Nx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ti).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,et).clear(),$(this,_i).clear()}},et=new WeakMap,_i=new WeakMap,Ti=new WeakMap,ys=new WeakMap,gs=new WeakMap,Ni=new WeakMap,xs=new WeakMap,bs=new WeakMap,KE),dT=P.createContext(void 0),hT=e=>{const t=P.useContext(dT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},eR=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(dT.Provider,{value:e,children:t})),pT=P.createContext(!1),tR=()=>P.useContext(pT);pT.Provider;function rR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nR=P.createContext(rR()),iR=()=>P.useContext(nR),aR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},oR=e=>{P.useEffect(()=>{e.clearReset()},[e])},sR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||LD(r,[e.error,n])),lR=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},uR=(e,t)=>e.isLoading&&e.isFetching&&!t,cR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,E1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function fR(e,t,r){var f,h,p,v,m;const n=tR(),i=iR(),a=hT(),o=a.defaultQueryOptions(e);(h=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,o),o._optimisticResults=n?"isRestoring":"optimistic",lR(o),aR(o,i),oR(i);const s=!a.getQueryCache().get(o.queryHash),[l]=P.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),c=!n&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(g=>{const y=c?l.subscribe(Tt.batchCalls(g)):nr;return l.updateResult(),y},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),P.useEffect(()=>{l.setOptions(o)},[o,l]),cR(o,u))throw E1(o,l,i);if(sR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,u),o.experimental_prefetchInRender&&!Xa&&uR(u,n)){const g=s?E1(o,l,i):(m=a.getQueryCache().get(o.queryHash))==null?void 0:m.promise;g==null||g.catch(nr).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function Ar(e,t){return fR(e,KD)}/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Du(){return Du=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function mT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function hR(){return Math.random().toString(36).substr(2,8)}function _1(e,t){return{usr:e.state,key:e.key,idx:t}}function Fy(e,t,r,n){return r===void 0&&(r=null),Du({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ol(t):t,{state:r,key:t&&t.key||n||hR()})}function Ad(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ol(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function pR(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,o=i.history,s=$i.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Du({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=$i.Pop;let g=c(),y=g==null?null:g-u;u=g,l&&l({action:s,location:m.location,delta:y})}function h(g,y){s=$i.Push;let x=Fy(m.location,g,y);u=c()+1;let b=_1(x,u),S=m.createHref(x);try{o.pushState(b,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}a&&l&&l({action:s,location:m.location,delta:1})}function p(g,y){s=$i.Replace;let x=Fy(m.location,g,y);u=c();let b=_1(x,u),S=m.createHref(x);o.replaceState(b,"",S),a&&l&&l({action:s,location:m.location,delta:0})}function v(g){let y=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof g=="string"?g:Ad(g);return x=x.replace(/ $/,"%20"),st(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let m={get action(){return s},get location(){return e(i,o)},listen(g){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(A1,f),l=g,()=>{i.removeEventListener(A1,f),l=null}},createHref(g){return t(i,g)},createURL:v,encodeLocation(g){let y=v(g);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(g){return o.go(g)}};return m}var T1;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(T1||(T1={}));function mR(e,t,r){return r===void 0&&(r="/"),vR(e,t,r)}function vR(e,t,r,n){let i=typeof t=="string"?ol(t):t,a=$x(i.pathname||"/",r);if(a==null)return null;let o=vT(e);yR(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("/")&&(st(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=Ki([n,l.relativePath]),c=r.concat(l);a.children&&a.children.length>0&&(st(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),vT(a.children,t,c,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:jR(u,a.index),routesMeta:c})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))i(a,o);else for(let l of yT(a.path))i(a,o,l)}),t}function yT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let o=yT(n.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),i&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function yR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:PR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const gR=/^:[\w-]+$/,xR=3,bR=2,wR=1,SR=10,OR=-2,N1=e=>e==="*";function jR(e,t){let r=e.split("/"),n=r.length;return r.some(N1)&&(n+=OR),t&&(n+=bR),r.filter(i=>!N1(i)).reduce((i,a)=>i+(gR.test(a)?xR:a===""?wR:SR),n)}function PR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function ER(e,t,r){let{routesMeta:n}=e,i={},a="/",o=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let m=s[f]||"";o=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const v=s[f];return p&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function _R(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),mT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function TR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function $x(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function NR(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?ol(e):e;return{pathname:r?r.startsWith("/")?r:kR(r,t):t,search:MR(n),hash:IR(i)}}function kR(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function zm(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` 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 CR(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function gT(e,t){let r=CR(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function xT(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=ol(e):(i=Du({},e),st(!i.pathname||!i.pathname.includes("?"),zm("?","pathname","search",i)),st(!i.pathname||!i.pathname.includes("#"),zm("#","pathname","hash",i)),st(!i.search||!i.search.includes("#"),zm("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,s;if(o==null)s=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=NR(i,s),u=o&&o!=="/"&&o.endsWith("/"),c=(a||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ki=e=>e.join("/").replace(/\/\/+/g,"/"),$R=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),MR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function DR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const bT=["post","put","patch","delete"];new Set(bT);const RR=["get",...bT];new Set(RR);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ru(){return Ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),P.useCallback(function(u,c){if(c===void 0&&(c={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=xT(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ki([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,a,e])}const zR=P.createContext(null);function UR(e){let t=P.useContext(ai).outlet;return t&&P.createElement(zR.Provider,{value:e},t)}function np(){let{matches:e}=P.useContext(ai),t=e[e.length-1];return t?t.params:{}}function OT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=P.useContext(uo),{matches:i}=P.useContext(ai),{pathname:a}=co(),o=JSON.stringify(gT(i,n.v7_relativeSplatPath));return P.useMemo(()=>xT(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function WR(e,t){return HR(e,t)}function HR(e,t,r,n){$c()||st(!1);let{navigator:i}=P.useContext(uo),{matches:a}=P.useContext(ai),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=co(),c;if(t){var f;let g=typeof t=="string"?ol(t):t;l==="/"||(f=g.pathname)!=null&&f.startsWith(l)||st(!1),c=g}else c=u;let h=c.pathname||"/",p=h;if(l!=="/"){let g=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(g.length).join("/")}let v=mR(e,{pathname:p}),m=YR(v&&v.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Ki([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Ki([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,r,n);return t&&m?P.createElement(rp.Provider,{value:{location:Ru({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:$i.Pop}},m):m}function KR(){let e=ZR(),t=DR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),r?P.createElement("pre",{style:i},r):null,null)}const qR=P.createElement(KR,null);class VR extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?P.createElement(ai.Provider,{value:this.props.routeContext},P.createElement(wT.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function GR(e){let{routeContext:t,match:r,children:n}=e,i=P.useContext(Mx);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),P.createElement(ai.Provider,{value:t},n)}function YR(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var a;if(!r)return null;if(r.errors)e=r.matches;else if((a=n)!=null&&a.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,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||st(!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 p,v=!1,m=null,g=null;r&&(p=s&&f.route.id?s[f.route.id]:void 0,m=f.route.errorElement||qR,l&&(u<0&&h===0?(tL("route-fallback"),v=!0,g=null):u===h&&(v=!0,g=f.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,h+1)),x=()=>{let b;return p?b=m:v?b=g:f.route.Component?b=P.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=c,P.createElement(GR,{match:f,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?P.createElement(VR,{location:r.location,revalidation:r.revalidation,component:m,error:p,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var jT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(jT||{}),PT=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(PT||{});function XR(e){let t=P.useContext(Mx);return t||st(!1),t}function QR(e){let t=P.useContext(LR);return t||st(!1),t}function JR(e){let t=P.useContext(ai);return t||st(!1),t}function ET(e){let t=JR(),r=t.matches[t.matches.length-1];return r.route.id||st(!1),r.route.id}function ZR(){var e;let t=P.useContext(wT),r=QR(),n=ET();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function eL(){let{router:e}=XR(jT.UseNavigateStable),t=ET(PT.UseNavigateStable),r=P.useRef(!1);return ST(()=>{r.current=!0}),P.useCallback(function(i,a){a===void 0&&(a={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ru({fromRouteId:t},a)))},[e,t])}const k1={};function tL(e,t,r){k1[e]||(k1[e]=!0)}function rL(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function nL(e){return UR(e.context)}function tr(e){st(!1)}function iL(e){let{basename:t="/",children:r=null,location:n,navigationType:i=$i.Pop,navigator:a,static:o=!1,future:s}=e;$c()&&st(!1);let l=t.replace(/^\/*/,"/"),u=P.useMemo(()=>({basename:l,navigator:a,static:o,future:Ru({v7_relativeSplatPath:!1},s)}),[l,s,a,o]);typeof n=="string"&&(n=ol(n));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:v="default"}=n,m=P.useMemo(()=>{let g=$x(c,l);return g==null?null:{location:{pathname:g,search:f,hash:h,state:p,key:v},navigationType:i}},[l,c,f,h,p,v,i]);return m==null?null:P.createElement(uo.Provider,{value:u},P.createElement(rp.Provider,{children:r,value:m}))}function aL(e){let{children:t,location:r}=e;return WR(By(t),r)}new Promise(()=>{});function By(e,t){t===void 0&&(t=[]);let r=[];return P.Children.forEach(e,(n,i)=>{if(!P.isValidElement(n))return;let a=[...t,i];if(n.type===P.Fragment){r.push.apply(r,By(n.props.children,a));return}n.type!==tr&&st(!1),!n.props.index||!n.props.children||st(!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=By(n.props.children,a)),r.push(o)}),r}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function sL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function lL(e,t){return e.button===0&&(!t||t==="_self")&&!sL(e)}function Uy(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function uL(e,t){let r=Uy(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(a=>{r.append(i,a)})}),r}const cL=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],fL="6";try{window.__reactRouterVersion=fL}catch{}const dL="startTransition",C1=R0[dL];function hL(e){let{basename:t,children:r,future:n,window:i}=e,a=P.useRef();a.current==null&&(a.current=dR({window:i,v5Compat:!0}));let o=a.current,[s,l]=P.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},c=P.useCallback(f=>{u&&C1?C1(()=>l(f)):l(f)},[l,u]);return P.useLayoutEffect(()=>o.listen(c),[o,c]),P.useEffect(()=>rL(n),[n]),P.createElement(iL,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o,future:n})}const pL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tn=P.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:o,state:s,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,h=oL(t,cL),{basename:p}=P.useContext(uo),v,m=!1;if(typeof u=="string"&&mL.test(u)&&(v=u,pL))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),w=$x(S.pathname,p);S.origin===b.origin&&w!=null?u=w+S.search+S.hash:m=!0}catch{}let g=FR(u,{relative:i}),y=vL(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:i,viewTransition:f});function x(b){n&&n(b),b.defaultPrevented||y(b)}return P.createElement("a",zy({},h,{href:v||g,onClick:m||a?n:x,ref:r,target:l}))});var $1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($1||($1={}));var M1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(M1||(M1={}));function vL(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,l=Ix(),u=co(),c=OT(e,{relative:o});return P.useCallback(f=>{if(lL(f,r)){f.preventDefault();let h=n!==void 0?n:Ad(u)===Ad(c);l(e,{replace:h,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[u,l,c,n,i,r,e,a,o,s])}function yL(e){let t=P.useRef(Uy(e)),r=P.useRef(!1),n=co(),i=P.useMemo(()=>uL(n.search,r.current?null:t.current),[n.search]),a=Ix(),o=P.useCallback((s,l)=>{const u=Uy(typeof s=="function"?s(i):s);r.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const gL=new ZD({defaultOptions:{queries:{staleTime:10*60*1e3,gcTime:30*60*1e3,retry:2,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!0}}});function Dx(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}function AT(e){if(!e||e.length===0)return!1;const t=["RUNNING","PENDING"];return e.some(n=>t.includes(n))?3e4:!1}const _T=P.createContext(void 0);function xL({children:e}){const[t,r]=P.useState(null),n=(i,a)=>{if(r(i),typeof window<"u"&&a){const o=`alphatrion_selected_team_${a}`;localStorage.setItem(o,i)}};return d.jsx(_T.Provider,{value:{selectedTeamId:t,setSelectedTeamId:n},children:e})}function fo(){const e=P.useContext(_T);if(!e)throw new Error("useTeamContext must be used within TeamProvider");return e}async function bL(){const e=await fetch("/api/config",{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!e.ok)throw new Error("Failed to load configuration");return await e.json()}async function wL(){return(await bL()).userId}function TT(e,t){return function(){return e.apply(t,arguments)}}const{toString:SL}=Object.prototype,{getPrototypeOf:Rx}=Object,{iterator:ip,toStringTag:NT}=Symbol,ap=(e=>t=>{const r=SL.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),cn=e=>(e=e.toLowerCase(),t=>ap(t)===e),op=e=>t=>typeof t===e,{isArray:sl}=Array,_s=op("undefined");function Mc(e){return e!==null&&!_s(e)&&e.constructor!==null&&!_s(e.constructor)&&cr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kT=cn("ArrayBuffer");function OL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kT(e.buffer),t}const jL=op("string"),cr=op("function"),CT=op("number"),Ic=e=>e!==null&&typeof e=="object",PL=e=>e===!0||e===!1,Yf=e=>{if(ap(e)!=="object")return!1;const t=Rx(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(NT in e)&&!(ip in e)},EL=e=>{if(!Ic(e)||Mc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},AL=cn("Date"),_L=cn("File"),TL=cn("Blob"),NL=cn("FileList"),kL=e=>Ic(e)&&cr(e.pipe),CL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||cr(e.append)&&((t=ap(e))==="formdata"||t==="object"&&cr(e.toString)&&e.toString()==="[object FormData]"))},$L=cn("URLSearchParams"),[ML,IL,DL,RL]=["ReadableStream","Request","Response","Headers"].map(cn),LL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Dc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),sl(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Pa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,MT=e=>!_s(e)&&e!==Pa;function Wy(){const{caseless:e,skipUndefined:t}=MT(this)&&this||{},r={},n=(i,a)=>{const o=e&&$T(r,a)||a;Yf(r[o])&&Yf(i)?r[o]=Wy(r[o],i):Yf(i)?r[o]=Wy({},i):sl(i)?r[o]=i.slice():(!t||!_s(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i(Dc(t,(i,a)=>{r&&cr(i)?e[a]=TT(i,r):e[a]=i},{allOwnKeys:n}),e),BL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zL=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},UL=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&Rx(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},WL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},HL=e=>{if(!e)return null;if(sl(e))return e;let t=e.length;if(!CT(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},KL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Rx(Uint8Array)),qL=(e,t)=>{const n=(e&&e[ip]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},VL=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},GL=cn("HTMLFormElement"),YL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),I1=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),XL=cn("RegExp"),IT=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Dc(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},QL=e=>{IT(e,(t,r)=>{if(cr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(cr(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},JL=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return sl(e)?n(e):n(String(e).split(t)),r},ZL=()=>{},e3=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function t3(e){return!!(e&&cr(e.append)&&e[NT]==="FormData"&&e[ip])}const r3=e=>{const t=new Array(10),r=(n,i)=>{if(Ic(n)){if(t.indexOf(n)>=0)return;if(Mc(n))return n;if(!("toJSON"in n)){t[i]=n;const a=sl(n)?[]:{};return Dc(n,(o,s)=>{const l=r(o,i+1);!_s(l)&&(a[s]=l)}),t[i]=void 0,a}}return n};return r(e,0)},n3=cn("AsyncFunction"),i3=e=>e&&(Ic(e)||cr(e))&&cr(e.then)&&cr(e.catch),DT=((e,t)=>e?setImmediate:t?((r,n)=>(Pa.addEventListener("message",({source:i,data:a})=>{i===Pa&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Pa.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",cr(Pa.postMessage)),a3=typeof queueMicrotask<"u"?queueMicrotask.bind(Pa):typeof process<"u"&&process.nextTick||DT,o3=e=>e!=null&&cr(e[ip]),L={isArray:sl,isArrayBuffer:kT,isBuffer:Mc,isFormData:CL,isArrayBufferView:OL,isString:jL,isNumber:CT,isBoolean:PL,isObject:Ic,isPlainObject:Yf,isEmptyObject:EL,isReadableStream:ML,isRequest:IL,isResponse:DL,isHeaders:RL,isUndefined:_s,isDate:AL,isFile:_L,isBlob:TL,isRegExp:XL,isFunction:cr,isStream:kL,isURLSearchParams:$L,isTypedArray:KL,isFileList:NL,forEach:Dc,merge:Wy,extend:FL,trim:LL,stripBOM:BL,inherits:zL,toFlatObject:UL,kindOf:ap,kindOfTest:cn,endsWith:WL,toArray:HL,forEachEntry:qL,matchAll:VL,isHTMLForm:GL,hasOwnProperty:I1,hasOwnProp:I1,reduceDescriptors:IT,freezeMethods:QL,toObjectSet:JL,toCamelCase:YL,noop:ZL,toFiniteNumber:e3,findKey:$T,global:Pa,isContextDefined:MT,isSpecCompliantForm:t3,toJSONObject:r3,isAsyncFn:n3,isThenable:i3,setImmediate:DT,asap:a3,isIterable:o3};function ce(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}L.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:L.toJSONObject(this.config),code:this.code,status:this.status}}});const RT=ce.prototype,LT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{LT[e]={value:e}});Object.defineProperties(ce,LT);Object.defineProperty(RT,"isAxiosError",{value:!0});ce.from=(e,t,r,n,i,a)=>{const o=Object.create(RT);L.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const s=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return ce.call(o,s,l,r,n,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};const s3=null;function Hy(e){return L.isPlainObject(e)||L.isArray(e)}function FT(e){return L.endsWith(e,"[]")?e.slice(0,-2):e}function D1(e,t,r){return e?e.concat(t).map(function(i,a){return i=FT(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function l3(e){return L.isArray(e)&&!e.some(Hy)}const u3=L.toFlatObject(L,{},null,function(t){return/^is[A-Z]/.test(t)});function sp(e,t,r){if(!L.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=L.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!L.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||c,a=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&L.isSpecCompliantForm(t);if(!L.isFunction(i))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(L.isDate(v))return v.toISOString();if(L.isBoolean(v))return v.toString();if(!l&&L.isBlob(v))throw new ce("Blob is not supported. Use a Buffer instead.");return L.isArrayBuffer(v)||L.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,g){let y=v;if(v&&!g&&typeof v=="object"){if(L.endsWith(m,"{}"))m=n?m:m.slice(0,-2),v=JSON.stringify(v);else if(L.isArray(v)&&l3(v)||(L.isFileList(v)||L.endsWith(m,"[]"))&&(y=L.toArray(v)))return m=FT(m),y.forEach(function(b,S){!(L.isUndefined(b)||b===null)&&t.append(o===!0?D1([m],S,a):o===null?m:m+"[]",u(b))}),!1}return Hy(v)?!0:(t.append(D1(g,m,a),u(v)),!1)}const f=[],h=Object.assign(u3,{defaultVisitor:c,convertValue:u,isVisitable:Hy});function p(v,m){if(!L.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(v),L.forEach(v,function(y,x){(!(L.isUndefined(y)||y===null)&&i.call(t,y,L.isString(x)?x.trim():x,m,h))===!0&&p(y,m?m.concat(x):[x])}),f.pop()}}if(!L.isObject(e))throw new TypeError("data must be an object");return p(e),t}function R1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Lx(e,t){this._pairs=[],e&&sp(e,this,t)}const BT=Lx.prototype;BT.append=function(t,r){this._pairs.push([t,r])};BT.toString=function(t){const r=t?function(n){return t.call(this,n,R1)}:R1;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function c3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zT(e,t,r){if(!t)return e;const n=r&&r.encode||c3;L.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let a;if(i?a=i(t,r):a=L.isURLSearchParams(t)?t.toString():new Lx(t,r).toString(n),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class L1{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){L.forEach(this.handlers,function(n){n!==null&&t(n)})}}const UT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},f3=typeof URLSearchParams<"u"?URLSearchParams:Lx,d3=typeof FormData<"u"?FormData:null,h3=typeof Blob<"u"?Blob:null,p3={isBrowser:!0,classes:{URLSearchParams:f3,FormData:d3,Blob:h3},protocols:["http","https","file","blob","url","data"]},Fx=typeof window<"u"&&typeof document<"u",Ky=typeof navigator=="object"&&navigator||void 0,m3=Fx&&(!Ky||["ReactNative","NativeScript","NS"].indexOf(Ky.product)<0),v3=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",y3=Fx&&window.location.href||"http://localhost",g3=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fx,hasStandardBrowserEnv:m3,hasStandardBrowserWebWorkerEnv:v3,navigator:Ky,origin:y3},Symbol.toStringTag,{value:"Module"})),Lt={...g3,...p3};function x3(e,t){return sp(e,new Lt.classes.URLSearchParams,{visitor:function(r,n,i,a){return Lt.isNode&&L.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function b3(e){return L.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function w3(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n=r.length;return o=!o&&L.isArray(i)?i.length:o,l?(L.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!L.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&L.isArray(i[o])&&(i[o]=w3(i[o])),!s)}if(L.isFormData(e)&&L.isFunction(e.entries)){const r={};return L.forEachEntry(e,(n,i)=>{t(b3(n),i,r,0)}),r}return null}function S3(e,t,r){if(L.isString(e))try{return(t||JSON.parse)(e),L.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Rc={transitional:UT,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=L.isObject(t);if(a&&L.isHTMLForm(t)&&(t=new FormData(t)),L.isFormData(t))return i?JSON.stringify(WT(t)):t;if(L.isArrayBuffer(t)||L.isBuffer(t)||L.isStream(t)||L.isFile(t)||L.isBlob(t)||L.isReadableStream(t))return t;if(L.isArrayBufferView(t))return t.buffer;if(L.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return x3(t,this.formSerializer).toString();if((s=L.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sp(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),S3(t)):t}],transformResponse:[function(t){const r=this.transitional||Rc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(L.isResponse(t)||L.isReadableStream(t))return t;if(t&&L.isString(t)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(s){if(o)throw s.name==="SyntaxError"?ce.from(s,ce.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch"],e=>{Rc.headers[e]={}});const O3=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),j3=e=>{const t={};let r,n,i;return e&&e.split(` +`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||t[r]&&O3[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},F1=Symbol("internals");function $l(e){return e&&String(e).trim().toLowerCase()}function Xf(e){return e===!1||e==null?e:L.isArray(e)?e.map(Xf):String(e)}function P3(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const E3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Um(e,t,r,n,i){if(L.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!L.isString(t)){if(L.isString(n))return t.indexOf(n)!==-1;if(L.isRegExp(n))return n.test(t)}}function A3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function _3(e,t){const r=L.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let fr=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,l,u){const c=$l(l);if(!c)throw new Error("header name must be a non-empty string");const f=L.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Xf(s))}const o=(s,l)=>L.forEach(s,(u,c)=>a(u,c,l));if(L.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(L.isString(t)&&(t=t.trim())&&!E3(t))o(j3(t),r);else if(L.isObject(t)&&L.isIterable(t)){let s={},l,u;for(const c of t){if(!L.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?L.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=$l(t),t){const n=L.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return P3(i);if(L.isFunction(r))return r.call(this,i,n);if(L.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=$l(t),t){const n=L.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Um(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=$l(o),o){const s=L.findKey(n,o);s&&(!r||Um(n,n[s],s,r))&&(delete n[s],i=!0)}}return L.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Um(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return L.forEach(this,(i,a)=>{const o=L.findKey(n,a);if(o){r[o]=Xf(i),delete r[a];return}const s=t?A3(a):String(a).trim();s!==a&&delete r[a],r[s]=Xf(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return L.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&L.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[F1]=this[F1]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=$l(o);n[s]||(_3(i,o),n[s]=!0)}return L.isArray(t)?t.forEach(a):a(t),this}};fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(fr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});L.freezeMethods(fr);function Wm(e,t){const r=this||Rc,n=t||r,i=fr.from(n.headers);let a=n.data;return L.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function HT(e){return!!(e&&e.__CANCEL__)}function ll(e,t,r){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,r),this.name="CanceledError"}L.inherits(ll,ce,{__CANCEL__:!0});function KT(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ce("Request failed with status code "+r.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function T3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function N3(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[a];o||(o=u),r[i]=l,n[i]=u;let f=a,h=0;for(;f!==i;)h+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{r=c,i=null,a&&(clearTimeout(a),a=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-r;f>=n?o(u,c):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-f)))},()=>i&&o(i)]}const _d=(e,t,r=3)=>{let n=0;const i=N3(50,250);return k3(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,l=o-n,u=i(l),c=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},B1=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},z1=e=>(...t)=>L.asap(()=>e(...t)),C3=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,$3=Lt.hasStandardBrowserEnv?{write(e,t,r,n,i,a){const o=[e+"="+encodeURIComponent(t)];L.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),L.isString(n)&&o.push("path="+n),L.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function M3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function I3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qT(e,t,r){let n=!M3(t);return e&&(n||r==!1)?I3(e,t):t}const U1=e=>e instanceof fr?{...e}:e;function Qa(e,t){t=t||{};const r={};function n(u,c,f,h){return L.isPlainObject(u)&&L.isPlainObject(c)?L.merge.call({caseless:h},u,c):L.isPlainObject(c)?L.merge({},c):L.isArray(c)?c.slice():c}function i(u,c,f,h){if(L.isUndefined(c)){if(!L.isUndefined(u))return n(void 0,u,f,h)}else return n(u,c,f,h)}function a(u,c){if(!L.isUndefined(c))return n(void 0,c)}function o(u,c){if(L.isUndefined(c)){if(!L.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c,f)=>i(U1(u),U1(c),f,!0)};return L.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,h=f(e[c],t[c],c);L.isUndefined(h)&&f!==s||(r[c]=h)}),r}const VT=e=>{const t=Qa({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=fr.from(o),t.url=zT(qT(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),L.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(L.isFunction(r.getHeaders)){const l=r.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if(Lt.hasStandardBrowserEnv&&(n&&L.isFunction(n)&&(n=n(t)),n||n!==!1&&C3(t.url))){const l=i&&a&&$3.read(a);l&&o.set(i,l)}return t},D3=typeof XMLHttpRequest<"u",R3=D3&&function(e){return new Promise(function(r,n){const i=VT(e);let a=i.data;const o=fr.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,f,h,p,v;function m(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function y(){if(!g)return;const b=fr.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:b,config:e,request:g};KT(function(j){r(j),m()},function(j){n(j),m()},w),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(n(new ce("Request aborted",ce.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const w=S&&S.message?S.message:"Network Error",O=new ce(w,ce.ERR_NETWORK,e,g);O.event=S||null,n(O),g=null},g.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||UT;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),n(new ce(S,w.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&L.forEach(o.toJSON(),function(S,w){g.setRequestHeader(w,S)}),L.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([h,v]=_d(u,!0),g.addEventListener("progress",h)),l&&g.upload&&([f,p]=_d(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=b=>{g&&(n(!b||b.type?new ll(null,e,g):b),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=T3(i.url);if(x&&Lt.protocols.indexOf(x)===-1){n(new ce("Unsupported protocol "+x+":",ce.ERR_BAD_REQUEST,e));return}g.send(a||null)})},L3=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const a=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;n.abort(c instanceof ce?c:new ll(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,a(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:l}=n;return l.unsubscribe=()=>L.asap(s),l}},F3=function*(e,t){let r=e.byteLength;if(r{const i=B3(e,t);let a=0,o,s=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let f=c.byteLength;if(r){let h=a+=f;r(h)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},H1=64*1024,{isFunction:mf}=L,U3=(({Request:e,Response:t})=>({Request:e,Response:t}))(L.global),{ReadableStream:K1,TextEncoder:q1}=L.global,V1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},W3=e=>{e=L.merge.call({skipUndefined:!0},U3,e);const{fetch:t,Request:r,Response:n}=e,i=t?mf(t):typeof fetch=="function",a=mf(r),o=mf(n);if(!i)return!1;const s=i&&mf(K1),l=i&&(typeof q1=="function"?(v=>m=>v.encode(m))(new q1):async v=>new Uint8Array(await new r(v).arrayBuffer())),u=a&&s&&V1(()=>{let v=!1;const m=new r(Lt.origin,{body:new K1,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!m}),c=o&&s&&V1(()=>L.isReadableStream(new n("").body)),f={stream:c&&(v=>v.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!f[v]&&(f[v]=(m,g)=>{let y=m&&m[v];if(y)return y.call(m);throw new ce(`Response type '${v}' is not supported`,ce.ERR_NOT_SUPPORT,g)})});const h=async v=>{if(v==null)return 0;if(L.isBlob(v))return v.size;if(L.isSpecCompliantForm(v))return(await new r(Lt.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(L.isArrayBufferView(v)||L.isArrayBuffer(v))return v.byteLength;if(L.isURLSearchParams(v)&&(v=v+""),L.isString(v))return(await l(v)).byteLength},p=async(v,m)=>{const g=L.toFiniteNumber(v.getContentLength());return g??h(m)};return async v=>{let{url:m,method:g,data:y,signal:x,cancelToken:b,timeout:S,onDownloadProgress:w,onUploadProgress:O,responseType:j,headers:E,withCredentials:A="same-origin",fetchOptions:T}=VT(v),_=t||fetch;j=j?(j+"").toLowerCase():"text";let N=L3([x,b&&b.toAbortSignal()],S),M=null;const R=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let I;try{if(O&&u&&g!=="get"&&g!=="head"&&(I=await p(E,y))!==0){let V=new r(m,{method:"POST",body:y,duplex:"half"}),H;if(L.isFormData(y)&&(H=V.headers.get("content-type"))&&E.setContentType(H),V.body){const[Y,re]=B1(I,_d(z1(O)));y=W1(V.body,H1,Y,re)}}L.isString(A)||(A=A?"include":"omit");const D=a&&"credentials"in r.prototype,z={...T,signal:N,method:g.toUpperCase(),headers:E.normalize().toJSON(),body:y,duplex:"half",credentials:D?A:void 0};M=a&&new r(m,z);let C=await(a?_(M,T):_(m,z));const F=c&&(j==="stream"||j==="response");if(c&&(w||F&&R)){const V={};["status","statusText","headers"].forEach(be=>{V[be]=C[be]});const H=L.toFiniteNumber(C.headers.get("content-length")),[Y,re]=w&&B1(H,_d(z1(w),!0))||[];C=new n(W1(C.body,H1,Y,()=>{re&&re(),R&&R()}),V)}j=j||"text";let W=await f[L.findKey(f,j)||"text"](C,v);return!F&&R&&R(),await new Promise((V,H)=>{KT(V,H,{data:W,headers:fr.from(C.headers),status:C.status,statusText:C.statusText,config:v,request:M})})}catch(D){throw R&&R(),D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,v,M),{cause:D.cause||D}):ce.from(D,D&&D.code,v,M)}}},H3=new Map,GT=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,l,u,c=H3;for(;s--;)l=a[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:W3(t)),c=u;return u};GT();const qy={http:s3,xhr:R3,fetch:{get:GT}};L.forEach(qy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G1=e=>`- ${e}`,K3=e=>L.isFunction(e)||e===null||e===!1,YT={getAdapter:(e,t)=>{e=L.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since : +`+o.map(G1).join(` +`):" "+G1(o[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:qy};function Hm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ll(null,e)}function Y1(e){return Hm(e),e.headers=fr.from(e.headers),e.data=Wm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),YT.getAdapter(e.adapter||Rc.adapter,e)(e).then(function(n){return Hm(e),n.data=Wm.call(e,e.transformResponse,n),n.headers=fr.from(n.headers),n},function(n){return HT(n)||(Hm(e),n&&n.response&&(n.response.data=Wm.call(e,e.transformResponse,n.response),n.response.headers=fr.from(n.response.headers))),Promise.reject(n)})}const XT="1.12.2",lp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lp[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const X1={};lp.transitional=function(t,r,n){function i(a,o){return"[Axios v"+XT+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new ce(i(o," has been removed"+(r?" in "+r:"")),ce.ERR_DEPRECATED);return r&&!X1[o]&&(X1[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};lp.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function q3(e,t,r){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ce("option "+a+" must be "+l,ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ce("Unknown option "+a,ce.ERR_BAD_OPTION)}}const Qf={assertOptions:q3,validators:lp},mn=Qf.validators;let za=class{constructor(t){this.defaults=t||{},this.interceptors={request:new L1,response:new L1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Qa(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Qf.assertOptions(n,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean)},!1),i!=null&&(L.isFunction(i)?r.paramsSerializer={serialize:i}:Qf.assertOptions(i,{encode:mn.function,serialize:mn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Qf.assertOptions(r,{baseUrl:mn.spelling("baseURL"),withXsrfToken:mn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&L.merge(a.common,a[r.method]);a&&L.forEach(["delete","get","head","post","put","patch","common"],v=>{delete a[v]}),r.headers=fr.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,f=0,h;if(!l){const v=[Y1.bind(this),void 0];for(v.unshift(...s),v.push(...u),h=v.length,c=Promise.resolve(r);f{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new ll(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new QT(function(i){t=i}),cancel:t}}};function G3(e){return function(r){return e.apply(null,r)}}function Y3(e){return L.isObject(e)&&e.isAxiosError===!0}const Vy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vy).forEach(([e,t])=>{Vy[t]=e});function JT(e){const t=new za(e),r=TT(za.prototype.request,t);return L.extend(r,za.prototype,t,{allOwnKeys:!0}),L.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return JT(Qa(e,i))},r}const nt=JT(Rc);nt.Axios=za;nt.CanceledError=ll;nt.CancelToken=V3;nt.isCancel=HT;nt.VERSION=XT;nt.toFormData=sp;nt.AxiosError=ce;nt.Cancel=nt.CanceledError;nt.all=function(t){return Promise.all(t)};nt.spread=G3;nt.isAxiosError=Y3;nt.mergeConfig=Qa;nt.AxiosHeaders=fr;nt.formToJSON=e=>WT(L.isHTMLForm(e)?new FormData(e):e);nt.getAdapter=YT.getAdapter;nt.HttpStatusCode=Vy;nt.default=nt;const{Axios:Ehe,AxiosError:Ahe,CanceledError:_he,isCancel:The,CancelToken:Nhe,VERSION:khe,all:Che,Cancel:$he,isAxiosError:Mhe,spread:Ihe,toFormData:Dhe,AxiosHeaders:Rhe,HttpStatusCode:Lhe,formToJSON:Fhe,getAdapter:Bhe,mergeConfig:zhe}=nt,X3="/graphql";async function Xt(e,t){try{const r=await nt.post(X3,{query:e,variables:t},{headers:{"Content-Type":"application/json"}});if(r.data.errors)throw new Error(r.data.errors.map(n=>n.message).join(", "));if(!r.data.data)throw new Error("No data returned from GraphQL query");return r.data.data}catch(r){throw nt.isAxiosError(r)?new Error(`GraphQL request failed: ${r.message}`):r}}const Qt={listTeams:` + query ListTeams($userId: ID!) { + teams(userId: $userId) { + id + name + description + meta + createdAt + updatedAt + } + } + `,getUser:` + query GetUser($id: ID!) { + user(id: $id) { + id + username + email + avatarUrl + meta + createdAt + updatedAt + } + } + `,getTeam:` + query GetTeam($id: ID!) { + team(id: $id) { + id + name + description + meta + createdAt + updatedAt + totalProjects + totalExperiments + totalRuns + } + } + `,getTeamWithExperiments:` + query GetTeamWithExperiments($id: ID!, $startTime: DateTime!, $endTime: DateTime!) { + team(id: $id) { + id + name + listExpsByTimeframe(startTime: $startTime, endTime: $endTime) { + id + teamId + userId + projectId + name + status + createdAt + } + } + } + `,listProjects:` + query ListProjects($teamId: ID!, $page: Int, $pageSize: Int) { + projects(teamId: $teamId, page: $page, pageSize: $pageSize) { + id + teamId + creatorId + name + description + meta + createdAt + updatedAt + } + } + `,getProject:` + query GetProject($id: ID!) { + project(id: $id) { + id + teamId + creatorId + name + description + meta + createdAt + updatedAt + } + } + `,listExperiments:` + query ListExperiments($projectId: ID!, $page: Int, $pageSize: Int) { + experiments(projectId: $projectId, page: $page, pageSize: $pageSize) { + id + teamId + userId + projectId + name + description + kind + meta + params + duration + status + createdAt + updatedAt + } + } + `,getExperiment:` + query GetExperiment($id: ID!) { + experiment(id: $id) { + id + teamId + userId + projectId + name + description + kind + meta + params + duration + status + createdAt + updatedAt + metrics { + id + key + value + teamId + projectId + experimentId + runId + createdAt + } + } + } + `,listRuns:` + query ListRuns($experimentId: ID!, $page: Int, $pageSize: Int) { + runs(experimentId: $experimentId, page: $page, pageSize: $pageSize) { + id + teamId + userId + projectId + experimentId + meta + status + createdAt + } + } + `,getRun:` + query GetRun($id: ID!) { + run(id: $id) { + id + teamId + userId + projectId + experimentId + meta + status + createdAt + metrics { + id + key + value + teamId + projectId + experimentId + runId + createdAt + } + spans { + timestamp + traceId + spanId + parentSpanId + spanName + spanKind + serviceName + duration + statusCode + statusMessage + teamId + projectId + runId + experimentId + spanAttributes + resourceAttributes + events { + timestamp + name + attributes + } + links { + traceId + spanId + attributes + } + } + } + } + `,listArtifactRepositories:` + query ListArtifactRepositories { + artifactRepos { + name + } + } + `,listArtifactTags:` + query ListArtifactTags($team_id: ID!, $project_id: ID!, $repo_type: String) { + artifactTags(teamId: $team_id, projectId: $project_id, repoType: $repo_type) { + name + } + } + `,getArtifactContent:` + query GetArtifactContent($team_id: ID!, $project_id: ID!, $tag: String!, $repo_type: String) { + artifactContent(teamId: $team_id, projectId: $project_id, tag: $tag, repoType: $repo_type) { + filename + content + contentType + } + } + `,listTraces:` + query ListTraces($runId: ID!) { + traces(runId: $runId) { + timestamp + traceId + spanId + parentSpanId + spanName + spanKind + semanticKind + serviceName + duration + statusCode + statusMessage + teamId + projectId + runId + experimentId + spanAttributes + resourceAttributes + events { + timestamp + name + attributes + } + links { + traceId + spanId + attributes + } + } + } + `,getDailyTokenUsage:` + query GetDailyTokenUsage($teamId: ID!, $days: Int = 30) { + dailyTokenUsage(teamId: $teamId, days: $days) { + date + totalTokens + inputTokens + outputTokens + } + } + `},ZT=P.createContext(null);function Q3({user:e,children:t}){const[r,n]=P.useState(e),i=a=>{n(o=>({...o,...a}))};return d.jsx(ZT.Provider,{value:{user:r,updateUser:i},children:t})}function Bx(){const e=P.useContext(ZT);if(!e)throw new Error("useCurrentUser must be used within UserProvider");return e.user}/** + * @license lucide-react v0.555.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=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Z3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Q1=e=>{const t=Z3(e);return t.charAt(0).toUpperCase()+t.slice(1)},eN=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),eF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var tF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rF=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},l)=>P.createElement("svg",{ref:l,...tF,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:eN("lucide",i),...!a&&!eF(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,c])=>P.createElement(u,c)),...Array.isArray(a)?a:[a]]));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ge=(e,t)=>{const r=P.forwardRef(({className:n,...i},a)=>P.createElement(rF,{ref:a,iconNode:t,className:eN(`lucide-${J3(Q1(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Q1(e),r};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nF=[["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"}]],iF=Ge("bot",nF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aF=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],J1=Ge("building-2",aF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zx=Ge("check",oF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sF=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],up=Ge("chevron-down",sF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qi=Ge("chevron-right",lF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uF=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],cp=Ge("chevron-left",uF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gy=Ge("clock",cF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fF=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],tN=Ge("copy",fF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dF=[["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"}]],rN=Ge("database",dF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hF=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nN=Ge("eye",hF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pF=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],mF=Ge("file-text",pF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vF=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],yF=Ge("flask-conical",vF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gF=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],iN=Ge("folder-kanban",gF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xF=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],bF=Ge("github",xF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],SF=Ge("globe",wF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OF=[["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:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aN=Ge("layers",OF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jF=[["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"}]],PF=Ge("layout-dashboard",jF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EF=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],AF=Ge("package",EF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _F=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],TF=Ge("play",_F);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NF=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],kF=Ge("route",NF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const CF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ja=Ge("search",CF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $F=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Z1=Ge("user",$F);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],oN=Ge("x",MF);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IF=[["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"}]],DF=Ge("zap",IF);function sN(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),lN=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",eS=[],FF="arbitrary..",BF=e=>{const t=UF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return zF(o);const s=o.split(Td),l=s[0]===""&&s.length>1?1:0;return uN(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=n[o],u=r[o];return l?u?RF(u,l):l:u||eS}return r[o]||eS}}},uN=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const u=uN(e,t+1,a);if(u)return u}const o=r.validators;if(o===null)return;const s=t===0?e.join(Td):e.slice(t).join(Td),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?FF+n:void 0})(),UF=e=>{const{theme:t,classGroups:r}=e;return WF(r,t)},WF=(e,t)=>{const r=lN();for(const n in e){const i=e[n];Ux(i,r,n,t)}return r},Ux=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){KF(e,t,r);return}if(typeof e=="function"){qF(e,t,r,n);return}VF(e,t,r,n)},KF=(e,t,r)=>{const n=e===""?t:cN(t,e);n.classGroupId=r},qF=(e,t,r,n)=>{if(GF(e)){Ux(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(LF(r,e))},VF=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,YF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Yy="!",tS=":",XF=[],rS=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),QF=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,l=0,u;const c=i.length;for(let m=0;ml?u-l:void 0;return rS(a,p,h,v)};if(t){const i=t+tS,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):rS(XF,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},JF=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},ZF=e=>({cache:YF(e.cacheSize),parseClassName:QF(e),sortModifiers:JF(e),...BF(e)}),e5=/\s+/,t5=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(e5);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:m}=r(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!m,y=n(g?v.substring(0,m):v);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=n(v),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const x=h.length===0?"":h.length===1?h[0]:a(h).join(":"),b=p?x+Yy:x,S=b+y;if(o.indexOf(S)>-1)continue;o.push(S);const w=i(y,g);for(let O=0;O0?" "+l:l)}return l},r5=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const o=l=>{const u=t.reduce((c,f)=>f(c),e());return r=ZF(u),n=r.cache.get,i=r.cache.set,a=s,s(l)},s=l=>{const u=n(l);if(u)return u;const c=t5(l,r);return i(l,c),c};return a=o,(...l)=>a(r5(...l))},i5=[],dt=e=>{const t=r=>r[e]||i5;return t.isThemeGetter=!0,t},dN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,hN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,a5=/^\d+\/\d+$/,o5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,l5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Eo=e=>a5.test(e),fe=e=>!!e&&!Number.isNaN(Number(e)),di=e=>!!e&&Number.isInteger(Number(e)),Km=e=>e.endsWith("%")&&fe(e.slice(0,-1)),$n=e=>o5.test(e),f5=()=>!0,d5=e=>s5.test(e)&&!l5.test(e),pN=()=>!1,h5=e=>u5.test(e),p5=e=>c5.test(e),m5=e=>!Z(e)&&!ee(e),v5=e=>ul(e,yN,pN),Z=e=>dN.test(e),ca=e=>ul(e,gN,d5),qm=e=>ul(e,w5,fe),nS=e=>ul(e,mN,pN),y5=e=>ul(e,vN,p5),vf=e=>ul(e,xN,h5),ee=e=>hN.test(e),Ml=e=>cl(e,gN),g5=e=>cl(e,S5),iS=e=>cl(e,mN),x5=e=>cl(e,yN),b5=e=>cl(e,vN),yf=e=>cl(e,xN,!0),ul=(e,t,r)=>{const n=dN.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},cl=(e,t,r=!1)=>{const n=hN.exec(e);return n?n[1]?t(n[1]):r:!1},mN=e=>e==="position"||e==="percentage",vN=e=>e==="image"||e==="url",yN=e=>e==="length"||e==="size"||e==="bg-size",gN=e=>e==="length",w5=e=>e==="number",S5=e=>e==="family-name",xN=e=>e==="shadow",O5=()=>{const e=dt("color"),t=dt("font"),r=dt("text"),n=dt("font-weight"),i=dt("tracking"),a=dt("leading"),o=dt("breakpoint"),s=dt("container"),l=dt("spacing"),u=dt("radius"),c=dt("shadow"),f=dt("inset-shadow"),h=dt("text-shadow"),p=dt("drop-shadow"),v=dt("blur"),m=dt("perspective"),g=dt("aspect"),y=dt("ease"),x=dt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),ee,Z],O=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],E=()=>[ee,Z,l],A=()=>[Eo,"full","auto",...E()],T=()=>[di,"none","subgrid",ee,Z],_=()=>["auto",{span:["full",di,ee,Z]},di,ee,Z],N=()=>[di,"auto",ee,Z],M=()=>["auto","min","max","fr",ee,Z],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...E()],z=()=>[Eo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],C=()=>[e,ee,Z],F=()=>[...S(),iS,nS,{position:[ee,Z]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",x5,v5,{size:[ee,Z]}],H=()=>[Km,Ml,ca],Y=()=>["","none","full",u,ee,Z],re=()=>["",fe,Ml,ca],be=()=>["solid","dashed","dotted","double"],Ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[fe,Km,iS,nS],Pt=()=>["","none",v,ee,Z],G=()=>["none",fe,ee,Z],se=()=>["none",fe,ee,Z],le=()=>[fe,ee,Z],U=()=>[Eo,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$n],breakpoint:[$n],color:[f5],container:[$n],"drop-shadow":[$n],ease:["in","out","in-out"],font:[m5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$n],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$n],shadow:[$n],spacing:["px",fe],text:[$n],"text-shadow":[$n],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Eo,Z,ee,g]}],container:["container"],columns:[{columns:[fe,Z,ee,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[di,"auto",ee,Z]}],basis:[{basis:[Eo,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[fe,Eo,"auto","initial","none",Z]}],grow:[{grow:["",fe,ee,Z]}],shrink:[{shrink:["",fe,ee,Z]}],order:[{order:[di,"first","last","none",ee,Z]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,Ml,ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ee,qm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Km,Z]}],"font-family":[{font:[g5,Z,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ee,Z]}],"line-clamp":[{"line-clamp":[fe,"none",ee,qm]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ee,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[fe,"from-font","auto",ee,ca]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[fe,"auto",ee,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},di,ee,Z],radial:["",ee,Z],conic:[di,ee,Z]},b5,y5]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[fe,ee,Z]}],"outline-w":[{outline:["",fe,Ml,ca]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,yf,vf]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,yf,vf]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[fe,ca]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,yf,vf]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[fe,ee,Z]}],"mix-blend":[{"mix-blend":[...Ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ke()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ee,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Z]}],filter:[{filter:["","none",ee,Z]}],blur:[{blur:Pt()}],brightness:[{brightness:[fe,ee,Z]}],contrast:[{contrast:[fe,ee,Z]}],"drop-shadow":[{"drop-shadow":["","none",p,yf,vf]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",fe,ee,Z]}],"hue-rotate":[{"hue-rotate":[fe,ee,Z]}],invert:[{invert:["",fe,ee,Z]}],saturate:[{saturate:[fe,ee,Z]}],sepia:[{sepia:["",fe,ee,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Z]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[fe,ee,Z]}],"backdrop-contrast":[{"backdrop-contrast":[fe,ee,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",fe,ee,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[fe,ee,Z]}],"backdrop-invert":[{"backdrop-invert":["",fe,ee,Z]}],"backdrop-opacity":[{"backdrop-opacity":[fe,ee,Z]}],"backdrop-saturate":[{"backdrop-saturate":[fe,ee,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",fe,ee,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[fe,"initial",ee,Z]}],ease:[{ease:["linear","initial",y,ee,Z]}],delay:[{delay:[fe,ee,Z]}],animate:[{animate:["none",x,ee,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ee,Z]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Z]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[fe,Ml,ca,qm]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},j5=n5(O5);function Oe(...e){return j5(ue(e))}const P5="/static/assets/logo-D6hHn9pX.png",E5=[{title:"Dashboard",href:"/",icon:PF},{title:"Projects",href:"/projects",icon:iN},{title:"Artifacts",href:"/artifacts",icon:AF}];function A5(){const e=co(),t=Bx(),[r,n]=P.useState(!1);return d.jsxs("div",{className:"flex h-screen w-48 flex-col bg-card",children:[d.jsxs(Tn,{to:"/",className:"flex h-14 items-center gap-2 px-3 hover:bg-accent/50 transition-colors",children:[d.jsx("img",{src:P5,alt:"AlphaTrion Logo",className:"h-6 w-6"}),d.jsx("h1",{className:"text-base font-bold text-foreground",children:"AlphaTrion"})]}),d.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 py-4",children:E5.map(i=>{const a=i.icon;let o=e.pathname===i.href||i.href!=="/"&&e.pathname.startsWith(i.href);return i.href==="/projects"&&(o=o||e.pathname.startsWith("/experiments")||e.pathname.startsWith("/runs")),d.jsxs(Tn,{to:i.href,className:Oe("flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm font-medium transition-colors relative",o?"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-400":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[o&&d.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-blue-600 dark:bg-blue-400 rounded-r"}),d.jsx(a,{className:Oe("h-4 w-4 ml-1",o&&"text-blue-600 dark:text-blue-400")}),i.title]},i.href)})}),d.jsxs("div",{className:"relative p-3 mt-auto",children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 hover:bg-accent/50 rounded-lg px-2 py-2 transition-colors",children:[d.jsx("button",{onClick:()=>n(!r),className:"flex items-center",title:"User menu",children:t.avatarUrl?d.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-7 w-7 rounded-full object-cover flex-shrink-0"}):d.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary text-primary-foreground flex-shrink-0",children:d.jsx(Z1,{className:"h-3.5 w-3.5"})})}),d.jsxs("div",{className:"flex items-center gap-0.5 flex-shrink-0",children:[d.jsx("a",{href:"https://github.com/InftyAI/alphatrion",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center h-6 w-6 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"View on GitHub",children:d.jsx(bF,{className:"h-3.5 w-3.5"})}),d.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:"v0.1.1"})]})]}),r&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>n(!1)}),d.jsx("div",{className:"absolute bottom-full left-4 mb-2 z-50 w-72 rounded-lg border bg-card shadow-lg overflow-hidden",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center gap-3",children:[t.avatarUrl?d.jsx("img",{src:t.avatarUrl,alt:t.username,className:"h-12 w-12 rounded-full object-cover"}):d.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground",children:d.jsx(Z1,{className:"h-6 w-6"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold text-foreground break-words",children:t.username}),d.jsx("p",{className:"text-xs text-muted-foreground break-words",children:t.email})]})]})})})]})]})]})}function _5(e=0,t=100){const r=Bx();return Ar({queryKey:["teams",r.id,e,t],queryFn:async()=>(await Xt(Qt.listTeams,{userId:r.id})).teams,staleTime:10*60*1e3})}function T5(e){return Ar({queryKey:["team",e],queryFn:async()=>(await Xt(Qt.getTeam,{id:e})).team,enabled:!!e,staleTime:10*60*1e3})}const lt=P.forwardRef(({className:e,variant:t="default",size:r="default",...n},i)=>{const a={default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},o={default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"};return d.jsx("button",{className:Oe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a[t],o[r],e),ref:i,...n})});lt.displayName="Button";function Te({className:e,...t}){return d.jsx("div",{className:Oe("animate-pulse rounded-md bg-muted",e),...t})}function N5(){const e=Ix(),{data:t,isLoading:r}=_5(),{selectedTeamId:n,setSelectedTeamId:i}=fo(),a=Bx(),[o,s]=P.useState(!1);if(r)return d.jsx(Te,{className:"h-9 w-40 rounded-lg"});if(!t||t.length===0)return d.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 px-3 py-1.5 text-xs text-muted-foreground",children:[d.jsx(J1,{className:"h-4 w-4"}),"No teams available"]});const l=t.find(u=>u.id===n);return d.jsxs("div",{className:"relative",children:[d.jsxs(lt,{variant:"outline",onClick:()=>s(!o),className:"h-9 px-3 gap-2 border-border/40 hover:border-border hover:bg-accent/50",children:[d.jsx(J1,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-medium",children:(l==null?void 0:l.name)||"Select team"}),d.jsx(up,{className:Oe("h-3.5 w-3.5 text-muted-foreground transition-transform",o&&"rotate-180")})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),d.jsx("div",{className:"absolute top-full right-0 mt-1.5 w-52 z-50 rounded-lg border bg-card shadow-lg overflow-hidden",children:d.jsx("div",{className:"p-1.5",children:t.map((u,c)=>{const f=u.id===n;return d.jsxs("button",{onClick:()=>{i(u.id,a.id),s(!1),e("/")},className:Oe("flex w-full items-center justify-between gap-2 px-2.5 py-2 rounded-md transition-colors",f?"bg-accent/50 text-foreground":"hover:bg-accent/30 text-foreground"),children:[d.jsx("div",{className:"flex-1 text-left",children:d.jsx("div",{className:"text-xs font-medium break-words",children:u.name||"Unnamed Team"})}),f&&d.jsx(zx,{className:"h-3 w-3 flex-shrink-0 text-primary"})]},u.id)})})})]})]})}function fp(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Ar({queryKey:["projects",e,r,n],queryFn:async()=>(await Xt(Qt.listProjects,{teamId:e,page:r,pageSize:n})).projects,enabled:i&&!!e,staleTime:60*60*1e3})}function bN(e,t){const{enabled:r=!0}=t||{};return Ar({queryKey:["project",e],queryFn:async()=>(await Xt(Qt.getProject,{id:e})).project,enabled:r&&!!e,staleTime:60*60*1e3})}function Nd(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Ar({queryKey:["experiments",e,r,n],queryFn:async()=>(await Xt(Qt.listExperiments,{projectId:e,page:r,pageSize:n})).experiments,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return Dx(s)}})}function dp(e,t){const{enabled:r=!0}=t||{};return Ar({queryKey:["experiment",e],queryFn:async()=>(await Xt(Qt.getExperiment,{id:e})).experiment,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?Dx([i.status]):!1}})}function k5(e){return Ar({queryKey:["experiments","by-ids",e],queryFn:async()=>(await Promise.all(e.map(async r=>(await Xt(Qt.getExperiment,{id:r})).experiment))).filter(r=>r!==null),enabled:e.length>0,refetchInterval:t=>{const r=t.state.data;if(!r)return!1;const n=r.map(i=>i.status);return Dx(n)}})}function Xy(e,t){const{page:r=0,pageSize:n=100,enabled:i=!0}=t||{};return Ar({queryKey:["runs",e,r,n],queryFn:async()=>(await Xt(Qt.listRuns,{experimentId:e,page:r,pageSize:n})).runs,enabled:i&&!!e,refetchInterval:a=>{const o=a.state.data;if(!o)return!1;const s=o.map(l=>l.status);return AT(s)}})}function wN(e,t){const{enabled:r=!0}=t||{};return Ar({queryKey:["run",e],queryFn:async()=>(await Xt(Qt.getRun,{id:e})).run,enabled:r&&!!e,refetchInterval:n=>{const i=n.state.data;return i?AT([i.status]):!1}})}function Ao(e,t=4,r=4){return!e||e.length<=t+r?e:`${e.slice(0,t)}....${e.slice(-r)}`}function C5(){const e=co();np();const t=e.pathname.split("/").filter(Boolean),r=t[0]==="projects"&&t[1]&&t[1]!=="projects"?t[1]:void 0,n=t[0]==="experiments"&&t[1]&&t[1]!=="compare"?t[1]:void 0,i=t[0]==="runs"&&t[1]?t[1]:void 0,{data:a}=bN(r||"",{enabled:!!r}),{data:o}=dp(n||"",{enabled:!!n}),{data:s}=wN(i||"",{enabled:!!i}),u=(()=>{const c=e.pathname.split("/").filter(Boolean);if(c.length===0)return[{label:"Home"}];const f=[{label:"Home",href:"/"}];return c[0]==="projects"?(f.push({label:"Projects",href:"/projects"}),r&&a&&f.push({label:Ao(a.id),href:`/projects/${a.id}`})):c[0]==="experiments"?n&&o?(f.push({label:"Projects",href:"/projects"}),f.push({label:Ao(o.projectId),href:`/projects/${o.projectId}`}),f.push({label:"Experiments",href:`/projects/${o.projectId}`}),f.push({label:Ao(o.id),href:c.length===2?void 0:`/experiments/${o.id}`})):f.push({label:"Experiments",href:void 0}):c[0]==="runs"?i&&s?(f.push({label:"Projects",href:"/projects"}),f.push({label:Ao(s.projectId),href:`/projects/${s.projectId}`}),f.push({label:"Experiments",href:`/projects/${s.projectId}`}),f.push({label:Ao(s.experimentId),href:`/experiments/${s.experimentId}`}),f.push({label:"Runs",href:`/experiments/${s.experimentId}`}),f.push({label:Ao(s.id),href:void 0})):f.push({label:"Runs",href:void 0}):c.forEach((h,p)=>{const v="/"+c.slice(0,p+1).join("/"),m=p===c.length-1,g=h.charAt(0).toUpperCase()+h.slice(1);f.push({label:g,href:m?void 0:v})}),f})();return d.jsxs("header",{className:"flex h-14 items-center justify-between bg-card px-6",children:[d.jsx("nav",{className:"flex items-center space-x-2 text-sm",children:u.map((c,f)=>{const h=f===u.length-1;return d.jsxs("div",{className:"flex items-center",children:[f>0&&d.jsx(Qi,{className:"mx-2 h-4 w-4 text-muted-foreground"}),c.href&&!h?d.jsx(Tn,{to:c.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:c.label}):d.jsx("span",{className:"text-foreground font-medium",children:c.label})]},f)})}),d.jsx(N5,{})]})}function $5(){return d.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[d.jsx("div",{className:"shadow-sm",children:d.jsx(A5,{})}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx("div",{className:"shadow-sm",children:d.jsx(C5,{})}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6 bg-muted/20",children:d.jsx(nL,{})})]})]})}function kd(e){"@babel/helpers - typeof";return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function ln(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Ae(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Ne(e){Ae(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||kd(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function M5(e,t){Ae(2,arguments);var r=Ne(e),n=ln(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function I5(e,t){Ae(2,arguments);var r=Ne(e),n=ln(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),a=new Date(r.getTime());a.setMonth(r.getMonth()+n+1,0);var o=a.getDate();return i>=o?a:(r.setFullYear(a.getFullYear(),a.getMonth(),i),r)}function D5(e,t){Ae(2,arguments);var r=Ne(e).getTime(),n=ln(t);return new Date(r+n)}var R5={};function Lc(){return R5}function Qy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Jy(e){Ae(1,arguments);var t=Ne(e);return t.setHours(0,0,0,0),t}function Jf(e,t){Ae(2,arguments);var r=Ne(e),n=Ne(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}function L5(e){return Ae(1,arguments),e instanceof Date||kd(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function F5(e){if(Ae(1,arguments),!L5(e)&&typeof e!="number")return!1;var t=Ne(e);return!isNaN(Number(t))}function B5(e,t){Ae(2,arguments);var r=Ne(e),n=Ne(t),i=r.getFullYear()-n.getFullYear(),a=r.getMonth()-n.getMonth();return i*12+a}function z5(e,t){return Ae(2,arguments),Ne(e).getTime()-Ne(t).getTime()}var U5={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W5="trunc";function H5(e){return U5[W5]}function K5(e){Ae(1,arguments);var t=Ne(e);return t.setHours(23,59,59,999),t}function q5(e){Ae(1,arguments);var t=Ne(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function V5(e){Ae(1,arguments);var t=Ne(e);return K5(t).getTime()===q5(t).getTime()}function G5(e,t){Ae(2,arguments);var r=Ne(e),n=Ne(t),i=Jf(r,n),a=Math.abs(B5(r,n)),o;if(a<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var s=Jf(r,n)===-i;V5(Ne(e))&&a===1&&Jf(e,n)===1&&(s=!1),o=i*(a-Number(s))}return o===0?0:o}function Y5(e,t,r){Ae(2,arguments);var n=z5(e,t)/1e3;return H5()(n)}function X5(e,t){Ae(2,arguments);var r=ln(t);return D5(e,-r)}var Q5=864e5;function J5(e){Ae(1,arguments);var t=Ne(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),i=r-n;return Math.floor(i/Q5)+1}function Cd(e){Ae(1,arguments);var t=1,r=Ne(e),n=r.getUTCDay(),i=(n=i.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function Z5(e){Ae(1,arguments);var t=SN(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Cd(r);return n}var e4=6048e5;function t4(e){Ae(1,arguments);var t=Ne(e),r=Cd(t).getTime()-Z5(t).getTime();return Math.round(r/e4)+1}function $d(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var c=Lc(),f=ln((r=(n=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Ne(e),p=h.getUTCDay(),v=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,p),v.setUTCHours(0,0,0,0);var m=$d(v,t),g=new Date(0);g.setUTCFullYear(f,0,p),g.setUTCHours(0,0,0,0);var y=$d(g,t);return c.getTime()>=m.getTime()?f+1:c.getTime()>=y.getTime()?f:f-1}function r4(e,t){var r,n,i,a,o,s,l,u;Ae(1,arguments);var c=Lc(),f=ln((r=(n=(i=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=ON(e,t),p=new Date(0);p.setUTCFullYear(h,0,f),p.setUTCHours(0,0,0,0);var v=$d(p,t);return v}var n4=6048e5;function i4(e,t){Ae(1,arguments);var r=Ne(e),n=$d(r,t).getTime()-r4(r,t).getTime();return Math.round(n/n4)+1}function _e(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return _e(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):_e(n+1,2)},d:function(t,r){return _e(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return _e(t.getUTCHours()%12||12,r.length)},H:function(t,r){return _e(t.getUTCHours(),r.length)},m:function(t,r){return _e(t.getUTCMinutes(),r.length)},s:function(t,r){return _e(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),a=Math.floor(i*Math.pow(10,n-3));return _e(a,r.length)}},_o={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},a4={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),a=i>0?i:1-i;return n.ordinalNumber(a,{unit:"year"})}return hi.y(t,r)},Y:function(t,r,n,i){var a=ON(t,i),o=a>0?a:1-a;if(r==="YY"){var s=o%100;return _e(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):_e(o,r.length)},R:function(t,r){var n=SN(t);return _e(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return _e(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return _e(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return _e(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return hi.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return _e(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var a=i4(t,i);return r==="wo"?n.ordinalNumber(a,{unit:"week"}):_e(a,r.length)},I:function(t,r,n){var i=t4(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):_e(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):hi.d(t,r)},D:function(t,r,n){var i=J5(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_e(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return _e(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var a=t.getUTCDay(),o=(a-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return _e(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),a=i===0?7:i;switch(r){case"i":return String(a);case"ii":return _e(a,r.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),a=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),a;switch(i===12?a=_o.noon:i===0?a=_o.midnight:a=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),a;switch(i>=17?a=_o.evening:i>=12?a=_o.afternoon:i>=4?a=_o.morning:a=_o.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return hi.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):hi.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):_e(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):hi.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):hi.s(t,r)},S:function(t,r){return hi.S(t,r)},X:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return oS(o);case"XXXX":case"XX":return va(o);case"XXXXX":case"XXX":default:return va(o,":")}},x:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"x":return oS(o);case"xxxx":case"xx":return va(o);case"xxxxx":case"xxx":default:return va(o,":")}},O:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+aS(o,":");case"OOOO":default:return"GMT"+va(o,":")}},z:function(t,r,n,i){var a=i._originalDate||t,o=a.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+aS(o,":");case"zzzz":default:return"GMT"+va(o,":")}},t:function(t,r,n,i){var a=i._originalDate||t,o=Math.floor(a.getTime()/1e3);return _e(o,r.length)},T:function(t,r,n,i){var a=i._originalDate||t,o=a.getTime();return _e(o,r.length)}};function aS(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),a=n%60;if(a===0)return r+String(i);var o=t;return r+String(i)+o+_e(a,2)}function oS(e,t){if(e%60===0){var r=e>0?"-":"+";return r+_e(Math.abs(e)/60,2)}return va(e,t)}function va(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),a=_e(Math.floor(i/60),2),o=_e(i%60,2);return n+a+r+o}var sS=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},jN=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},o4=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],a=n[2];if(!a)return sS(t,r);var o;switch(i){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",sS(i,r)).replace("{{time}}",jN(a,r))},s4={p:jN,P:o4},l4=["D","DD"],u4=["YY","YYYY"];function c4(e){return l4.indexOf(e)!==-1}function f4(e){return u4.indexOf(e)!==-1}function lS(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var d4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},h4=function(t,r,n){var i,a=d4[t];return typeof a=="string"?i=a:r===1?i=a.one:i=a.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Vm(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var p4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},m4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},v4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},y4={date:Vm({formats:p4,defaultWidth:"full"}),time:Vm({formats:m4,defaultWidth:"full"}),dateTime:Vm({formats:v4,defaultWidth:"full"})},g4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},x4=function(t,r,n,i){return g4[t]};function Il(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return i[u]}}var b4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},w4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},O4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},j4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},P4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},E4=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},A4={ordinalNumber:E4,era:Il({values:b4,defaultWidth:"wide"}),quarter:Il({values:w4,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Il({values:S4,defaultWidth:"wide"}),day:Il({values:O4,defaultWidth:"wide"}),dayPeriod:Il({values:j4,defaultWidth:"wide",formattingValues:P4,defaultFormattingWidth:"wide"})};function Dl(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?T4(s,function(f){return f.test(o)}):_4(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function _4(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function T4(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var k4=/^(\d+)(th|st|nd|rd)?/i,C4=/\d+/i,$4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},M4={any:[/^b/i,/^(a|c)/i]},I4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},D4={any:[/1/i,/2/i,/3/i,/4/i]},R4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},L4={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},F4={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},B4={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},z4={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},U4={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},W4={ordinalNumber:N4({matchPattern:k4,parsePattern:C4,valueCallback:function(t){return parseInt(t,10)}}),era:Dl({matchPatterns:$4,defaultMatchWidth:"wide",parsePatterns:M4,defaultParseWidth:"any"}),quarter:Dl({matchPatterns:I4,defaultMatchWidth:"wide",parsePatterns:D4,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Dl({matchPatterns:R4,defaultMatchWidth:"wide",parsePatterns:L4,defaultParseWidth:"any"}),day:Dl({matchPatterns:F4,defaultMatchWidth:"wide",parsePatterns:B4,defaultParseWidth:"any"}),dayPeriod:Dl({matchPatterns:z4,defaultMatchWidth:"any",parsePatterns:U4,defaultParseWidth:"any"})},PN={code:"en-US",formatDistance:h4,formatLong:y4,formatRelative:x4,localize:A4,match:W4,options:{weekStartsOn:0,firstWeekContainsDate:1}},H4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,K4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,q4=/^'([^]*?)'?$/,V4=/''/g,G4=/[a-zA-Z]/;function qi(e,t,r){var n,i,a,o,s,l,u,c,f,h,p,v,m,g;Ae(2,arguments);var y=String(t),x=Lc(),b=(n=(i=void 0)!==null&&i!==void 0?i:x.locale)!==null&&n!==void 0?n:PN,S=ln((a=(o=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:x.firstWeekContainsDate)!==null&&o!==void 0?o:(u=x.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var w=ln((f=(h=(p=(v=void 0)!==null&&v!==void 0?v:void 0)!==null&&p!==void 0?p:x.weekStartsOn)!==null&&h!==void 0?h:(m=x.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&f!==void 0?f:0);if(!(w>=0&&w<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var O=Ne(e);if(!F5(O))throw new RangeError("Invalid time value");var j=Qy(O),E=X5(O,j),A={firstWeekContainsDate:S,weekStartsOn:w,locale:b,_originalDate:O},T=y.match(K4).map(function(_){var N=_[0];if(N==="p"||N==="P"){var M=s4[N];return M(_,b.formatLong)}return _}).join("").match(H4).map(function(_){if(_==="''")return"'";var N=_[0];if(N==="'")return Y4(_);var M=a4[N];if(M)return f4(_)&&lS(_,t,String(e)),c4(_)&&lS(_,t,String(e)),M(E,_,b.localize,A);if(N.match(G4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return _}).join("");return T}function Y4(e){var t=e.match(q4);return t?t[1].replace(V4,"'"):e}function EN(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function X4(e){return EN({},e)}var uS=1440,Q4=2520,Gm=43200,J4=86400;function Z4(e,t,r){var n,i;Ae(2,arguments);var a=Lc(),o=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:a.locale)!==null&&n!==void 0?n:PN;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Jf(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=EN(X4(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=Ne(t),c=Ne(e)):(u=Ne(e),c=Ne(t));var f=Y5(c,u),h=(Qy(c)-Qy(u))/1e3,p=Math.round((f-h)/60),v;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p{const n=new Date,i=Zy(n,3);return(await Xt(Qt.getTeamWithExperiments,{id:e,startTime:i.toISOString(),endTime:n.toISOString()})).team.listExpsByTimeframe},enabled:r&&!!e,staleTime:5*60*1e3})}function tB(e,t=30){return Ar({queryKey:["dailyTokenUsage",e,t],queryFn:async()=>(await Xt(Qt.getDailyTokenUsage,{teamId:e,days:t})).dailyTokenUsage,enabled:!!e,staleTime:5*60*1e3})}const de=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));de.displayName="Card";const Ft=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("flex flex-col space-y-1.5 p-6",e),...t}));Ft.displayName="CardHeader";const Bt=P.forwardRef(({className:e,...t},r)=>d.jsx("h3",{ref:r,className:Oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));Bt.displayName="CardTitle";const dr=P.forwardRef(({className:e,...t},r)=>d.jsx("p",{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));dr.displayName="CardDescription";const he=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("p-6 pt-0",e),...t}));he.displayName="CardContent";const rB=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("flex items-center p-6 pt-0",e),...t}));rB.displayName="CardFooter";var nB=Array.isArray,hr=nB,iB=typeof Yc=="object"&&Yc&&Yc.Object===Object&&Yc,AN=iB,aB=AN,oB=typeof self=="object"&&self&&self.Object===Object&&self,sB=aB||oB||Function("return this")(),kn=sB,lB=kn,uB=lB.Symbol,Fc=uB,cS=Fc,_N=Object.prototype,cB=_N.hasOwnProperty,fB=_N.toString,Rl=cS?cS.toStringTag:void 0;function dB(e){var t=cB.call(e,Rl),r=e[Rl];try{e[Rl]=void 0;var n=!0}catch{}var i=fB.call(e);return n&&(t?e[Rl]=r:delete e[Rl]),i}var hB=dB,pB=Object.prototype,mB=pB.toString;function vB(e){return mB.call(e)}var yB=vB,fS=Fc,gB=hB,xB=yB,bB="[object Null]",wB="[object Undefined]",dS=fS?fS.toStringTag:void 0;function SB(e){return e==null?e===void 0?wB:bB:dS&&dS in Object(e)?gB(e):xB(e)}var oi=SB;function OB(e){return e!=null&&typeof e=="object"}var si=OB,jB=oi,PB=si,EB="[object Symbol]";function AB(e){return typeof e=="symbol"||PB(e)&&jB(e)==EB}var fl=AB,_B=hr,TB=fl,NB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kB=/^\w*$/;function CB(e,t){if(_B(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||TB(e)?!0:kB.test(e)||!NB.test(e)||t!=null&&e in Object(t)}var Hx=CB;function $B(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var na=$B;const dl=Ee(na);var MB=oi,IB=na,DB="[object AsyncFunction]",RB="[object Function]",LB="[object GeneratorFunction]",FB="[object Proxy]";function BB(e){if(!IB(e))return!1;var t=MB(e);return t==RB||t==LB||t==DB||t==FB}var Kx=BB;const oe=Ee(Kx);var zB=kn,UB=zB["__core-js_shared__"],WB=UB,Ym=WB,hS=function(){var e=/[^.]+$/.exec(Ym&&Ym.keys&&Ym.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function HB(e){return!!hS&&hS in e}var KB=HB,qB=Function.prototype,VB=qB.toString;function GB(e){if(e!=null){try{return VB.call(e)}catch{}try{return e+""}catch{}}return""}var TN=GB,YB=Kx,XB=KB,QB=na,JB=TN,ZB=/[\\^$.*+?()[\]{}|]/g,ez=/^\[object .+?Constructor\]$/,tz=Function.prototype,rz=Object.prototype,nz=tz.toString,iz=rz.hasOwnProperty,az=RegExp("^"+nz.call(iz).replace(ZB,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oz(e){if(!QB(e)||XB(e))return!1;var t=YB(e)?az:ez;return t.test(JB(e))}var sz=oz;function lz(e,t){return e==null?void 0:e[t]}var uz=lz,cz=sz,fz=uz;function dz(e,t){var r=fz(e,t);return cz(r)?r:void 0}var ho=dz,hz=ho,pz=hz(Object,"create"),hp=pz,pS=hp;function mz(){this.__data__=pS?pS(null):{},this.size=0}var vz=mz;function yz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gz=yz,xz=hp,bz="__lodash_hash_undefined__",wz=Object.prototype,Sz=wz.hasOwnProperty;function Oz(e){var t=this.__data__;if(xz){var r=t[e];return r===bz?void 0:r}return Sz.call(t,e)?t[e]:void 0}var jz=Oz,Pz=hp,Ez=Object.prototype,Az=Ez.hasOwnProperty;function _z(e){var t=this.__data__;return Pz?t[e]!==void 0:Az.call(t,e)}var Tz=_z,Nz=hp,kz="__lodash_hash_undefined__";function Cz(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Nz&&t===void 0?kz:t,this}var $z=Cz,Mz=vz,Iz=gz,Dz=jz,Rz=Tz,Lz=$z;function hl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}var tU=eU,rU=pp;function nU(e,t){var r=this.__data__,n=rU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var iU=nU,aU=zz,oU=Yz,sU=Jz,lU=tU,uU=iU;function pl(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0?1:-1},Ea=function(t){return Za(t)&&t.indexOf("%")===t.length-1},q=function(t){return T8(t)&&!Bc(t)},$8=function(t){return ae(t)},yt=function(t){return q(t)||Za(t)},M8=0,po=function(t){var r=++M8;return"".concat(t||"").concat(r)},qt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&!Za(t))return n;var a;if(Ea(t)){var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Bc(a)&&(a=n),i&&a>r&&(a=r),a},Si=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},I8=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function W8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tg(e){"@babel/helpers - typeof";return tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tg(e)}var wS={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Vn=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},SS=null,Qm=null,tb=function e(t){if(t===SS&&Array.isArray(Qm))return Qm;var r=[];return P.Children.forEach(t,function(n){ae(n)||(j8.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Qm=r,SS=t,r};function Yt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return Vn(i)}):n=[Vn(t)],tb(e).forEach(function(i){var a=wr(i,"type.displayName")||wr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function yr(e,t){var r=Yt(e,t);return r&&r[0]}var OS=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!q(n)||n<=0||!q(i)||i<=0)},H8=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],K8=function(t){return t&&t.type&&Za(t.type)&&H8.indexOf(t.type)>=0},q8=function(t){return t&&tg(t)==="object"&&"clipDot"in t},V8=function(t,r,n,i){var a,o=(a=Xm==null?void 0:Xm[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!oe(t)&&(i&&o.includes(r)||F8.includes(r))||n&&eb.includes(r)},te=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(P.isValidElement(t)&&(i=t.props),!dl(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;V8((s=i)===null||s===void 0?void 0:s[o],o,r,n)&&(a[o]=i[o])}),a},rg=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return jS(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function J8(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ig(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,u=Q8(e,X8),c=i||{width:r,height:n,x:0,y:0},f=ue("recharts-surface",a);return k.createElement("svg",ng({},te(u,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),k.createElement("title",null,s),k.createElement("desc",null,l),t)}var Z8=["children","className"];function ag(){return ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function t6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var pe=k.forwardRef(function(e,t){var r=e.children,n=e.className,i=e6(e,Z8),a=ue("recharts-layer",n);return k.createElement("g",ag({className:a},te(i,!0),{ref:t}),r)}),on=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;ai?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=n?e:i6(e,t,r)}var o6=a6,s6="\\ud800-\\udfff",l6="\\u0300-\\u036f",u6="\\ufe20-\\ufe2f",c6="\\u20d0-\\u20ff",f6=l6+u6+c6,d6="\\ufe0e\\ufe0f",h6="\\u200d",p6=RegExp("["+h6+s6+f6+d6+"]");function m6(e){return p6.test(e)}var FN=m6;function v6(e){return e.split("")}var y6=v6,BN="\\ud800-\\udfff",g6="\\u0300-\\u036f",x6="\\ufe20-\\ufe2f",b6="\\u20d0-\\u20ff",w6=g6+x6+b6,S6="\\ufe0e\\ufe0f",O6="["+BN+"]",og="["+w6+"]",sg="\\ud83c[\\udffb-\\udfff]",j6="(?:"+og+"|"+sg+")",zN="[^"+BN+"]",UN="(?:\\ud83c[\\udde6-\\uddff]){2}",WN="[\\ud800-\\udbff][\\udc00-\\udfff]",P6="\\u200d",HN=j6+"?",KN="["+S6+"]?",E6="(?:"+P6+"(?:"+[zN,UN,WN].join("|")+")"+KN+HN+")*",A6=KN+HN+E6,_6="(?:"+[zN+og+"?",og,UN,WN,O6].join("|")+")",T6=RegExp(sg+"(?="+sg+")|"+_6+A6,"g");function N6(e){return e.match(T6)||[]}var k6=N6,C6=y6,$6=FN,M6=k6;function I6(e){return $6(e)?M6(e):C6(e)}var D6=I6,R6=o6,L6=FN,F6=D6,B6=$N;function z6(e){return function(t){t=B6(t);var r=L6(t)?F6(t):void 0,n=r?r[0]:t.charAt(0),i=r?R6(r,1).join(""):t.slice(1);return n[e]()+i}}var U6=z6,W6=U6,H6=W6("toUpperCase"),K6=H6;const _p=Ee(K6);function De(e){return function(){return e}}const qN=Math.cos,Dd=Math.sin,fn=Math.sqrt,Rd=Math.PI,Tp=2*Rd,lg=Math.PI,ug=2*lg,ya=1e-6,q6=ug-ya;function VN(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return VN;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iya)if(!(Math.abs(f*l-u*c)>ya)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=i-s,m=l*l+u*u,g=p*p+v*v,y=Math.sqrt(m),x=Math.sqrt(h),b=a*Math.tan((lg-Math.acos((m+h-g)/(2*y*x)))/2),S=b/x,w=b/y;Math.abs(S-1)>ya&&this._append`L${t+S*c},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*p>c*v)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),u=t+s,c=r+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>ya||Math.abs(this._y1-c)>ya)&&this._append`L${u},${c}`,n&&(h<0&&(h=h%ug+ug),h>q6?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=c}`:h>ya&&this._append`A${n},${n},0,${+(h>=lg)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function rb(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new G6(t)}function nb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function GN(e){this._context=e}GN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Np(e){return new GN(e)}function YN(e){return e[0]}function XN(e){return e[1]}function QN(e,t){var r=De(!0),n=null,i=Np,a=null,o=rb(s);e=typeof e=="function"?e:e===void 0?YN:De(e),t=typeof t=="function"?t:t===void 0?XN:De(t);function s(l){var u,c=(l=nb(l)).length,f,h=!1,p;for(n==null&&(a=i(p=o())),u=0;u<=c;++u)!(u=p;--v)s.point(b[v],S[v]);s.lineEnd(),s.areaEnd()}y&&(b[h]=+e(g,h,f),S[h]=+t(g,h,f),s.point(n?+n(g,h,f):b[h],r?+r(g,h,f):S[h]))}if(x)return s=null,x+""||null}function c(){return QN().defined(i).curve(o).context(a)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:De(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:De(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:De(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:De(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:De(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:De(+f),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(n).y(t)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:De(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),u):o},u.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),u):a},u}class JN{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Y6(e){return new JN(e,!0)}function X6(e){return new JN(e,!1)}const ib={draw(e,t){const r=fn(t/Rd);e.moveTo(r,0),e.arc(0,0,r,0,Tp)}},Q6={draw(e,t){const r=fn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},ZN=fn(1/3),J6=ZN*2,Z6={draw(e,t){const r=fn(t/J6),n=r*ZN;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},eW={draw(e,t){const r=fn(t),n=-r/2;e.rect(n,n,r,r)}},tW=.8908130915292852,ek=Dd(Rd/10)/Dd(7*Rd/10),rW=Dd(Tp/10)*ek,nW=-qN(Tp/10)*ek,iW={draw(e,t){const r=fn(t*tW),n=rW*r,i=nW*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Tp*a/5,s=qN(o),l=Dd(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Jm=fn(3),aW={draw(e,t){const r=-fn(t/(Jm*3));e.moveTo(0,r*2),e.lineTo(-Jm*r,-r),e.lineTo(Jm*r,-r),e.closePath()}},_r=-.5,Tr=fn(3)/2,cg=1/fn(12),oW=(cg/2+1)*3,sW={draw(e,t){const r=fn(t/oW),n=r/2,i=r*cg,a=n,o=r*cg+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(_r*n-Tr*i,Tr*n+_r*i),e.lineTo(_r*a-Tr*o,Tr*a+_r*o),e.lineTo(_r*s-Tr*l,Tr*s+_r*l),e.lineTo(_r*n+Tr*i,_r*i-Tr*n),e.lineTo(_r*a+Tr*o,_r*o-Tr*a),e.lineTo(_r*s+Tr*l,_r*l-Tr*s),e.closePath()}};function lW(e,t){let r=null,n=rb(i);e=typeof e=="function"?e:De(e||ib),t=typeof t=="function"?t:De(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:De(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:De(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Ld(){}function Fd(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function tk(e){this._context=e}tk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Fd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uW(e){return new tk(e)}function rk(e){this._context=e}rk.prototype={areaStart:Ld,areaEnd:Ld,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cW(e){return new rk(e)}function nk(e){this._context=e}nk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fW(e){return new nk(e)}function ik(e){this._context=e}ik.prototype={areaStart:Ld,areaEnd:Ld,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function dW(e){return new ik(e)}function ES(e){return e<0?-1:1}function AS(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(ES(a)+ES(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function _S(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Zm(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Bd(e){this._context=e}Bd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Zm(this,this._t0,_S(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Zm(this,_S(this,r=AS(this,e,t)),r);break;default:Zm(this,this._t0,r=AS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ak(e){this._context=new ok(e)}(ak.prototype=Object.create(Bd.prototype)).point=function(e,t){Bd.prototype.point.call(this,t,e)};function ok(e){this._context=e}ok.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function hW(e){return new Bd(e)}function pW(e){return new ak(e)}function sk(e){this._context=e}sk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=TS(e),i=TS(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function vW(e){return new kp(e,.5)}function yW(e){return new kp(e,0)}function gW(e){return new kp(e,1)}function Ts(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r=0;)r[t]=t;return r}function xW(e,t){return e[t]}function bW(e){const t=[];return t.key=e,t}function wW(){var e=De([]),t=fg,r=Ts,n=xW;function i(a){var o=Array.from(e.apply(this,arguments),bW),s,l=o.length,u=-1,c;for(const f of a)for(s=0,++u;s0){for(var r,n,i=0,a=e[0].length,o;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function NW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var lk={symbolCircle:ib,symbolCross:Q6,symbolDiamond:Z6,symbolSquare:eW,symbolStar:iW,symbolTriangle:aW,symbolWye:sW},kW=Math.PI/180,CW=function(t){var r="symbol".concat(_p(t));return lk[r]||ib},$W=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*kW;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},MW=function(t,r){lk["symbol".concat(_p(t))]=r},Cp=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=TW(t,PW),u=kS(kS({},l),{},{type:n,size:a,sizeType:s}),c=function(){var g=CW(n),y=lW().type(g).size($W(a,s,n));return y()},f=u.className,h=u.cx,p=u.cy,v=te(u,!0);return h===+h&&p===+p&&a===+a?k.createElement("path",dg({},v,{className:ue("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Cp.registerSymbol=MW;function Ns(e){"@babel/helpers - typeof";return Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(e)}function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?u:p.color;return k.createElement("li",hg({className:g,style:f,key:"legend-item-".concat(v)},Ji(n.props,p,v)),k.createElement(ig,{width:o,height:o,viewBox:c,style:h},n.renderIcon(p)),k.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(y,p,v):y))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,o=n.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return k.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(P.PureComponent);Fu(ab,"displayName","Legend");Fu(ab,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var HW=mp;function KW(){this.__data__=new HW,this.size=0}var qW=KW;function VW(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var GW=VW;function YW(e){return this.__data__.get(e)}var XW=YW;function QW(e){return this.__data__.has(e)}var JW=QW,ZW=mp,e9=Vx,t9=Gx,r9=200;function n9(e,t){var r=this.__data__;if(r instanceof ZW){var n=r.__data__;if(!e9||n.lengths))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,h=!0,p=r&P9?new w9:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=TH}var ub=NH,kH=oi,CH=ub,$H=si,MH="[object Arguments]",IH="[object Array]",DH="[object Boolean]",RH="[object Date]",LH="[object Error]",FH="[object Function]",BH="[object Map]",zH="[object Number]",UH="[object Object]",WH="[object RegExp]",HH="[object Set]",KH="[object String]",qH="[object WeakMap]",VH="[object ArrayBuffer]",GH="[object DataView]",YH="[object Float32Array]",XH="[object Float64Array]",QH="[object Int8Array]",JH="[object Int16Array]",ZH="[object Int32Array]",eK="[object Uint8Array]",tK="[object Uint8ClampedArray]",rK="[object Uint16Array]",nK="[object Uint32Array]",Ue={};Ue[YH]=Ue[XH]=Ue[QH]=Ue[JH]=Ue[ZH]=Ue[eK]=Ue[tK]=Ue[rK]=Ue[nK]=!0;Ue[MH]=Ue[IH]=Ue[VH]=Ue[DH]=Ue[GH]=Ue[RH]=Ue[LH]=Ue[FH]=Ue[BH]=Ue[zH]=Ue[UH]=Ue[WH]=Ue[HH]=Ue[KH]=Ue[qH]=!1;function iK(e){return $H(e)&&CH(e.length)&&!!Ue[kH(e)]}var aK=iK;function oK(e){return function(t){return e(t)}}var xk=oK,Hd={exports:{}};Hd.exports;(function(e,t){var r=AN,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Hd,Hd.exports);var sK=Hd.exports,lK=aK,uK=xk,LS=sK,FS=LS&&LS.isTypedArray,cK=FS?uK(FS):lK,bk=cK,fK=pH,dK=sb,hK=hr,pK=gk,mK=lb,vK=bk,yK=Object.prototype,gK=yK.hasOwnProperty;function xK(e,t){var r=hK(e),n=!r&&dK(e),i=!r&&!n&&pK(e),a=!r&&!n&&!i&&vK(e),o=r||n||i||a,s=o?fK(e.length,String):[],l=s.length;for(var u in e)(t||gK.call(e,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||mK(u,l)))&&s.push(u);return s}var bK=xK,wK=Object.prototype;function SK(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wK;return e===r}var OK=SK;function jK(e,t){return function(r){return e(t(r))}}var wk=jK,PK=wk,EK=PK(Object.keys,Object),AK=EK,_K=OK,TK=AK,NK=Object.prototype,kK=NK.hasOwnProperty;function CK(e){if(!_K(e))return TK(e);var t=[];for(var r in Object(e))kK.call(e,r)&&r!="constructor"&&t.push(r);return t}var $K=CK,MK=Kx,IK=ub;function DK(e){return e!=null&&IK(e.length)&&!MK(e)}var zc=DK,RK=bK,LK=$K,FK=zc;function BK(e){return FK(e)?RK(e):LK(e)}var $p=BK,zK=rH,UK=dH,WK=$p;function HK(e){return zK(e,WK,UK)}var KK=HK,BS=KK,qK=1,VK=Object.prototype,GK=VK.hasOwnProperty;function YK(e,t,r,n,i,a){var o=r&qK,s=BS(e),l=s.length,u=BS(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:GK.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=o;++f-1}var Vq=qq;function Gq(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=uV){var u=t?null:sV(e);if(u)return lV(u);o=!1,i=oV,l=new nV}else l=t?[]:s;e:for(;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EV(e){return e.value}function AV(e,t){if(k.isValidElement(e))return k.cloneElement(e,t);if(typeof e=="function")return k.createElement(e,t);t.ref;var r=jV(t,vV);return k.createElement(ab,r)}var rO=1,Br=function(e){function t(){var r;yV(this,t);for(var n=arguments.length,i=new Array(n),a=0;arO||Math.abs(i.height-this.lastBoundingBox.height)>rO)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Mn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,c=i.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((c||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Mn(Mn({},f),h)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,c=i.payload,f=Mn(Mn({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return k.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},AV(a,Mn(Mn({},this.props),{},{payload:_k(c,u,EV)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Mn(Mn({},this.defaultProps),n.props),o=a.layout;return o==="vertical"&&q(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||i}:null}}])}(P.PureComponent);Mp(Br,"displayName","Legend");Mp(Br,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var nO=Fc,_V=sb,TV=hr,iO=nO?nO.isConcatSpreadable:void 0;function NV(e){return TV(e)||_V(e)||!!(iO&&e&&e[iO])}var kV=NV,CV=vk,$V=kV;function kk(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=$V),i||(i=[]);++a0&&r(s)?t>1?kk(s,t-1,r,n,i):CV(i,s):n||(i[i.length]=s)}return i}var Ck=kk;function MV(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var l=o[e?s:++i];if(r(a[l],l,a)===!1)break}return t}}var IV=MV,DV=IV,RV=DV(),LV=RV,FV=LV,BV=$p;function zV(e,t){return e&&FV(e,t,BV)}var $k=zV,UV=zc;function WV(e,t){return function(r,n){if(r==null)return r;if(!UV(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++at||a&&o&&l&&!s&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var nG=rG,nv=Xx,iG=Qx,aG=Cn,oG=Mk,sG=JV,lG=xk,uG=nG,cG=gl,fG=hr;function dG(e,t,r){t.length?t=nv(t,function(a){return fG(a)?function(o){return iG(o,a.length===1?a[0]:a)}:a}):t=[cG];var n=-1;t=nv(t,lG(aG));var i=oG(e,function(a,o,s){var l=nv(t,function(u){return u(a)});return{criteria:l,index:++n,value:a}});return sG(i,function(a,o){return uG(a,o,r)})}var hG=dG;function pG(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var mG=pG,vG=mG,oO=Math.max;function yG(e,t,r){return t=oO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=oO(n.length-t,0),o=Array(a);++i0){if(++t>=AG)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var kG=NG,CG=EG,$G=kG,MG=$G(CG),IG=MG,DG=gl,RG=gG,LG=IG;function FG(e,t){return LG(RG(e,t,DG),e+"")}var BG=FG,zG=qx,UG=zc,WG=lb,HG=na;function KG(e,t,r){if(!HG(r))return!1;var n=typeof t;return(n=="number"?UG(r)&&WG(t,r.length):n=="string"&&t in r)?zG(r[t],e):!1}var Ip=KG,qG=Ck,VG=hG,GG=BG,lO=Ip,YG=GG(function(e,t){if(e==null)return[];var r=t.length;return r>1&&lO(e,t[0],t[1])?t=[]:r>2&&lO(t[0],t[1],t[2])&&(t=[t[0]]),VG(e,qG(t,1),[])}),XG=YG;const db=Ee(XG);function Bu(e){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}function wg(){return wg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Ll,"-left"),q(r)&&t&&q(t.x)&&r=t.y),"".concat(Ll,"-top"),q(n)&&t&&q(t.y)&&nm?Math.max(c,l[n]):Math.max(f,l[n])}function fY(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function dY(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,c,f;return o.height>0&&o.width>0&&r?(c=fO({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=fO({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),u=fY({translateX:c,translateY:f,useTranslate3d:s})):u=uY,{cssProperties:u,cssClasses:cY({translateX:c,translateY:f,coordinate:r})}}function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function dO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hO(e){for(var t=1;tpO||Math.abs(n.height-this.state.lastBoundingBox.height)>pO)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,v=i.position,m=i.reverseDirection,g=i.useTranslate3d,y=i.viewBox,x=i.wrapperStyle,b=dY({allowEscapeViewBox:o,coordinate:c,offsetTopLeft:p,position:v,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:g,viewBox:y}),S=b.cssClasses,w=b.cssProperties,O=hO(hO({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return k.createElement("div",{tabIndex:-1,className:S,style:O,ref:function(E){n.wrapperNode=E}},u)}}])}(P.PureComponent),SY=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ia={isSsr:SY()};function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function mO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vO(e){for(var t=1;t0;return k.createElement(wY,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:c,hasPayload:O,offset:p,position:g,reverseDirection:y,useTranslate3d:x,viewBox:b,wrapperStyle:S},CY(u,vO(vO({},this.props),{},{payload:w})))}}])}(P.PureComponent);hb(_t,"displayName","Tooltip");hb(_t,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ia.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var $Y=kn,MY=function(){return $Y.Date.now()},IY=MY,DY=/\s/;function RY(e){for(var t=e.length;t--&&DY.test(e.charAt(t)););return t}var LY=RY,FY=LY,BY=/^\s+/;function zY(e){return e&&e.slice(0,FY(e)+1).replace(BY,"")}var UY=zY,WY=UY,yO=na,HY=fl,gO=NaN,KY=/^[-+]0x[0-9a-f]+$/i,qY=/^0b[01]+$/i,VY=/^0o[0-7]+$/i,GY=parseInt;function YY(e){if(typeof e=="number")return e;if(HY(e))return gO;if(yO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=yO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=WY(e);var r=qY.test(e);return r||VY.test(e)?GY(e.slice(2),r?2:8):KY.test(e)?gO:+e}var Bk=YY,XY=na,av=IY,xO=Bk,QY="Expected a function",JY=Math.max,ZY=Math.min;function eX(e,t,r){var n,i,a,o,s,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(QY);t=xO(t)||0,XY(r)&&(c=!!r.leading,f="maxWait"in r,a=f?JY(xO(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h);function p(O){var j=n,E=i;return n=i=void 0,u=O,o=e.apply(E,j),o}function v(O){return u=O,s=setTimeout(y,t),c?p(O):o}function m(O){var j=O-l,E=O-u,A=t-j;return f?ZY(A,a-E):A}function g(O){var j=O-l,E=O-u;return l===void 0||j>=t||j<0||f&&E>=a}function y(){var O=av();if(g(O))return x(O);s=setTimeout(y,m(O))}function x(O){return s=void 0,h&&n?p(O):(n=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function S(){return s===void 0?o:x(av())}function w(){var O=av(),j=g(O);if(n=arguments,i=this,l=O,j){if(s===void 0)return v(l);if(f)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),o}return w.cancel=b,w.flush=S,w}var tX=eX,rX=tX,nX=na,iX="Expected a function";function aX(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(iX);return nX(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),rX(e,t,{leading:n,maxWait:t,trailing:i})}var oX=aX;const zk=Ee(oX);function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function bO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wf(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(M=zk(M,m,{trailing:!0,leading:!1}));var R=new ResizeObserver(M),I=w.current.getBoundingClientRect(),D=I.width,z=I.height;return _(D,z),R.observe(w.current),function(){R.disconnect()}},[_,m]);var N=P.useMemo(function(){var M=A.containerWidth,R=A.containerHeight;if(M<0||R<0)return null;on(Ea(o)||Ea(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,l),on(!r||r>0,"The aspect(%s) must be greater than zero.",r);var I=Ea(o)?M:o,D=Ea(l)?R:l;r&&r>0&&(I?D=I/r:D&&(I=D*r),h&&D>h&&(D=h)),on(I>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,I,D,o,l,c,f,r);var z=!Array.isArray(p)&&Vn(p.type).endsWith("Chart");return k.Children.map(p,function(C){return k.isValidElement(C)?P.cloneElement(C,wf({width:I,height:D},z?{style:wf({height:"100%",width:"100%",maxHeight:D,maxWidth:I},C.props.style)}:{})):C})},[r,p,l,h,f,c,A,o]);return k.createElement("div",{id:g?"".concat(g):void 0,className:ue("recharts-responsive-container",y),style:wf(wf({},S),{},{width:o,height:l,minWidth:c,minHeight:f,maxHeight:h}),ref:w},N)}),mo=function(t){return null};mo.displayName="Cell";function Wu(e){"@babel/helpers - typeof";return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function SO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pg(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ia.isSsr)return{width:0,height:0};var n=bX(r),i=JSON.stringify({text:t,copyStyle:n});if(To.widthCache[i])return To.widthCache[i];try{var a=document.getElementById(OO);a||(a=document.createElement("span"),a.setAttribute("id",OO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=Pg(Pg({},xX),n);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return To.widthCache[i]=l,++To.cacheCount>gX&&(To.cacheCount=0,To.widthCache={}),l}catch{return{width:0,height:0}}},wX=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Hu(e){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function Gd(e,t){return PX(e)||jX(e,t)||OX(e,t)||SX()}function SX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OX(e,t){if(e){if(typeof e=="string")return jO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jO(e,t)}}function jO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function FX(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function NO(e,t){return WX(e)||UX(e,t)||zX(e,t)||BX()}function BX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zX(e,t){if(e){if(typeof e=="string")return kO(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kO(e,t)}}function kO(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(D,z){var C=z.word,F=z.width,W=D[D.length-1];if(W&&(i==null||a||W.width+F+nz.width?D:z})};if(!c)return p;for(var m="…",g=function(I){var D=f.slice(0,I),z=Kk({breakAll:u,style:l,children:D+m}).wordsWithComputedWidth,C=h(z),F=C.length>o||v(C).width>Number(i);return[F,C]},y=0,x=f.length-1,b=0,S;y<=x&&b<=f.length-1;){var w=Math.floor((y+x)/2),O=w-1,j=g(O),E=NO(j,2),A=E[0],T=E[1],_=g(w),N=NO(_,1),M=N[0];if(!A&&!M&&(y=w+1),A&&M&&(x=w-1),!A&&M){S=T;break}b++}return S||p},CO=function(t){var r=ae(t)?[]:t.toString().split(Hk);return[{words:r}]},KX=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!ia.isSsr){var l,u,c=Kk({breakAll:o,children:i,style:a});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;l=f,u=h}else return CO(i);return HX({breakAll:o,children:i,maxLines:s,style:a},l,u,r,n)}return CO(i)},$O="#808080",eo=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,u=l===void 0?"0.71em":l,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,v=t.verticalAnchor,m=v===void 0?"end":v,g=t.fill,y=g===void 0?$O:g,x=TO(t,RX),b=P.useMemo(function(){return KX({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),S=x.dx,w=x.dy,O=x.angle,j=x.className,E=x.breakAll,A=TO(x,LX);if(!yt(n)||!yt(a))return null;var T=n+(q(S)?S:0),_=a+(q(w)?w:0),N;switch(m){case"start":N=ov("calc(".concat(u,")"));break;case"middle":N=ov("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=ov("calc(".concat(b.length-1," * -").concat(s,")"));break}var M=[];if(f){var R=b[0].width,I=x.width;M.push("scale(".concat((q(I)?I/R:1)/R,")"))}return O&&M.push("rotate(".concat(O,", ").concat(T,", ").concat(_,")")),M.length&&(A.transform=M.join(" ")),k.createElement("text",Eg({},te(A,!0),{x:T,y:_,className:ue("recharts-text",j),textAnchor:p,fill:y.includes("url")?$O:y}),b.map(function(D,z){var C=D.words.join(E?"":" ");return k.createElement("tspan",{x:T,dy:z===0?N:s,key:"".concat(C,"-").concat(z)},C)}))};function Vi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function qX(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function pb(e){let t,r,n;e.length!==2?(t=Vi,r=(s,l)=>Vi(e(s),l),n=(s,l)=>e(s)-l):(t=e===Vi||e===qX?e:VX,r=e,n=e);function i(s,l,u=0,c=s.length){if(u>>1;r(s[f],l)<0?u=f+1:c=f}while(u>>1;r(s[f],l)<=0?u=f+1:c=f}while(uu&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function VX(){return 0}function qk(e){return e===null?NaN:+e}function*GX(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const YX=pb(Vi),Uc=YX.right;pb(qk).center;class MO extends Map{constructor(t,r=JX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(IO(this,t))}has(t){return super.has(IO(this,t))}set(t,r){return super.set(XX(this,t),r)}delete(t){return super.delete(QX(this,t))}}function IO({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function XX({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function QX({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function JX(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ZX(e=Vi){if(e===Vi)return Vk;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function Vk(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const eQ=Math.sqrt(50),tQ=Math.sqrt(10),rQ=Math.sqrt(2);function Yd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=eQ?10:a>=tQ?5:a>=rQ?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/o,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*o,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const n=t=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let u=0;u=n)&&(r=n);return r}function RO(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Gk(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?Vk:ZX(i);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/l+h)),v=Math.min(n,Math.floor(t+(l-u)*f/l+h));Gk(e,t,p,v,i)}const a=e[t];let o=r,s=n;for(Fl(e,r,t),i(e[n],a)>0&&Fl(e,r,n);o0;)--s}i(e[r],a)===0?Fl(e,r,s):(++s,Fl(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Fl(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function nQ(e,t,r){if(e=Float64Array.from(GX(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RO(e);if(t>=1)return DO(e);var n,i=(n-1)*t,a=Math.floor(i),o=DO(Gk(e,a).subarray(0,a+1)),s=RO(e.subarray(a+1));return o+(s-o)*(i-a)}}function iQ(e,t,r=qk){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function aQ(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Of(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Of(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sQ.exec(e))?new or(t[1],t[2],t[3],1):(t=lQ.exec(e))?new or(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uQ.exec(e))?Of(t[1],t[2],t[3],t[4]):(t=cQ.exec(e))?Of(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fQ.exec(e))?HO(t[1],t[2]/100,t[3]/100,1):(t=dQ.exec(e))?HO(t[1],t[2]/100,t[3]/100,t[4]):LO.hasOwnProperty(e)?zO(LO[e]):e==="transparent"?new or(NaN,NaN,NaN,0):null}function zO(e){return new or(e>>16&255,e>>8&255,e&255,1)}function Of(e,t,r,n){return n<=0&&(e=t=r=NaN),new or(e,t,r,n)}function mQ(e){return e instanceof Wc||(e=Gu(e)),e?(e=e.rgb(),new or(e.r,e.g,e.b,e.opacity)):new or}function kg(e,t,r,n){return arguments.length===1?mQ(e):new or(e,t,r,n??1)}function or(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}vb(or,kg,Xk(Wc,{brighter(e){return e=e==null?Xd:Math.pow(Xd,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qu:Math.pow(qu,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new or(Ua(this.r),Ua(this.g),Ua(this.b),Qd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:UO,formatHex:UO,formatHex8:vQ,formatRgb:WO,toString:WO}));function UO(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function vQ(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function WO(){const e=Qd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ua(this.r)}, ${Ua(this.g)}, ${Ua(this.b)}${e===1?")":`, ${e})`}`}function Qd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ua(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Aa(e){return e=Ua(e),(e<16?"0":"")+e.toString(16)}function HO(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new tn(e,t,r,n)}function Qk(e){if(e instanceof tn)return new tn(e.h,e.s,e.l,e.opacity);if(e instanceof Wc||(e=Gu(e)),!e)return new tn;if(e instanceof tn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new tn(o,s,l,e.opacity)}function yQ(e,t,r,n){return arguments.length===1?Qk(e):new tn(e,t,r,n??1)}function tn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}vb(tn,yQ,Xk(Wc,{brighter(e){return e=e==null?Xd:Math.pow(Xd,e),new tn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qu:Math.pow(qu,e),new tn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new or(sv(e>=240?e-240:e+120,i,n),sv(e,i,n),sv(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new tn(KO(this.h),jf(this.s),jf(this.l),Qd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qd(this.opacity);return`${e===1?"hsl(":"hsla("}${KO(this.h)}, ${jf(this.s)*100}%, ${jf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function KO(e){return e=(e||0)%360,e<0?e+360:e}function jf(e){return Math.max(0,Math.min(1,e||0))}function sv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const yb=e=>()=>e;function gQ(e,t){return function(r){return e+r*t}}function xQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function bQ(e){return(e=+e)==1?Jk:function(t,r){return r-t?xQ(t,r,e):yb(isNaN(t)?r:t)}}function Jk(e,t){var r=t-e;return r?gQ(e,r):yb(isNaN(e)?t:e)}const qO=function e(t){var r=bQ(t);function n(i,a){var o=r((i=kg(i)).r,(a=kg(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=Jk(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);function wQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Jd(n,i)})),r=lv.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function CQ(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?$Q:CQ,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(i((u||(u=s(t,e.map(n),Jd)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Zd),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=gb,c()},f.clamp=function(h){return arguments.length?(o=h?!0:Vt,c()):o!==Vt},f.interpolate=function(h){return arguments.length?(r=h,c()):r},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return n=h,i=p,c()}}function xb(){return Dp()(Vt,Vt)}function MQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eh(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Ms(e){return e=eh(Math.abs(e)),e?e[1]:NaN}function IQ(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function DQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var RQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yu(e){if(!(t=RQ.exec(e)))throw new Error("invalid format: "+e);var t;return new bb({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Yu.prototype=bb.prototype;function bb(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}bb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function LQ(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Zk;function FQ(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(Zk=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+eh(e,Math.max(0,t+a-1))[0]}function GO(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const YO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:MQ,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>GO(e*100,t),r:GO,s:FQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function XO(e){return e}var QO=Array.prototype.map,JO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function BQ(e){var t=e.grouping===void 0||e.thousands===void 0?XO:IQ(QO.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?XO:DQ(QO.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Yu(f);var h=f.fill,p=f.align,v=f.sign,m=f.symbol,g=f.zero,y=f.width,x=f.comma,b=f.precision,S=f.trim,w=f.type;w==="n"?(x=!0,w="g"):YO[w]||(b===void 0&&(b=12),S=!0,w="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var O=m==="$"?r:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",j=m==="$"?n:/[%p]/.test(w)?o:"",E=YO[w],A=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function T(_){var N=O,M=j,R,I,D;if(w==="c")M=E(_)+M,_="";else{_=+_;var z=_<0||1/_<0;if(_=isNaN(_)?l:E(Math.abs(_),b),S&&(_=LQ(_)),z&&+_==0&&v!=="+"&&(z=!1),N=(z?v==="("?v:s:v==="-"||v==="("?"":v)+N,M=(w==="s"?JO[8+Zk/3]:"")+M+(z&&v==="("?")":""),A){for(R=-1,I=_.length;++RD||D>57){M=(D===46?i+_.slice(R+1):_.slice(R))+M,_=_.slice(0,R);break}}}x&&!g&&(_=t(_,1/0));var C=N.length+_.length+M.length,F=C>1)+N+_+M+F.slice(C);break;default:_=F+N+_+M;break}return a(_)}return T.toString=function(){return f+""},T}function c(f,h){var p=u((f=Yu(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Ms(h)/3)))*3,m=Math.pow(10,-v),g=JO[8+v/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:c}}var Pf,wb,eC;zQ({thousands:",",grouping:[3],currency:["$",""]});function zQ(e){return Pf=BQ(e),wb=Pf.format,eC=Pf.formatPrefix,Pf}function UQ(e){return Math.max(0,-Ms(Math.abs(e)))}function WQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ms(t)/3)))*3-Ms(Math.abs(e)))}function HQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ms(t)-Ms(e))+1}function tC(e,t,r,n){var i=Tg(e,t,r),a;switch(n=Yu(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=WQ(i,o))&&(n.precision=a),eC(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=HQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=UQ(i))&&(n.precision=a-(n.type==="%")*2);break}}return wb(n)}function aa(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ag(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return tC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,u,c=10;for(s0;){if(u=_g(o,s,r),u===l)return n[i]=o,n[a]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function th(){var e=xb();return e.copy=function(){return Hc(e,th())},Kr.apply(e,arguments),aa(e)}function rC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Zd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rC(e).unknown(t)},e=arguments.length?Array.from(e,Zd):[0,1],aa(r)}function nC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return aMath.pow(e,t)}function YQ(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function tj(e){return(t,r)=>-e(-t,r)}function Sb(e){const t=e(ZO,ej),r=t.domain;let n=10,i,a;function o(){return i=YQ(n),a=GQ(n),r()[0]<0?(i=tj(i),a=tj(a),e(KQ,qQ)):e(ZO,ej),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let u=l[0],c=l[l.length-1];const f=c0){for(;h<=p;++h)for(v=1;vc)break;y.push(m)}}else for(;h<=p;++h)for(v=n-1;v>=1;--v)if(m=h>0?v/a(-h):v*a(h),!(mc)break;y.push(m)}y.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Yu(l)).precision==null&&(l.trim=!0),l=wb(l)),s===1/0)return l;const u=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*nr(nC(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function iC(){const e=Sb(Dp()).domain([1,10]);return e.copy=()=>Hc(e,iC()).base(e.base()),Kr.apply(e,arguments),e}function rj(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nj(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ob(e){var t=1,r=e(rj(t),nj(t));return r.constant=function(n){return arguments.length?e(rj(t=+n),nj(t)):t},aa(r)}function aC(){var e=Ob(Dp());return e.copy=function(){return Hc(e,aC()).constant(e.constant())},Kr.apply(e,arguments)}function ij(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function XQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function QQ(e){return e<0?-e*e:e*e}function jb(e){var t=e(Vt,Vt),r=1;function n(){return r===1?e(Vt,Vt):r===.5?e(XQ,QQ):e(ij(r),ij(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},aa(t)}function Pb(){var e=jb(Dp());return e.copy=function(){return Hc(e,Pb()).exponent(e.exponent())},Kr.apply(e,arguments),e}function JQ(){return Pb.apply(null,arguments).exponent(.5)}function aj(e){return Math.sign(e)*e*e}function ZQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function oC(){var e=xb(),t=[0,1],r=!1,n;function i(a){var o=ZQ(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(aj(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Zd)).map(aj)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return oC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Kr.apply(i,arguments),aa(i)}function sC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o0?r[s-1]:e[0],s=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return lC().domain([e,t]).range(i).unknown(a)},Kr.apply(aa(o),arguments)}function uC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Uc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return uC().domain(e).range(t).unknown(r)},Kr.apply(i,arguments)}const uv=new Date,cv=new Date;function gt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(ugt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(uv.setTime(+a),cv.setTime(+o),e(uv),e(cv),Math.floor(r(uv,cv))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const rh=gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);rh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):rh);rh.range;const Wn=1e3,Lr=Wn*60,Hn=Lr*60,Zn=Hn*24,Eb=Zn*7,oj=Zn*30,fv=Zn*365,_a=gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wn)},(e,t)=>(t-e)/Wn,e=>e.getUTCSeconds());_a.range;const Ab=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wn)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getMinutes());Ab.range;const _b=gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCMinutes());_b.range;const Tb=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wn-e.getMinutes()*Lr)},(e,t)=>{e.setTime(+e+t*Hn)},(e,t)=>(t-e)/Hn,e=>e.getHours());Tb.range;const Nb=gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hn)},(e,t)=>(t-e)/Hn,e=>e.getUTCHours());Nb.range;const Kc=gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Lr)/Zn,e=>e.getDate()-1);Kc.range;const Rp=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zn,e=>e.getUTCDate()-1);Rp.range;const cC=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zn,e=>Math.floor(e/Zn));cC.range;function vo(e){return gt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Lr)/Eb)}const Lp=vo(0),nh=vo(1),eJ=vo(2),tJ=vo(3),Is=vo(4),rJ=vo(5),nJ=vo(6);Lp.range;nh.range;eJ.range;tJ.range;Is.range;rJ.range;nJ.range;function yo(e){return gt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Eb)}const Fp=yo(0),ih=yo(1),iJ=yo(2),aJ=yo(3),Ds=yo(4),oJ=yo(5),sJ=yo(6);Fp.range;ih.range;iJ.range;aJ.range;Ds.range;oJ.range;sJ.range;const kb=gt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());kb.range;const Cb=gt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Cb.range;const ei=gt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ei.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});ei.range;const ti=gt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ti.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});ti.range;function fC(e,t,r,n,i,a){const o=[[_a,1,Wn],[_a,5,5*Wn],[_a,15,15*Wn],[_a,30,30*Wn],[a,1,Lr],[a,5,5*Lr],[a,15,15*Lr],[a,30,30*Lr],[i,1,Hn],[i,3,3*Hn],[i,6,6*Hn],[i,12,12*Hn],[n,1,Zn],[n,2,2*Zn],[r,1,Eb],[t,1,oj],[t,3,3*oj],[e,1,fv]];function s(u,c,f){const h=cg).right(o,h);if(p===o.length)return e.every(Tg(u/fv,c/fv,f));if(p===0)return rh.every(Math.max(Tg(u,c,f),1));const[v,m]=o[h/o[p-1][2]53)return null;"w"in U||(U.w=1),"Z"in U?(ge=hv(Bl(U.y,0,1)),ct=ge.getUTCDay(),ge=ct>4||ct===0?ih.ceil(ge):ih(ge),ge=Rp.offset(ge,(U.V-1)*7),U.y=ge.getUTCFullYear(),U.m=ge.getUTCMonth(),U.d=ge.getUTCDate()+(U.w+6)%7):(ge=dv(Bl(U.y,0,1)),ct=ge.getDay(),ge=ct>4||ct===0?nh.ceil(ge):nh(ge),ge=Kc.offset(ge,(U.V-1)*7),U.y=ge.getFullYear(),U.m=ge.getMonth(),U.d=ge.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),ct="Z"in U?hv(Bl(U.y,0,1)).getUTCDay():dv(Bl(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(ct+5)%7:U.w+U.U*7-(ct+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,hv(U)):dv(U)}}function E(G,se,le,U){for(var Ze=0,ge=se.length,ct=le.length,ft,er;Ze=ct)return-1;if(ft=se.charCodeAt(Ze++),ft===37){if(ft=se.charAt(Ze++),er=w[ft in sj?se.charAt(Ze++):ft],!er||(U=er(G,le,U))<0)return-1}else if(ft!=le.charCodeAt(U++))return-1}return U}function A(G,se,le){var U=u.exec(se.slice(le));return U?(G.p=c.get(U[0].toLowerCase()),le+U[0].length):-1}function T(G,se,le){var U=p.exec(se.slice(le));return U?(G.w=v.get(U[0].toLowerCase()),le+U[0].length):-1}function _(G,se,le){var U=f.exec(se.slice(le));return U?(G.w=h.get(U[0].toLowerCase()),le+U[0].length):-1}function N(G,se,le){var U=y.exec(se.slice(le));return U?(G.m=x.get(U[0].toLowerCase()),le+U[0].length):-1}function M(G,se,le){var U=m.exec(se.slice(le));return U?(G.m=g.get(U[0].toLowerCase()),le+U[0].length):-1}function R(G,se,le){return E(G,t,se,le)}function I(G,se,le){return E(G,r,se,le)}function D(G,se,le){return E(G,n,se,le)}function z(G){return o[G.getDay()]}function C(G){return a[G.getDay()]}function F(G){return l[G.getMonth()]}function W(G){return s[G.getMonth()]}function V(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function Y(G){return o[G.getUTCDay()]}function re(G){return a[G.getUTCDay()]}function be(G){return l[G.getUTCMonth()]}function Ke(G){return s[G.getUTCMonth()]}function Se(G){return i[+(G.getUTCHours()>=12)]}function Pt(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var se=O(G+="",b);return se.toString=function(){return G},se},parse:function(G){var se=j(G+="",!1);return se.toString=function(){return G},se},utcFormat:function(G){var se=O(G+="",S);return se.toString=function(){return G},se},utcParse:function(G){var se=j(G+="",!0);return se.toString=function(){return G},se}}}var sj={"-":"",_:" ",0:"0"},jt=/^\s*\d+/,hJ=/^%/,pJ=/[\\^$*+?|[\]().{}]/g;function we(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function vJ(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function yJ(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function gJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function xJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function bJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function lj(e,t,r){var n=jt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function uj(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function wJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function SJ(e,t,r){var n=jt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function OJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function cj(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jJ(e,t,r){var n=jt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function fj(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function PJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function EJ(e,t,r){var n=jt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function AJ(e,t,r){var n=jt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function _J(e,t,r){var n=jt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function TJ(e,t,r){var n=hJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function NJ(e,t,r){var n=jt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function kJ(e,t,r){var n=jt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function dj(e,t){return we(e.getDate(),t,2)}function CJ(e,t){return we(e.getHours(),t,2)}function $J(e,t){return we(e.getHours()%12||12,t,2)}function MJ(e,t){return we(1+Kc.count(ei(e),e),t,3)}function dC(e,t){return we(e.getMilliseconds(),t,3)}function IJ(e,t){return dC(e,t)+"000"}function DJ(e,t){return we(e.getMonth()+1,t,2)}function RJ(e,t){return we(e.getMinutes(),t,2)}function LJ(e,t){return we(e.getSeconds(),t,2)}function FJ(e){var t=e.getDay();return t===0?7:t}function BJ(e,t){return we(Lp.count(ei(e)-1,e),t,2)}function hC(e){var t=e.getDay();return t>=4||t===0?Is(e):Is.ceil(e)}function zJ(e,t){return e=hC(e),we(Is.count(ei(e),e)+(ei(e).getDay()===4),t,2)}function UJ(e){return e.getDay()}function WJ(e,t){return we(nh.count(ei(e)-1,e),t,2)}function HJ(e,t){return we(e.getFullYear()%100,t,2)}function KJ(e,t){return e=hC(e),we(e.getFullYear()%100,t,2)}function qJ(e,t){return we(e.getFullYear()%1e4,t,4)}function VJ(e,t){var r=e.getDay();return e=r>=4||r===0?Is(e):Is.ceil(e),we(e.getFullYear()%1e4,t,4)}function GJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+we(t/60|0,"0",2)+we(t%60,"0",2)}function hj(e,t){return we(e.getUTCDate(),t,2)}function YJ(e,t){return we(e.getUTCHours(),t,2)}function XJ(e,t){return we(e.getUTCHours()%12||12,t,2)}function QJ(e,t){return we(1+Rp.count(ti(e),e),t,3)}function pC(e,t){return we(e.getUTCMilliseconds(),t,3)}function JJ(e,t){return pC(e,t)+"000"}function ZJ(e,t){return we(e.getUTCMonth()+1,t,2)}function eZ(e,t){return we(e.getUTCMinutes(),t,2)}function tZ(e,t){return we(e.getUTCSeconds(),t,2)}function rZ(e){var t=e.getUTCDay();return t===0?7:t}function nZ(e,t){return we(Fp.count(ti(e)-1,e),t,2)}function mC(e){var t=e.getUTCDay();return t>=4||t===0?Ds(e):Ds.ceil(e)}function iZ(e,t){return e=mC(e),we(Ds.count(ti(e),e)+(ti(e).getUTCDay()===4),t,2)}function aZ(e){return e.getUTCDay()}function oZ(e,t){return we(ih.count(ti(e)-1,e),t,2)}function sZ(e,t){return we(e.getUTCFullYear()%100,t,2)}function lZ(e,t){return e=mC(e),we(e.getUTCFullYear()%100,t,2)}function uZ(e,t){return we(e.getUTCFullYear()%1e4,t,4)}function cZ(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ds(e):Ds.ceil(e),we(e.getUTCFullYear()%1e4,t,4)}function fZ(){return"+0000"}function pj(){return"%"}function mj(e){return+e}function vj(e){return Math.floor(+e/1e3)}var No,vC,yC;dZ({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dZ(e){return No=dJ(e),vC=No.format,No.parse,yC=No.utcFormat,No.utcParse,No}function hZ(e){return new Date(e)}function pZ(e){return e instanceof Date?+e:+new Date(+e)}function $b(e,t,r,n,i,a,o,s,l,u){var c=xb(),f=c.invert,h=c.domain,p=u(".%L"),v=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),x=u("%b %d"),b=u("%B"),S=u("%Y");function w(O){return(l(O)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>nQ(e,a/n))},r.copy=function(){return wC(t).domain(e)},li.apply(r,arguments)}function zp(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,u=Vt,c,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-a)*(n*mt}var PC=wZ,SZ=Up,OZ=PC,jZ=gl;function PZ(e){return e&&e.length?SZ(e,jZ,OZ):void 0}var EZ=PZ;const Wp=Ee(EZ);function AZ(e,t){return ee.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*We;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};J.dividedBy=J.div=function(e){return Gn(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,r=t.constructor;return Me(Gn(t,new r(e),0,1),r.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return ut(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(gr))throw Error(Wr+"NaN");if(r.s<1)throw Error(Wr+(r.s?"NaN":"-Infinity"));return r.eq(gr)?new n(0):(Ve=!1,t=Gn(Xu(r,a),Xu(e,a),a),Ve=!0,Me(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?NC(t,e):_C(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Wr+"NaN");return r.s?(Ve=!1,t=Gn(r,e,0,1).times(e),Ve=!0,r.minus(t)):Me(new n(r),i)};J.naturalExponential=J.exp=function(){return TC(this)};J.naturalLogarithm=J.ln=function(){return Xu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_C(t,e):NC(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Wa+e);if(t=ut(i)+1,n=i.d.length-1,r=n*We+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};J.squareRoot=J.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Wr+"NaN")}for(e=ut(s),Ve=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Sn(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Sl((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Gn(s,a,o+2)).times(.5),Sn(a.d).slice(0,o)===(t=Sn(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Me(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ve=!0,Me(n,r)};J.times=J.mul=function(e){var t,r,n,i,a,o,s,l,u,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,l=h.length,u=p.length,l=0;){for(t=0,i=l+n;i>n;)s=a[i]+p[n]*h[i-n-1]+t,a[i--]=s%bt|0,t=s/bt|0;a[i]=(a[i]+t)%bt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ve?Me(e,f.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Nn(e,0,wl),t===void 0?t=n.rounding:Nn(t,0,8),Me(r,e+ut(r)+1,t))};J.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=to(n,!0):(Nn(e,0,wl),t===void 0?t=i.rounding:Nn(t,0,8),n=Me(new i(n),e+1,t),r=to(n,!0,e+1)),r};J.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?to(i):(Nn(e,0,wl),t===void 0?t=a.rounding:Nn(t,0,8),n=Me(new a(i),e+ut(i)+1,t),r=to(n.abs(),!1,e+ut(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return Me(new t(e),ut(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,u=12,c=+(e=new l(e));if(!e.s)return new l(gr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Wr+"Infinity");return s}if(s.eq(gr))return s;if(n=l.precision,e.eq(gr))return Me(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=AC){for(i=new l(gr),t=Math.ceil(n/We+4),Ve=!1;r%2&&(i=i.times(s),xj(i.d,t)),r=Sl(r/2),r!==0;)s=s.times(s),xj(s.d,t);return Ve=!0,e.s<0?new l(gr).div(i):Me(i,n)}}else if(a<0)throw Error(Wr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ve=!1,i=e.times(Xu(s,n+u)),Ve=!0,i=TC(i),i.s=a,i};J.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ut(i),n=to(i,r<=a.toExpNeg||r>=a.toExpPos)):(Nn(e,1,wl),t===void 0?t=a.rounding:Nn(t,0,8),i=Me(new a(i),e,t),r=ut(i),n=to(i,e<=r||r<=a.toExpNeg,e)),n};J.toSignificantDigits=J.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Nn(e,1,wl),t===void 0?t=n.rounding:Nn(t,0,8)),Me(new n(r),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ut(e),r=e.constructor;return to(e,t<=r.toExpNeg||t>=r.toExpPos)};function _C(e,t){var r,n,i,a,o,s,l,u,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),Ve?Me(t,f):t;if(l=e.d,u=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=u.length):(n=u,i=o,s=l.length),o=Math.ceil(f/We),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,n=u,u=l,l=n),r=0;a;)r=(l[--a]=l[a]+u[a]+r)/bt|0,l[a]%=bt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ve?Me(t,f):t}function Nn(e,t,r){if(e!==~~e||er)throw Error(Wa+e)}function Sn(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]1;)n.shift()}return function(n,i,a,o){var s,l,u,c,f,h,p,v,m,g,y,x,b,S,w,O,j,E,A=n.constructor,T=n.s==i.s?1:-1,_=n.d,N=i.d;if(!n.s)return new A(n);if(!i.s)throw Error(Wr+"Division by zero");for(l=n.e-i.e,j=N.length,w=_.length,p=new A(T),v=p.d=[],u=0;N[u]==(_[u]||0);)++u;if(N[u]>(_[u]||0)&&--l,a==null?x=a=A.precision:o?x=a+(ut(n)-ut(i))+1:x=a,x<0)return new A(0);if(x=x/We+2|0,u=0,j==1)for(c=0,N=N[0],x++;(u1&&(N=e(N,c),_=e(_,c),j=N.length,w=_.length),S=j,m=_.slice(0,j),g=m.length;g=bt/2&&++O;do c=0,s=t(N,m,j,g),s<0?(y=m[0],j!=g&&(y=y*bt+(m[1]||0)),c=y/O|0,c>1?(c>=bt&&(c=bt-1),f=e(N,c),h=f.length,g=m.length,s=t(f,m,h,g),s==1&&(c--,r(f,j16)throw Error(Db+ut(e));if(!e.s)return new c(gr);for(Ve=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(xa(2,u))/Math.LN10*2+5|0,s+=n,r=i=a=new c(gr),c.precision=s;;){if(i=Me(i.times(e),s),r=r.times(++l),o=a.plus(Gn(i,r,s)),Sn(o.d).slice(0,s)===Sn(a.d).slice(0,s)){for(;u--;)a=Me(a.times(a),s);return c.precision=f,t==null?(Ve=!0,Me(a,f)):a}a=o}}function ut(e){for(var t=e.e*We,r=e.d[0];r>=10;r/=10)t++;return t}function pv(e,t,r){if(t>e.LN10.sd())throw Ve=!0,r&&(e.precision=r),Error(Wr+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function xi(e){for(var t="";e--;)t+="0";return t}function Xu(e,t){var r,n,i,a,o,s,l,u,c,f=1,h=10,p=e,v=p.d,m=p.constructor,g=m.precision;if(p.s<1)throw Error(Wr+(p.s?"NaN":"-Infinity"));if(p.eq(gr))return new m(0);if(t==null?(Ve=!1,u=g):u=t,p.eq(10))return t==null&&(Ve=!0),pv(m,u);if(u+=h,m.precision=u,r=Sn(v),n=r.charAt(0),a=ut(p),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Sn(p.d),n=r.charAt(0),f++;a=ut(p),n>1?(p=new m("0."+r),a++):p=new m(n+"."+r.slice(1))}else return l=pv(m,u+2,g).times(a+""),p=Xu(new m(n+"."+r.slice(1)),u-h).plus(l),m.precision=g,t==null?(Ve=!0,Me(p,g)):p;for(s=o=p=Gn(p.minus(gr),p.plus(gr),u),c=Me(p.times(p),u),i=3;;){if(o=Me(o.times(c),u),l=s.plus(Gn(o,new m(i),u)),Sn(l.d).slice(0,u)===Sn(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(pv(m,u+2,g).times(a+""))),s=Gn(s,new m(f),u),m.precision=g,t==null?(Ve=!0,Me(s,g)):s;s=l,i+=2}}function gj(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Sl(r/We),e.d=[],n=(r+1)%We,r<0&&(n+=We),nah||e.e<-ah))throw Error(Db+r)}else e.s=0,e.e=0,e.d=[0];return e}function Me(e,t,r){var n,i,a,o,s,l,u,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=We,i=t,u=f[c=0];else{if(c=Math.ceil((n+1)/We),a=f.length,c>=a)return e;for(u=a=f[c],o=1;a>=10;a/=10)o++;n%=We,i=n-We+o}if(r!==void 0&&(a=xa(10,o-i-1),s=u/a%10|0,l=t<0||f[c+1]!==void 0||u%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?u/xa(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ut(e),f.length=1,t=t-a-1,f[0]=xa(10,(We-t%We)%We),e.e=Sl(-t/We)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=xa(10,We-n),f[c]=i>0?(u/xa(10,o-i)%xa(10,i)|0)*a:0),l)for(;;)if(c==0){(f[0]+=a)==bt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=bt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Ve&&(e.e>ah||e.e<-ah))throw Error(Db+ut(e));return e}function NC(e,t){var r,n,i,a,o,s,l,u,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ve?Me(t,p):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),o=u-n,o){for(c=o<0,c?(r=l,o=-o,s=f.length):(r=f,n=u,s=l.length),i=Math.max(Math.ceil(p/We),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,c=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+xi(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+xi(-i-1)+a,r&&(n=r-o)>0&&(a+=xi(n))):i>=o?(a+=xi(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+xi(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=xi(n))),e.s<0?"-"+a:a}function xj(e,t){if(e.length>t)return e.length=t,!0}function kC(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Wa+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return gj(o,a.toString())}else if(typeof a!="string")throw Error(Wa+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,GZ.test(a))gj(o,a);else throw Error(Wa+a)}if(i.prototype=J,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=kC,i.config=i.set=YZ,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Wa+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Wa+r+": "+n);return this}var Rb=kC(VZ);gr=new Rb(1);const $e=Rb;function XZ(e){return eee(e)||ZZ(e)||JZ(e)||QZ()}function QZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JZ(e,t){if(e){if(typeof e=="string")return Mg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mg(e,t)}}function ZZ(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function eee(e){if(Array.isArray(e))return Mg(e)}function Mg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-o,bj(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r}}function mee(e){if(Array.isArray(e))return e}function DC(e){var t=Qu(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function RC(e,t,r){if(e.lte(0))return new $e(0);var n=qp.getDigitCount(e.toNumber()),i=new $e(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new $e(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?l:new $e(Math.ceil(l))}function vee(e,t,r){var n=1,i=new $e(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new $e(10).pow(qp.getDigitCount(e)-1),i=new $e(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new $e(Math.floor(e)))}else e===0?i=new $e(Math.floor((t-1)/2)):r||(i=new $e(Math.floor(e)));var o=Math.floor((t-1)/2),s=iee(nee(function(l){return i.add(new $e(l-o).mul(n)).toNumber()}),Ig);return s(0,t)}function LC(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new $e(0),tickMin:new $e(0),tickMax:new $e(0)};var a=RC(new $e(t).sub(e).div(r-1),n,i),o;e<=0&&t>=0?o=new $e(0):(o=new $e(e).add(t).div(2),o=o.sub(new $e(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new $e(t).sub(o).div(a).toNumber()),u=s+l+1;return u>r?LC(e,t,r,n,i+1):(u0?l+(r-u):l,s=t>0?s:s+(r-u)),{step:a,tickMin:o.sub(new $e(s).mul(a)),tickMax:o.add(new $e(l).mul(a))})}function yee(e){var t=Qu(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=DC([r,n]),l=Qu(s,2),u=l[0],c=l[1];if(u===-1/0||c===1/0){var f=c===1/0?[u].concat(Rg(Ig(0,i-1).map(function(){return 1/0}))):[].concat(Rg(Ig(0,i-1).map(function(){return-1/0})),[c]);return r>n?Dg(f):f}if(u===c)return vee(u,i,a);var h=LC(u,c,o,a),p=h.step,v=h.tickMin,m=h.tickMax,g=qp.rangeStep(v,m.add(new $e(.1).mul(p)),p);return r>n?Dg(g):g}function gee(e,t){var r=Qu(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=DC([n,i]),s=Qu(o,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[n,i];if(l===u)return[l];var c=Math.max(t,2),f=RC(new $e(u).sub(l).div(c-1),a,0),h=[].concat(Rg(qp.rangeStep(new $e(l),new $e(u).sub(new $e(.99).mul(f)),f)),[u]);return n>i?Dg(h):h}var xee=MC(yee),bee=MC(gee),wee="Invariant failed";function ro(e,t){throw new Error(wee)}var See=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function oh(){return oh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Nee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kee(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,f=i[u].coordinate,h=u>=s-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Kt(f-c)!==Kt(h-f)){var v=[];if(Kt(h-f)===Kt(l[1]-l[0])){p=h;var m=f+l[1]-l[0];v[0]=Math.min(m,(m+c)/2),v[1]=Math.max(m,(m+c)/2)}else{p=c;var g=h+l[1]-l[0];v[0]=Math.min(f,(g+f)/2),v[1]=Math.max(f,(g+f)/2)}var y=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){o=i[u].index;break}}else{var x=Math.min(c,h),b=Math.max(c,h);if(t>(x+f)/2&&t<=(b+f)/2){o=i[u].index;break}}}else for(var S=0;S0&&S(n[S].coordinate+n[S-1].coordinate)/2&&t<=(n[S].coordinate+n[S+1].coordinate)/2||S===s-1&&t>(n[S].coordinate+n[S-1].coordinate)/2){o=n[S].index;break}return o},Lb=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?rt(rt({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},Gee=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,u=s.length;l=0});if(y&&y.length){var x=y[0].type.defaultProps,b=x!==void 0?rt(rt({},x),y[0].props):y[0].props,S=b.barSize,w=b[g];o[w]||(o[w]=[]);var O=ae(S)?r:S;o[w].push({item:y[0],stackList:y.slice(1),barSize:ae(O)?void 0:qt(O,n,0)})}}return o},Yee=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var u=qt(r,i,0,!0),c,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/l,v=o.reduce(function(S,w){return S+w.barSize||0},0);v+=(l-1)*u,v>=i&&(v-=(l-1)*u,u=0),v>=i&&p>0&&(h=!0,p*=.9,v=l*p);var m=(i-v)/2>>0,g={offset:m-u,size:0};c=o.reduce(function(S,w){var O={item:w.item,position:{offset:g.offset+g.size+u,size:h?p:w.barSize}},j=[].concat(Oj(S),[O]);return g=j[j.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){j.push({item:E,position:g})}),j},f)}else{var y=qt(n,i,0,!0);i-2*y-(l-1)*u<=0&&(u=0);var x=(i-2*y-(l-1)*u)/l;x>1&&(x>>=0);var b=s===+s?Math.min(x,s):x;c=o.reduce(function(S,w,O){var j=[].concat(Oj(S),[{item:w.item,position:{offset:y+(x+u)*O+(x-b)/2,size:b}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(E){j.push({item:E,position:j[j.length-1].position})}),j},f)}return c},Xee=function(t,r,n,i){var a=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),u=UC({children:a,legendWidth:l});if(u){var c=i||{},f=c.width,h=c.height,p=u.align,v=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&v==="middle")&&p!=="center"&&q(t[p]))return rt(rt({},t),{},ss({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&v!=="middle"&&q(t[v]))return rt(rt({},t),{},ss({},v,t[v]+(h||0)))}return t},Qee=function(t,r,n){return ae(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},WC=function(t,r,n,i,a){var o=r.props.children,s=Yt(o,Ol).filter(function(u){return Qee(i,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,c){var f=Xe(c,n);if(ae(f))return u;var h=Array.isArray(f)?[Hp(f),Wp(f)]:[f,f],p=l.reduce(function(v,m){var g=Xe(c,m,0),y=h[0]-Math.abs(Array.isArray(g)?g[0]:g),x=h[1]+Math.abs(Array.isArray(g)?g[1]:g);return[Math.min(y,v[0]),Math.max(x,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},Jee=function(t,r,n,i,a){var o=r.map(function(s){return WC(t,s,n,a,i)}).filter(function(s){return!ae(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},HC=function(t,r,n,i,a){var o=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&WC(t,l,u,i)||cu(t,u,n,a)});if(n==="number")return o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,u){for(var c=0,f=u.length;c=2?Kt(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+u,value:f,offset:u}});return c.filter(function(f){return!Bc(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+u,value:f,index:h,offset:u}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,h){return{coordinate:i(f)+u,value:a?a[f]:f,index:h,offset:u}})},mv=new WeakMap,Ef=function(t,r){if(typeof r!="function")return t;mv.has(t)||mv.set(t,new WeakMap);var n=mv.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},VC=function(t,r,n){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Ku(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:th(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:uu(),realScaleType:"point"}:a==="category"?{scale:Ku(),realScaleType:"band"}:{scale:th(),realScaleType:"linear"};if(Za(i)){var l="scale".concat(_p(i));return{scale:(yj[l]||uu)(),realScaleType:yj[l]?l:"point"}}return oe(i)?{scale:i}:{scale:uu(),realScaleType:"point"}},Pj=1e-4,GC=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-Pj,o=Math.max(i[0],i[1])+Pj,s=t(r[0]),l=t(r[n-1]);(so||lo)&&t.domain([r[0],r[n-1]])}},Zee=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][n][0]=a,t[s][n][1]=a+l,a=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},rte=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[o][n][0]=a,t[o][n][1]=a+s,a=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},nte={sign:tte,expand:SW,none:Ts,silhouette:OW,wiggle:jW,positive:rte},ite=function(t,r,n){var i=r.map(function(s){return s.props.dataKey}),a=nte[n],o=wW().keys(i).value(function(s,l){return+Xe(s,l,0)}).order(fg).offset(a);return o(t)},ate=function(t,r,n,i,a,o){if(!t)return null;var s=o?r.reverse():r,l={},u=s.reduce(function(f,h){var p,v=(p=h.type)!==null&&p!==void 0&&p.defaultProps?rt(rt({},h.type.defaultProps),h.props):h.props,m=v.stackId,g=v.hide;if(g)return f;var y=v[n],x=f[y]||{hasStack:!1,stackGroups:{}};if(yt(m)){var b=x.stackGroups[m]||{numericAxisId:n,cateAxisId:i,items:[]};b.items.push(h),x.hasStack=!0,x.stackGroups[m]=b}else x.stackGroups[po("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[h]};return rt(rt({},f),{},ss({},y,x))},l),c={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,g){var y=p.stackGroups[g];return rt(rt({},m),{},ss({},g,{numericAxisId:n,cateAxisId:i,items:y.items,stackedData:ite(t,y.items,a)}))},v)}return rt(rt({},f),{},ss({},h,p))},c)},YC=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var c=xee(u,a,s);return t.domain([Hp(c),Wp(c)]),{niceTicks:c}}if(a&&i==="number"){var f=t.domain(),h=bee(f,a,s);return{niceTicks:h}}return null};function lh(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ae(i[t.dataKey])){var s=Md(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=Xe(i,ae(o)?t.dataKey:o);return ae(l)?null:t.scale(l)}var Ej=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+i:null;var l=Xe(o,r.dataKey,r.domain[s]);return ae(l)?null:r.scale(l)-a/2+i},ote=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},ste=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?rt(rt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(yt(a)){var o=r[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},lte=function(t){return t.reduce(function(r,n){return[Hp(n.concat([r[0]]).filter(q)),Wp(n.concat([r[1]]).filter(q))]},[1/0,-1/0])},XC=function(t,r,n){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(u,c){var f=lte(c.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Aj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_j=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zg=function(t,r,n){if(oe(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(q(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(Aj.test(t[0])){var a=+Aj.exec(t[0])[1];i[0]=r[0]-a}else oe(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(q(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(_j.test(t[1])){var o=+_j.exec(t[1])[1];i[1]=r[1]+o}else oe(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},uh=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=db(r,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},yte=function(t,r,n,i,a){var o=t.width,s=t.height,l=t.startAngle,u=t.endAngle,c=qt(t.cx,o,o/2),f=qt(t.cy,s,s/2),h=ZC(o,s,n),p=qt(t.innerRadius,h,0),v=qt(t.outerRadius,h,h*.8),m=Object.keys(r);return m.reduce(function(g,y){var x=r[y],b=x.domain,S=x.reversed,w;if(ae(x.range))i==="angleAxis"?w=[l,u]:i==="radiusAxis"&&(w=[p,v]),S&&(w=[w[1],w[0]]);else{w=x.range;var O=w,j=fte(O,2);l=j[0],u=j[1]}var E=VC(x,a),A=E.realScaleType,T=E.scale;T.domain(b).range(w),GC(T);var _=YC(T,Rn(Rn({},x),{},{realScaleType:A})),N=Rn(Rn(Rn({},x),_),{},{range:w,radius:v,realScaleType:A,scale:T,cx:c,cy:f,innerRadius:p,outerRadius:v,startAngle:l,endAngle:u});return Rn(Rn({},g),{},JC({},y,N))},{})},gte=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-o,2))},xte=function(t,r){var n=t.x,i=t.y,a=r.cx,o=r.cy,s=gte({x:n,y:i},{x:a,y:o});if(s<=0)return{radius:s};var l=(n-a)/s,u=Math.acos(l);return i>o&&(u=2*Math.PI-u),{radius:s,angle:vte(u),angleInRadian:u}},bte=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return{startAngle:r-o*360,endAngle:n-o*360}},wte=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},Cj=function(t,r){var n=t.x,i=t.y,a=xte({x:n,y:i},r),o=a.radius,s=a.angle,l=r.innerRadius,u=r.outerRadius;if(ou)return!1;if(o===0)return!0;var c=bte(r),f=c.startAngle,h=c.endAngle,p=s,v;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return v?Rn(Rn({},r),{},{radius:o,angle:wte(p,r)}):null},e$=function(t){return!P.isValidElement(t)&&!oe(t)&&typeof t!="boolean"?t.className:""};function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tc(e)}var Ste=["offset"];function Ote(e){return Ate(e)||Ete(e)||Pte(e)||jte()}function jte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pte(e,t){if(e){if(typeof e=="string")return Ug(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ug(e,t)}}function Ete(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ate(e){if(Array.isArray(e))return Ug(e)}function Ug(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Tte(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pt(e){for(var t=1;t=0?1:-1,b,S;i==="insideStart"?(b=p+x*o,S=m):i==="insideEnd"?(b=v-x*o,S=!m):i==="end"&&(b=v+x*o,S=m),S=y<=0?S:!S;var w=Be(u,c,g,b),O=Be(u,c,g,b+(S?1:-1)*359),j="M".concat(w.x,",").concat(w.y,` + A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`, + `).concat(O.x,",").concat(O.y),E=ae(t.id)?po("recharts-radial-line-"):t.id;return k.createElement("text",rc({},n,{dominantBaseline:"central",className:ue("recharts-radial-bar-label",s)}),k.createElement("defs",null,k.createElement("path",{id:E,d:j})),k.createElement("textPath",{xlinkHref:"#".concat(E)},r))},Dte=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,o=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,c=a.startAngle,f=a.endAngle,h=(c+f)/2;if(i==="outside"){var p=Be(o,s,u+n,h),v=p.x,m=p.y;return{x:v,y:m,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var g=(l+u)/2,y=Be(o,s,g,h),x=y.x,b=y.y;return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Rte=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,o=r,s=o.x,l=o.y,u=o.width,c=o.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",v=f>0?"start":"end",m=u>=0?1:-1,g=m*i,y=m>0?"end":"start",x=m>0?"start":"end";if(a==="top"){var b={x:s+u/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return pt(pt({},b),n?{height:Math.max(l-n.y,0),width:u}:{})}if(a==="bottom"){var S={x:s+u/2,y:l+c+h,textAnchor:"middle",verticalAnchor:v};return pt(pt({},S),n?{height:Math.max(n.y+n.height-(l+c),0),width:u}:{})}if(a==="left"){var w={x:s-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return pt(pt({},w),n?{width:Math.max(w.x-n.x,0),height:c}:{})}if(a==="right"){var O={x:s+u+g,y:l+c/2,textAnchor:x,verticalAnchor:"middle"};return pt(pt({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:c}:{})}var j=n?{width:u,height:c}:{};return a==="insideLeft"?pt({x:s+g,y:l+c/2,textAnchor:x,verticalAnchor:"middle"},j):a==="insideRight"?pt({x:s+u-g,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},j):a==="insideTop"?pt({x:s+u/2,y:l+h,textAnchor:"middle",verticalAnchor:v},j):a==="insideBottom"?pt({x:s+u/2,y:l+c-h,textAnchor:"middle",verticalAnchor:p},j):a==="insideTopLeft"?pt({x:s+g,y:l+h,textAnchor:x,verticalAnchor:v},j):a==="insideTopRight"?pt({x:s+u-g,y:l+h,textAnchor:y,verticalAnchor:v},j):a==="insideBottomLeft"?pt({x:s+g,y:l+c-h,textAnchor:x,verticalAnchor:p},j):a==="insideBottomRight"?pt({x:s+u-g,y:l+c-h,textAnchor:y,verticalAnchor:p},j):dl(a)&&(q(a.x)||Ea(a.x))&&(q(a.y)||Ea(a.y))?pt({x:s+qt(a.x,u),y:l+qt(a.y,c),textAnchor:"end",verticalAnchor:"end"},j):pt({x:s+u/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},j)},Lte=function(t){return"cx"in t&&q(t.cx)};function St(e){var t=e.offset,r=t===void 0?5:t,n=_te(e,Ste),i=pt({offset:r},n),a=i.viewBox,o=i.position,s=i.value,l=i.children,u=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!a||ae(s)&&ae(l)&&!P.isValidElement(u)&&!oe(u))return null;if(P.isValidElement(u))return P.cloneElement(u,i);var p;if(oe(u)){if(p=P.createElement(u,i),P.isValidElement(p))return p}else p=$te(i);var v=Lte(a),m=te(i,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Ite(i,p,m);var g=v?Dte(i):Rte(i);return k.createElement(eo,rc({className:ue("recharts-label",f)},m,g,{breakAll:h}),p)}St.displayName="Label";var t$=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,v=t.left,m=t.width,g=t.height,y=t.clockWise,x=t.labelViewBox;if(x)return x;if(q(m)&&q(g)){if(q(f)&&q(h))return{x:f,y:h,width:m,height:g};if(q(p)&&q(v))return{x:p,y:v,width:m,height:g}}return q(f)&&q(h)?{x:f,y:h,width:0,height:0}:q(r)&&q(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:c||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},Fte=function(t,r){return t?t===!0?k.createElement(St,{key:"label-implicit",viewBox:r}):yt(t)?k.createElement(St,{key:"label-implicit",viewBox:r,value:t}):P.isValidElement(t)?t.type===St?P.cloneElement(t,{key:"label-implicit",viewBox:r}):k.createElement(St,{key:"label-implicit",content:t,viewBox:r}):oe(t)?k.createElement(St,{key:"label-implicit",content:t,viewBox:r}):dl(t)?k.createElement(St,rc({viewBox:r},t,{key:"label-implicit"})):null:null},Bte=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=t$(t),o=Yt(i,St).map(function(l,u){return P.cloneElement(l,{viewBox:r||a,key:"label-".concat(u)})});if(!n)return o;var s=Fte(t.label,r||a);return[s].concat(Ote(o))};St.parseViewBox=t$;St.renderCallByParent=Bte;function zte(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ute=zte;const Wte=Ee(Ute);function nc(e){"@babel/helpers - typeof";return nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nc(e)}var Hte=["valueAccessor"],Kte=["data","dataKey","clockWise","id","textBreakAll"];function qte(e){return Xte(e)||Yte(e)||Gte(e)||Vte()}function Vte(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gte(e,t){if(e){if(typeof e=="string")return Wg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wg(e,t)}}function Yte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xte(e){if(Array.isArray(e))return Wg(e)}function Wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ere(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var tre=function(t){return Array.isArray(t.value)?Wte(t.value):t.value};function En(e){var t=e.valueAccessor,r=t===void 0?tre:t,n=Dj(e,Hte),i=n.data,a=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,u=Dj(n,Kte);return!i||!i.length?null:k.createElement(pe,{className:"recharts-label-list"},i.map(function(c,f){var h=ae(a)?r(c,f):Xe(c&&c.payload,a),p=ae(s)?{}:{id:"".concat(s,"-").concat(f)};return k.createElement(St,fh({},te(c,!0),u,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:l,viewBox:St.parseViewBox(ae(o)?c:Ij(Ij({},c),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}En.displayName="LabelList";function rre(e,t){return e?e===!0?k.createElement(En,{key:"labelList-implicit",data:t}):k.isValidElement(e)||oe(e)?k.createElement(En,{key:"labelList-implicit",data:t,content:e}):dl(e)?k.createElement(En,fh({data:t},e,{key:"labelList-implicit"})):null:null}function nre(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Yt(n,En).map(function(o,s){return P.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return i;var a=rre(e.label,t);return[a].concat(qte(i))}En.renderCallByParent=nre;function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>u),`, + `).concat(f.x,",").concat(f.y,` + `);if(i>0){var p=Be(r,n,i,o),v=Be(r,n,i,u);h+="L ".concat(v.x,",").concat(v.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(o<=u),`, + `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},lre=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,c=t.endAngle,f=Kt(c-u),h=Af({cx:r,cy:n,radius:a,angle:u,sign:f,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,v=h.lineTangency,m=h.theta,g=Af({cx:r,cy:n,radius:a,angle:c,sign:-f,cornerRadius:o,cornerIsExternal:l}),y=g.circleTangency,x=g.lineTangency,b=g.theta,S=l?Math.abs(u-c):Math.abs(u-c)-m-b;if(S<0)return s?"M ".concat(v.x,",").concat(v.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):r$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:u,endAngle:c});var w="M ".concat(v.x,",").concat(v.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` + A`).concat(a,",").concat(a,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,` + `);if(i>0){var O=Af({cx:r,cy:n,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),j=O.circleTangency,E=O.lineTangency,A=O.theta,T=Af({cx:r,cy:n,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),_=T.circleTangency,N=T.lineTangency,M=T.theta,R=l?Math.abs(u-c):Math.abs(u-c)-A-M;if(R<0&&o===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(N.x,",").concat(N.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,` + A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(f>0),",").concat(j.x,",").concat(j.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(E.x,",").concat(E.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},ure={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},n$=function(t){var r=Lj(Lj({},ure),t),n=r.cx,i=r.cy,a=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,c=r.startAngle,f=r.endAngle,h=r.className;if(o0&&Math.abs(c-f)<360?g=lre({cx:n,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,v/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:c,endAngle:f}):g=r$({cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:c,endAngle:f}),k.createElement("path",Hg({},te(r,!0),{className:p,d:g,role:"img"}))};function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;tSre.call(e,t));function go(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Pre="__v",Ere="__o",Are="_owner",{getOwnPropertyDescriptor:Wj,keys:Hj}=Object;function _re(e,t){return e.byteLength===t.byteLength&&dh(new Uint8Array(e),new Uint8Array(t))}function Tre(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Nre(e,t){return e.byteLength===t.byteLength&&dh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function kre(e,t){return go(e.getTime(),t.getTime())}function Cre(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function $re(e,t){return e===t}function Kj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let o,s,l=0;for(;(o=a.next())&&!o.done;){const u=t.entries();let c=!1,f=0;for(;(s=u.next())&&!s.done;){if(i[f]){f++;continue}const h=o.value,p=s.value;if(r.equals(h[0],p[0],l,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){c=i[f]=!0;break}f++}if(!c)return!1;l++}return!0}const Mre=go;function Ire(e,t,r){const n=Hj(e);let i=n.length;if(Hj(t).length!==i)return!1;for(;i-- >0;)if(!s$(e,t,r,n[i]))return!1;return!0}function Kl(e,t,r){const n=Uj(e);let i=n.length;if(Uj(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=n[i],!s$(e,t,r,a)||(o=Wj(e,a),s=Wj(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Dre(e,t){return go(e.valueOf(),t.valueOf())}function Rre(e,t){return e.source===t.source&&e.flags===t.flags}function qj(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let o,s;for(;(o=a.next())&&!o.done;){const l=t.values();let u=!1,c=0;for(;(s=l.next())&&!s.done;){if(!i[c]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function dh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Lre(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function s$(e,t,r,n){return(n===Are||n===Ere||n===Pre)&&(e.$$typeof||t.$$typeof)?!0:jre(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const Fre="[object ArrayBuffer]",Bre="[object Arguments]",zre="[object Boolean]",Ure="[object DataView]",Wre="[object Date]",Hre="[object Error]",Kre="[object Map]",qre="[object Number]",Vre="[object Object]",Gre="[object RegExp]",Yre="[object Set]",Xre="[object String]",Qre={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Jre="[object URL]",Zre=Object.prototype.toString;function ene({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:v}){return function(g,y,x){if(g===y)return!0;if(g==null||y==null)return!1;const b=typeof g;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?s(g,y,x):b==="function"?a(g,y,x):!1;const S=g.constructor;if(S!==y.constructor)return!1;if(S===Object)return l(g,y,x);if(Array.isArray(g))return t(g,y,x);if(S===Date)return n(g,y,x);if(S===RegExp)return c(g,y,x);if(S===Map)return o(g,y,x);if(S===Set)return f(g,y,x);const w=Zre.call(g);if(w===Wre)return n(g,y,x);if(w===Gre)return c(g,y,x);if(w===Kre)return o(g,y,x);if(w===Yre)return f(g,y,x);if(w===Vre)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,x);if(w===Jre)return p(g,y,x);if(w===Hre)return i(g,y,x);if(w===Bre)return l(g,y,x);if(Qre[w])return h(g,y,x);if(w===Fre)return e(g,y,x);if(w===Ure)return r(g,y,x);if(w===zre||w===qre||w===Xre)return u(g,y,x);if(v){let O=v[w];if(!O){const j=Ore(g);j&&(O=v[j])}if(O)return O(g,y,x)}return!1}}function tne({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:_re,areArraysEqual:r?Kl:Tre,areDataViewsEqual:Nre,areDatesEqual:kre,areErrorsEqual:Cre,areFunctionsEqual:$re,areMapsEqual:r?vv(Kj,Kl):Kj,areNumbersEqual:Mre,areObjectsEqual:r?Kl:Ire,arePrimitiveWrappersEqual:Dre,areRegExpsEqual:Rre,areSetsEqual:r?vv(qj,Kl):qj,areTypedArraysEqual:r?vv(dh,Kl):dh,areUrlsEqual:Lre,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=Tf(n.areArraysEqual),a=Tf(n.areMapsEqual),o=Tf(n.areObjectsEqual),s=Tf(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return n}function rne(e){return function(t,r,n,i,a,o,s){return e(t,r,s)}}function nne({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(s,l){const{cache:u=e?new WeakMap:void 0,meta:c}=r();return t(s,l,{cache:u,equals:n,meta:c,strict:i})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(s,l){return t(s,l,a)}}const ine=sa();sa({strict:!0});sa({circular:!0});sa({circular:!0,strict:!0});sa({createInternalComparator:()=>go});sa({strict:!0,createInternalComparator:()=>go});sa({circular:!0,createInternalComparator:()=>go});sa({circular:!0,createInternalComparator:()=>go,strict:!0});function sa(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=tne(e),o=ene(a),s=r?r(o):rne(o);return nne({circular:t,comparator:o,createState:n,equals:s,strict:i})}function ane(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Vj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):ane(i)};requestAnimationFrame(n)}function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function one(e){return cne(e)||une(e)||lne(e)||sne()}function sne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lne(e,t){if(e){if(typeof e=="string")return Gj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gj(e,t)}}function Gj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:y<0?0:y},m=function(y){for(var x=y>1?1:y,b=x,S=0;S<8;++S){var w=f(b)-x,O=p(b);if(Math.abs(w-x)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(c,f,h){var p=-(c-f)*n,v=h*a,m=h+(p-v)*s/1e3,g=h*s/1e3+c;return Math.abs(g-f)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zne(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function yv(e){return Kne(e)||Hne(e)||Wne(e)||Une()}function Une(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wne(e,t){if(e){if(typeof e=="string")return Qg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qg(e,t)}}function Hne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kne(e){if(Array.isArray(e))return Qg(e)}function Qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mh(e){return mh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mh(e)}var un=function(e){Xne(r,e);var t=Qne(r);function r(n,i){var a;qne(this,r),a=t.call(this,n,i);var o=a.props,s=o.isActive,l=o.attributeName,u=o.from,c=o.to,f=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(e0(a)),a.changeStyle=a.changeStyle.bind(e0(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:c}),Zg(a);if(f&&f.length)a.state={style:f[0].style};else if(u){if(typeof h=="function")return a.state={style:u},Zg(a);a.state={style:l?Jl({},l,u):u}}else a.state={style:{}};return a}return Gne(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,c=a.to,f=a.from,h=this.state.style;if(s){if(!o){var p={style:l?Jl({},l,c):c};this.state&&h&&(l&&h[l]!==c||!l&&h!==c)&&this.setState(p);return}if(!(ine(i.to,c)&&i.canBegin&&i.isActive)){var v=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=v||u?f:i.to;if(this.state&&h){var g={style:l?Jl({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(g)}this.runAnimation(Vr(Vr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,u=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=Lne(o,s,Ane(u),l,this.changeStyle),v=function(){a.stopJSAnimation=p()};this.manager.start([h,c,v,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,u=o[0],c=u.style,f=u.duration,h=f===void 0?0:f,p=function(m,g,y){if(y===0)return m;var x=g.duration,b=g.easing,S=b===void 0?"ease":b,w=g.style,O=g.properties,j=g.onAnimationEnd,E=y>0?o[y-1]:g,A=O||Object.keys(w);if(typeof S=="function"||S==="spring")return[].concat(yv(m),[a.runJSAnimation.bind(a,{from:E.style,to:w,duration:x,easing:S}),x]);var T=Qj(A,x,S),_=Vr(Vr(Vr({},E.style),w),{},{transition:T});return[].concat(yv(m),[_,x,j]).filter(mne)};return this.manager.start([l].concat(yv(o.reduce(p,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=fne());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,u=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?Jl({},s,l):l,g=Qj(Object.keys(m),o,u);v.start([c,a,Vr(Vr({},m),{},{transition:g}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=Bne(i,Fne),u=P.Children.count(a),c=this.state.style;if(typeof a=="function")return a(c);if(!s||u===0||o<=0)return a;var f=function(p){var v=p.props,m=v.style,g=m===void 0?{}:m,y=v.className,x=P.cloneElement(p,Vr(Vr({},l),{},{style:Vr(Vr({},g),c),className:y}));return x};return u===1?f(P.Children.only(a)):k.createElement("div",null,P.Children.map(a,function(h){return f(h)}))}}]),r}(P.PureComponent);un.displayName="Animate";un.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};un.propTypes={from:je.oneOfType([je.object,je.string]),to:je.oneOfType([je.object,je.string]),attributeName:je.string,duration:je.number,begin:je.number,easing:je.oneOfType([je.string,je.func]),steps:je.arrayOf(je.shape({duration:je.number.isRequired,style:je.object.isRequired,easing:je.oneOfType([je.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),je.func]),properties:je.arrayOf("string"),onAnimationEnd:je.func})),children:je.oneOfType([je.node,je.func]),isActive:je.bool,canBegin:je.bool,onAnimationEnd:je.func,shouldReAnimate:je.bool,onAnimationStart:je.func,onAnimationReStart:je.func};function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}function vh(){return vh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,l=n>=0?1:-1,u=i>=0&&n>=0||i<0&&n<0?1:0,c;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ho?o:a[h];c="M".concat(t,",").concat(r+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),c+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, + `).concat(t+n,",").concat(r+s*f[1])),c+="L ".concat(t+n,",").concat(r+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, + `).concat(t+n-l*f[2],",").concat(r+i)),c+="L ".concat(t+l*f[3],",").concat(r+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, + `).concat(t,",").concat(r+i-s*f[3])),c+="Z"}else if(o>0&&a===+a&&a>0){var v=Math.min(o,a);c="M ".concat(t,",").concat(r+s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+l*v,",").concat(r,` + L `).concat(t+n-l*v,",").concat(r,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*v,` + L `).concat(t+n,",").concat(r+i-s*v,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+n-l*v,",").concat(r+i,` + L `).concat(t+l*v,",").concat(r+i,` + A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(r+i-s*v," Z")}else c="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return c},sie=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),c=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return n>=u&&n<=c&&i>=f&&i<=h}return!1},lie={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Fb=function(t){var r=aP(aP({},lie),t),n=P.useRef(),i=P.useState(-1),a=Zne(i,2),o=a[0],s=a[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,u=r.y,c=r.width,f=r.height,h=r.radius,p=r.className,v=r.animationEasing,m=r.animationDuration,g=r.animationBegin,y=r.isAnimationActive,x=r.isUpdateAnimationActive;if(l!==+l||u!==+u||c!==+c||f!==+f||c===0||f===0)return null;var b=ue("recharts-rectangle",p);return x?k.createElement(un,{canBegin:o>0,from:{width:c,height:f,x:l,y:u},to:{width:c,height:f,x:l,y:u},duration:m,animationEasing:v,isActive:x},function(S){var w=S.width,O=S.height,j=S.x,E=S.y;return k.createElement(un,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,isActive:y,easing:v},k.createElement("path",vh({},te(r,!0),{className:b,d:oP(j,E,w,O,h),ref:n})))}):k.createElement("path",vh({},te(r,!0),{className:b,d:oP(l,u,c,f,h)}))},uie=["points","className","baseLinePoints","connectNulls"];function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sP(e){return mie(e)||pie(e)||hie(e)||die()}function die(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hie(e,t){if(e){if(typeof e=="string")return t0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(e,t)}}function pie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mie(e){if(Array.isArray(e))return t0(e)}function t0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){lP(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),lP(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},du=function(t,r){var n=vie(t);r&&(n=[n.reduce(function(a,o){return[].concat(sP(a),sP(o))},[])]);var i=n.map(function(a){return a.reduce(function(o,s,l){return"".concat(o).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},yie=function(t,r,n){var i=du(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(du(r.reverse(),n).slice(1))},gie=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,o=cie(t,uie);if(!r||!r.length)return null;var s=ue("recharts-polygon",n);if(i&&i.length){var l=o.stroke&&o.stroke!=="none",u=yie(r,i,a);return k.createElement("g",{className:s},k.createElement("path",Yo({},te(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),l?k.createElement("path",Yo({},te(o,!0),{fill:"none",d:du(r,a)})):null,l?k.createElement("path",Yo({},te(o,!0),{fill:"none",d:du(i,a)})):null)}var c=du(r,a);return k.createElement("path",Yo({},te(o,!0),{fill:c.slice(-1)==="Z"?o.fill:"none",className:s,d:c}))};function r0(){return r0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Eie=function(t,r,n,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(r,"h").concat(n)},Aie=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,u=l===void 0?0:l,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,v=t.className,m=jie(t,xie),g=bie({x:n,y:a,top:s,left:u,width:f,height:p},m);return!q(n)||!q(a)||!q(f)||!q(p)||!q(s)||!q(u)?null:k.createElement("path",n0({},te(g,!0),{className:ue("recharts-cross",v),d:Eie(n,a,f,p,s,u)}))},_ie=Up,Tie=PC,Nie=Cn;function kie(e,t){return e&&e.length?_ie(e,Nie(t),Tie):void 0}var Cie=kie;const $ie=Ee(Cie);var Mie=Up,Iie=Cn,Die=EC;function Rie(e,t){return e&&e.length?Mie(e,Iie(t),Die):void 0}var Lie=Rie;const Fie=Ee(Lie);var Bie=["cx","cy","angle","ticks","axisLine"],zie=["ticks","tick","angle","tickFormatter","stroke"];function Fs(e){"@babel/helpers - typeof";return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uie(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Wie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dP(e,t){for(var r=0;rmP?o=i==="outer"?"start":"end":a<-mP?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,o=n.radius,s=n.axisLine,l=n.axisLineType,u=ha(ha({},te(this.props,!1)),{},{fill:"none"},te(s,!1));if(l==="circle")return k.createElement(Vp,ba({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var c=this.props.ticks,f=c.map(function(h){return Be(i,a,o,h.coordinate)});return k.createElement(gie,ba({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,o=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,c=te(this.props,!1),f=te(o,!1),h=ha(ha({},c),{},{fill:"none"},te(s,!1)),p=a.map(function(v,m){var g=n.getTickLineCoord(v),y=n.getTickTextAnchor(v),x=ha(ha(ha({textAnchor:y},c),{},{stroke:"none",fill:u},f),{},{index:m,payload:v,x:g.x2,y:g.y2});return k.createElement(pe,ba({className:ue("recharts-polar-angle-axis-tick",e$(o)),key:"tick-".concat(v.coordinate)},Ji(n.props,v,m)),s&&k.createElement("line",ba({className:"recharts-polar-angle-axis-tick-line"},h,g)),o&&t.renderTickItem(o,x,l?l(v.value,m):v.value))});return k.createElement(pe,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,o=n.axisLine;return a<=0||!i||!i.length?null:k.createElement(pe,{className:ue("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var o;return k.isValidElement(n)?o=k.cloneElement(n,i):oe(n)?o=n(i):o=k.createElement(eo,ba({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])}(P.PureComponent);Xp(Qp,"displayName","PolarAngleAxis");Xp(Qp,"axisType","angleAxis");Xp(Qp,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var iae=wk,aae=iae(Object.getPrototypeOf,Object),oae=aae,sae=oi,lae=oae,uae=si,cae="[object Object]",fae=Function.prototype,dae=Object.prototype,g$=fae.toString,hae=dae.hasOwnProperty,pae=g$.call(Object);function mae(e){if(!uae(e)||sae(e)!=cae)return!1;var t=lae(e);if(t===null)return!0;var r=hae.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&g$.call(r)==pae}var vae=mae;const yae=Ee(vae);var gae=oi,xae=si,bae="[object Boolean]";function wae(e){return e===!0||e===!1||xae(e)&&gae(e)==bae}var Sae=wae;const Oae=Ee(Sae);function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}function xh(){return xh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:c,lowerWidth:f,height:h,x:l,y:u},duration:m,animationEasing:v,isActive:y},function(b){var S=b.upperWidth,w=b.lowerWidth,O=b.height,j=b.x,E=b.y;return k.createElement(un,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:g,duration:m,easing:v},k.createElement("path",xh({},te(r,!0),{className:x,d:xP(j,E,S,w,O),ref:n})))}):k.createElement("g",null,k.createElement("path",xh({},te(r,!0),{className:x,d:xP(l,u,c,f,h)})))},Mae=["option","shapeType","propTransformer","activeClassName","isActive"];function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}function Iae(e,t){if(e==null)return{};var r=Dae(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Dae(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function bP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t0?wr(b,"paddingAngle",0):0;if(w){var j=Nt(w.endAngle-w.startAngle,b.endAngle-b.startAngle),E=Ie(Ie({},b),{},{startAngle:x+O,endAngle:x+j(m)+O});g.push(E),x=E.endAngle}else{var A=b.endAngle,T=b.startAngle,_=Nt(0,A-T),N=_(m),M=Ie(Ie({},b),{},{startAngle:x+O,endAngle:x+N+O});g.push(M),x=M.endAngle}}),k.createElement(pe,null,n.renderSectorsStatically(g))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!bl(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,o=i.sectors,s=i.className,l=i.label,u=i.cx,c=i.cy,f=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,v=this.state.isAnimationFinished;if(a||!o||!o.length||!q(u)||!q(c)||!q(f)||!q(h))return null;var m=ue("recharts-pie",s);return k.createElement(pe,{tabIndex:this.props.rootTabIndex,className:m,ref:function(y){n.pieRef=y}},this.renderSectors(),l&&this.renderLabels(o),St.renderCallByParent(this.props,null,!1),(!p||v)&&En.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?x:x-1)*l,S=g-x*p-b,w=i.reduce(function(E,A){var T=Xe(A,y,0);return E+(q(T)?T:0)},0),O;if(w>0){var j;O=i.map(function(E,A){var T=Xe(E,y,0),_=Xe(E,c,A),N=(q(T)?T:0)/w,M;A?M=j.endAngle+Kt(m)*l*(T!==0?1:0):M=o;var R=M+Kt(m)*((T!==0?p:0)+N*S),I=(M+R)/2,D=(v.innerRadius+v.outerRadius)/2,z=[{name:_,value:T,payload:E,dataKey:y,type:h}],C=Be(v.cx,v.cy,D,I);return j=Ie(Ie(Ie({percent:N,cornerRadius:a,name:_,tooltipPayload:z,midAngle:I,middleRadius:D,tooltipPosition:C},E),v),{},{value:Xe(E,y),startAngle:M,endAngle:R,payload:E,paddingAngle:Kt(m)*l}),j})}return Ie(Ie({},v),{},{sectors:O,data:i})});var noe=Math.ceil,ioe=Math.max;function aoe(e,t,r,n){for(var i=-1,a=ioe(noe((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var ooe=aoe,soe=Bk,jP=1/0,loe=17976931348623157e292;function uoe(e){if(!e)return e===0?e:0;if(e=soe(e),e===jP||e===-jP){var t=e<0?-1:1;return t*loe}return e===e?e:0}var w$=uoe,coe=ooe,foe=Ip,gv=w$;function doe(e){return function(t,r,n){return n&&typeof n!="number"&&foe(t,r,n)&&(r=n=void 0),t=gv(t),r===void 0?(r=t,t=0):r=gv(r),n=n===void 0?t0&&n.handleDrag(i.changedTouches[0])}),mr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),n.detachDragEndListener()}),mr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),mr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),mr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),mr(n,"handleSlideDragStart",function(i){var a=TP(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return Eoe(t,e),Soe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,c=u.length-1,f=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:v===c?c:v-v%l}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Xe(a[n],s,n);return oe(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,u=l.x,c=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,v=l.onChange,m=n.pageX-a;m>0?m=Math.min(m,u+c-f-s,u+c-f-o):m<0&&(m=Math.max(m,u-o,u-s));var g=this.getIndex({startX:o+m,endX:s+m});(g.startIndex!==h||g.endIndex!==p)&&v&&v(g),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=TP(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[o],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,v=c.onChange,m=c.gap,g=c.data,y={startX:this.state.startX,endX:this.state.endX},x=n.pageX-a;x>0?x=Math.min(x,f+h-p-u):x<0&&(x=Math.max(x,f-u)),y[o]=u+x;var b=this.getIndex(y),S=b.startIndex,w=b.endIndex,O=function(){var E=g.length-1;return o==="startX"&&(s>l?S%m===0:w%m===0)||sl?w%m===0:S%m===0)||s>l&&w===E};this.setState(mr(mr({},o,u+x),"brushMoveStartX",n.pageX),function(){v&&O()&&v(b)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,u=o.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+n;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=u||i==="endX"&&p<=l||this.setState(mr({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.fill,u=n.stroke;return k.createElement("rect",{stroke:u,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,o=n.width,s=n.height,l=n.data,u=n.children,c=n.padding,f=P.Children.only(u);return f?k.cloneElement(f,{x:i,y:a,width:o,height:s,margin:c,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,o,s=this,l=this.props,u=l.y,c=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,v=l.data,m=l.startIndex,g=l.endIndex,y=Math.max(n,this.props.x),x=xv(xv({},te(this.props,!1)),{},{x:y,y:u,width:c,height:f}),b=p||"Min value: ".concat((a=v[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=v[g])===null||o===void 0?void 0:o.name);return k.createElement(pe,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(n,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,c=Math.min(n,i)+u,f=Math.max(Math.abs(i-n)-u,0);return k.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:c,y:o,width:f,height:s})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,u=n.stroke,c=this.state,f=c.startX,h=c.endX,p=5,v={pointerEvents:"none",fill:u};return k.createElement(pe,{className:"recharts-brush-texts"},k.createElement(eo,jh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:o+s/2},v),this.getTextOfTick(i)),k.createElement(eo,jh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:o+s/2},v),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,o=n.children,s=n.x,l=n.y,u=n.width,c=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,v=h.endX,m=h.isTextActive,g=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!q(s)||!q(l)||!q(u)||!q(c)||u<=0||c<=0)return null;var b=ue("recharts-brush",a),S=k.Children.count(o)===1,w=boe("userSelect","none");return k.createElement(pe,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(m||g||y||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,o=n.width,s=n.height,l=n.stroke,u=Math.floor(a+s/2)-1;return k.createElement(k.Fragment,null,k.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),k.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),k.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return k.isValidElement(n)?a=k.cloneElement(n,i):oe(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,o=n.width,s=n.x,l=n.travellerWidth,u=n.updateId,c=n.startIndex,f=n.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return xv({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o},a&&a.length?_oe({data:a,width:o,x:s,travellerWidth:l,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:o,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>i?s=l:o=l}return i>=n[s]?s:o}}])}(P.PureComponent);mr(Ws,"displayName","Brush");mr(Ws,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Toe=fb;function Noe(e,t){var r;return Toe(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}var koe=Noe,Coe=hk,$oe=Cn,Moe=koe,Ioe=hr,Doe=Ip;function Roe(e,t,r){var n=Ioe(e)?Coe:Moe;return r&&Doe(e,t,r)&&(t=void 0),n(e,$oe(t))}var Loe=Roe;const Foe=Ee(Loe);var An=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},NP=Ik;function Boe(e,t,r){t=="__proto__"&&NP?NP(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var zoe=Boe,Uoe=zoe,Woe=$k,Hoe=Cn;function Koe(e,t){var r={};return t=Hoe(t),Woe(e,function(n,i,a){Uoe(r,i,t(n,i,a))}),r}var qoe=Koe;const Voe=Ee(qoe);function Goe(e,t){for(var r=-1,n=e==null?0:e.length;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function fse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dse(e,t){var r=e.x,n=e.y,i=cse(e,ose),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),u="".concat(t.height||i.height),c=parseInt(u,10),f="".concat(t.width||i.width),h=parseInt(f,10);return ql(ql(ql(ql(ql({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function CP(e){return k.createElement(wh,l0({shapeType:"rectangle",propTransformer:dse,activeClassName:"recharts-active-bar"},e))}var hse=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=q(n)||$8(n);return a?t(n,i):(a||ro(),r)}},pse=["value","background"],E$;function Hs(e){"@babel/helpers - typeof";return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function mse(e,t){if(e==null)return{};var r=vse(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vse(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(R)0&&(M=Math.min((re||0)-(R[be-1]||0),M))}),Number.isFinite(M)){var I=M/N,D=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(j=I*D/2),m.padding==="no-gap"){var z=qt(t.barCategoryGap,I*D),C=I*D/2;j=C-z-(C-z)/D*z}}}i==="xAxis"?E=[n.left+(b.left||0)+(j||0),n.left+n.width-(b.right||0)-(j||0)]:i==="yAxis"?E=l==="horizontal"?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(j||0),n.top+n.height-(b.bottom||0)-(j||0)]:E=m.range,w&&(E=[E[1],E[0]]);var F=VC(m,a,h),W=F.scale,V=F.realScaleType;W.domain(y).range(E),GC(W);var H=YC(W,Jr(Jr({},m),{},{realScaleType:V}));i==="xAxis"?(_=g==="top"&&!S||g==="bottom"&&S,A=n.left,T=f[O]-_*m.height):i==="yAxis"&&(_=g==="left"&&!S||g==="right"&&S,A=f[O]-_*m.width,T=n.top);var Y=Jr(Jr(Jr({},m),H),{},{realScaleType:V,x:A,y:T,scale:W,width:i==="xAxis"?n.width:m.width,height:i==="yAxis"?n.height:m.height});return Y.bandSize=uh(Y,H),!m.hide&&i==="xAxis"?f[O]+=(_?-1:1)*Y.height:m.hide||(f[O]+=(_?-1:1)*Y.width),Jr(Jr({},p),{},em({},v,Y))},{})},k$=function(t,r){var n=t.x,i=t.y,a=r.x,o=r.y;return{x:Math.min(n,a),y:Math.min(i,o),width:Math.abs(a-n),height:Math.abs(o-i)}},Ase=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return k$({x:r,y:n},{x:i,y:a})},C$=function(){function e(t){jse(this,e),this.scale=t}return Pse(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])}();em(C$,"EPS",1e-4);var Bb=function(t){var r=Object.keys(t).reduce(function(n,i){return Jr(Jr({},n),{},em({},i,C$.create(t[i])))},{});return Jr(Jr({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return Voe(i,function(l,u){return r[u].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return P$(i,function(a,o){return r[o].isInRange(a)})}})};function _se(e){return(e%180+180)%180}var Tse=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=_se(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Mse=$se,Ise=w$;function Dse(e){var t=Ise(e),r=t%1;return t===t?r?t-r:t:0}var Rse=Dse,Lse=Ak,Fse=Cn,Bse=Rse,zse=Math.max;function Use(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Bse(r);return i<0&&(i=zse(n+i,0)),Lse(e,Fse(t),i)}var Wse=Use,Hse=Mse,Kse=Wse,qse=Hse(Kse),Vse=qse;const Gse=Ee(Vse);var Yse=FU(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),zb=P.createContext(void 0),Ub=P.createContext(void 0),$$=P.createContext(void 0),M$=P.createContext({}),I$=P.createContext(void 0),D$=P.createContext(0),R$=P.createContext(0),RP=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,o=t.clipPathId,s=t.children,l=t.width,u=t.height,c=Yse(a);return k.createElement(zb.Provider,{value:n},k.createElement(Ub.Provider,{value:i},k.createElement(M$.Provider,{value:a},k.createElement($$.Provider,{value:c},k.createElement(I$.Provider,{value:o},k.createElement(D$.Provider,{value:u},k.createElement(R$.Provider,{value:l},s)))))))},Xse=function(){return P.useContext(I$)},L$=function(t){var r=P.useContext(zb);r==null&&ro();var n=r[t];return n==null&&ro(),n},Qse=function(){var t=P.useContext(zb);return Si(t)},Jse=function(){var t=P.useContext(Ub),r=Gse(t,function(n){return P$(n.domain,Number.isFinite)});return r||Si(t)},F$=function(t){var r=P.useContext(Ub);r==null&&ro();var n=r[t];return n==null&&ro(),n},Zse=function(){var t=P.useContext($$);return t},ele=function(){return P.useContext(M$)},Wb=function(){return P.useContext(R$)},Hb=function(){return P.useContext(D$)};function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function tle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rle(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Rle(e,t){return q$(e,t+1)}function Lle(e,t,r,n,i){for(var a=(n||[]).slice(),o=t.start,s=t.end,l=0,u=1,c=o,f=function(){var v=n==null?void 0:n[l];if(v===void 0)return{v:q$(n,u)};var m=l,g,y=function(){return g===void 0&&(g=r(v,m)),g},x=v.coordinate,b=l===0||kh(e,x,y,c,s);b||(l=0,c=o,u+=1),b&&(c=x+e*(y()/2+i),l+=u)},h;u<=a.length;)if(h=f(),h)return h.v;return[]}function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function KP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function It(e){for(var t=1;t0?p.coordinate-g*e:p.coordinate})}else a[h]=p=It(It({},p),{},{tickCoord:p.coordinate});var y=kh(e,p.tickCoord,m,s,l);y&&(l=p.tickCoord-e*(m()/2+i),a[h]=It(It({},p),{},{isShow:!0}))},c=o-1;c>=0;c--)u(c);return a}function Wle(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,l=t.start,u=t.end;if(a){var c=n[s-1],f=r(c,s-1),h=e*(c.coordinate+e*f/2-u);o[s-1]=c=It(It({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=kh(e,c.tickCoord,function(){return f},l,u);p&&(u=c.tickCoord-e*(f/2+i),o[s-1]=It(It({},c),{},{isShow:!0}))}for(var v=a?s-1:s,m=function(x){var b=o[x],S,w=function(){return S===void 0&&(S=r(b,x)),S};if(x===0){var O=e*(b.coordinate-e*w()/2-l);o[x]=b=It(It({},b),{},{tickCoord:O<0?b.coordinate-O*e:b.coordinate})}else o[x]=b=It(It({},b),{},{tickCoord:b.coordinate});var j=kh(e,b.tickCoord,w,l,u);j&&(l=b.tickCoord+e*(w()/2+i),o[x]=It(It({},b),{},{isShow:!0}))},g=0;g=2?Kt(i[1].coordinate-i[0].coordinate):1,y=Dle(a,g,p);return l==="equidistantPreserveStart"?Lle(g,y,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=Wle(g,y,m,i,o,l==="preserveStartEnd"):h=Ule(g,y,m,i,o),h.filter(function(x){return x.isShow}))}var Hle=["viewBox"],Kle=["viewBox"],qle=["ticks"];function Gs(e){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Vle(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Gle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VP(e,t){for(var r=0;r0?l(this.props):l(p)),o<=0||s<=0||!v||!v.length?null:k.createElement(pe,{className:ue("recharts-cartesian-axis",u),ref:function(g){n.layerReference=g}},a&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),St.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var o,s=ue(i.className,"recharts-cartesian-axis-tick-value");return k.isValidElement(n)?o=k.cloneElement(n,ht(ht({},i),{},{className:s})):oe(n)?o=n(ht(ht({},i),{},{className:s})):o=k.createElement(eo,Qo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(P.Component);Gb(jl,"displayName","CartesianAxis");Gb(jl,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var tue=["x1","y1","x2","y2","key"],rue=["offset"];function no(e){"@babel/helpers - typeof";return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(e)}function GP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var sue=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return k.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Y$(e,t){var r;if(k.isValidElement(e))r=k.cloneElement(e,t);else if(oe(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=YP(t,tue),u=te(l,!1);u.offset;var c=YP(u,rue);r=k.createElement("line",Ta({},c,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function lue(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Rt(Rt({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return Y$(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function uue(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var u=Rt(Rt({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return Y$(i,u)});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function cue(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var v=!c[p+1],m=v?i+o-h:c[p+1]-h;if(m<=0)return null;var g=p%t.length;return k.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:m,width:a,stroke:"none",fill:t[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function fue(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var c=u.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var v=!c[p+1],m=v?a+s-h:c[p+1]-h;if(m<=0)return null;var g=p%n.length;return k.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:m,height:l,stroke:"none",fill:n[g],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var due=function(t,r){var n=t.xAxis,i=t.width,a=t.height,o=t.offset;return qC(Vb(Rt(Rt(Rt({},jl.defaultProps),n),{},{ticks:Kn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,r)},hue=function(t,r){var n=t.yAxis,i=t.width,a=t.height,o=t.offset;return qC(Vb(Rt(Rt(Rt({},jl.defaultProps),n),{},{ticks:Kn(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,r)},ko={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Ys(e){var t,r,n,i,a,o,s=Wb(),l=Hb(),u=ele(),c=Rt(Rt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ko.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:ko.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:ko.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:ko.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:ko.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:ko.verticalFill,x:q(e.x)?e.x:u.left,y:q(e.y)?e.y:u.top,width:q(e.width)?e.width:u.width,height:q(e.height)?e.height:u.height}),f=c.x,h=c.y,p=c.width,v=c.height,m=c.syncWithTicks,g=c.horizontalValues,y=c.verticalValues,x=Qse(),b=Jse();if(!q(p)||p<=0||!q(v)||v<=0||!q(f)||f!==+f||!q(h)||h!==+h)return null;var S=c.verticalCoordinatesGenerator||due,w=c.horizontalCoordinatesGenerator||hue,O=c.horizontalPoints,j=c.verticalPoints;if((!O||!O.length)&&oe(w)){var E=g&&g.length,A=w({yAxis:b?Rt(Rt({},b),{},{ticks:E?g:b.ticks}):void 0,width:s,height:l,offset:u},E?!0:m);on(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(no(A),"]")),Array.isArray(A)&&(O=A)}if((!j||!j.length)&&oe(S)){var T=y&&y.length,_=S({xAxis:x?Rt(Rt({},x),{},{ticks:T?y:x.ticks}):void 0,width:s,height:l,offset:u},T?!0:m);on(Array.isArray(_),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(no(_),"]")),Array.isArray(_)&&(j=_)}return k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(sue,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),k.createElement(lue,Ta({},c,{offset:u,horizontalPoints:O,xAxis:x,yAxis:b})),k.createElement(uue,Ta({},c,{offset:u,verticalPoints:j,xAxis:x,yAxis:b})),k.createElement(cue,Ta({},c,{horizontalPoints:O})),k.createElement(fue,Ta({},c,{verticalPoints:j})))}Ys.displayName="CartesianGrid";var pue=["type","layout","connectNulls","ref"],mue=["key"];function Xs(e){"@babel/helpers - typeof";return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xs(e)}function XP(e,t){if(e==null)return{};var r=vue(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rf){p=[].concat(Co(l.slice(0,v)),[f-m]);break}var g=p.length%2===0?[0,h]:[h];return[].concat(Co(t.repeat(l,c)),Co(p),g).map(function(y){return"".concat(y,"px")}).join(", ")}),Zr(r,"id",po("recharts-line-")),Zr(r,"pathRef",function(o){r.mainCurve=o}),Zr(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Zr(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Eue(t,e),Sue(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,c=a.children,f=Yt(c,Ol);if(!f)return null;var h=function(m,g){return{x:m.x,y:m.y,value:m.value,errorVal:Xe(m.payload,g)}},p={clipPath:n?"url(#clipPath-".concat(i,")"):null};return k.createElement(pe,p,f.map(function(v){return k.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,i,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,c=s.dataKey,f=te(this.props,!1),h=te(l,!0),p=u.map(function(m,g){var y=pr(pr(pr({key:"dot-".concat(g),r:3},f),h),{},{index:g,cx:m.x,cy:m.y,value:m.value,dataKey:c,payload:m.payload,points:u});return t.renderDotItem(l,y)}),v={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return k.createElement(pe,pu({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,i,a,o){var s=this.props,l=s.type,u=s.layout,c=s.connectNulls;s.ref;var f=XP(s,pue),h=pr(pr(pr({},te(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},o),{},{type:l,layout:u,connectNulls:c});return k.createElement(oc,pu({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,o=this.props,s=o.points,l=o.strokeDasharray,u=o.isAnimationActive,c=o.animationBegin,f=o.animationDuration,h=o.animationEasing,p=o.animationId,v=o.animateNewValues,m=o.width,g=o.height,y=this.state,x=y.prevPoints,b=y.totalLength;return k.createElement(un,{begin:c,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var w=S.t;if(x){var O=x.length/s.length,j=s.map(function(N,M){var R=Math.floor(M*O);if(x[R]){var I=x[R],D=Nt(I.x,N.x),z=Nt(I.y,N.y);return pr(pr({},N),{},{x:D(w),y:z(w)})}if(v){var C=Nt(m*2,N.x),F=Nt(g/2,N.y);return pr(pr({},N),{},{x:C(w),y:F(w)})}return pr(pr({},N),{},{x:N.x,y:N.y})});return a.renderCurveStatically(j,n,i)}var E=Nt(0,b),A=E(w),T;if(l){var _="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});T=a.getStrokeDasharray(A,b,_)}else T=a.generateSimpleStrokeDasharray(b,A);return a.renderCurveStatically(s,n,i,{strokeDasharray:T})})}},{key:"renderCurve",value:function(n,i){var a=this.props,o=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,c=l.totalLength;return s&&o&&o.length&&(!u&&c>0||!bl(u,o))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(o,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,u=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,v=i.height,m=i.isAnimationActive,g=i.id;if(a||!s||!s.length)return null;var y=this.state.isAnimationFinished,x=s.length===1,b=ue("recharts-line",l),S=u&&u.allowDataOverflow,w=c&&c.allowDataOverflow,O=S||w,j=ae(g)?this.id:g,E=(n=te(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},A=E.r,T=A===void 0?3:A,_=E.strokeWidth,N=_===void 0?2:_,M=q8(o)?o:{},R=M.clipDot,I=R===void 0?!0:R,D=T*2+N;return k.createElement(pe,{className:b},S||w?k.createElement("defs",null,k.createElement("clipPath",{id:"clipPath-".concat(j)},k.createElement("rect",{x:S?h:h-p/2,y:w?f:f-v/2,width:S?p:p*2,height:w?v:v*2})),!I&&k.createElement("clipPath",{id:"clipPath-dots-".concat(j)},k.createElement("rect",{x:h-D/2,y:f-D/2,width:p+D,height:v+D}))):null,!x&&this.renderCurve(O,j),this.renderErrorBar(O,j),(x||o)&&this.renderDots(O,I,j),(!m||y)&&En.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Co(n),[0]):n,o=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lue(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Fue(e){var t=e.option,r=e.isActive,n=Rue(e,Due);return typeof t=="string"?P.createElement(wh,mu({option:P.createElement(Cp,mu({type:t},n)),isActive:r,shapeType:"symbols"},n)):P.createElement(wh,mu({option:t,isActive:r,shapeType:"symbols"},n))}function Js(e){"@babel/helpers - typeof";return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Js(e)}function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Mce(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ice(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dce(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?o:t&&t.length&&q(i)&&q(a)?t.slice(i,a+1):[]};function v2(e){return e==="number"?[0,"auto"]:void 0}var T0=function(t,r,n,i){var a=t.graphicalItems,o=t.tooltipAxis,s=om(r,t);return n<0||!a||!a.length||n>=s.length?null:a.reduce(function(l,u){var c,f=(c=u.props.data)!==null&&c!==void 0?c:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;h=Md(p,o.dataKey,i)}else h=f&&f[n]||s[n];return h?[].concat(rl(l),[QC(u,h)]):l},[])},oE=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},o=Gce(a,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,c=Vee(o,s,u,l);if(c>=0&&u){var f=u[c]&&u[c].value,h=T0(t,r,c,f),p=Yce(n,s,c,a);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},Xce=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=KC(c,a);return n.reduce(function(v,m){var g,y=m.type.defaultProps!==void 0?B(B({},m.type.defaultProps),m.props):m.props,x=y.type,b=y.dataKey,S=y.allowDataOverflow,w=y.allowDuplicatedCategory,O=y.scale,j=y.ticks,E=y.includeHidden,A=y[o];if(v[A])return v;var T=om(t.data,{graphicalItems:i.filter(function(H){var Y,re=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o];return re===A}),dataStartIndex:l,dataEndIndex:u}),_=T.length,N,M,R;Sce(y.domain,S,x)&&(N=zg(y.domain,null,S),p&&(x==="number"||O!=="auto")&&(R=cu(T,b,"category")));var I=v2(x);if(!N||N.length===0){var D,z=(D=y.domain)!==null&&D!==void 0?D:I;if(b){if(N=cu(T,b,x),x==="category"&&p){var C=I8(N);w&&C?(M=N,N=Oh(0,_)):w||(N=Tj(z,N,m).reduce(function(H,Y){return H.indexOf(Y)>=0?H:[].concat(rl(H),[Y])},[]))}else if(x==="category")w?N=N.filter(function(H){return H!==""&&!ae(H)}):N=Tj(z,N,m).reduce(function(H,Y){return H.indexOf(Y)>=0||Y===""||ae(Y)?H:[].concat(rl(H),[Y])},[]);else if(x==="number"){var F=Jee(T,i.filter(function(H){var Y,re,be=o in H.props?H.props[o]:(Y=H.type.defaultProps)===null||Y===void 0?void 0:Y[o],Ke="hide"in H.props?H.props.hide:(re=H.type.defaultProps)===null||re===void 0?void 0:re.hide;return be===A&&(E||!Ke)}),b,a,c);F&&(N=F)}p&&(x==="number"||O!=="auto")&&(R=cu(T,b,"category"))}else p?N=Oh(0,_):s&&s[A]&&s[A].hasStack&&x==="number"?N=h==="expand"?[0,1]:XC(s[A].stackGroups,l,u):N=HC(T,i.filter(function(H){var Y=o in H.props?H.props[o]:H.type.defaultProps[o],re="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return Y===A&&(E||!re)}),x,c,!0);if(x==="number")N=E0(f,N,A,a,j),z&&(N=zg(z,N,S));else if(x==="category"&&z){var W=z,V=N.every(function(H){return W.indexOf(H)>=0});V&&(N=W)}}return B(B({},v),{},ie({},A,B(B({},y),{},{axisType:a,domain:N,categoricalDomain:R,duplicateDomain:M,originalDomain:(g=y.domain)!==null&&g!==void 0?g:I,isCategorical:p,layout:c})))},{})},Qce=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.layout,f=t.children,h=om(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=h.length,v=KC(c,a),m=-1;return n.reduce(function(g,y){var x=y.type.defaultProps!==void 0?B(B({},y.type.defaultProps),y.props):y.props,b=x[o],S=v2("number");if(!g[b]){m++;var w;return v?w=Oh(0,p):s&&s[b]&&s[b].hasStack?(w=XC(s[b].stackGroups,l,u),w=E0(f,w,b,a)):(w=zg(S,HC(h,n.filter(function(O){var j,E,A=o in O.props?O.props[o]:(j=O.type.defaultProps)===null||j===void 0?void 0:j[o],T="hide"in O.props?O.props.hide:(E=O.type.defaultProps)===null||E===void 0?void 0:E.hide;return A===b&&!T}),"number",c),i.defaultProps.allowDataOverflow),w=E0(f,w,b,a)),B(B({},g),{},ie({},b,B(B({axisType:a},i.defaultProps),{},{hide:!0,orientation:wr(qce,"".concat(a,".").concat(m%2),null),domain:w,originalDomain:S,isCategorical:v,layout:c})))}return g},{})},Jce=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=Yt(c,a),p={};return h&&h.length?p=Xce(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):o&&o.length&&(p=Qce(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),p},Zce=function(t){var r=Si(t),n=Kn(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:db(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:uh(r,n)}},sE=function(t){var r=t.children,n=t.defaultShowTooltip,i=yr(r,Ws),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},efe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Vn(r&&r.type);return n&&n.indexOf("Bar")>=0})},lE=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},tfe=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=n.width,c=n.height,f=n.children,h=n.margin||{},p=yr(f,Ws),v=yr(f,Br),m=Object.keys(l).reduce(function(w,O){var j=l[O],E=j.orientation;return!j.mirror&&!j.hide?B(B({},w),{},ie({},E,w[E]+j.width)):w},{left:h.left||0,right:h.right||0}),g=Object.keys(o).reduce(function(w,O){var j=o[O],E=j.orientation;return!j.mirror&&!j.hide?B(B({},w),{},ie({},E,wr(w,"".concat(E))+j.height)):w},{top:h.top||0,bottom:h.bottom||0}),y=B(B({},g),m),x=y.bottom;p&&(y.bottom+=p.props.height||Ws.defaultProps.height),v&&r&&(y=Xee(y,i,n,r));var b=u-y.left-y.right,S=c-y.top-y.bottom;return B(B({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(S,0)})},rfe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},Yb=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,u=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(y,x){var b=x.graphicalItems,S=x.stackGroups,w=x.offset,O=x.updateId,j=x.dataStartIndex,E=x.dataEndIndex,A=y.barSize,T=y.layout,_=y.barGap,N=y.barCategoryGap,M=y.maxBarSize,R=lE(T),I=R.numericAxisName,D=R.cateAxisName,z=efe(b),C=[];return b.forEach(function(F,W){var V=om(y.data,{graphicalItems:[F],dataStartIndex:j,dataEndIndex:E}),H=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Y=H.dataKey,re=H.maxBarSize,be=H["".concat(I,"Id")],Ke=H["".concat(D,"Id")],Se={},Pt=l.reduce(function(la,ua){var hm=x["".concat(ua.axisType,"Map")],aw=H["".concat(ua.axisType,"Id")];hm&&hm[aw]||ua.axisType==="zAxis"||ro();var ow=hm[aw];return B(B({},la),{},ie(ie({},ua.axisType,ow),"".concat(ua.axisType,"Ticks"),Kn(ow)))},Se),G=Pt[D],se=Pt["".concat(D,"Ticks")],le=S&&S[be]&&S[be].hasStack&&ste(F,S[be].stackGroups),U=Vn(F.type).indexOf("Bar")>=0,Ze=uh(G,se),ge=[],ct=z&&Gee({barSize:A,stackGroups:S,totalSize:rfe(Pt,D)});if(U){var ft,er,ci=ae(re)?M:re,jo=(ft=(er=uh(G,se,!0))!==null&&er!==void 0?er:ci)!==null&&ft!==void 0?ft:0;ge=Yee({barGap:_,barCategoryGap:N,bandSize:jo!==Ze?jo:Ze,sizeList:ct[Ke],maxBarSize:ci}),jo!==Ze&&(ge=ge.map(function(la){return B(B({},la),{},{position:B(B({},la.position),{},{offset:la.position.offset-jo/2})})}))}var Vc=F&&F.type&&F.type.getComposedData;Vc&&C.push({props:B(B({},Vc(B(B({},Pt),{},{displayedData:V,props:y,dataKey:Y,item:F,bandSize:Ze,barPosition:ge,offset:w,stackedData:le,layout:T,dataStartIndex:j,dataEndIndex:E}))),{},ie(ie(ie({key:F.key||"item-".concat(W)},I,Pt[I]),D,Pt[D]),"animationId",O)),childIndex:Y8(F,y.children),item:F})}),C},p=function(y,x){var b=y.props,S=y.dataStartIndex,w=y.dataEndIndex,O=y.updateId;if(!OS({props:b}))return null;var j=b.children,E=b.layout,A=b.stackOffset,T=b.data,_=b.reverseStackOrder,N=lE(E),M=N.numericAxisName,R=N.cateAxisName,I=Yt(j,n),D=ate(T,I,"".concat(M,"Id"),"".concat(R,"Id"),A,_),z=l.reduce(function(H,Y){var re="".concat(Y.axisType,"Map");return B(B({},H),{},ie({},re,Jce(b,B(B({},Y),{},{graphicalItems:I,stackGroups:Y.axisType===M&&D,dataStartIndex:S,dataEndIndex:w}))))},{}),C=tfe(B(B({},z),{},{props:b,graphicalItems:I}),x==null?void 0:x.legendBBox);Object.keys(z).forEach(function(H){z[H]=c(b,z[H],C,H.replace("Map",""),r)});var F=z["".concat(R,"Map")],W=Zce(F),V=h(b,B(B({},z),{},{dataStartIndex:S,dataEndIndex:w,updateId:O,graphicalItems:I,stackGroups:D,offset:C}));return B(B({formattedGraphicalItems:V,graphicalItems:I,offset:C,stackGroups:D},W),z)},v=function(g){function y(x){var b,S,w;return Ice(this,y),w=Lce(this,y,[x]),ie(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(w,"accessibilityManager",new wce),ie(w,"handleLegendBBoxUpdate",function(O){if(O){var j=w.state,E=j.dataStartIndex,A=j.dataEndIndex,T=j.updateId;w.setState(B({legendBBox:O},p({props:w.props,dataStartIndex:E,dataEndIndex:A,updateId:T},B(B({},w.state),{},{legendBBox:O}))))}}),ie(w,"handleReceiveSyncEvent",function(O,j,E){if(w.props.syncId===O){if(E===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(j)}}),ie(w,"handleBrushChange",function(O){var j=O.startIndex,E=O.endIndex;if(j!==w.state.dataStartIndex||E!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return B({dataStartIndex:j,dataEndIndex:E},p({props:w.props,dataStartIndex:j,dataEndIndex:E,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:j,dataEndIndex:E})}}),ie(w,"handleMouseEnter",function(O){var j=w.getMouseInfo(O);if(j){var E=B(B({},j),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseEnter;oe(A)&&A(E,O)}}),ie(w,"triggeredAfterMouseMove",function(O){var j=w.getMouseInfo(O),E=j?B(B({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(E),w.triggerSyncEvent(E);var A=w.props.onMouseMove;oe(A)&&A(E,O)}),ie(w,"handleItemMouseEnter",function(O){w.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),ie(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),ie(w,"handleMouseMove",function(O){O.persist(),w.throttleTriggeredAfterMouseMove(O)}),ie(w,"handleMouseLeave",function(O){w.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};w.setState(j),w.triggerSyncEvent(j);var E=w.props.onMouseLeave;oe(E)&&E(j,O)}),ie(w,"handleOuterEvent",function(O){var j=G8(O),E=wr(w.props,"".concat(j));if(j&&oe(E)){var A,T;/.*touch.*/i.test(j)?T=w.getMouseInfo(O.changedTouches[0]):T=w.getMouseInfo(O),E((A=T)!==null&&A!==void 0?A:{},O)}}),ie(w,"handleClick",function(O){var j=w.getMouseInfo(O);if(j){var E=B(B({},j),{},{isTooltipActive:!0});w.setState(E),w.triggerSyncEvent(E);var A=w.props.onClick;oe(A)&&A(E,O)}}),ie(w,"handleMouseDown",function(O){var j=w.props.onMouseDown;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"handleMouseUp",function(O){var j=w.props.onMouseUp;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),ie(w,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseDown(O.changedTouches[0])}),ie(w,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&w.handleMouseUp(O.changedTouches[0])}),ie(w,"handleDoubleClick",function(O){var j=w.props.onDoubleClick;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"handleContextMenu",function(O){var j=w.props.onContextMenu;if(oe(j)){var E=w.getMouseInfo(O);j(E,O)}}),ie(w,"triggerSyncEvent",function(O){w.props.syncId!==void 0&&wv.emit(Sv,w.props.syncId,O,w.eventEmitterSymbol)}),ie(w,"applySyncEvent",function(O){var j=w.props,E=j.layout,A=j.syncMethod,T=w.state.updateId,_=O.dataStartIndex,N=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)w.setState(B({dataStartIndex:_,dataEndIndex:N},p({props:w.props,dataStartIndex:_,dataEndIndex:N,updateId:T},w.state)));else if(O.activeTooltipIndex!==void 0){var M=O.chartX,R=O.chartY,I=O.activeTooltipIndex,D=w.state,z=D.offset,C=D.tooltipTicks;if(!z)return;if(typeof A=="function")I=A(C,O);else if(A==="value"){I=-1;for(var F=0;F=0){var le,U;if(M.dataKey&&!M.allowDuplicatedCategory){var Ze=typeof M.dataKey=="function"?se:"payload.".concat(M.dataKey.toString());le=Md(F,Ze,I),U=W&&V&&Md(V,Ze,I)}else le=F==null?void 0:F[R],U=W&&V&&V[R];if(Ke||be){var ge=O.props.activeIndex!==void 0?O.props.activeIndex:R;return[P.cloneElement(O,B(B(B({},A.props),Pt),{},{activeIndex:ge})),null,null]}if(!ae(le))return[G].concat(rl(w.renderActivePoints({item:A,activePoint:le,basePoint:U,childIndex:R,isRange:W})))}else{var ct,ft=(ct=w.getItemByXY(w.state.activeCoordinate))!==null&&ct!==void 0?ct:{graphicalItem:G},er=ft.graphicalItem,ci=er.item,jo=ci===void 0?O:ci,Vc=er.childIndex,la=B(B(B({},A.props),Pt),{},{activeIndex:Vc});return[P.cloneElement(jo,la),null,null]}return W?[G,null,null]:[G,null]}),ie(w,"renderCustomized",function(O,j,E){return P.cloneElement(O,B(B({key:"recharts-customized-".concat(E)},w.props),w.state))}),ie(w,"renderMap",{CartesianGrid:{handler:kf,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:kf},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:kf},YAxis:{handler:kf},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:po("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=zk(w.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),w.state={},w}return zce(y,g),Rce(y,[{key:"componentDidMount",value:function(){var b,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,S=b.children,w=b.data,O=b.height,j=b.layout,E=yr(S,_t);if(E){var A=E.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,_=T0(this.state,w,A,T),N=this.state.tooltipTicks[A].coordinate,M=(this.state.offset.top+O)/2,R=j==="horizontal",I=R?{x:N,y:M}:{y:N,x:M},D=this.state.formattedGraphicalItems.find(function(C){var F=C.item;return F.type.name==="Scatter"});D&&(I=B(B({},I),D.props.points[A].tooltipPosition),_=D.props.points[A].tooltipPayload);var z={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:T,activePayload:_,activeCoordinate:I};this.setState(z),this.renderCursor(E),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var w,O;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(b){rg([yr(b.children,_t)],[yr(this.props.children,_t)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=yr(this.props.children,_t);if(b&&typeof b.props.shared=="boolean"){var S=b.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var S=this.container,w=S.getBoundingClientRect(),O=wX(w),j={chartX:Math.round(b.pageX-O.left),chartY:Math.round(b.pageY-O.top)},E=w.width/S.offsetWidth||1,A=this.inRange(j.chartX,j.chartY,E);if(!A)return null;var T=this.state,_=T.xAxisMap,N=T.yAxisMap,M=this.getTooltipEventType(),R=oE(this.state,this.props.data,this.props.layout,A);if(M!=="axis"&&_&&N){var I=Si(_).scale,D=Si(N).scale,z=I&&I.invert?I.invert(j.chartX):null,C=D&&D.invert?D.invert(j.chartY):null;return B(B({},j),{},{xValue:z,yValue:C},R)}return R?B(B({},j),R):null}},{key:"inRange",value:function(b,S){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,j=b/w,E=S/w;if(O==="horizontal"||O==="vertical"){var A=this.state.offset,T=j>=A.left&&j<=A.left+A.width&&E>=A.top&&E<=A.top+A.height;return T?{x:j,y:E}:null}var _=this.state,N=_.angleAxisMap,M=_.radiusAxisMap;if(N&&M){var R=Si(N);return Cj({x:j,y:E},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,S=this.getTooltipEventType(),w=yr(b,_t),O={};w&&S==="axis"&&(w.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=Id(this.props,this.handleOuterEvent);return B(B({},j),O)}},{key:"addListener",value:function(){wv.on(Sv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){wv.removeListener(Sv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,S,w){for(var O=this.state.formattedGraphicalItems,j=0,E=O.length;j{const i=ife.find(s=>s.value===t);if(!i)return[];const a=new Date,o=new Map;for(let s=0;s{const l=new Date(s.createdAt),u=qi(Jy(l),"yyyy-MM-dd"),c=o.get(u)||0;o.set(u,c+1)}),Array.from(o.entries()).map(([s,l])=>({date:s,experiments:l,displayDate:qi(new Date(s),"MMM dd")})).sort((s,l)=>s.date.localeCompare(l.date))},[e,t]),n=P.useMemo(()=>e.length,[e]);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Timeline"}),d.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n]})]}),d.jsx(Zi,{width:"100%",height:260,children:d.jsxs(sm,{data:r,margin:{left:0,right:15,top:15,bottom:15},children:[d.jsx(Ys,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),d.jsx(ri,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),d.jsx(ni,{tick:{fontSize:10},width:40,label:{value:"Count",angle:-90,position:"insideLeft",offset:8,style:{textAnchor:"middle",fontSize:11}}}),d.jsx(_t,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px"},content:({active:i,payload:a,label:o})=>{if(!i||!a||!a.length)return null;const s=a[0].payload;return d.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[d.jsx("div",{className:"text-xs font-medium mb-1.5",children:o}),d.jsx("div",{className:"space-y-0.5 text-xs",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Launched:"}),d.jsx("span",{className:"font-medium ml-auto",children:s.experiments})]})})]})}}),d.jsx(Br,{wrapperStyle:{fontSize:"11px"},iconType:"circle",iconSize:8}),d.jsx(_n,{type:"monotone",dataKey:"experiments",stroke:"#a78bfa",strokeWidth:2,dot:{fill:"#a78bfa",r:3},activeDot:{r:5},name:"Launched"})]})})]})}const uE={COMPLETED:"#22c55e",RUNNING:"#3b82f6",FAILED:"#ef4444",PENDING:"#eab308",CANCELLED:"#6b7280",UNKNOWN:"#a78bfa"};function ofe({experiments:e}){const t=P.useMemo(()=>{const r=new Map;return e.forEach(n=>{const i=n.status,a=r.get(i)||0;r.set(i,a+1)}),Array.from(r.entries()).map(([n,i])=>({name:n,value:i,color:uE[n]||uE.UNKNOWN})).sort((n,i)=>i.value-n.value)},[e]);return t.length===0?d.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No data available"}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-semibold",children:"Experiments Distribution"}),d.jsx(Zi,{width:"100%",height:220,children:d.jsxs(Xb,{margin:{top:20,bottom:5},children:[d.jsx(dn,{data:t,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:58,label:({name:r,value:n})=>`${r}: ${n}`,style:{fontSize:"11px"},children:t.map((r,n)=>d.jsx(mo,{fill:r.color},`cell-${n}`))}),d.jsx(_t,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"11px"}}),d.jsx(Br,{wrapperStyle:{fontSize:"11px"}})]})})]})}const sfe=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function lfe({data:e,timeRange:t}){const r=P.useMemo(()=>{const o=sfe.find(u=>u.value===t);if(!o)return[];const s=new Date,l=new Map;for(let u=0;u{const c=qi(new Date(u.date),"yyyy-MM-dd");l.has(c)&&l.set(c,{totalTokens:u.totalTokens,inputTokens:u.inputTokens,outputTokens:u.outputTokens})}),Array.from(l.entries()).map(([u,c])=>({date:u,displayDate:qi(new Date(u),"MMM dd"),totalTokens:c.totalTokens,inputTokens:c.inputTokens,outputTokens:c.outputTokens})).sort((u,c)=>u.date.localeCompare(c.date))},[e,t]),n=P.useMemo(()=>r.reduce((o,s)=>o+s.totalTokens,0),[r]),i=P.useMemo(()=>r.reduce((o,s)=>o+s.inputTokens,0),[r]),a=P.useMemo(()=>r.reduce((o,s)=>o+s.outputTokens,0),[r]);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"text-sm font-semibold",children:"Token Usage"}),d.jsxs("div",{className:"text-xs text-muted-foreground",children:["Total: ",n.toLocaleString()," (",i.toLocaleString(),"↓ ",a.toLocaleString(),"↑)"]})]}),d.jsx(Zi,{width:"100%",height:260,children:d.jsxs(sm,{data:r,margin:{left:0,right:15,top:15,bottom:15},children:[d.jsx(Ys,{strokeDasharray:"3 3",stroke:"#e2e8f0",opacity:.5}),d.jsx(ri,{dataKey:"displayDate",tick:{fontSize:10},angle:-45,textAnchor:"end",height:70}),d.jsx(ni,{tick:{fontSize:10},width:40,tickFormatter:o=>o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}K`:o.toString(),label:{value:"Tokens",angle:-90,position:"insideLeft",offset:8,style:{textAnchor:"middle",fontSize:11}}}),d.jsx(_t,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:"12px"},content:({active:o,payload:s,label:l})=>{if(!o||!s||!s.length)return null;const u=s[0].payload;return d.jsxs("div",{className:"bg-card border border-border rounded-md p-2 shadow-sm",children:[d.jsx("div",{className:"text-xs font-medium mb-1.5",children:l}),d.jsxs("div",{className:"space-y-0.5 text-xs",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Total:"}),d.jsx("span",{className:"font-medium ml-auto",children:u.totalTokens.toLocaleString()})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Input:"}),d.jsx("span",{className:"font-medium ml-auto",children:u.inputTokens.toLocaleString()})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Output:"}),d.jsx("span",{className:"font-medium ml-auto",children:u.outputTokens.toLocaleString()})]})]})]})}}),d.jsx(Br,{wrapperStyle:{fontSize:"11px"},iconType:"circle",iconSize:8}),d.jsx(_n,{type:"monotone",dataKey:"totalTokens",stroke:"#3b82f6",strokeWidth:2,dot:{fill:"#3b82f6",r:3},activeDot:{r:5},name:"Total"}),d.jsx(_n,{type:"monotone",dataKey:"inputTokens",stroke:"#10b981",strokeWidth:2,dot:{fill:"#10b981",r:3},activeDot:{r:5},name:"Input"}),d.jsx(_n,{type:"monotone",dataKey:"outputTokens",stroke:"#f59e0b",strokeWidth:2,dot:{fill:"#f59e0b",r:3},activeDot:{r:5},name:"Output"})]})})]})}const cE=[{value:"7days",label:"7 Days",days:7},{value:"1month",label:"1 Month",days:30},{value:"3months",label:"3 Months",days:90}];function ufe(){var f;const{selectedTeamId:e}=fo(),[t,r]=P.useState("7days"),{data:n,isLoading:i}=T5(e||""),{data:a,isLoading:o}=eB(e||"",{enabled:!!e}),s=((f=cE.find(h=>h.value===t))==null?void 0:f.days)||30,{data:l,isLoading:u}=tB(e||"",s),c=P.useMemo(()=>{if(!a)return[];const h=new Date,p=t==="7days"?Wx(h,7):t==="1month"?Zy(h,1):Zy(h,3);return a.filter(v=>{const m=new Date(v.createdAt);return m>=p&&m<=h})},[a,t]);return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"pb-2 border-b",children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),e&&d.jsxs("p",{className:"mt-0.5 text-muted-foreground font-mono text-xs",children:["TeamID: ",e]})]}),d.jsx("div",{children:d.jsx("h2",{className:"text-base font-semibold text-foreground mb-2",children:"Overview"})}),i?d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[d.jsx(Te,{className:"h-14 w-full"}),d.jsx(Te,{className:"h-14 w-full"}),d.jsx(Te,{className:"h-14 w-full"})]}):d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5",children:[d.jsx(de,{children:d.jsx(he,{className:"p-3",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"PROJECTS"}),d.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalProjects)||0})]}),d.jsx("div",{className:"p-1.5 bg-blue-100 rounded-lg",children:d.jsx(iN,{className:"h-3.5 w-3.5 text-blue-600"})})]})})}),d.jsx(de,{children:d.jsx(he,{className:"p-3",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"EXPERIMENTS"}),d.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalExperiments)||0})]}),d.jsx("div",{className:"p-1.5 bg-purple-100 rounded-lg",children:d.jsx(yF,{className:"h-3.5 w-3.5 text-purple-600"})})]})})}),d.jsx(de,{children:d.jsx(he,{className:"p-3",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"space-y-0.5",children:[d.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"RUNS"}),d.jsx("p",{className:"text-lg font-bold tabular-nums text-foreground",children:(n==null?void 0:n.totalRuns)||0})]}),d.jsx("div",{className:"p-1.5 bg-green-100 rounded-lg",children:d.jsx(TF,{className:"h-3.5 w-3.5 text-green-600"})})]})})})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Activity"}),d.jsx("div",{className:"flex gap-1",children:cE.map(h=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>r(h.value),className:`h-8 px-2.5 text-xs transition-colors ${t===h.value?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:h.label},h.value))})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(de,{children:d.jsx(he,{className:"p-4",children:o?d.jsx(Te,{className:"h-56 w-full"}):c&&c.length>0?d.jsx(ofe,{experiments:c}):d.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})}),d.jsx(de,{children:d.jsx(he,{className:"p-4",children:o?d.jsx(Te,{className:"h-56 w-full"}):c&&c.length>0?d.jsx(afe,{experiments:c,timeRange:t}):d.jsx("div",{className:"flex h-56 items-center justify-center text-sm text-muted-foreground",children:"No experiments data available for this time range"})})})]}),d.jsx(de,{children:d.jsx(he,{className:"p-4",children:u?d.jsx(Te,{className:"h-80 w-full"}):l?d.jsx(lfe,{data:l,timeRange:t}):d.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No token usage data available for this time range"})})})]})]})}const xo=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:r,className:Oe("w-full caption-bottom text-sm",e),...t})}));xo.displayName="Table";const bo=P.forwardRef(({className:e,...t},r)=>d.jsx("thead",{ref:r,className:Oe("[&_tr]:border-b",e),...t}));bo.displayName="TableHeader";const wo=P.forwardRef(({className:e,...t},r)=>d.jsx("tbody",{ref:r,className:Oe("[&_tr:last-child]:border-0",e),...t}));wo.displayName="TableBody";const cfe=P.forwardRef(({className:e,...t},r)=>d.jsx("tfoot",{ref:r,className:Oe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));cfe.displayName="TableFooter";const Or=P.forwardRef(({className:e,...t},r)=>d.jsx("tr",{ref:r,className:Oe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Or.displayName="TableRow";const Re=P.forwardRef(({className:e,...t},r)=>d.jsx("th",{ref:r,className:Oe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Re.displayName="TableHead";const Le=P.forwardRef(({className:e,...t},r)=>d.jsx("td",{ref:r,className:Oe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Le.displayName="TableCell";const ffe=P.forwardRef(({className:e,...t},r)=>d.jsx("caption",{ref:r,className:Oe("mt-4 text-sm text-muted-foreground",e),...t}));ffe.displayName="TableCaption";const So=P.forwardRef(({className:e,type:t,...r},n)=>d.jsx("input",{type:t,className:Oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));So.displayName="Input";const fE=20;function dfe(){const{selectedTeamId:e}=fo(),[t,r]=P.useState(1),[n,i]=P.useState(""),{data:a,isLoading:o,error:s}=fp(e||"",{page:t-1,pageSize:fE,enabled:!!e}),l=P.useMemo(()=>{if(!a)return[];let u=[...a];if(n.trim()){const c=n.toLowerCase();u=u.filter(f=>{var h,p,v;return((h=f.name)==null?void 0:h.toLowerCase().includes(c))||((p=f.description)==null?void 0:p.toLowerCase().includes(c))||((v=f.id)==null?void 0:v.toLowerCase().includes(c))})}return u.sort((c,f)=>new Date(f.createdAt).getTime()-new Date(c.createdAt).getTime()),u},[a,n]);return o?d.jsxs("div",{className:"space-y-4",children:[d.jsx(Te,{className:"h-12 w-64"}),d.jsx(Te,{className:"h-64 w-full"})]}):e?s?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load projects"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:s.message})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{children:d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Projects"})}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("div",{className:"flex gap-2 mb-3 items-center",children:d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ja,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(So,{placeholder:"Search projects...",value:n,onChange:u=>i(u.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]})}),!a||a.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No projects found"}):l.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No projects match your search"}):d.jsxs(d.Fragment,{children:[d.jsxs(xo,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"UUID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Name"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"})]})}),d.jsx(wo,{children:l.map(u=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 font-mono text-sm",children:d.jsx(Tn,{to:`/projects/${u.id}`,className:"text-primary font-medium hover:underline",children:u.id})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:u.name||"Unnamed Project"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:u.description||"-"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:an(new Date(u.createdAt),{addSuffix:!0})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:an(new Date(u.updatedAt),{addSuffix:!0})})]},u.id))})]}),d.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[d.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",t]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{r(t-1),window.scrollTo({top:0,behavior:"smooth"})},disabled:t===1,className:"h-9 w-9 p-0",children:d.jsx(cp,{className:"h-4 w-4"})}),d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{r(t+1),window.scrollTo({top:0,behavior:"smooth"})},disabled:a.lengthd.jsx(Qb.Provider,{value:{value:t,onValueChange:r},children:d.jsx("div",{ref:i,className:Oe("w-full",e),...n})}));lm.displayName="Tabs";const um=P.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));um.displayName="TabsList";const io=P.forwardRef(({className:e,value:t,...r},n)=>{const i=P.useContext(Qb);if(!i)throw new Error("TabsTrigger must be used within Tabs");const a=i.value===t;return d.jsx("button",{ref:n,className:Oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground",e),onClick:()=>i.onValueChange(t),...r})});io.displayName="TabsTrigger";const ao=P.forwardRef(({className:e,value:t,...r},n)=>{const i=P.useContext(Qb);if(!i)throw new Error("TabsContent must be used within Tabs");return i.value!==t?null:d.jsx("div",{ref:n,className:Oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r})});ao.displayName="TabsContent";const hfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},dE=20;function pfe(){const{id:e}=np(),[t,r]=P.useState("overview"),[n,i]=P.useState(1),[a,o]=P.useState(""),[s,l]=P.useState("ALL"),{data:u,isLoading:c,error:f}=bN(e),{data:h,isLoading:p,error:v}=Nd(e,{page:n-1,pageSize:dE,enabled:!!e}),{data:m}=Nd(e,{page:0,pageSize:1e3,enabled:!!e}),g=P.useMemo(()=>{if(!h)return[];let x=[...h];if(a.trim()){const b=a.toLowerCase();x=x.filter(S=>{var w,O,j;return((w=S.name)==null?void 0:w.toLowerCase().includes(b))||((O=S.description)==null?void 0:O.toLowerCase().includes(b))||((j=S.id)==null?void 0:j.toLowerCase().includes(b))})}return s!=="ALL"&&(x=x.filter(b=>b.status===s)),x.sort((b,S)=>new Date(S.createdAt).getTime()-new Date(b.createdAt).getTime()),x},[h,a,s]),y=P.useMemo(()=>!m||m.length===0?[]:[{name:"COMPLETED",value:m.filter(b=>b.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:m.filter(b=>b.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:m.filter(b=>b.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:m.filter(b=>b.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:m.filter(b=>b.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:m.filter(b=>b.status==="UNKNOWN").length,color:"#a78bfa"}].filter(b=>b.value>0),[m]);return c?d.jsxs("div",{className:"space-y-4",children:[d.jsx(Te,{className:"h-12 w-64"}),d.jsx(Te,{className:"h-64 w-full"})]}):f||!u?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load project"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:(f==null?void 0:f.message)||"Project not found"})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name||"Unnamed Project"}),d.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),d.jsxs(lm,{value:t,onValueChange:r,children:[d.jsxs(um,{children:[d.jsx(io,{value:"overview",children:"Overview"}),d.jsx(io,{value:"experiments",children:"Experiments"})]}),d.jsx(ao,{value:"overview",className:"space-y-4",children:d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),d.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:an(new Date(u.createdAt),{addSuffix:!0})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:an(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).map(([x,b])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:x}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof b=="string"?b:JSON.stringify(b)})]},x))})]}),m&&m.length>0&&y.length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",m.length," experiments)"]}),d.jsx(Zi,{width:"100%",height:180,children:d.jsxs(Xb,{margin:{top:20,bottom:5},children:[d.jsx(dn,{data:y,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:x,value:b})=>`${x}: ${b}`,style:{fontSize:"12px"},children:y.map((x,b)=>d.jsx(mo,{fill:x.color},`cell-${b}`))}),d.jsx(_t,{}),d.jsx(Br,{wrapperStyle:{fontSize:"12px"}})]})})]})]})})}),d.jsx(ao,{value:"experiments",className:"space-y-4",children:d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ja,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(So,{placeholder:"Search experiments...",value:a,onChange:x=>o(x.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(x=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>l(x),className:`h-8 px-2.5 text-xs transition-colors ${s===x?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:x},x))})]}),p?d.jsx(Te,{className:"h-24 w-full"}):v?d.jsxs("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-3",children:[d.jsx("p",{className:"text-sm font-medium text-destructive",children:"Failed to load experiments"}),d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:v.message})]}):!h||h.length===0?d.jsxs("div",{className:"flex flex-col items-center justify-center h-24 text-center",children:[d.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"No experiments found"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Create experiments using the AlphaTrion SDK"})]}):g.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No experiments match your search"}):d.jsxs(d.Fragment,{children:[d.jsxs(xo,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"UUID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Name"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(wo,{children:g.map(x=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(Tn,{to:`/experiments/${x.id}`,className:"font-mono text-primary font-medium hover:underline",children:x.id})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:x.name}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:hfe[x.status],className:"text-xs px-2 py-0.5",children:x.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground tabular-nums",children:x.duration>0?`${x.duration.toFixed(2)}s`:"-"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:an(new Date(x.createdAt),{addSuffix:!0})})]},x.id))})]}),d.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[d.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",n]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n-1),window.scrollTo({top:0,behavior:"smooth"})},disabled:n===1,className:"h-9 w-9 p-0",children:d.jsx(cp,{className:"h-4 w-4"})}),d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n+1),window.scrollTo({top:0,behavior:"smooth"})},disabled:h.length{if(!l)return[];let p=[...l];if(n.trim()){const v=n.toLowerCase();p=p.filter(m=>{var g,y,x,b;return((g=m.name)==null?void 0:g.toLowerCase().includes(v))||((y=m.description)==null?void 0:y.toLowerCase().includes(v))||((x=m.id)==null?void 0:x.toLowerCase().includes(v))||((b=m.projectId)==null?void 0:b.toLowerCase().includes(v))})}return t!=="ALL"&&(p=p.filter(v=>v.status===t)),p.sort((v,m)=>new Date(m.createdAt).getTime()-new Date(v.createdAt).getTime()),p},[l,t,n]),f=o||u;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Experiments"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and manage experiments"})]}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ja,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(So,{placeholder:"Search experiments...",value:n,onChange:p=>i(p.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(p=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>r(p),className:`h-8 px-2.5 text-xs transition-colors ${t===p?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:p},p))})]}),f?d.jsx(Te,{className:"h-24 w-full"}):!c||c.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No experiments match your search":t!=="ALL"?`No ${t} experiments found`:"No experiments found"}):d.jsxs(xo,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Name"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Experiment ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Project ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(wo,{children:c.map(p=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:p.name}),d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(Tn,{to:`/experiments/${p.id}`,className:"font-mono text-primary font-medium hover:underline",children:p.id})}),d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(Tn,{to:`/projects/${p.projectId}`,className:"font-mono text-primary font-medium hover:underline",children:p.projectId})}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:mfe[p.status],className:"text-xs px-2 py-0.5",children:p.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground tabular-nums",children:p.duration>0?`${p.duration.toFixed(2)}s`:"-"}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:an(new Date(p.createdAt),{addSuffix:!0})})]},p.id))})]})]})})]})}function y2(e){const{data:t,...r}=dp(e),n=P.useMemo(()=>{const i={};return((t==null?void 0:t.metrics)||[]).forEach(o=>{const s=o.key||"unknown";i[s]||(i[s]=[]),i[s].push(o)}),Object.keys(i).forEach(o=>{i[o].sort((s,l)=>new Date(s.createdAt).getTime()-new Date(l.createdAt).getTime())}),i},[t==null?void 0:t.metrics]);return{...r,data:n,metricKeys:Object.keys(n)}}const yfe="modulepreload",gfe=function(e){return"/static/"+e},hE={},xfe=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=gfe(l),l in hE)return;hE[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":yfe,u||(f.as="script"),f.crossOrigin="",f.href=l,s&&f.setAttribute("nonce",s),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};function bfe(e){const{data:t,...r}=dp(e),{runMetrics:n,availableMetrics:i}=P.useMemo(()=>{const a=(t==null?void 0:t.metrics)||[];if(a.length===0)return{runMetrics:[],availableMetrics:[]};const o=new Map,s=new Set;[...a].sort((c,f)=>new Date(c.createdAt).getTime()-new Date(f.createdAt).getTime()).forEach(c=>{!c.key||c.value===null||(s.add(c.key),o.has(c.runId)||o.set(c.runId,new Map),o.get(c.runId).set(c.key,c.value))});const u=[];return o.forEach((c,f)=>{const h={};c.forEach((p,v)=>{h[v]=p}),u.push({runId:f,metrics:h})}),{runMetrics:u,availableMetrics:Array.from(s).sort()}},[t==null?void 0:t.metrics]);return{...r,runMetrics:n,availableMetrics:i}}function wfe(e,t,r){let n=!1;for(const i of r){const a=e.metrics[i.key],o=t.metrics[i.key];if(a===void 0||o===void 0)return!1;if(i.direction==="maximize"){if(ao&&(n=!0)}else{if(a>o)return!1;axfe(()=>import("./react-plotly-vwUBUZui.js").then(e=>e.r),[])),pi=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981","#ef4444","#6366f1","#14b8a6"],pE="#10b981",mE="#9ca3af",vE="#f59e0b";function jfe({metrics:e,experimentId:t,title:r="Metrics",description:n}){const i=Object.keys(e),[a,o]=P.useState(i[0]||""),[s,l]=P.useState("timeline"),[u,c]=P.useState([]),{runMetrics:f,availableMetrics:h}=bfe(t),p=P.useMemo(()=>{const j=[];return Object.values(e).forEach(E=>{j.push(...E)}),j.length===0?null:j[0].runId},[e]),v=P.useMemo(()=>u.length===0?f:f.filter(j=>u.every(E=>j.metrics[E.key]!==void 0)),[f,u]),m=P.useMemo(()=>u.length<2||v.length<2?new Set:Sfe(v,u),[v,u]),g=P.useMemo(()=>{var E;if(i.length===0||!a)return[];const j=[];return e[a]&&e[a].forEach((A,T)=>{A.value!==null&&j.push({timestamp:new Date(A.createdAt).getTime(),index:T,time:qi(new Date(A.createdAt),"MMM dd HH:mm:ss"),value:A.value,runId:A.runId})}),j.sort((A,T)=>A.timestamp-T.timestamp),j.forEach((A,T)=>{A.index=T}),console.log("[MetricsChart] Selected key:",a),console.log("[MetricsChart] Total metrics for this key:",(E=e[a])==null?void 0:E.length),console.log("[MetricsChart] Total data points after processing:",j.length),console.log("[MetricsChart] All data points:",j),j},[e,i,a]),y=P.useMemo(()=>{if(u.length<2)return{all:[],paretoLine:[]};const j=u[0],E=u[1],A=u.length>=3?u[2]:void 0,T=v.map(N=>({runId:N.runId,x:N.metrics[j.key],y:N.metrics[E.key],z:A?N.metrics[A.key]:void 0,isParetoOptimal:m.has(N.runId),metrics:N.metrics})),_=T.filter(N=>N.isParetoOptimal).sort((N,M)=>N.x-M.x);return{all:T,paretoLine:_}},[v,u,m]),x=P.useMemo(()=>{if(u.length!==3||y.all.length===0)return null;const j=[...y.paretoLine].sort((N,M)=>N.x!==M.x?N.x-M.x:N.y!==M.y?N.y-M.y:(N.z||0)-(M.z||0)),E=y.all.find(N=>N.runId===p),A=j.filter(N=>N.runId!==p),T=y.all.filter(N=>!N.isParetoOptimal&&N.runId!==p),_=[{x:T.map(N=>N.x),y:T.map(N=>N.y),z:T.map(N=>N.z),mode:"markers",type:"scatter3d",name:"Dominated",showlegend:!1,marker:{size:5,color:mE,opacity:.4,symbol:"circle",line:{color:"#6b7280",width:1,opacity:.3}},customdata:T.map(N=>[N.runId,N.x,N.y,N.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fafafa",bordercolor:"#d1d5db",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}},{x:A.map(N=>N.x),y:A.map(N=>N.y),z:A.map(N=>N.z),mode:"markers",type:"scatter3d",name:"Pareto Optimal",showlegend:!1,marker:{size:5,color:pE,symbol:"circle",opacity:.95,line:{color:"#059669",width:1,opacity:.8}},customdata:A.map(N=>[N.runId,N.x,N.y,N.z]),hovertemplate:`Run: %{customdata[0]}
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#f0fdf4",bordercolor:"#86efac",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}];return E&&_.push({x:[E.x],y:[E.y],z:[E.z],mode:"markers",type:"scatter3d",name:"Start Point",showlegend:!1,marker:{size:5,color:vE,symbol:"circle",opacity:1,line:{color:"#d97706",width:1,opacity:1}},customdata:[[E.runId,E.x,E.y,E.z]],hovertemplate:`Run: %{customdata[0]} (StartPoint)
${u[0].key}: %{customdata[1]:.4f}
${u[1].key}: %{customdata[2]:.4f}
${u[2].key}: %{customdata[3]:.4f}`,hoverlabel:{bgcolor:"#fef3c7",bordercolor:"#fcd34d",font:{family:"system-ui, -apple-system, sans-serif",size:12,color:"#374151"},align:"left"}}),_},[y,u,p]),b=j=>{o(j)},S=j=>{u.length>=3||u.some(E=>E.key===j)||c([...u,{key:j,direction:"maximize"}])},w=j=>{c(u.filter(E=>E.key!==j))},O=j=>{c(u.map(E=>E.key===j?{...E,direction:E.direction==="maximize"?"minimize":"maximize"}:E))};return i.length===0?d.jsxs(de,{children:[d.jsxs(Ft,{className:"pb-3",children:[d.jsx(Bt,{className:"text-sm",children:r}),n&&d.jsx(dr,{className:"text-xs",children:n})]}),d.jsx(he,{children:d.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"No metrics data available"})})]}):d.jsxs(de,{children:[d.jsxs(Ft,{className:"pb-3",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx(Bt,{className:"text-sm",children:r}),n&&d.jsx(dr,{className:"text-xs",children:n})]}),d.jsxs("div",{className:"flex gap-1",children:[d.jsx(lt,{variant:s==="timeline"?"default":"outline",size:"sm",onClick:()=>l("timeline"),className:"h-7 px-3 text-xs",children:"Timeline"}),d.jsx(lt,{variant:s==="pareto"?"default":"outline",size:"sm",onClick:()=>l("pareto"),className:"h-7 px-3 text-xs",children:"Pareto"})]})]}),s==="timeline"?d.jsx("div",{className:"flex flex-wrap gap-1.5 pt-3",children:i.map((j,E)=>d.jsx(jr,{variant:a===j?"default":"outline",className:"cursor-pointer text-xs px-2 py-0.5",style:{backgroundColor:a===j?pi[E%pi.length]:void 0},onClick:()=>b(j),children:j},j))}):d.jsxs("div",{className:"space-y-2 pt-3",children:[d.jsx("div",{className:"flex flex-wrap gap-1.5",children:h.map((j,E)=>{const A=u.find(_=>_.key===j),T=(A==null?void 0:A.direction)==="maximize";return d.jsxs(jr,{variant:A?"default":"outline",className:"cursor-pointer text-xs px-2 py-1 transition-colors relative",style:{backgroundColor:A?pi[E%pi.length]:void 0,borderColor:A?pi[E%pi.length]:void 0},onClick:()=>{A?O(j):u.length<3&&S(j)},onContextMenu:_=>{_.preventDefault(),A&&w(j)},children:[j,A&&d.jsx("span",{className:"ml-1 text-[10px] opacity-90",children:T?"↑":"↓"})]},j)})}),u.length>0&&d.jsx("div",{className:"text-xs text-gray-500 italic",children:"Click: toggle direction ↑↓ • Right-click: remove"}),d.jsx("div",{className:"text-xs text-muted-foreground",children:u.length===0?d.jsx("span",{children:"Click metrics to select (up to 3)"}):u.length<2?d.jsx("span",{children:"Select at least 2 metrics for analysis"}):d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("span",{children:["Runs: ",v.length]}),m.size>0&&d.jsxs("span",{className:"text-emerald-600 font-medium",children:["Pareto Optimal: ",m.size]})]})})]})]}),d.jsx(he,{className:"pt-0",children:s==="timeline"?a?d.jsx(Zi,{width:"100%",height:280,children:d.jsxs(sm,{data:g,margin:{top:5,right:20,left:10,bottom:5},onClick:j=>{if(j&&j.activePayload&&j.activePayload[0]){const E=j.activePayload[0].payload;E.runId&&window.open(`/runs/${E.runId}`,"_blank")}},children:[d.jsx(Ys,{strokeDasharray:"3 3"}),d.jsx(ri,{dataKey:"index",label:{value:"Index",position:"insideBottom",offset:-5,style:{fontSize:12}},type:"number",domain:["dataMin","dataMax"],tick:{fontSize:11}}),d.jsx(ni,{label:{value:"Value",angle:-90,position:"insideLeft",style:{fontSize:12}},tick:{fontSize:11}}),d.jsx(_t,{cursor:{strokeDasharray:"5 5",stroke:"#94a3b8",strokeWidth:1},contentStyle:{backgroundColor:"transparent",border:"none",padding:0},content:({active:j,payload:E})=>{if(!j||!E||E.length===0)return null;const A=E[0].payload;return A.runId?d.jsxs("div",{style:{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",fontFamily:"system-ui, -apple-system, sans-serif",lineHeight:"1.4"},children:[d.jsxs("div",{style:{fontWeight:600,fontSize:"12px"},children:["Run: ",A.runId]}),d.jsxs("div",{style:{fontSize:"12px"},children:[a,": ",typeof A.value=="number"?A.value.toFixed(4):A.value]})]}):null}}),d.jsx(_n,{type:"monotone",dataKey:"value",name:a,stroke:pi[i.indexOf(a)%pi.length],strokeWidth:2,dot:{r:3,style:{cursor:"pointer"}},activeDot:{r:5,style:{cursor:"pointer"}},connectNulls:!0})]})}):d.jsx("div",{className:"flex h-48 items-center justify-center text-sm text-muted-foreground",children:"Select a metric to display"}):u.length<2?d.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"Select at least 2 metrics for Pareto analysis"}):y.all.length===0?d.jsx("div",{className:"flex h-80 items-center justify-center text-sm text-muted-foreground",children:"No runs with complete data for selected metrics"}):u.length===3?d.jsxs("div",{className:"w-full h-[550px] rounded-lg overflow-hidden",style:{background:"linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%)"},children:[d.jsx("style",{children:` + #pareto-3d-plot .nsewdrag { + cursor: default !important; + } + #pareto-3d-plot .nsewdrag.cursor-crosshair { + cursor: default !important; + } + `}),d.jsx(P.Suspense,{fallback:d.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:d.jsxs("div",{className:"text-center space-y-2",children:[d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-500 mx-auto"}),d.jsx("div",{children:"Loading 3D visualization..."})]})}),children:d.jsx(Ofe,{divId:"pareto-3d-plot",data:x,onInitialized:(j,E)=>{E.on("plotly_click",A=>{var T;if(A&&A.points&&A.points[0]){const N=(T=A.points[0].customdata)==null?void 0:T[0];N&&window.open(`/runs/${N}`,"_blank")}})},onUpdate:(j,E)=>{E.removeAllListeners("plotly_click"),E.on("plotly_click",A=>{var T;if(A&&A.points&&A.points[0]){const N=(T=A.points[0].customdata)==null?void 0:T[0];N&&window.open(`/runs/${N}`,"_blank")}})},layout:{autosize:!0,transition:{duration:0},scene:{xaxis:{title:{text:`${u[0].key} (${u[0].direction})`,font:{size:12,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},yaxis:{title:{text:`${u[1].key} (${u[1].direction})`,font:{size:12,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},zaxis:{title:{text:`${u[2].key} (${u[2].direction})`,font:{size:12,color:"#374151",family:"system-ui"}},gridcolor:"#e5e7eb",gridwidth:1,showbackground:!0,backgroundcolor:"#fafafa",tickfont:{size:10,color:"#6b7280"}},camera:{eye:{x:1.7,y:1.7,z:1.3},center:{x:0,y:0,z:0},up:{x:0,y:0,z:1}},aspectmode:"cube"},showlegend:!1,hovermode:"closest",margin:{l:10,r:10,t:10,b:10},paper_bgcolor:"rgba(0,0,0,0)",plot_bgcolor:"rgba(0,0,0,0)",dragmode:"orbit"},config:{responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["toImage"],modeBarButtonsToAdd:[]},style:{width:"100%",height:"100%"}})})]}):d.jsx(Zi,{width:"100%",height:400,children:d.jsxs(nfe,{margin:{top:20,right:20,bottom:60,left:60},children:[d.jsx(Ys,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),d.jsx(ri,{type:"number",dataKey:"x",name:u[0].key,label:{value:`${u[0].key} (${u[0].direction})`,position:"insideBottom",offset:-10,style:{fontSize:12,fill:"#374151"}},tick:{fontSize:11,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),d.jsx(ni,{type:"number",dataKey:"y",name:u[1].key,label:{value:`${u[1].key} (${u[1].direction})`,angle:-90,position:"insideLeft",style:{fontSize:12,fill:"#374151"}},tick:{fontSize:11,fill:"#6b7280"},domain:["dataMin - 0.1 * abs(dataMin)","dataMax + 0.1 * abs(dataMax)"]}),d.jsx(_t,{cursor:{strokeDasharray:"3 3"},content:({active:j,payload:E})=>{var R,I;if(!j||!E||!E[0])return null;const A=E[0].payload,T=A.runId===p,_=A.isParetoOptimal,N=T?"#fef3c7":_?"#f0fdf4":"#fafafa",M=T?"#fcd34d":_?"#86efac":"#d1d5db";return d.jsxs("div",{style:{backgroundColor:N,border:`1px solid ${M}`,borderRadius:"6px",padding:"8px 12px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",fontSize:"12px"},children:[d.jsxs("div",{style:{fontWeight:600,marginBottom:"4px"},children:["Run: ",A.runId,T?" (StartPoint)":""]}),d.jsxs("div",{children:[u[0].key,": ",(R=A.x)==null?void 0:R.toFixed(4)]}),d.jsxs("div",{children:[u[1].key,": ",(I=A.y)==null?void 0:I.toFixed(4)]})]})}}),d.jsx(Ha,{name:"Dominated",data:y.all.filter(j=>!j.isParetoOptimal&&j.runId!==p),fill:mE,fillOpacity:.4,shape:"circle",onClick:j=>(j==null?void 0:j.runId)&&window.open(`/runs/${j.runId}`,"_blank")}),d.jsx(Ha,{name:"Pareto",data:y.all.filter(j=>j.isParetoOptimal&&j.runId!==p),fill:pE,fillOpacity:.95,shape:"circle",onClick:j=>(j==null?void 0:j.runId)&&window.open(`/runs/${j.runId}`,"_blank")}),p&&d.jsx(Ha,{name:"Start",data:y.all.filter(j=>j.runId===p),fill:vE,shape:"circle",onClick:j=>(j==null?void 0:j.runId)&&window.open(`/runs/${j.runId}`,"_blank")})]})})})]})}const yE={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"},gE=20;function Pfe(){var b;const{id:e}=np(),[t,r]=P.useState("overview"),[n,i]=P.useState(1),[a,o]=P.useState(""),[s,l]=P.useState("ALL"),{data:u,isLoading:c,error:f}=dp(e),{data:h,isLoading:p}=Xy(e,{page:n-1,pageSize:gE}),{data:v}=Xy(e,{page:0,pageSize:1e3}),{data:m,isLoading:g}=y2(e),y=P.useMemo(()=>{if(!h)return[];let S=[...h];if(a.trim()){const w=a.toLowerCase();S=S.filter(O=>{var j;return(j=O.id)==null?void 0:j.toLowerCase().includes(w)})}return s!=="ALL"&&(S=S.filter(w=>w.status===s)),S.sort((w,O)=>new Date(O.createdAt).getTime()-new Date(w.createdAt).getTime()),S},[h,a,s]),x=P.useMemo(()=>!v||v.length===0?[]:[{name:"COMPLETED",value:v.filter(w=>w.status==="COMPLETED").length,color:"#22c55e"},{name:"RUNNING",value:v.filter(w=>w.status==="RUNNING").length,color:"#3b82f6"},{name:"FAILED",value:v.filter(w=>w.status==="FAILED").length,color:"#ef4444"},{name:"PENDING",value:v.filter(w=>w.status==="PENDING").length,color:"#eab308"},{name:"CANCELLED",value:v.filter(w=>w.status==="CANCELLED").length,color:"#6b7280"},{name:"UNKNOWN",value:v.filter(w=>w.status==="UNKNOWN").length,color:"#a78bfa"}].filter(w=>w.value>0),[v]);return c?d.jsxs("div",{className:"space-y-4",children:[d.jsx(Te,{className:"h-12 w-64"}),d.jsx(Te,{className:"h-96 w-full"})]}):f||!u?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load experiment"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:(f==null?void 0:f.message)||"Experiment not found"})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:u.name}),d.jsx("p",{className:"mt-0.5 text-muted-foreground font-mono text-sm",children:u.id})]}),d.jsx(jr,{variant:yE[u.status],children:u.status})]}),d.jsxs(lm,{value:t,onValueChange:r,children:[d.jsxs(um,{children:[d.jsx(io,{value:"overview",children:"Overview"}),d.jsx(io,{value:"runs",children:"Runs"})]}),d.jsxs(ao,{value:"overview",className:"space-y-4",children:[d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Details"}),d.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[u.description&&d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Description"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.description})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Duration"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:u.duration>0?`${u.duration.toFixed(2)}s`:"-"})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Total Tokens"}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((b=u.meta)==null?void 0:b.total_tokens)!==void 0?d.jsxs(d.Fragment,{children:[Number(u.meta.total_tokens).toLocaleString(),u.meta.input_tokens!==void 0&&u.meta.output_tokens!==void 0&&d.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(u.meta.input_tokens).toLocaleString(),"↓ ",Number(u.meta.output_tokens).toLocaleString(),"↑)"]})]}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:an(new Date(u.createdAt),{addSuffix:!0})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Updated"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:an(new Date(u.updatedAt),{addSuffix:!0})})]})]}),u.meta&&Object.keys(u.meta).filter(S=>!["total_tokens","input_tokens","output_tokens"].includes(S)).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.meta).filter(([S])=>!["total_tokens","input_tokens","output_tokens"].includes(S)).map(([S,w])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:S}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof w=="string"?w:JSON.stringify(w)})]},S))})]}),u.params&&Object.keys(u.params).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Parameters"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(u.params).map(([S,w])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:S}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof w=="string"?w:JSON.stringify(w)})]},S))})]}),v&&v.length>0&&x.length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsxs("h3",{className:"text-base font-semibold mb-6",children:["Statistics (",v.length," runs)"]}),d.jsx(Zi,{width:"100%",height:180,children:d.jsxs(Xb,{margin:{top:20,bottom:5},children:[d.jsx(dn,{data:x,dataKey:"value",nameKey:"name",cx:"50%",cy:"48%",outerRadius:48,label:({name:S,value:w})=>`${S}: ${w}`,style:{fontSize:"12px"},children:x.map((S,w)=>d.jsx(mo,{fill:S.color},`cell-${w}`))}),d.jsx(_t,{}),d.jsx(Br,{wrapperStyle:{fontSize:"12px"}})]})})]})]})}),g?d.jsx(Te,{className:"h-80 w-full"}):m&&Object.keys(m).length>0?d.jsx(jfe,{metrics:m,experimentId:e,title:"Metrics",description:"Switch between timeline and Pareto analysis views"}):d.jsxs(de,{children:[d.jsxs(Ft,{className:"pb-3",children:[d.jsx(Bt,{className:"text-sm",children:"Metrics"}),d.jsx(dr,{className:"text-xs",children:"No metrics data available"})]}),d.jsx(he,{children:d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:v&&v.length>0?"No metrics logged yet":"No runs in this experiment"})})]})]}),d.jsx(ao,{value:"runs",className:"space-y-4",children:d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ja,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(So,{placeholder:"Search runs...",value:a,onChange:S=>o(S.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(S=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>l(S),className:`h-8 px-2.5 text-xs transition-colors ${s===S?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:S},S))})]}),p?d.jsx(Te,{className:"h-24 w-full"}):!h||h.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No runs found"}):y.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No runs match your search"}):d.jsxs(d.Fragment,{children:[d.jsxs(xo,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Run ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(wo,{children:y.map(S=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(Tn,{to:`/runs/${S.id}`,className:"font-mono text-primary font-medium hover:underline",children:S.id})}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:yE[S.status],className:"text-xs px-2 py-0.5",children:S.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:an(new Date(S.createdAt),{addSuffix:!0})})]},S.id))})]}),d.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[d.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",n]}),d.jsxs("div",{className:"flex gap-1.5",children:[d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n-1),window.scrollTo({top:0,behavior:"smooth"})},disabled:n===1,className:"h-9 w-9 p-0",children:d.jsx(cp,{className:"h-4 w-4"})}),d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>{i(n+1),window.scrollTo({top:0,behavior:"smooth"})},disabled:h.length{const r=new Set;return e.forEach(i=>{i.params&&Object.keys(i.params).forEach(a=>r.add(a))}),Array.from(r).map(i=>{const a=e.map(l=>l.params&&i in l.params?JSON.stringify(l.params[i]):null),s=new Set(a.filter(l=>l!==null)).size>1;return{key:i,values:a,isDifferent:s}}).sort((i,a)=>i.isDifferent!==a.isDifferent?i.isDifferent?-1:1:i.key.localeCompare(a.key))},[e]);return d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Parameter Comparison"}),d.jsx(dr,{children:"Side-by-side comparison of experiment parameters"})]}),d.jsx(he,{children:t.length===0?d.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No parameters to compare"}):d.jsxs(xo,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"font-semibold",children:"Parameter"}),e.map((r,n)=>d.jsx(Re,{className:"font-semibold",children:r.name},r.id))]})}),d.jsx(wo,{children:t.map(r=>d.jsxs(Or,{className:r.isDifferent?"bg-yellow-50 dark:bg-yellow-950":"",children:[d.jsx(Le,{className:"font-medium",children:r.key}),r.values.map((n,i)=>d.jsx(Le,{className:n===null?"text-muted-foreground italic":r.isDifferent?"font-medium":"",children:n===null?"-":n},i))]},r.key))})]})})]})}const xE=["#0ea5e9","#8b5cf6","#ec4899","#f59e0b","#10b981"];function Afe({experimentIds:e}){const t=e.map(a=>y2(a)),r=t.some(a=>a.isLoading),n=P.useMemo(()=>{if(r)return[];const a=new Map;return t.forEach((o,s)=>{const l=o.data||{};Object.entries(l).forEach(([u,c])=>{c.forEach(f=>{const h=f.createdAt,p=`exp${s+1}_${u}`;a.has(h)||a.set(h,{timestamp:h,time:qi(new Date(h),"HH:mm:ss")});const v=a.get(h);v[p]=f.value})})}),Array.from(a.values()).sort((o,s)=>new Date(o.timestamp).getTime()-new Date(s.timestamp).getTime())},[t,r]),i=P.useMemo(()=>{const a=new Set;return n.length>0&&Object.keys(n[0]).forEach(o=>{o!=="timestamp"&&o!=="time"&&a.add(o)}),Array.from(a)},[n]);return r?d.jsxs(de,{children:[d.jsx(Ft,{children:d.jsx(Bt,{children:"Metrics Overlay"})}),d.jsx(he,{children:d.jsx(Te,{className:"h-96 w-full"})})]}):n.length===0?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Metrics Overlay"}),d.jsx(dr,{children:"Combined metrics visualization across experiments"})]}),d.jsx(he,{children:d.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No metrics data available for comparison"})})]}):d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Metrics Overlay"}),d.jsx(dr,{children:"Combined metrics from all selected experiments"})]}),d.jsx(he,{children:d.jsx(Zi,{width:"100%",height:400,children:d.jsxs(sm,{data:n,margin:{top:5,right:30,left:20,bottom:5},children:[d.jsx(Ys,{strokeDasharray:"3 3"}),d.jsx(ri,{dataKey:"time",label:{value:"Time",position:"insideBottom",offset:-5}}),d.jsx(ni,{label:{value:"Value",angle:-90,position:"insideLeft"}}),d.jsx(_t,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:"0.5rem"}}),d.jsx(Br,{}),i.map((a,o)=>d.jsx(_n,{type:"monotone",dataKey:a,stroke:xE[o%xE.length],strokeWidth:2,dot:{r:3},connectNulls:!0},a))]})})})]})}const _fe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function Tfe(){var i;const[e]=yL(),t=((i=e.get("ids"))==null?void 0:i.split(","))||[],{data:r,isLoading:n}=k5(t);return n?d.jsxs("div",{className:"space-y-4",children:[d.jsx(Te,{className:"h-12 w-64"}),d.jsx(Te,{className:"h-96 w-full"})]}):!r||r.length<2?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Experiment Comparison"}),d.jsx(dr,{children:"Select at least 2 experiments to compare"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-muted-foreground",children:"No experiments selected for comparison"})})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Experiment Comparison"}),d.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Comparing ",r.length," experiments"]})]}),d.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(a=>d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsx(Bt,{className:"text-lg",children:a.name}),d.jsx(jr,{variant:_fe[a.status],children:a.status})]}),a.description&&d.jsx(dr,{children:a.description})]}),d.jsx(he,{children:d.jsxs("dl",{className:"space-y-2 text-sm",children:[d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-muted-foreground",children:"Duration"}),d.jsx("dd",{className:"font-medium",children:a.duration>0?`${a.duration.toFixed(2)}s`:"-"})]}),d.jsxs("div",{className:"flex justify-between",children:[d.jsx("dt",{className:"text-muted-foreground",children:"Params"}),d.jsx("dd",{className:"font-medium",children:a.params?Object.keys(a.params).length:0})]})]})})]},a.id))}),d.jsx(Efe,{experiments:r}),d.jsx(Afe,{experimentIds:t})]})}const Nfe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function kfe(){var m,g;const{selectedTeamId:e}=fo(),[t,r]=P.useState("ALL"),[n,i]=P.useState(""),{data:a,isLoading:o}=fp(e||"",{page:0,pageSize:1e3,enabled:!!e}),s=((m=a==null?void 0:a[0])==null?void 0:m.id)||"",{data:l,isLoading:u}=Nd(s,{page:0,pageSize:100,enabled:!!s}),c=((g=l==null?void 0:l[0])==null?void 0:g.id)||"",{data:f,isLoading:h}=Xy(c,{page:0,pageSize:100,enabled:!!c}),p=P.useMemo(()=>{if(!f)return[];let y=[...f];if(n.trim()){const x=n.toLowerCase();y=y.filter(b=>{var S,w;return((S=b.id)==null?void 0:S.toLowerCase().includes(x))||((w=b.experimentId)==null?void 0:w.toLowerCase().includes(x))})}return t!=="ALL"&&(y=y.filter(x=>x.status===t)),y.sort((x,b)=>new Date(b.createdAt).getTime()-new Date(x.createdAt).getTime()),y},[f,t,n]),v=o||u||h;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Runs"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Browse and monitor individual runs"})]}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex gap-2 mb-3 items-center",children:[d.jsxs("div",{className:"relative w-64",children:[d.jsx(Ja,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(So,{placeholder:"Search runs...",value:n,onChange:y=>i(y.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),d.jsx("div",{className:"flex gap-1",children:["ALL","COMPLETED","RUNNING","FAILED","PENDING","CANCELLED"].map(y=>d.jsx(lt,{variant:"outline",size:"sm",onClick:()=>r(y),className:`h-8 px-2.5 text-xs transition-colors ${t===y?"bg-blue-50 border-blue-300 text-blue-700 hover:bg-blue-100":"bg-white hover:bg-gray-50"}`,children:y},y))})]}),v?d.jsx(Te,{className:"h-24 w-full"}):!p||p.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:n.trim()?"No runs match your search":t!=="ALL"?`No ${t} runs found`:"No runs found"}):d.jsxs(xo,{children:[d.jsx(bo,{children:d.jsxs(Or,{children:[d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Run ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Experiment ID"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Status"}),d.jsx(Re,{className:"h-10 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"})]})}),d.jsx(wo,{children:p.map(y=>d.jsxs(Or,{children:[d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(Tn,{to:`/runs/${y.id}`,className:"font-mono text-primary font-medium hover:underline",children:y.id})}),d.jsx(Le,{className:"py-3.5 text-sm",children:d.jsx(Tn,{to:`/experiments/${y.experimentId}`,className:"font-mono text-primary font-medium hover:underline",children:y.experimentId})}),d.jsx(Le,{className:"py-3.5",children:d.jsx(jr,{variant:Nfe[y.status],className:"text-xs px-2 py-0.5",children:y.status})}),d.jsx(Le,{className:"py-3.5 text-sm text-foreground",children:an(new Date(y.createdAt),{addSuffix:!0})})]},y.id))})]})]})})]})}async function Cfe(e,t,r){try{return(await Xt(Qt.listArtifactTags,{team_id:e,project_id:t,repo_type:r})).artifactTags.map(i=>i.name)}catch(n){throw new Error(`Failed to list tags for project ${t}: ${n instanceof Error?n.message:"Unknown error"}`)}}async function $fe(e,t,r,n){try{return(await Xt(Qt.getArtifactContent,{team_id:e,project_id:t,tag:r,repo_type:n})).artifactContent}catch(i){throw new Error(`Failed to get artifact content: ${i instanceof Error?i.message:"Unknown error"}`)}}function Mfe(e,t,r){return Ar({queryKey:["artifacts","tags",e,t,r],queryFn:()=>Cfe(e,t,r),enabled:!!(e&&t),staleTime:10*60*1e3})}function g2(e,t,r,n,i=!0){return Ar({queryKey:["artifacts","content",e,t,r,n],queryFn:()=>$fe(e,t,r,n),enabled:!!(i&&e&&t&&r),staleTime:1/0,gcTime:30*60*1e3,retry:1})}function Gi(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function bE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function x2(...e){return t=>{let r=!1;const n=e.map(i=>{const a=bE(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:o,...s}=a,l=P.useMemo(()=>s,Object.values(s));return d.jsx(r.Provider,{value:l,children:o})};n.displayName=e+"Provider";function i(a){const o=P.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function Dfe(e,t=[]){let r=[];function n(a,o){const s=P.createContext(o),l=r.length;r=[...r,o];const u=f=>{var y;const{scope:h,children:p,...v}=f,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||s,g=P.useMemo(()=>v,Object.values(v));return d.jsx(m.Provider,{value:g,children:p})};u.displayName=a+"Provider";function c(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||s,v=P.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[u,c]}const i=()=>{const a=r.map(o=>P.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return P.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,Rfe(i,...t)]}function Rfe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=n.reduce((s,{useScope:l,scopeName:u})=>{const f=l(a)[`__scope${u}`];return{...s,...f}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var bc=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},Lfe=R0[" useId ".trim().toString()]||(()=>{}),Ffe=0;function jv(e){const[t,r]=P.useState(Lfe());return bc(()=>{r(n=>n??String(Ffe++))},[e]),e||(t?`radix-${t}`:"")}var Bfe=R0[" useInsertionEffect ".trim().toString()]||bc;function zfe({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,o]=Ufe({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:i;{const c=P.useRef(e!==void 0);P.useEffect(()=>{const f=c.current;f!==s&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=s},[s,n])}const u=P.useCallback(c=>{var f;if(s){const h=Wfe(c)?c(e):c;h!==e&&((f=o.current)==null||f.call(o,h))}else a(c)},[s,e,a,o]);return[l,u]}function Ufe({defaultProp:e,onChange:t}){const[r,n]=P.useState(e),i=P.useRef(r),a=P.useRef(t);return Bfe(()=>{a.current=t},[t]),P.useEffect(()=>{var o;i.current!==r&&((o=a.current)==null||o.call(a,r),i.current=r)},[r,i]),[r,n,a]}function Wfe(e){return typeof e=="function"}function b2(e){const t=Hfe(e),r=P.forwardRef((n,i)=>{const{children:a,...o}=n,s=P.Children.toArray(a),l=s.find(qfe);if(l){const u=l.props.children,c=s.map(f=>f===l?P.Children.count(u)>1?P.Children.only(null):P.isValidElement(u)?u.props.children:null:f);return d.jsx(t,{...o,ref:i,children:P.isValidElement(u)?P.cloneElement(u,void 0,c):null})}return d.jsx(t,{...o,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Hfe(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const o=Gfe(i),s=Vfe(a,i.props);return i.type!==P.Fragment&&(s.ref=n?x2(n,o):o),P.cloneElement(i,s)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kfe=Symbol("radix.slottable");function qfe(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kfe}function Vfe(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...s)=>{const l=a(...s);return i(...s),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function Gfe(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Yfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ui=Yfe.reduce((e,t)=>{const r=b2(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xfe(e,t){e&&_x.flushSync(()=>e.dispatchEvent(t))}function wc(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Qfe(e,t=globalThis==null?void 0:globalThis.document){const r=wc(e);P.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Jfe="DismissableLayer",N0="dismissableLayer.update",Zfe="dismissableLayer.pointerDownOutside",ede="dismissableLayer.focusOutside",wE,w2=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),S2=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,u=P.useContext(w2),[c,f]=P.useState(null),h=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=P.useState({}),v=Oo(t,j=>f(j)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),x=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,w=nde(j=>{const E=j.target,A=[...u.branches].some(T=>T.contains(E));!S||A||(i==null||i(j),o==null||o(j),j.defaultPrevented||s==null||s())},h),O=ide(j=>{const E=j.target;[...u.branches].some(T=>T.contains(E))||(a==null||a(j),o==null||o(j),j.defaultPrevented||s==null||s())},h);return Qfe(j=>{x===u.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},h),P.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wE=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),SE(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=wE)}},[c,h,r,u]),P.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),SE())},[c,u]),P.useEffect(()=>{const j=()=>p({});return document.addEventListener(N0,j),()=>document.removeEventListener(N0,j)},[]),d.jsx(ui.div,{...l,ref:v,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:Gi(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Gi(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Gi(e.onPointerDownCapture,w.onPointerDownCapture)})});S2.displayName=Jfe;var tde="DismissableLayerBranch",rde=P.forwardRef((e,t)=>{const r=P.useContext(w2),n=P.useRef(null),i=Oo(t,n);return P.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(ui.div,{...e,ref:i})});rde.displayName=tde;function nde(e,t=globalThis==null?void 0:globalThis.document){const r=wc(e),n=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const a=s=>{if(s.target&&!n.current){let l=function(){O2(Zfe,r,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function ide(e,t=globalThis==null?void 0:globalThis.document){const r=wc(e),n=P.useRef(!1);return P.useEffect(()=>{const i=a=>{a.target&&!n.current&&O2(ede,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function SE(){const e=new CustomEvent(N0);document.dispatchEvent(e)}function O2(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Xfe(i,a):i.dispatchEvent(a)}var Pv="focusScope.autoFocusOnMount",Ev="focusScope.autoFocusOnUnmount",OE={bubbles:!1,cancelable:!0},ade="FocusScope",j2=P.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=P.useState(null),u=wc(i),c=wc(a),f=P.useRef(null),h=Oo(t,m=>l(m)),p=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let m=function(b){if(p.paused||!s)return;const S=b.target;s.contains(S)?f.current=S:vi(f.current,{select:!0})},g=function(b){if(p.paused||!s)return;const S=b.relatedTarget;S!==null&&(s.contains(S)||vi(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const w of b)w.removedNodes.length>0&&vi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",g);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),x.disconnect()}}},[n,s,p.paused]),P.useEffect(()=>{if(s){PE.add(p);const m=document.activeElement;if(!s.contains(m)){const y=new CustomEvent(Pv,OE);s.addEventListener(Pv,u),s.dispatchEvent(y),y.defaultPrevented||(ode(fde(P2(s)),{select:!0}),document.activeElement===m&&vi(s))}return()=>{s.removeEventListener(Pv,u),setTimeout(()=>{const y=new CustomEvent(Ev,OE);s.addEventListener(Ev,c),s.dispatchEvent(y),y.defaultPrevented||vi(m??document.body,{select:!0}),s.removeEventListener(Ev,c),PE.remove(p)},0)}}},[s,u,c,p]);const v=P.useCallback(m=>{if(!r&&!n||p.paused)return;const g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){const x=m.currentTarget,[b,S]=sde(x);b&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&vi(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),r&&vi(S,{select:!0})):y===x&&m.preventDefault()}},[r,n,p.paused]);return d.jsx(ui.div,{tabIndex:-1,...o,ref:h,onKeyDown:v})});j2.displayName=ade;function ode(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vi(n,{select:t}),document.activeElement!==r)return}function sde(e){const t=P2(e),r=jE(t,e),n=jE(t.reverse(),e);return[r,n]}function P2(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jE(e,t){for(const r of e)if(!lde(r,{upTo:t}))return r}function lde(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ude(e){return e instanceof HTMLInputElement&&"select"in e}function vi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ude(e)&&t&&e.select()}}var PE=cde();function cde(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=EE(e,t),e.unshift(t)},remove(t){var r;e=EE(e,t),(r=e[0])==null||r.resume()}}}function EE(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function fde(e){return e.filter(t=>t.tagName!=="A")}var dde="Portal",E2=P.forwardRef((e,t)=>{var s;const{container:r,...n}=e,[i,a]=P.useState(!1);bc(()=>a(!0),[]);const o=r||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?TD.createPortal(d.jsx(ui.div,{...n,ref:t}),o):null});E2.displayName=dde;function hde(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var cm=e=>{const{present:t,children:r}=e,n=pde(t),i=typeof r=="function"?r({present:n.isPresent}):P.Children.only(r),a=Oo(n.ref,mde(i));return typeof r=="function"||n.isPresent?P.cloneElement(i,{ref:a}):null};cm.displayName="Presence";function pde(e){const[t,r]=P.useState(),n=P.useRef(null),i=P.useRef(e),a=P.useRef("none"),o=e?"mounted":"unmounted",[s,l]=hde(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const u=Cf(n.current);a.current=s==="mounted"?u:"none"},[s]),bc(()=>{const u=n.current,c=i.current;if(c!==e){const h=a.current,p=Cf(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),bc(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=p=>{const m=Cf(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=p=>{p.target===t&&(a.current=Cf(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:P.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Cf(e){return(e==null?void 0:e.animationName)||"none"}function mde(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Av=0;function vde(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??AE()),document.body.insertAdjacentElement("beforeend",e[1]??AE()),Av++,()=>{Av===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Av--}},[])}function AE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var wn=function(){return wn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return $de;var t=Mde(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Dde=N2(),ls="data-scroll-locked",Rde=function(e,t,r,n){var i=e.left,a=e.top,o=e.right,s=e.gap;return r===void 0&&(r="margin"),` + .`.concat(gde,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body[`).concat(ls,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(ed,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(td,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(ed," .").concat(ed,` { + right: 0 `).concat(n,`; + } + + .`).concat(td," .").concat(td,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(ls,`] { + `).concat(xde,": ").concat(s,`px; + } +`)},TE=function(){var e=parseInt(document.body.getAttribute(ls)||"0",10);return isFinite(e)?e:0},Lde=function(){P.useEffect(function(){return document.body.setAttribute(ls,(TE()+1).toString()),function(){var e=TE()-1;e<=0?document.body.removeAttribute(ls):document.body.setAttribute(ls,e.toString())}},[])},Fde=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;Lde();var a=P.useMemo(function(){return Ide(i)},[i]);return P.createElement(Dde,{styles:Rde(a,!t,i,r?"":"!important")})},k0=!1;if(typeof window<"u")try{var $f=Object.defineProperty({},"passive",{get:function(){return k0=!0,!0}});window.addEventListener("test",$f,$f),window.removeEventListener("test",$f,$f)}catch{k0=!1}var $o=k0?{passive:!1}:!1,Bde=function(e){return e.tagName==="TEXTAREA"},k2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Bde(e)&&r[t]==="visible")},zde=function(e){return k2(e,"overflowY")},Ude=function(e){return k2(e,"overflowX")},NE=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=C2(e,n);if(i){var a=$2(e,n),o=a[1],s=a[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Wde=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Hde=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},C2=function(e,t){return e==="v"?zde(t):Ude(t)},$2=function(e,t){return e==="v"?Wde(t):Hde(t)},Kde=function(e,t){return e==="h"&&t==="rtl"?-1:1},qde=function(e,t,r,n,i){var a=Kde(e,window.getComputedStyle(t).direction),o=a*n,s=r.target,l=t.contains(s),u=!1,c=o>0,f=0,h=0;do{if(!s)break;var p=$2(e,s),v=p[0],m=p[1],g=p[2],y=m-g-a*v;(v||y)&&C2(e,s)&&(f+=y,h+=v);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&Math.abs(f)<1||!c&&Math.abs(h)<1)&&(u=!0),u},Mf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kE=function(e){return[e.deltaX,e.deltaY]},CE=function(e){return e&&"current"in e?e.current:e},Vde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Gde=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Yde=0,Mo=[];function Xde(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),i=P.useState(Yde++)[0],a=P.useState(N2)[0],o=P.useRef(e);P.useEffect(function(){o.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=yde([e.lockRef.current],(e.shards||[]).map(CE),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=P.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Mf(m),x=r.current,b="deltaX"in m?m.deltaX:x[0]-y[0],S="deltaY"in m?m.deltaY:x[1]-y[1],w,O=m.target,j=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in m&&j==="h"&&O.type==="range")return!1;var E=window.getSelection(),A=E&&E.anchorNode,T=A?A===O||A.contains(O):!1;if(T)return!1;var _=NE(j,O);if(!_)return!0;if(_?w=j:(w=j==="v"?"h":"v",_=NE(j,O)),!_)return!1;if(!n.current&&"changedTouches"in m&&(b||S)&&(n.current=w),!w)return!0;var N=n.current||w;return qde(N,g,m,N==="h"?b:S)},[]),l=P.useCallback(function(m){var g=m;if(!(!Mo.length||Mo[Mo.length-1]!==a)){var y="deltaY"in g?kE(g):Mf(g),x=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&Vde(w.delta,y)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(CE).filter(Boolean).filter(function(w){return w.contains(g.target)}),S=b.length>0?s(g,b[0]):!o.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),u=P.useCallback(function(m,g,y,x){var b={name:m,delta:g,target:y,should:x,shadowParent:Qde(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),c=P.useCallback(function(m){r.current=Mf(m),n.current=void 0},[]),f=P.useCallback(function(m){u(m.type,kE(m),m.target,s(m,e.lockRef.current))},[]),h=P.useCallback(function(m){u(m.type,Mf(m),m.target,s(m,e.lockRef.current))},[]);P.useEffect(function(){return Mo.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,$o),document.addEventListener("touchmove",l,$o),document.addEventListener("touchstart",c,$o),function(){Mo=Mo.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,$o),document.removeEventListener("touchmove",l,$o),document.removeEventListener("touchstart",c,$o)}},[]);var p=e.removeScrollBar,v=e.inert;return P.createElement(P.Fragment,null,v?P.createElement(a,{styles:Gde(i)}):null,p?P.createElement(Fde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jde=Ede(T2,Xde);var M2=P.forwardRef(function(e,t){return P.createElement(fm,wn({},e,{ref:t,sideCar:Jde}))});M2.classNames=fm.classNames;var Zde=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Io=new WeakMap,If=new WeakMap,Df={},kv=0,I2=function(e){return e&&(e.host||I2(e.parentNode))},ehe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=I2(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},the=function(e,t,r,n){var i=ehe(t,Array.isArray(e)?e:[e]);Df[r]||(Df[r]=new WeakMap);var a=Df[r],o=[],s=new Set,l=new Set(i),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};i.forEach(u);var c=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(n),v=p!==null&&p!=="false",m=(Io.get(h)||0)+1,g=(a.get(h)||0)+1;Io.set(h,m),a.set(h,g),o.push(h),m===1&&v&&If.set(h,!0),g===1&&h.setAttribute(r,"true"),v||h.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return c(t),s.clear(),kv++,function(){o.forEach(function(f){var h=Io.get(f)-1,p=a.get(f)-1;Io.set(f,h),a.set(f,p),h||(If.has(f)||f.removeAttribute(n),If.delete(f)),p||f.removeAttribute(r)}),kv--,kv||(Io=new WeakMap,Io=new WeakMap,If=new WeakMap,Df={})}},rhe=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=Zde(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),the(n,i,r,"aria-hidden")):function(){return null}},dm="Dialog",[D2]=Dfe(dm),[nhe,hn]=D2(dm),R2=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=P.useRef(null),l=P.useRef(null),[u,c]=zfe({prop:n,defaultProp:i??!1,onChange:a,caller:dm});return d.jsx(nhe,{scope:t,triggerRef:s,contentRef:l,contentId:jv(),titleId:jv(),descriptionId:jv(),open:u,onOpenChange:c,onOpenToggle:P.useCallback(()=>c(f=>!f),[c]),modal:o,children:r})};R2.displayName=dm;var L2="DialogTrigger",ihe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(L2,r),a=Oo(t,i.triggerRef);return d.jsx(ui.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ew(i.open),...n,ref:a,onClick:Gi(e.onClick,i.onOpenToggle)})});ihe.displayName=L2;var Jb="DialogPortal",[ahe,F2]=D2(Jb,{forceMount:void 0}),B2=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=hn(Jb,t);return d.jsx(ahe,{scope:t,forceMount:r,children:P.Children.map(n,o=>d.jsx(cm,{present:r||a.open,children:d.jsx(E2,{asChild:!0,container:i,children:o})}))})};B2.displayName=Jb;var Fh="DialogOverlay",z2=P.forwardRef((e,t)=>{const r=F2(Fh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=hn(Fh,e.__scopeDialog);return a.modal?d.jsx(cm,{present:n||a.open,children:d.jsx(she,{...i,ref:t})}):null});z2.displayName=Fh;var ohe=b2("DialogOverlay.RemoveScroll"),she=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(Fh,r);return d.jsx(M2,{as:ohe,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(ui.div,{"data-state":ew(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),oo="DialogContent",U2=P.forwardRef((e,t)=>{const r=F2(oo,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=hn(oo,e.__scopeDialog);return d.jsx(cm,{present:n||a.open,children:a.modal?d.jsx(lhe,{...i,ref:t}):d.jsx(uhe,{...i,ref:t})})});U2.displayName=oo;var lhe=P.forwardRef((e,t)=>{const r=hn(oo,e.__scopeDialog),n=P.useRef(null),i=Oo(t,r.contentRef,n);return P.useEffect(()=>{const a=n.current;if(a)return rhe(a)},[]),d.jsx(W2,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gi(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Gi(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Gi(e.onFocusOutside,a=>a.preventDefault())})}),uhe=P.forwardRef((e,t)=>{const r=hn(oo,e.__scopeDialog),n=P.useRef(!1),i=P.useRef(!1);return d.jsx(W2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(n.current||(s=r.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),W2=P.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=hn(oo,r),l=P.useRef(null),u=Oo(t,l);return vde(),d.jsxs(d.Fragment,{children:[d.jsx(j2,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(S2,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ew(s.open),...o,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(che,{titleId:s.titleId}),d.jsx(dhe,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Zb="DialogTitle",H2=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(Zb,r);return d.jsx(ui.h2,{id:i.titleId,...n,ref:t})});H2.displayName=Zb;var K2="DialogDescription",q2=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(K2,r);return d.jsx(ui.p,{id:i.descriptionId,...n,ref:t})});q2.displayName=K2;var V2="DialogClose",G2=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=hn(V2,r);return d.jsx(ui.button,{type:"button",...n,ref:t,onClick:Gi(e.onClick,()=>i.onOpenChange(!1))})});G2.displayName=V2;function ew(e){return e?"open":"closed"}var Y2="DialogTitleWarning",[Uhe,X2]=Ife(Y2,{contentName:oo,titleName:Zb,docsSlug:"dialog"}),che=({titleId:e})=>{const t=X2(Y2),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},fhe="DialogDescriptionWarning",dhe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X2(fhe).contentName}}.`;return P.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},hhe=R2,phe=B2,Q2=z2,J2=U2,Z2=H2,eM=q2,mhe=G2;const tM=hhe,vhe=phe,rM=P.forwardRef(({className:e,...t},r)=>d.jsx(Q2,{ref:r,className:Oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));rM.displayName=Q2.displayName;const tw=P.forwardRef(({className:e,children:t,...r},n)=>d.jsxs(vhe,{children:[d.jsx(rM,{}),d.jsxs(J2,{ref:n,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,d.jsxs(mhe,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(oN,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));tw.displayName=J2.displayName;const rw=({className:e,...t})=>d.jsx("div",{className:Oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});rw.displayName="DialogHeader";const nw=P.forwardRef(({className:e,...t},r)=>d.jsx(Z2,{ref:r,className:Oe("text-lg font-semibold leading-none tracking-tight",e),...t}));nw.displayName=Z2.displayName;const iw=P.forwardRef(({className:e,...t},r)=>d.jsx(eM,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));iw.displayName=eM.displayName;const $E={OK:"bg-green-500",ERROR:"bg-red-500",UNSET:"bg-green-500"},ME=e=>{var n,i;const t=e.spanName.toLowerCase(),r=e.spanKind;return t.includes("openai")||t.includes("chat")||t.includes("completion")?{label:"LLM",icon:d.jsx(iF,{className:"h-3 w-3"}),badgeColor:"bg-purple-100 text-purple-700 border-purple-200"}:r==="CLIENT"||t.includes("http")||t.includes("api")?{label:"API",icon:d.jsx(SF,{className:"h-3 w-3"}),badgeColor:"bg-blue-100 text-blue-700 border-blue-200"}:t.includes("db")||t.includes("database")||t.includes("query")?{label:"DB",icon:d.jsx(rN,{className:"h-3 w-3"}),badgeColor:"bg-cyan-100 text-cyan-700 border-cyan-200"}:((n=e.spanAttributes)==null?void 0:n["traceloop.span.kind"])==="workflow"?{label:"Workflow",icon:d.jsx(kF,{className:"h-3 w-3"}),badgeColor:"bg-indigo-100 text-indigo-700 border-indigo-200"}:((i=e.spanAttributes)==null?void 0:i["traceloop.span.kind"])==="task"?{label:"Task",icon:d.jsx(DF,{className:"h-3 w-3"}),badgeColor:"bg-amber-100 text-amber-700 border-amber-200"}:{label:"Span",icon:d.jsx(Gy,{className:"h-3 w-3"}),badgeColor:"bg-gray-100 text-gray-700 border-gray-200"}};function yhe({spans:e}){const[t,r]=P.useState(()=>new Set(e.filter(g=>!g.parentSpanId||g.parentSpanId==="").map(g=>g.spanId))),[n,i]=P.useState(null),a=()=>{const g=new Set(e.map(y=>y.spanId));r(g)},o=()=>{r(new Set)},s=P.useMemo(()=>{if(!e||e.length===0)return[];const g=new Map,y=[];e.forEach(S=>{g.set(S.spanId,{span:S,children:[],depth:0})}),e.forEach(S=>{const w=g.get(S.spanId);if(!S.parentSpanId||S.parentSpanId==="")y.push(w);else{const O=g.get(S.parentSpanId);O?(w.depth=O.depth+1,O.children.push(w)):y.push(w)}});const x=S=>{S.sort((w,O)=>new Date(w.span.timestamp).getTime()-new Date(O.span.timestamp).getTime()),S.forEach(w=>x(w.children))},b=S=>{var _,N,M;S.children.forEach(R=>b(R));const w=parseInt((_=S.span.spanAttributes)==null?void 0:_["gen_ai.usage.input_tokens"])||0,O=parseInt((N=S.span.spanAttributes)==null?void 0:N["gen_ai.usage.output_tokens"])||0,j=parseInt((M=S.span.spanAttributes)==null?void 0:M["llm.usage.total_tokens"])||0,E=S.children.reduce((R,I)=>R+(I.inputTokens||0),0),A=S.children.reduce((R,I)=>R+(I.outputTokens||0),0),T=S.children.reduce((R,I)=>R+(I.totalTokens||0),0);S.inputTokens=w+E,S.outputTokens=O+A,S.totalTokens=j+T};return x(y),y.forEach(S=>b(S)),y},[e]),{minTimestamp:l,maxTimestamp:u,totalDuration:c}=P.useMemo(()=>{if(!e||e.length===0)return{minTimestamp:0,maxTimestamp:0,totalDuration:0};const g=e.map(w=>new Date(w.timestamp).getTime()),y=e.map(w=>new Date(w.timestamp).getTime()+w.duration/1e6),x=Math.min(...g),b=Math.max(...y),S=b-x;return{minTimestamp:x,maxTimestamp:b,totalDuration:S||1}},[e]),f=g=>{r(y=>{const x=new Set(y);return x.has(g)?x.delete(g):x.add(g),x})},h=g=>{const y=g/1e3,x=y/1e3,b=x/1e3;return b>=1?`${b.toFixed(2)}s`:x>=1?`${x.toFixed(2)}ms`:`${y.toFixed(2)}μs`},p=g=>{const{span:y}=g,x=new Date(y.timestamp).getTime(),b=x+y.duration/1e6,S=(x-l)/c*100,w=(b-x)/c*100,O=$E[y.statusCode]||$E.UNSET;return d.jsx("div",{className:`${O} absolute h-7 rounded flex items-center px-2 text-white text-[11px] font-medium overflow-hidden transition-all hover:opacity-90 hover:shadow-md cursor-pointer shadow`,style:{left:`${S}%`,width:`${Math.max(w,.8)}%`},title:`${y.spanName} +Duration: ${h(y.duration)} +Status: ${y.statusCode} +Kind: ${y.spanKind}`,children:d.jsx("span",{className:"truncate",children:h(y.duration)})})},v=g=>{const{span:y,children:x,depth:b,totalTokens:S,inputTokens:w,outputTokens:O}=g,j=x.length>0,E=t.has(y.spanId),A=ME(y),T=j&&S&&S>0;return d.jsxs("div",{children:[d.jsxs("div",{className:`flex items-center border-b border-border hover:bg-muted/30 transition-colors cursor-pointer ${(n==null?void 0:n.spanId)===y.spanId?"bg-accent":""}`,onClick:_=>{_.target.closest("button")||i(y)},children:[d.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2 py-2 min-w-0",style:{width:"360px",paddingLeft:`${b*12+12}px`,paddingRight:"12px"},children:[b>0&&d.jsx("div",{className:"absolute h-full border-l border-border/60",style:{left:`${(b-1)*12+12}px`}}),j?d.jsx("button",{onClick:()=>f(y.spanId),className:"p-0.5 hover:bg-accent rounded flex-shrink-0 transition-colors",children:E?d.jsx(up,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}):d.jsx(Qi,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})}):d.jsx("div",{className:"w-[20px] flex-shrink-0"}),d.jsxs(jr,{variant:"outline",className:`${A.badgeColor} flex items-center gap-1 px-2 py-0.5 text-xs font-medium flex-shrink-0`,children:[A.icon,d.jsx("span",{children:A.label})]}),d.jsx("span",{className:"text-sm font-medium truncate text-foreground",title:y.spanName,children:y.spanName})]}),d.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1.5 whitespace-nowrap text-foreground py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"12px"},children:[d.jsx(Gy,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-mono",children:h(y.duration)})]}),d.jsx("div",{className:"flex-shrink-0 flex flex-col justify-center whitespace-nowrap text-foreground py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"6px"},children:S&&S>0?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"font-mono flex items-center text-xs",children:[T&&d.jsx("span",{className:"inline-block align-middle mr-1 text-muted-foreground",children:"∑"}),d.jsx("span",{children:S.toLocaleString()})]}),w&&O&&w>0&&O>0&&d.jsxs("div",{className:"text-muted-foreground text-[10px] mt-0.5 font-mono",children:[w.toLocaleString(),"↓ ",O.toLocaleString(),"↑"]})]}):d.jsx("span",{className:"text-muted-foreground/40 text-xs",children:"—"})}),d.jsx("div",{className:"flex-1 relative h-9 min-w-0 flex items-center",style:{paddingLeft:"2px",paddingRight:"12px"},children:p(g)})]}),j&&E&&d.jsx("div",{children:x.map(_=>v(_))})]},y.spanId)};if(!e||e.length===0)return d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsx("div",{className:"flex h-32 items-center justify-center text-sm text-muted-foreground",children:"No traces available"})})});const m=g=>{const y=ME(g),x=g.spanAttributes||{},b=x["gen_ai.request.model"]||x["gen_ai.response.model"],S=x["gen_ai.request.temperature"],w=x["gen_ai.request.max_tokens"],O=x["gen_ai.request.top_p"],j=[];let E=0;for(;x[`gen_ai.prompt.${E}.role`];)j.push({role:x[`gen_ai.prompt.${E}.role`],content:x[`gen_ai.prompt.${E}.content`]}),E++;const A=[];for(E=0;x[`gen_ai.completion.${E}.role`];)A.push({role:x[`gen_ai.completion.${E}.role`],content:x[`gen_ai.completion.${E}.content`],finishReason:x[`gen_ai.completion.${E}.finish_reason`]}),E++;return d.jsx(de,{className:"mt-3 border-2",children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"flex items-start justify-between mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(jr,{variant:"outline",className:`${y.badgeColor} flex items-center gap-1 px-2 py-1 text-xs`,children:[y.icon,y.label]}),d.jsx("h4",{className:"font-semibold text-sm",children:g.spanName})]}),d.jsx(lt,{variant:"ghost",size:"sm",onClick:()=>i(null),className:"h-6 w-6 p-0 hover:bg-muted",children:d.jsx(oN,{className:"h-3.5 w-3.5"})})]}),b&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h5",{className:"text-xs font-semibold mb-2 text-foreground uppercase tracking-wide",children:"Model Configuration"}),d.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs border rounded-md p-3 bg-muted/30",children:[d.jsxs("div",{className:"col-span-2",children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Model:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:b})]}),S!==void 0&&d.jsxs("div",{children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Temperature:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:S})]}),w&&d.jsxs("div",{children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Max Tokens:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:w})]}),O!==void 0&&d.jsxs("div",{children:[d.jsx("span",{className:"text-muted-foreground font-medium",children:"Top P:"}),d.jsx("span",{className:"ml-2 font-mono text-foreground",children:O})]})]})]}),j.length>0&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h5",{className:"text-xs font-semibold mb-2 text-foreground uppercase tracking-wide",children:"Input"}),d.jsx("div",{className:"space-y-2",children:j.map((T,_)=>d.jsxs("div",{className:"border rounded-md p-3 bg-muted/30",children:[d.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:T.role}),d.jsx("div",{className:"text-xs whitespace-pre-wrap leading-relaxed text-foreground",children:T.content})]},_))})]}),A.length>0&&d.jsxs("div",{className:"mb-4",children:[d.jsx("h5",{className:"text-xs font-semibold mb-2 text-foreground uppercase tracking-wide",children:"Output"}),d.jsx("div",{className:"space-y-2",children:A.map((T,_)=>d.jsxs("div",{className:"border rounded-md p-3 bg-muted/30",children:[d.jsx("div",{className:"text-[11px] font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:T.role}),d.jsx("div",{className:"text-xs whitespace-pre-wrap leading-relaxed text-foreground",children:T.content})]},_))})]}),d.jsxs("details",{className:"mt-3",children:[d.jsxs("summary",{className:"text-xs font-semibold cursor-pointer hover:text-foreground text-muted-foreground py-1 uppercase tracking-wide",children:["All Attributes (",Object.keys(x).length,")"]}),d.jsx("div",{className:"mt-2 text-xs space-y-1 bg-muted/30 rounded-md p-3 max-h-64 overflow-auto border",children:Object.entries(x).map(([T,_])=>d.jsxs("div",{className:"grid grid-cols-3 gap-3 py-1",children:[d.jsxs("span",{className:"text-muted-foreground truncate font-medium",title:T,children:[T,":"]}),d.jsx("span",{className:"col-span-2 font-mono break-all text-xs text-foreground",children:String(_)})]},T))})]})]})})};return d.jsx(de,{className:"shadow-sm",children:d.jsxs(he,{className:"p-4",children:[d.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Gy,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[h(c*1e6)," · ",e.length," span",e.length!==1?"s":""]})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("button",{onClick:a,className:"text-xs px-2 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors font-medium",children:"Expand all"}),d.jsx("span",{className:"text-muted-foreground/30",children:"|"}),d.jsx("button",{onClick:o,className:"text-xs px-2 py-0.5 rounded hover:bg-accent text-muted-foreground hover:text-foreground transition-colors font-medium",children:"Collapse all"})]})]}),d.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Success"})]}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500"}),d.jsx("span",{className:"text-muted-foreground",children:"Error"})]})]})]}),d.jsxs("div",{className:"border rounded-md overflow-hidden bg-background shadow-sm",children:[d.jsxs("div",{className:"flex items-center bg-muted/50 border-b border-border font-semibold text-[11px] text-foreground uppercase tracking-wide",children:[d.jsx("div",{className:"flex-shrink-0 py-2",style:{width:"360px",paddingLeft:"12px",paddingRight:"12px"},children:"Span Name"}),d.jsx("div",{className:"flex-shrink-0 py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"12px"},children:"Duration"}),d.jsx("div",{className:"flex-shrink-0 py-2",style:{width:"105px",paddingLeft:"12px",paddingRight:"6px"},children:"Tokens"}),d.jsx("div",{className:"flex-1 py-2",style:{paddingLeft:"2px",paddingRight:"12px"},children:"Timeline"})]}),s.map(g=>v(g))]}),n&&d.jsx("div",{className:"mt-3",children:m(n)})]})})}const ghe={UNKNOWN:"unknown",PENDING:"warning",RUNNING:"default",CANCELLED:"secondary",COMPLETED:"success",FAILED:"destructive"};function xhe(){var A,T;const{id:e}=np(),{data:t,isLoading:r,error:n}=wN(e),[i,a]=P.useState(!1),[o,s]=P.useState(!1),[l,u]=P.useState("overview"),c=(t==null?void 0:t.metrics)||[],f=(t==null?void 0:t.spans)||[],h=r,p=r,v=n,m=(A=t==null?void 0:t.meta)==null?void 0:A.execution_result,g=(m==null?void 0:m.path)&&(m==null?void 0:m.file_name);let y="";if(g){let _=m.path;if(_.includes(":")&&(_=_.split(":")[1]),_.includes("/")){const N=_.split("/");_=N[N.length-1],_.includes(":")&&(_=_.split(":")[1])}y=_}const{data:x,isLoading:b,error:S}=g2((t==null?void 0:t.teamId)||"",(t==null?void 0:t.projectId)||"",y,"execution",i&&g),w=()=>{!g||!t||(s(!1),a(!0))};S&&i&&console.error("Failed to load artifact:",S);const O=()=>{x!=null&&x.content&&(navigator.clipboard.writeText(x.content),s(!0),setTimeout(()=>s(!1),2e3))},j=()=>{if(!x)return"";const{content:_,filename:N,contentType:M}=x;if(M==="application/json"||N.endsWith(".json"))try{const R=JSON.parse(_);return JSON.stringify(R,null,2)}catch{return _}return _},E=()=>{if(!x)return"";const{filename:_,contentType:N}=x;return N==="application/json"||_.endsWith(".json")?"language-json":""};return r?d.jsxs("div",{className:"space-y-4",children:[d.jsx(Te,{className:"h-12 w-64"}),d.jsx(Te,{className:"h-96 w-full"})]}):n||!t?d.jsxs(de,{children:[d.jsxs(Ft,{children:[d.jsx(Bt,{children:"Error"}),d.jsx(dr,{children:"Failed to load run"})]}),d.jsx(he,{children:d.jsx("p",{className:"text-destructive",children:(n==null?void 0:n.message)||"Run not found"})})]}):d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Run Details"}),d.jsx("p",{className:"mt-1 text-muted-foreground font-mono text-sm",children:t.id})]}),d.jsx(jr,{variant:ghe[t.status],children:t.status})]}),d.jsxs(lm,{value:l,onValueChange:u,children:[d.jsxs(um,{children:[d.jsx(io,{value:"overview",children:"Overview"}),d.jsx(io,{value:"traces",children:"Traces"})]}),d.jsxs(ao,{value:"overview",className:"space-y-4",children:[d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Overview"}),d.jsxs("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Execution Result"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:g?d.jsxs("button",{onClick:w,disabled:b,className:"inline-flex items-center gap-1.5 text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 hover:underline",children:[d.jsx(nN,{className:"h-3.5 w-3.5"}),m.file_name]}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Tokens"}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:((T=t.meta)==null?void 0:T.total_tokens)!==void 0?d.jsxs(d.Fragment,{children:[Number(t.meta.total_tokens).toLocaleString(),d.jsxs("span",{className:"text-muted-foreground text-xs ml-1",children:["(",Number(t.meta.input_tokens||0).toLocaleString(),"↓ ",Number(t.meta.output_tokens||0).toLocaleString(),"↑)"]})]}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]}),d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Created"}),d.jsx("dd",{className:"mt-1.5 text-foreground text-sm",children:an(new Date(t.createdAt),{addSuffix:!0})})]})]}),t.meta&&Object.keys(t.meta).filter(_=>!["total_tokens","input_tokens","output_tokens","execution_result"].includes(_)).length>0&&d.jsxs("div",{className:"mt-5 pt-5 border-t",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metadata"}),d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:Object.entries(t.meta).filter(([_])=>!["total_tokens","input_tokens","output_tokens","execution_result"].includes(_)).map(([_,N])=>d.jsxs("div",{className:"break-words",children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:_}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm break-all",children:typeof N=="string"?N:JSON.stringify(N)})]},_))})]})]})}),d.jsx(de,{children:d.jsxs(he,{className:"p-4",children:[d.jsx("h3",{className:"text-base font-semibold mb-3",children:"Metrics"}),h?d.jsx(Te,{className:"h-32 w-full"}):c.length===0?d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No metrics logged for this run"}):d.jsx("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:c.map(_=>d.jsxs("div",{children:[d.jsx("dt",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:_.key}),d.jsx("dd",{className:"mt-1.5 text-foreground font-mono text-sm",children:_.value})]},_.id))})]})})]}),d.jsx(ao,{value:"traces",children:p?d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsx(Te,{className:"h-64 w-full"})})}):v?d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsxs("div",{className:"text-red-500",children:["Error loading traces: ",v.message]})})}):f&&f.length>0?d.jsx(yhe,{spans:f}):d.jsx(de,{children:d.jsx(he,{className:"p-4",children:d.jsx("div",{className:"flex h-24 items-center justify-center text-sm text-muted-foreground",children:"No traces available for this run"})})})})]}),d.jsx(tM,{open:i,onOpenChange:a,children:d.jsxs(tw,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[d.jsx(rw,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx(nw,{className:"text-base",children:"Artifact Content"}),d.jsx(iw,{className:"text-xs font-mono mt-1 truncate",children:(x==null?void 0:x.filename)||"Loading..."})]}),x&&d.jsx(lt,{variant:"outline",size:"sm",onClick:O,className:"ml-2 h-8 flex-shrink-0",children:o?d.jsxs(d.Fragment,{children:[d.jsx(zx,{className:"h-3.5 w-3.5 mr-1.5"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(tN,{className:"h-3.5 w-3.5 mr-1.5"}),"Copy"]})})]})}),d.jsx("div",{className:"flex-1 overflow-auto border rounded-md bg-slate-950 dark:bg-slate-950",children:b&&!x?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-slate-400 text-sm",children:"Loading artifact..."})}):S?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-red-400 text-sm",children:"Failed to load artifact"})}):d.jsx("pre",{className:`text-xs p-4 overflow-auto text-slate-50 ${E()}`,children:d.jsx("code",{className:"text-slate-50",children:j()})})})]})})]})}function IE({teamId:e,projectId:t,repoType:r,icon:n,title:i,color:a}){const{data:o,isLoading:s}=Mfe(e,t,r),[l,u]=P.useState(!1),[c,f]=P.useState(1),[h,p]=P.useState(!1),[v,m]=P.useState(""),[g,y]=P.useState(!1),x=10,{data:b,isLoading:S,error:w}=g2(e,t,v,r,h&&!!v),O=I=>{y(!1),m(I),p(!0)};w&&h&&console.error("Failed to load artifact:",w);const j=()=>{b!=null&&b.content&&(navigator.clipboard.writeText(b.content),y(!0),setTimeout(()=>y(!1),2e3))},E=()=>{if(!b)return"";const{content:I,filename:D,contentType:z}=b;if(z==="application/json"||D.endsWith(".json"))try{const C=JSON.parse(I);return JSON.stringify(C,null,2)}catch{return I}return I},A=()=>{if(!b)return"";const{filename:I,contentType:D}=b;return D==="application/json"||I.endsWith(".json")?"language-json":""};if(s)return d.jsxs("div",{className:"flex items-center gap-2 p-2 rounded border bg-card",children:[n,d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-xs font-medium",children:i}),d.jsx(Te,{className:"h-3 w-20 mt-0.5"})]})]});const T=o?Math.ceil(o.length/x):0,_=(c-1)*x,N=_+x,M=o==null?void 0:o.slice(_,N),R=o&&o.length>x;return d.jsxs("div",{className:"rounded border bg-card hover:bg-accent/50 transition-colors",children:[d.jsxs("button",{className:"w-full flex items-center gap-2 p-2 text-left",onClick:()=>u(!l),children:[n,d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:"text-xs font-medium",children:i}),d.jsx("div",{className:"text-xs text-muted-foreground",children:!o||o.length===0?"No artifacts":`${o.length} item${o.length===1?"":"s"}`})]}),o&&o.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(jr,{variant:"secondary",className:`${a} text-xs h-5 px-1.5`,children:o.length}),l?d.jsx(up,{className:"h-3.5 w-3.5 text-muted-foreground"}):d.jsx(Qi,{className:"h-3.5 w-3.5 text-muted-foreground"})]})]}),l&&o&&o.length>0&&d.jsxs("div",{className:"px-2 pb-2",children:[d.jsx("div",{className:"h-px bg-border mb-1"}),d.jsx("div",{className:"space-y-0.5",children:M==null?void 0:M.map((I,D)=>d.jsxs("button",{onClick:z=>{z.stopPropagation(),O(I)},disabled:S,className:"w-full flex items-center gap-1.5 py-1 px-1.5 rounded hover:bg-muted/50 transition-colors cursor-pointer group text-left",children:[d.jsxs("span",{className:"text-xs text-muted-foreground font-mono w-8 flex-shrink-0",children:[_+D+1,"."]}),d.jsx("code",{className:"text-sm bg-muted px-1.5 py-0.5 rounded flex-1 truncate",children:I}),d.jsx(nN,{className:"h-3 w-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]},I))}),R&&d.jsxs("div",{className:"flex items-center justify-between gap-2 mt-2 pt-2 border-t",children:[d.jsx(lt,{variant:"ghost",size:"sm",onClick:I=>{I.stopPropagation(),f(D=>Math.max(1,D-1))},disabled:c===1,className:"h-7 w-7 p-0",children:d.jsx(cp,{className:"h-3.5 w-3.5"})}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:["Page ",c," of ",T]}),d.jsx(lt,{variant:"ghost",size:"sm",onClick:I=>{I.stopPropagation(),f(D=>Math.min(T,D+1))},disabled:c===T,className:"h-7 w-7 p-0",children:d.jsx(Qi,{className:"h-3.5 w-3.5"})})]})]}),d.jsx(tM,{open:h,onOpenChange:p,children:d.jsxs(tw,{className:"max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[d.jsx(rw,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx(nw,{className:"text-base",children:"Artifact Content"}),d.jsx(iw,{className:"text-xs font-mono mt-1 truncate",children:(b==null?void 0:b.filename)||"Loading..."})]}),b&&d.jsx(lt,{variant:"outline",size:"sm",onClick:j,className:"ml-2 h-8 flex-shrink-0",children:g?d.jsxs(d.Fragment,{children:[d.jsx(zx,{className:"h-3.5 w-3.5 mr-1.5"}),"Copied"]}):d.jsxs(d.Fragment,{children:[d.jsx(tN,{className:"h-3.5 w-3.5 mr-1.5"}),"Copy"]})})]})}),d.jsx("div",{className:"flex-1 overflow-auto border rounded-md bg-slate-950 dark:bg-slate-950",children:S&&!b?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-slate-400 text-sm",children:"Loading artifact..."})}):w?d.jsx("div",{className:"flex items-center justify-center h-full",children:d.jsx("div",{className:"text-red-400 text-sm",children:"Failed to load artifact"})}):d.jsx("pre",{className:`text-xs p-4 overflow-auto text-slate-50 ${A()}`,children:d.jsx("code",{className:"text-slate-50",children:E()})})})]})})]})}function bhe({project:e,teamId:t}){const[r,n]=P.useState(!1);return d.jsxs(de,{className:"overflow-hidden hover:shadow-sm transition-shadow",children:[d.jsx(Ft,{className:"cursor-pointer hover:bg-muted/30 transition-colors p-3",onClick:()=>n(!r),children:d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[d.jsx("div",{className:"flex-shrink-0",children:r?d.jsx(up,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(Qi,{className:"h-4 w-4 text-muted-foreground"})}),d.jsx("div",{className:"flex-1 min-w-0",children:d.jsxs(Bt,{className:"text-sm font-medium truncate",children:[e.name," ",d.jsxs("span",{className:"text-sm text-muted-foreground font-normal",children:["(",e.id,")"]})]})})]}),d.jsx("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:d.jsx(aN,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),r&&d.jsx(he,{className:"pt-0 pb-2 px-3",children:d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[d.jsx(IE,{teamId:t,projectId:e.id,repoType:"execution",icon:d.jsx(mF,{className:"h-3.5 w-3.5 text-blue-500"}),title:"Execution Results",color:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300"}),d.jsx(IE,{teamId:t,projectId:e.id,repoType:"checkpoint",icon:d.jsx(rN,{className:"h-3.5 w-3.5 text-green-500"}),title:"Checkpoints",color:"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300"})]})})]})}function whe(){const{selectedTeamId:e}=fo(),[t,r]=P.useState(""),{data:n,isLoading:i}=fp(e||"",{pageSize:100}),a=n==null?void 0:n.filter(o=>{var s,l;return((s=o.name)==null?void 0:s.toLowerCase().includes(t.toLowerCase()))||((l=o.id)==null?void 0:l.toLowerCase().includes(t.toLowerCase()))});return d.jsxs("div",{className:"space-y-3 pb-6",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:"Artifacts"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Browse execution results and checkpoints across all projects"})]}),d.jsxs(jr,{variant:"secondary",className:"text-xs h-6 px-2",children:[(n==null?void 0:n.length)||0," projects"]})]}),n&&n.length>0&&d.jsxs("div",{className:"relative max-w-md",children:[d.jsx(Ja,{className:"absolute left-2.5 top-1/2 transform -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),d.jsx(So,{placeholder:"Search projects...",value:t,onChange:o=>r(o.target.value),className:"pl-8 h-9 text-sm focus:bg-blue-50 focus:border-blue-300 focus-visible:ring-0"})]}),i?d.jsxs("div",{className:"space-y-2",children:[d.jsx(Te,{className:"h-14 w-full"}),d.jsx(Te,{className:"h-14 w-full"}),d.jsx(Te,{className:"h-14 w-full"})]}):!n||n.length===0?d.jsx(de,{children:d.jsxs(he,{className:"flex flex-col items-center justify-center py-10",children:[d.jsx("div",{className:"rounded-full bg-muted p-3 mb-3",children:d.jsx(aN,{className:"h-6 w-6 text-muted-foreground"})}),d.jsx("h3",{className:"text-xs font-semibold mb-1",children:"No Projects Found"}),d.jsx("p",{className:"text-xs text-muted-foreground text-center max-w-sm",children:"Create a project to start managing artifacts for your experiments"})]})}):a&&a.length===0?d.jsx(de,{children:d.jsxs(he,{className:"flex flex-col items-center justify-center py-8",children:[d.jsx(Ja,{className:"h-8 w-8 text-muted-foreground mb-2"}),d.jsx("h3",{className:"text-xs font-semibold mb-0.5",children:"No matches found"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Try adjusting your search query"})]})}):d.jsx("div",{className:"space-y-2",children:a==null?void 0:a.map(o=>d.jsx(bhe,{project:o,teamId:e||""},o.id))})]})}function She(){const[e,t]=P.useState(null),[r,n]=P.useState(!0),[i,a]=P.useState(null),{selectedTeamId:o,setSelectedTeamId:s}=fo(),l=hT();return P.useEffect(()=>{async function u(){try{const c=await wL(),f=localStorage.getItem("alphatrion_user_id");f&&f!==c&&(console.log("User ID changed, clearing cache"),l.clear()),localStorage.setItem("alphatrion_user_id",c);const h=await Xt(Qt.getUser,{id:c});if(!h.user)throw new Error(`User with ID ${c} not found`);t(h.user);const p=await Xt(Qt.listTeams,{userId:c});if(p.teams&&p.teams.length>0){const v=`alphatrion_selected_team_${c}`,m=localStorage.getItem(v);let g;m&&p.teams.find(x=>x.id===m)?g=m:g=p.teams[0].id,s(g,c)}}catch(c){console.error("Failed to initialize app:",c),a(c)}finally{n(!1)}}u()},[s,l]),r?d.jsx("div",{className:"flex h-screen items-center justify-center",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),d.jsx("p",{className:"text-gray-600",children:"Loading user information..."})]})}):i?d.jsx("div",{className:"flex h-screen items-center justify-center",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("h1",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error Loading User"}),d.jsx("p",{className:"text-gray-700 mb-2",children:i.message}),d.jsx("p",{className:"text-gray-500 text-sm",children:"Please verify:"}),d.jsxs("ul",{className:"text-gray-500 text-sm text-left mt-2 space-y-1",children:[d.jsx("li",{children:"• The user ID exists in the database"}),d.jsx("li",{children:"• The backend server is running"}),d.jsx("li",{children:"• The dashboard was started with correct --userid flag"})]})]})}):e?d.jsx("div",{className:"h-full",children:d.jsx(Q3,{user:e,children:d.jsx(aL,{children:d.jsxs(tr,{path:"/",element:d.jsx($5,{}),children:[d.jsx(tr,{index:!0,element:d.jsx(ufe,{})}),d.jsxs(tr,{path:"projects",children:[d.jsx(tr,{index:!0,element:d.jsx(dfe,{})}),d.jsx(tr,{path:":id",element:d.jsx(pfe,{})})]}),d.jsxs(tr,{path:"experiments",children:[d.jsx(tr,{index:!0,element:d.jsx(vfe,{})}),d.jsx(tr,{path:":id",element:d.jsx(Pfe,{})}),d.jsx(tr,{path:"compare",element:d.jsx(Tfe,{})})]}),d.jsxs(tr,{path:"runs",children:[d.jsx(tr,{index:!0,element:d.jsx(kfe,{})}),d.jsx(tr,{path:":id",element:d.jsx(xhe,{})})]}),d.jsx(tr,{path:"artifacts",element:d.jsx(whe,{})})]})})})}):null}Cv.createRoot(document.getElementById("root")).render(d.jsx(k.StrictMode,{children:d.jsx(eR,{client:gL,children:d.jsx(hL,{children:d.jsx(xL,{children:d.jsx(She,{})})})})}));export{Yc as c,Ee as g,xre as p,P as r}; diff --git a/dashboard/static/assets/react-plotly-BtWP0KBj.js b/dashboard/static/assets/react-plotly-vwUBUZui.js similarity index 99% rename from dashboard/static/assets/react-plotly-BtWP0KBj.js rename to dashboard/static/assets/react-plotly-vwUBUZui.js index aa38cf6d..c709625d 100644 --- a/dashboard/static/assets/react-plotly-BtWP0KBj.js +++ b/dashboard/static/assets/react-plotly-vwUBUZui.js @@ -1,4 +1,4 @@ -import{r as FD,p as OD,c as BD,g as ND}from"./index-CvEzrI53.js";function UD(zh,Yh){for(var Fh=0;FhAu[Th]})}}}return Object.freeze(Object.defineProperty(zh,Symbol.toStringTag,{value:"Module"}))}var rb={},V5={};(function(zh){function Yh(bs){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Hs){return typeof Hs}:function(Hs){return Hs&&typeof Symbol=="function"&&Hs.constructor===Symbol&&Hs!==Symbol.prototype?"symbol":typeof Hs},Yh(bs)}Object.defineProperty(zh,"__esModule",{value:!0}),zh.default=qm;var Fh=Yv(FD),Au=Th(OD);function Th(bs){return bs&&bs.__esModule?bs:{default:bs}}function uv(bs){if(typeof WeakMap!="function")return null;var Hs=new WeakMap,Mc=new WeakMap;return(uv=function(bi){return bi?Mc:Hs})(bs)}function Yv(bs,Hs){if(bs&&bs.__esModule)return bs;if(bs===null||Yh(bs)!=="object"&&typeof bs!="function")return{default:bs};var Mc=uv(Hs);if(Mc&&Mc.has(bs))return Mc.get(bs);var zc={},bi=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nc in bs)if(nc!=="default"&&Object.prototype.hasOwnProperty.call(bs,nc)){var bo=bi?Object.getOwnPropertyDescriptor(bs,nc):null;bo&&(bo.get||bo.set)?Object.defineProperty(zc,nc,bo):zc[nc]=bs[nc]}return zc.default=bs,Mc&&Mc.set(bs,zc),zc}function Gy(bs,Hs){if(!(bs instanceof Hs))throw new TypeError("Cannot call a class as a function")}function M0(bs,Hs){for(var Mc=0;Mc"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gp(bs){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Mc){return Mc.__proto__||Object.getPrototypeOf(Mc)},gp(bs)}var Ll=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],yp=typeof window<"u";function qm(bs){var Hs=function(Mc){Hy(bi,Mc);var zc=jm(bi);function bi(nc){var bo;return Gy(this,bi),bo=zc.call(this,nc),bo.p=Promise.resolve(),bo.resizeHandler=null,bo.handlers={},bo.syncWindowResize=bo.syncWindowResize.bind(sh(bo)),bo.syncEventHandlers=bo.syncEventHandlers.bind(sh(bo)),bo.attachUpdateEvents=bo.attachUpdateEvents.bind(sh(bo)),bo.getRef=bo.getRef.bind(sh(bo)),bo.handleUpdate=bo.handleUpdate.bind(sh(bo)),bo.figureCallback=bo.figureCallback.bind(sh(bo)),bo.updatePlotly=bo.updatePlotly.bind(sh(bo)),bo}return mp(bi,[{key:"updatePlotly",value:function(bo,Fc,Eh){var Bi=this;this.p=this.p.then(function(){if(!Bi.unmounting){if(!Bi.el)throw new Error("Missing element reference");return bs.react(Bi.el,{data:Bi.props.data,layout:Bi.props.layout,config:Bi.props.config,frames:Bi.props.frames})}}).then(function(){Bi.unmounting||(Bi.syncWindowResize(bo),Bi.syncEventHandlers(),Bi.figureCallback(Fc),Eh&&Bi.attachUpdateEvents())}).catch(function(Yo){Bi.props.onError&&Bi.props.onError(Yo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(bo){this.unmounting=!1;var Fc=bo.frames&&bo.frames.length?bo.frames.length:0,Eh=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Bi=!(bo.layout===this.props.layout&&bo.data===this.props.data&&bo.config===this.props.config&&Eh===Fc),Yo=bo.revision!==void 0,_p=bo.revision!==this.props.revision;!Bi&&(!Yo||Yo&&!_p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&yp&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),bs.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.on(Fc,bo.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.removeListener(Fc,bo.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(bo){if(typeof bo=="function"){var Fc=this.el,Eh=Fc.data,Bi=Fc.layout,Yo=this.el._transitionData?this.el._transitionData._frames:null,_p={data:Eh,layout:Bi,frames:Yo};bo(_p,this.el)}}},{key:"syncWindowResize",value:function(bo){var Fc=this;yp&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return bs.Plots.resize(Fc.el)},window.addEventListener("resize",this.resizeHandler),bo&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(bo){this.el=bo,this.props.debug&&yp&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var bo=this;Ll.forEach(function(Fc){var Eh=bo.props["on"+Fc],Bi=bo.handlers[Fc],Yo=!!Bi;Eh&&!Yo?bo.addEventHandler(Fc,Eh):!Eh&&Yo?bo.removeEventHandler(Fc):Eh&&Yo&&Eh!==Bi&&(bo.removeEventHandler(Fc),bo.addEventHandler(Fc,Eh))})}},{key:"addEventHandler",value:function(bo,Fc){this.handlers[bo]=Fc,this.el.on(this.getPlotlyEventName(bo),this.handlers[bo])}},{key:"removeEventHandler",value:function(bo){this.el.removeListener(this.getPlotlyEventName(bo),this.handlers[bo]),delete this.handlers[bo]}},{key:"getPlotlyEventName",value:function(bo){return"plotly_"+bo.toLowerCase()}},{key:"render",value:function(){return Fh.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),bi}(Fh.Component);return Hs.propTypes={data:Au.default.arrayOf(Au.default.object),config:Au.default.object,layout:Au.default.object,frames:Au.default.arrayOf(Au.default.object),revision:Au.default.number,onInitialized:Au.default.func,onPurge:Au.default.func,onError:Au.default.func,onUpdate:Au.default.func,debug:Au.default.bool,style:Au.default.object,className:Au.default.string,useResizeHandler:Au.default.bool,divId:Au.default.string},Ll.forEach(function(Mc){Hs.propTypes["on"+Mc]=Au.default.func}),Hs.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Hs}})(V5);var q5={exports:{}};(function(zh){var Yh={};(function(Fh,Au){zh.exports?zh.exports=Au():Fh.moduleName=Au()})(typeof self<"u"?self:BD,()=>{var Fh=(()=>{var Au=Object.create,Th=Object.defineProperty,uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,M0=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,Hy=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,jm=Object.prototype.propertyIsEnumerable,Vm=(Y,G,h)=>G in Y?Th(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,sh=(Y,G)=>{for(var h in G||(G={}))Cd.call(G,h)&&Vm(Y,h,G[h]);if(mp)for(var h of mp(G))jm.call(G,h)&&Vm(Y,h,G[h]);return Y},Ld=(Y,G)=>uv(Y,Gy(G)),gp=(Y,G)=>{var h={};for(var b in Y)Cd.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&mp)for(var b of mp(Y))G.indexOf(b)<0&&jm.call(Y,b)&&(h[b]=Y[b]);return h},Ll=(Y,G)=>function(){return Y&&(G=(0,Y[M0(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[M0(Y)[0]])((G={exports:{}}).exports,G),G.exports},yp=(Y,G)=>{for(var h in G)Th(Y,h,{get:G[h],enumerable:!0})},qm=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of M0(G))!Cd.call(Y,S)&&S!==h&&Th(Y,S,{get:()=>G[S],enumerable:!(b=Yv(G,S))||b.enumerable});return Y},bs=(Y,G,h)=>(h=Y!=null?Au(Hy(Y)):{},qm(Th(h,"default",{value:Y,enumerable:!0}),Y)),Hs=Y=>qm(Th({},"__esModule",{value:!0}),Y),Mc=He({"src/version.js"(Y){Y.version="3.3.1"}}),zc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(g,x,A,M){return Object.defineProperty(g,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=function(){var g,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,m){A=new M(w,m),x?x.next=A:g=A,x=A,A=void 0},drain:function(){var w=g;for(g=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}}();function r(l,g){E.add(l,g),S||(S=t(E.drain))}function o(l){var g,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(g=l.then),typeof g=="function"?g:!1}function a(){for(var l=0;l0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=l,g.state=2,g.chain.length>0&&r(a,g))}function f(l,g,x,A){for(var M=0;MPe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pede?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}return mt},h.max=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}return mt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt,qt;if(arguments.length===1){for(;++Ke=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:mt=Tt}return vt},right:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)>0?mt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,mt,Tt;vt;)Tt=Math.random()*vt--|0,mt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=mt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],mt=new Array(Ke<0?0:Ke);Pe=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--mt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],mt=g(l(Ke)),Tt=-1,qt;if(de*=mt,Pe*=mt,Ke*=mt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/mt);else for(;(qt=de+Ke*++Tt)=Pe.length)return mt?mt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,an,da,La=new A,Oa;++Lr=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return mt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var mt=Pe,Tt=-1,qt=mt.length,Vt;++Tt=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function mt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:mt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,mt=-1;if(Pe=Ke.classList){for(;++mt=0;)(Tt=Ke[vt])&&(mt&&mt!==Tt.nextSibling&&mt.parentNode.insertBefore(Tt,mt),mt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe=Pe&&(Pe=mt+1);!(or=qt[Pe])&&++Pe0&&(de=de.slice(0,mt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return mt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var mt=this,Tt=vt.relatedTarget;(!Tt||Tt!==mt&&!(Tt.compareDocumentPosition(mt)&8))&&Ke.call(mt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var mt=e(de).style,Tt=mt[vr];mt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(mt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return gt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var mt=t(de);if(mt.scrollX||mt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,mt=Pe.length,Tt;vt1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],mt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr0&&(pi=pi.transition().duration(qt)),pi.call(on.event)}function Ti(){La&&La.domain(da.range().map(function(pi){return(pi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(pi){return(pi-de.y)/de.k}).map(Oa.invert))}function ki(pi){Vt++||pi({type:"zoomstart"})}function Go(pi){Ti(),pi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Pi(pi){--Vt||(pi({type:"zoomend"}),Ke=null)}function oo(){var pi=this,ko=an.of(pi,arguments),Xo=0,Os=h.select(t(pi)).on(Ir,gs).on(Lr,Bs),Ms=Fa(h.mouse(pi)),Zl=hr(pi);$a.call(pi),ki(ko);function gs(){Xo=1,Kn(h.mouse(pi),Ms),Go(ko)}function Bs(){Os.on(Ir,null).on(Lr,null),Zl(Xo),Pi(ko)}}function $o(){var pi=this,ko=an.of(pi,arguments),Xo={},Os=0,Ms,Zl=".zoom-"+h.event.changedTouches[0].identifier,gs="touchmove"+Zl,Bs="touchend"+Zl,du=[],ul=h.select(pi),st=hr(pi);ur(),ki(ko),ul.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(pi);return Ms=de.k,Qr.forEach(function($r){$r.identifier in Xo&&(Xo[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(gs,ua).on(Bs,Ua),du.push(Qr);for(var $r=h.event.changedTouches,un=0,sn=$r.length;un1){var Qn=ln[0],jn=ln[1],yn=Qn[0]-jn[0],Wa=Qn[1]-jn[1];Os=yn*yn+Wa*Wa}}function ua(){var Qr=h.touches(pi),$r,un,sn,ln;$a.call(pi);for(var xn=0,Qn=Qr.length;xn1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,mt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-mt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(mt-vt)*Vt/60:Vt<180?mt:Vt<240?vt+(mt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Bn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Bn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,mt=vt+Pe/500,Tt=vt-Ke/200;return mt=Za(mt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Bn(wa(3.2404542*mt-1.5371385*vt-.4985314*Tt),wa(-.969266*mt+1.8760108*vt+.041556*Tt),wa(.0556434*mt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function rn(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Bn;function Bn(de,Pe,Ke){return this instanceof Bn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Bn?new Bn(de.r,de.g,de.b):Sr(""+de,Bn,mn):new Bn(de,Pe,Ke)}function Hn(de){return new Bn(de>>16,de>>8&255,de&255)}function At(de){return Hn(de)+""}var ft=Bn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,mt=30;return!Pe&&!Ke&&!vt?new Bn(mt,mt,mt):(Pe&&Pe>4,vt=vt>>4|vt,mt=or&240,mt=mt>>4|mt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,mt=(or&65280)>>8,Tt=or&255)),Pe(vt,mt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),mt=Math.max(de,Pe,Ke),Tt=mt-vt,qt,Vt,or=(mt+vt)/2;return Tt?(Vt=or<.5?Tt/(mt+vt):Tt/(2-mt-vt),de==mt?qt=(Pe-Ke)/Tt+(Pe0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=rn((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),mt=rn((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=rn((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*mt-16,500*(vt-mt),200*(mt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Hn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var mt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(mt,Vt)}catch(ia){Tt.error.call(mt,ia);return}Tt.load.call(mt,Zr)}else Tt.error.call(mt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(mt,Vt)}finally{h.event=Zr}},mt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",mt)},mt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",mt):Pe},mt.responseType=function(Lr){return arguments.length?(or=Lr,mt):or},mt.response=function(Lr){return Ke=Lr,mt},["get","post"].forEach(function(Lr){mt[Lr]=function(){return mt.send.apply(mt,[Lr].concat(S(arguments)))}}),mt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&&mt.on("error",ia).on("load",function(an){ia(null,an)}),Tt.beforesend.call(mt,Vt),Vt.send(Zr??null),mt},mt.abort=function(){return Vt.abort(),mt},h.rebind(mt,Tt,"on"),vt==null?mt:mt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+` +import{r as FD,p as OD,c as BD,g as ND}from"./index-jnqNSGCv.js";function UD(zh,Yh){for(var Fh=0;FhAu[Th]})}}}return Object.freeze(Object.defineProperty(zh,Symbol.toStringTag,{value:"Module"}))}var rb={},V5={};(function(zh){function Yh(bs){"@babel/helpers - typeof";return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Hs){return typeof Hs}:function(Hs){return Hs&&typeof Symbol=="function"&&Hs.constructor===Symbol&&Hs!==Symbol.prototype?"symbol":typeof Hs},Yh(bs)}Object.defineProperty(zh,"__esModule",{value:!0}),zh.default=qm;var Fh=Yv(FD),Au=Th(OD);function Th(bs){return bs&&bs.__esModule?bs:{default:bs}}function uv(bs){if(typeof WeakMap!="function")return null;var Hs=new WeakMap,Mc=new WeakMap;return(uv=function(bi){return bi?Mc:Hs})(bs)}function Yv(bs,Hs){if(bs&&bs.__esModule)return bs;if(bs===null||Yh(bs)!=="object"&&typeof bs!="function")return{default:bs};var Mc=uv(Hs);if(Mc&&Mc.has(bs))return Mc.get(bs);var zc={},bi=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var nc in bs)if(nc!=="default"&&Object.prototype.hasOwnProperty.call(bs,nc)){var bo=bi?Object.getOwnPropertyDescriptor(bs,nc):null;bo&&(bo.get||bo.set)?Object.defineProperty(zc,nc,bo):zc[nc]=bs[nc]}return zc.default=bs,Mc&&Mc.set(bs,zc),zc}function Gy(bs,Hs){if(!(bs instanceof Hs))throw new TypeError("Cannot call a class as a function")}function M0(bs,Hs){for(var Mc=0;Mc"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gp(bs){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Mc){return Mc.__proto__||Object.getPrototypeOf(Mc)},gp(bs)}var Ll=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],yp=typeof window<"u";function qm(bs){var Hs=function(Mc){Hy(bi,Mc);var zc=jm(bi);function bi(nc){var bo;return Gy(this,bi),bo=zc.call(this,nc),bo.p=Promise.resolve(),bo.resizeHandler=null,bo.handlers={},bo.syncWindowResize=bo.syncWindowResize.bind(sh(bo)),bo.syncEventHandlers=bo.syncEventHandlers.bind(sh(bo)),bo.attachUpdateEvents=bo.attachUpdateEvents.bind(sh(bo)),bo.getRef=bo.getRef.bind(sh(bo)),bo.handleUpdate=bo.handleUpdate.bind(sh(bo)),bo.figureCallback=bo.figureCallback.bind(sh(bo)),bo.updatePlotly=bo.updatePlotly.bind(sh(bo)),bo}return mp(bi,[{key:"updatePlotly",value:function(bo,Fc,Eh){var Bi=this;this.p=this.p.then(function(){if(!Bi.unmounting){if(!Bi.el)throw new Error("Missing element reference");return bs.react(Bi.el,{data:Bi.props.data,layout:Bi.props.layout,config:Bi.props.config,frames:Bi.props.frames})}}).then(function(){Bi.unmounting||(Bi.syncWindowResize(bo),Bi.syncEventHandlers(),Bi.figureCallback(Fc),Eh&&Bi.attachUpdateEvents())}).catch(function(Yo){Bi.props.onError&&Bi.props.onError(Yo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(bo){this.unmounting=!1;var Fc=bo.frames&&bo.frames.length?bo.frames.length:0,Eh=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Bi=!(bo.layout===this.props.layout&&bo.data===this.props.data&&bo.config===this.props.config&&Eh===Fc),Yo=bo.revision!==void 0,_p=bo.revision!==this.props.revision;!Bi&&(!Yo||Yo&&!_p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&yp&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),bs.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.on(Fc,bo.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var bo=this;!this.el||!this.el.removeListener||He.forEach(function(Fc){bo.el.removeListener(Fc,bo.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(bo){if(typeof bo=="function"){var Fc=this.el,Eh=Fc.data,Bi=Fc.layout,Yo=this.el._transitionData?this.el._transitionData._frames:null,_p={data:Eh,layout:Bi,frames:Yo};bo(_p,this.el)}}},{key:"syncWindowResize",value:function(bo){var Fc=this;yp&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return bs.Plots.resize(Fc.el)},window.addEventListener("resize",this.resizeHandler),bo&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(bo){this.el=bo,this.props.debug&&yp&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var bo=this;Ll.forEach(function(Fc){var Eh=bo.props["on"+Fc],Bi=bo.handlers[Fc],Yo=!!Bi;Eh&&!Yo?bo.addEventHandler(Fc,Eh):!Eh&&Yo?bo.removeEventHandler(Fc):Eh&&Yo&&Eh!==Bi&&(bo.removeEventHandler(Fc),bo.addEventHandler(Fc,Eh))})}},{key:"addEventHandler",value:function(bo,Fc){this.handlers[bo]=Fc,this.el.on(this.getPlotlyEventName(bo),this.handlers[bo])}},{key:"removeEventHandler",value:function(bo){this.el.removeListener(this.getPlotlyEventName(bo),this.handlers[bo]),delete this.handlers[bo]}},{key:"getPlotlyEventName",value:function(bo){return"plotly_"+bo.toLowerCase()}},{key:"render",value:function(){return Fh.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),bi}(Fh.Component);return Hs.propTypes={data:Au.default.arrayOf(Au.default.object),config:Au.default.object,layout:Au.default.object,frames:Au.default.arrayOf(Au.default.object),revision:Au.default.number,onInitialized:Au.default.func,onPurge:Au.default.func,onError:Au.default.func,onUpdate:Au.default.func,debug:Au.default.bool,style:Au.default.object,className:Au.default.string,useResizeHandler:Au.default.bool,divId:Au.default.string},Ll.forEach(function(Mc){Hs.propTypes["on"+Mc]=Au.default.func}),Hs.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Hs}})(V5);var q5={exports:{}};(function(zh){var Yh={};(function(Fh,Au){zh.exports?zh.exports=Au():Fh.moduleName=Au()})(typeof self<"u"?self:BD,()=>{var Fh=(()=>{var Au=Object.create,Th=Object.defineProperty,uv=Object.defineProperties,Yv=Object.getOwnPropertyDescriptor,Gy=Object.getOwnPropertyDescriptors,M0=Object.getOwnPropertyNames,mp=Object.getOwnPropertySymbols,Hy=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty,jm=Object.prototype.propertyIsEnumerable,Vm=(Y,G,h)=>G in Y?Th(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,sh=(Y,G)=>{for(var h in G||(G={}))Cd.call(G,h)&&Vm(Y,h,G[h]);if(mp)for(var h of mp(G))jm.call(G,h)&&Vm(Y,h,G[h]);return Y},Ld=(Y,G)=>uv(Y,Gy(G)),gp=(Y,G)=>{var h={};for(var b in Y)Cd.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&mp)for(var b of mp(Y))G.indexOf(b)<0&&jm.call(Y,b)&&(h[b]=Y[b]);return h},Ll=(Y,G)=>function(){return Y&&(G=(0,Y[M0(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[M0(Y)[0]])((G={exports:{}}).exports,G),G.exports},yp=(Y,G)=>{for(var h in G)Th(Y,h,{get:G[h],enumerable:!0})},qm=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of M0(G))!Cd.call(Y,S)&&S!==h&&Th(Y,S,{get:()=>G[S],enumerable:!(b=Yv(G,S))||b.enumerable});return Y},bs=(Y,G,h)=>(h=Y!=null?Au(Hy(Y)):{},qm(Th(h,"default",{value:Y,enumerable:!0}),Y)),Hs=Y=>qm(Th({},"__esModule",{value:!0}),Y),Mc=He({"src/version.js"(Y){Y.version="3.3.1"}}),zc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(g){return setImmediate(g)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(g,x,A,M){return Object.defineProperty(g,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=function(){var g,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,m){A=new M(w,m),x?x.next=A:g=A,x=A,A=void 0},drain:function(){var w=g;for(g=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}}();function r(l,g){E.add(l,g),S||(S=t(E.drain))}function o(l){var g,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(g=l.then),typeof g=="function"?g:!1}function a(){for(var l=0;l0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var g=this;g.triggered||(g.triggered=!0,g.def&&(g=g.def),g.msg=l,g.state=2,g.chain.length>0&&r(a,g))}function f(l,g,x,A){for(var M=0;MPe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pede?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++KeTt&&(mt=Tt)}return mt},h.max=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt;if(arguments.length===1){for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}else{for(;++Ke=Tt){mt=Tt;break}for(;++Kemt&&(mt=Tt)}return mt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,mt,Tt,qt;if(arguments.length===1){for(;++Ke=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt=Tt){mt=qt=Tt;break}for(;++KeTt&&(mt=Tt),qt1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:mt=Tt}return vt},right:function(Pe,Ke,vt,mt){for(arguments.length<3&&(vt=0),arguments.length<4&&(mt=Pe.length);vt>>1;de(Pe[Tt],Ke)>0?mt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,mt,Tt;vt;)Tt=Math.random()*vt--|0,mt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=mt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],mt=new Array(Ke<0?0:Ke);Pe=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--mt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],mt=g(l(Ke)),Tt=-1,qt;if(de*=mt,Pe*=mt,Ke*=mt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/mt);else for(;(qt=de+Ke*++Tt)=Pe.length)return mt?mt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,an,da,La=new A,Oa;++Lr=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return mt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var mt=Pe,Tt=-1,qt=mt.length,Vt;++Tt=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function mt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:mt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,mt=-1;if(Pe=Ke.classList){for(;++mt=0;)(Tt=Ke[vt])&&(mt&&mt!==Tt.nextSibling&&mt.parentNode.insertBefore(Tt,mt),mt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe=Pe&&(Pe=mt+1);!(or=qt[Pe])&&++Pe0&&(de=de.slice(0,mt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return mt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var mt=this,Tt=vt.relatedTarget;(!Tt||Tt!==mt&&!(Tt.compareDocumentPosition(mt)&8))&&Ke.call(mt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var mt=e(de).style,Tt=mt[vr];mt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(mt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return gt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var mt=t(de);if(mt.scrollX||mt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,mt=Pe.length,Tt;vt1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],mt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr0&&(pi=pi.transition().duration(qt)),pi.call(on.event)}function Ti(){La&&La.domain(da.range().map(function(pi){return(pi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(pi){return(pi-de.y)/de.k}).map(Oa.invert))}function ki(pi){Vt++||pi({type:"zoomstart"})}function Go(pi){Ti(),pi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Pi(pi){--Vt||(pi({type:"zoomend"}),Ke=null)}function oo(){var pi=this,ko=an.of(pi,arguments),Xo=0,Os=h.select(t(pi)).on(Ir,gs).on(Lr,Bs),Ms=Fa(h.mouse(pi)),Zl=hr(pi);$a.call(pi),ki(ko);function gs(){Xo=1,Kn(h.mouse(pi),Ms),Go(ko)}function Bs(){Os.on(Ir,null).on(Lr,null),Zl(Xo),Pi(ko)}}function $o(){var pi=this,ko=an.of(pi,arguments),Xo={},Os=0,Ms,Zl=".zoom-"+h.event.changedTouches[0].identifier,gs="touchmove"+Zl,Bs="touchend"+Zl,du=[],ul=h.select(pi),st=hr(pi);ur(),ki(ko),ul.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(pi);return Ms=de.k,Qr.forEach(function($r){$r.identifier in Xo&&(Xo[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(gs,ua).on(Bs,Ua),du.push(Qr);for(var $r=h.event.changedTouches,un=0,sn=$r.length;un1){var Qn=ln[0],jn=ln[1],yn=Qn[0]-jn[0],Wa=Qn[1]-jn[1];Os=yn*yn+Wa*Wa}}function ua(){var Qr=h.touches(pi),$r,un,sn,ln;$a.call(pi);for(var xn=0,Qn=Qr.length;xn1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,mt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-mt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(mt-vt)*Vt/60:Vt<180?mt:Vt<240?vt+(mt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Bn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Bn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,mt=vt+Pe/500,Tt=vt-Ke/200;return mt=Za(mt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Bn(wa(3.2404542*mt-1.5371385*vt-.4985314*Tt),wa(-.969266*mt+1.8760108*vt+.041556*Tt),wa(.0556434*mt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function rn(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Bn;function Bn(de,Pe,Ke){return this instanceof Bn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Bn?new Bn(de.r,de.g,de.b):Sr(""+de,Bn,mn):new Bn(de,Pe,Ke)}function Hn(de){return new Bn(de>>16,de>>8&255,de&255)}function At(de){return Hn(de)+""}var ft=Bn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,mt=30;return!Pe&&!Ke&&!vt?new Bn(mt,mt,mt):(Pe&&Pe>4,vt=vt>>4|vt,mt=or&240,mt=mt>>4|mt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,mt=(or&65280)>>8,Tt=or&255)),Pe(vt,mt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),mt=Math.max(de,Pe,Ke),Tt=mt-vt,qt,Vt,or=(mt+vt)/2;return Tt?(Vt=or<.5?Tt/(mt+vt):Tt/(2-mt-vt),de==mt?qt=(Pe-Ke)/Tt+(Pe0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=rn((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),mt=rn((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=rn((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*mt-16,500*(vt-mt),200*(mt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Hn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var mt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(mt,Vt)}catch(ia){Tt.error.call(mt,ia);return}Tt.load.call(mt,Zr)}else Tt.error.call(mt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(mt,Vt)}finally{h.event=Zr}},mt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",mt)},mt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",mt):Pe},mt.responseType=function(Lr){return arguments.length?(or=Lr,mt):or},mt.response=function(Lr){return Ke=Lr,mt},["get","post"].forEach(function(Lr){mt[Lr]=function(){return mt.send.apply(mt,[Lr].concat(S(arguments)))}}),mt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&&mt.on("error",ia).on("load",function(an){ia(null,an)}),Tt.beforesend.call(mt,Vt),Vt.send(Zr??null),mt},mt.abort=function(){return Vt.abort(),mt},h.rebind(mt,Tt,"on"),vt==null?mt:mt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+` ]`),vt=de.charCodeAt(0);function mt(Ir,Lr,Zr){arguments.length<3&&(Zr=Lr,Lr=null);var ia=xr(Ir,Pe,Lr==null?Tt:qt(Lr),Zr);return ia.row=function(la){return arguments.length?ia.response((Lr=la)==null?Tt:qt(la)):Lr},ia}function Tt(Ir){return mt.parse(Ir.responseText)}function qt(Ir){return function(Lr){return mt.parse(Lr.responseText,Ir)}}mt.parse=function(Ir,Lr){var Zr;return mt.parseRows(Ir,function(ia,la){if(Zr)return Zr(ia,la-1);var an=function(da){for(var La={},Oa=ia.length,Qa=0;Qa=an)return ia;if(Qa)return Qa=!1,Zr;var Ln=da;if(Ir.charCodeAt(Ln)===34){for(var oi=Ln;oi++24?(isFinite(Pe)&&(clearTimeout(ha),ha=setTimeout(Xn,Pe)),Wr=0):(Wr=1,Un(Xn))}h.timer.flush=function(){ni(),di()};function ni(){for(var de=Date.now(),Pe=xa;Pe;)de>=Pe.t&&Pe.c(de-Pe.t)&&(Pe.c=null),Pe=Pe.n;return de}function di(){for(var de,Pe=xa,Ke=1/0;Pe;)Pe.c?(Pe.t=0;--Vt)da.push(mt[Ir[Zr[Vt]][2]]);for(Vt=+la;Vt1&&xt(de[Ke[vt-2]],de[Ke[vt-1]],de[mt])<=0;)--vt;Ke[vt++]=mt}return Ke.slice(0,vt)}function to(de,Pe){return de[0]-Pe[0]||de[1]-Pe[1]}h.geom.polygon=function(de){return V(de,Gi),de};var Gi=h.geom.polygon.prototype=[];Gi.area=function(){for(var de=-1,Pe=this.length,Ke,vt=this[Pe-1],mt=0;++deWe)Vt=Vt.L;else if(qt=Pe-hi(Vt,Ke),qt>We){if(!Vt.R){vt=Vt;break}Vt=Vt.R}else{Tt>-We?(vt=Vt.P,mt=Vt):qt>-We?(vt=Vt,mt=Vt.N):vt=mt=Vt;break}var or=rs(de);if(Bo.insert(vt,or),!(!vt&&!mt)){if(vt===mt){as(vt),mt=rs(vt.site),Bo.insert(or,mt),or.edge=mt.edge=Rs(vt.site,or.site),qo(vt),qo(mt);return}if(!mt){or.edge=Rs(vt.site,or.site);return}as(vt),as(mt);var Ir=vt.site,Lr=Ir.x,Zr=Ir.y,ia=de.x-Lr,la=de.y-Zr,an=mt.site,da=an.x-Lr,La=an.y-Zr,Oa=2*(ia*La-la*da),Qa=ia*ia+la*la,on=da*da+La*La,Fa={x:(La*Qa-la*on)/Oa+Lr,y:(ia*on-da*Qa)/Oa+Zr};Ii(mt.edge,Ir,an,Fa),or.edge=Rs(Ir,de,null,Fa),mt.edge=Rs(de,an,null,Fa),qo(vt),qo(mt)}}function Fn(de,Pe){var Ke=de.site,vt=Ke.x,mt=Ke.y,Tt=mt-Pe;if(!Tt)return vt;var qt=de.P;if(!qt)return-1/0;Ke=qt.site;var Vt=Ke.x,or=Ke.y,Ir=or-Pe;if(!Ir)return Vt;var Lr=Vt-vt,Zr=1/Tt-1/Ir,ia=Lr/Ir;return Zr?(-ia+Math.sqrt(ia*ia-2*Zr*(Lr*Lr/(-2*Ir)-or+Ir/2+mt-Tt/2)))/Zr+vt:(vt+Vt)/2}function hi(de,Pe){var Ke=de.N;if(Ke)return Fn(Ke,Pe);var vt=de.site;return vt.y===Pe?vt.x:1/0}function _s(de){this.site=de,this.edges=[]}_s.prototype.prepare=function(){for(var de=this.edges,Pe=de.length,Ke;Pe--;)Ke=de[Pe].edge,(!Ke.b||!Ke.a)&&de.splice(Pe,1);return de.sort(Fi),de.length};function Po(de){for(var Pe=de[0][0],Ke=de[1][0],vt=de[0][1],mt=de[1][1],Tt,qt,Vt,or,Ir=Vo,Lr=Ir.length,Zr,ia,la,an,da,La;Lr--;)if(Zr=Ir[Lr],!(!Zr||!Zr.prepare()))for(la=Zr.edges,an=la.length,ia=0;iaWe||l(or-qt)>We)&&(la.splice(ia,0,new Xs(Ds(Zr.site,La,l(Vt-Pe)We?{x:Pe,y:l(Tt-Pe)We?{x:l(qt-mt)We?{x:Ke,y:l(Tt-Ke)We?{x:l(qt-vt)=-Ae)){var ia=or*or+Ir*Ir,la=Lr*Lr+La*La,an=(La*ia-Ir*la)/Zr,da=(or*la-Lr*ia)/Zr,La=da+Vt,Oa=_i.pop()||new Ts;Oa.arc=de,Oa.site=mt,Oa.x=an+qt,Oa.y=La+Math.sqrt(an*an+da*da),Oa.cy=La,de.circle=Oa;for(var Qa=null,on=Zi._;on;)if(Oa.y0)){if(da/=la,la<0){if(da0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=Ke-Vt,!(!la&&da<0)){if(da/=la,la<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(la>0){if(da0)){if(da/=an,an<0){if(da0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=vt-or,!(!an&&da<0)){if(da/=an,an<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(an>0){if(da0&&(mt.a={x:Vt+Zr*la,y:or+Zr*an}),ia<1&&(mt.b={x:Vt+ia*la,y:or+ia*an}),mt}}}}}}function ci(de){for(var Pe=ji,Ke=al(de[0][0],de[0][1],de[1][0],de[1][1]),vt=Pe.length,mt;vt--;)mt=Pe[vt],(!mo(mt,de)||!Ke(mt)||l(mt.a.x-mt.b.x)=Tt)return;if(Lr>ia){if(!vt)vt={x:an,y:qt};else if(vt.y>=Vt)return;Ke={x:an,y:Vt}}else{if(!vt)vt={x:an,y:Vt};else if(vt.y1)if(Lr>ia){if(!vt)vt={x:(qt-Oa)/La,y:qt};else if(vt.y>=Vt)return;Ke={x:(Vt-Oa)/La,y:Vt}}else{if(!vt)vt={x:(Vt-Oa)/La,y:Vt};else if(vt.y=Tt)return;Ke={x:Tt,y:La*Tt+Oa}}else{if(!vt)vt={x:Tt,y:La*Tt+Oa};else if(vt.x=Lr&&Oa.x<=ia&&Oa.y>=Zr&&Oa.y<=la?[[Lr,la],[ia,la],[ia,Zr],[Lr,Zr]]:[];Qa.point=or[da]}),Ir}function Vt(or){return or.map(function(Ir,Lr){return{x:Math.round(vt(Ir,Lr)/We)*We,y:Math.round(mt(Ir,Lr)/We)*We,i:Lr}})}return qt.links=function(or){return wl(Vt(or)).edges.filter(function(Ir){return Ir.l&&Ir.r}).map(function(Ir){return{source:or[Ir.l.i],target:or[Ir.r.i]}})},qt.triangles=function(or){var Ir=[];return wl(Vt(or)).cells.forEach(function(Lr,Zr){for(var ia=Lr.site,la=Lr.edges.sort(Fi),an=-1,da=la.length,La,Oa=la[da-1].edge,Qa=Oa.l===ia?Oa.r:Oa.l;++anon&&(on=Lr.x),Lr.y>Fa&&(Fa=Lr.y),la.push(Lr.x),an.push(Lr.y);else for(da=0;daon&&(on=Ln),oi>Fa&&(Fa=oi),la.push(Ln),an.push(oi)}var Kn=on-Oa,ai=Fa-Qa;Kn>ai?Fa=Qa+Kn:on=Oa+ai;function Ti(Pi,oo,$o,hl,js,pi,ko,Xo){if(!(isNaN($o)||isNaN(hl)))if(Pi.leaf){var Os=Pi.x,Ms=Pi.y;if(Os!=null)if(l(Os-$o)+l(Ms-hl)<.01)ki(Pi,oo,$o,hl,js,pi,ko,Xo);else{var Zl=Pi.point;Pi.x=Pi.y=Pi.point=null,ki(Pi,Zl,Os,Ms,js,pi,ko,Xo),ki(Pi,oo,$o,hl,js,pi,ko,Xo)}else Pi.x=$o,Pi.y=hl,Pi.point=oo}else ki(Pi,oo,$o,hl,js,pi,ko,Xo)}function ki(Pi,oo,$o,hl,js,pi,ko,Xo){var Os=(js+ko)*.5,Ms=(pi+Xo)*.5,Zl=$o>=Os,gs=hl>=Ms,Bs=gs<<1|Zl;Pi.leaf=!1,Pi=Pi.nodes[Bs]||(Pi.nodes[Bs]=ds()),Zl?js=Os:ko=Os,gs?pi=Ms:Xo=Ms,Ti(Pi,oo,$o,hl,js,pi,ko,Xo)}var Go=ds();if(Go.add=function(Pi){Ti(Go,Pi,+Zr(Pi,++da),+ia(Pi,da),Oa,Qa,on,Fa)},Go.visit=function(Pi){Jl(Pi,Go,Oa,Qa,on,Fa)},Go.find=function(Pi){return Nc(Go,Pi[0],Pi[1],Oa,Qa,on,Fa)},da=-1,Pe==null){for(;++daTt||ia>qt||la=Ln,ai=Ke>=oi,Ti=ai<<1|Kn,ki=Ti+4;TiKe&&(Tt=Pe.slice(Ke,Tt),Vt[qt]?Vt[qt]+=Tt:Vt[++qt]=Tt),(vt=vt[0])===(mt=mt[0])?Vt[qt]?Vt[qt]+=mt:Vt[++qt]=mt:(Vt[++qt]=null,or.push({i:qt,x:Rl(vt,mt)})),Ke=Al.lastIndex;return Ke=0&&!(vt=h.interpolators[Ke](de,Pe)););return vt}h.interpolators=[function(de,Pe){var Ke=typeof Pe;return(Ke==="string"?Fr.has(Pe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Pe)?Il:gu:Pe instanceof Ra?Il:Array.isArray(Pe)?As:Ke==="object"&&isNaN(Pe)?Tl:Rl)(de,Pe)}],h.interpolateArray=As;function As(de,Pe){var Ke=[],vt=[],mt=de.length,Tt=Pe.length,qt=Math.min(de.length,Pe.length),Vt;for(Vt=0;Vt=0?de.slice(0,Pe):de,vt=Pe>=0?de.slice(Pe+1):"in";return Ke=Hl.get(Ke)||Uu,vt=Yu.get(vt)||F,Zs(vt(Ke.apply(null,b.call(arguments,1))))};function Zs(de){return function(Pe){return Pe<=0?0:Pe>=1?1:de(Pe)}}function df(de){return function(Pe){return 1-de(1-Pe)}}function zo(de){return function(Pe){return .5*(Pe<.5?de(2*Pe):2-de(2-2*Pe))}}function Ef(de){return de*de}function ls(de){return de*de*de}function zi(de){if(de<=0)return 0;if(de>=1)return 1;var Pe=de*de,Ke=Pe*de;return 4*(de<.5?Ke:3*(de-Pe)+Ke-.75)}function uc(de){return function(Pe){return Math.pow(Pe,de)}}function yu(de){return 1-Math.cos(de*Ue)}function dl(de){return Math.pow(2,10*(de-1))}function Uc(de){return 1-Math.sqrt(1-de*de)}function Ku(de,Pe){var Ke;return arguments.length<2&&(Pe=.45),arguments.length?Ke=Pe/pe*Math.asin(1/de):(de=1,Ke=Pe/4),function(vt){return 1+de*Math.pow(2,-10*vt)*Math.sin((vt-Ke)*pe/Pe)}}function _c(de){return de||(de=1.70158),function(Pe){return Pe*Pe*((de+1)*Pe-de)}}function Sl(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}h.interpolateHcl=lf;function lf(de,Pe){de=h.hcl(de),Pe=h.hcl(Pe);var Ke=de.h,vt=de.c,mt=de.l,Tt=Pe.h-Ke,qt=Pe.c-vt,Vt=Pe.l-mt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.c:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return Zt(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateHsl=Wc;function Wc(de,Pe){de=h.hsl(de),Pe=h.hsl(Pe);var Ke=de.h,vt=de.s,mt=de.l,Tt=Pe.h-Ke,qt=Pe.s-vt,Vt=Pe.l-mt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.s:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return mn(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateLab=xc;function xc(de,Pe){de=h.lab(de),Pe=h.lab(Pe);var Ke=de.l,vt=de.a,mt=de.b,Tt=Pe.l-Ke,qt=Pe.a-vt,Vt=Pe.b-mt;return function(or){return Ha(Ke+Tt*or,vt+qt*or,mt+Vt*or)+""}}h.interpolateRound=$u;function $u(de,Pe){return Pe-=de,function(Ke){return Math.round(de+Pe*Ke)}}h.transform=function(de){var Pe=E.createElementNS(h.ns.prefix.svg,"g");return(h.transform=function(Ke){if(Ke!=null){Pe.setAttribute("transform",Ke);var vt=Pe.transform.baseVal.consolidate()}return new jc(vt?vt.matrix:ju)})(de)};function jc(de){var Pe=[de.a,de.b],Ke=[de.c,de.d],vt=_u(Pe),mt=Vc(Pe,Ke),Tt=_u(Xc(Ke,Pe,-mt))||0;Pe[0]*Ke[1]180?Pe+=360:Pe-de>180&&(de+=360),vt.push({i:Ke.push(Cu(Ke)+"rotate(",null,")")-2,x:Rl(de,Pe)})):Pe&&Ke.push(Cu(Ke)+"rotate("+Pe+")")}function qc(de,Pe,Ke,vt){de!==Pe?vt.push({i:Ke.push(Cu(Ke)+"skewX(",null,")")-2,x:Rl(de,Pe)}):Pe&&Ke.push(Cu(Ke)+"skewX("+Pe+")")}function Cs(de,Pe,Ke,vt){if(de[0]!==Pe[0]||de[1]!==Pe[1]){var mt=Ke.push(Cu(Ke)+"scale(",null,",",null,")");vt.push({i:mt-4,x:Rl(de[0],Pe[0])},{i:mt-2,x:Rl(de[1],Pe[1])})}else(Pe[0]!==1||Pe[1]!==1)&&Ke.push(Cu(Ke)+"scale("+Pe+")")}function kc(de,Pe){var Ke=[],vt=[];return de=h.transform(de),Pe=h.transform(Pe),Ml(de.translate,Pe.translate,Ke,vt),ic(de.rotate,Pe.rotate,Ke,vt),qc(de.skew,Pe.skew,Ke,vt),Cs(de.scale,Pe.scale,Ke,vt),de=Pe=null,function(mt){for(var Tt=-1,qt=vt.length,Vt;++Tt0?Tt=Fa:(Ke.c=null,Ke.t=NaN,Ke=null,Pe.end({type:"end",alpha:Tt=0})):Fa>0&&(Pe.start({type:"start",alpha:Tt=Fa}),Ke=en(de.tick)),de):Tt},de.start=function(){var Fa,Ln=la.length,oi=an.length,Kn=vt[0],ai=vt[1],Ti,ki;for(Fa=0;Fa=0;)Tt.push(Lr=Ir[or]),Lr.parent=Vt,Lr.depth=Vt.depth+1;Ke&&(Vt.value=0),Vt.children=Ir}else Ke&&(Vt.value=+Ke.call(vt,Vt,Vt.depth)||0),delete Vt.children;return Lu(mt,function(Zr){var ia,la;de&&(ia=Zr.children)&&ia.sort(de),Ke&&(la=Zr.parent)&&(la.value+=Zr.value)}),qt}return vt.sort=function(mt){return arguments.length?(de=mt,vt):de},vt.children=function(mt){return arguments.length?(Pe=mt,vt):Pe},vt.value=function(mt){return arguments.length?(Ke=mt,vt):Ke},vt.revalue=function(mt){return Ke&&(cc(mt,function(Tt){Tt.children&&(Tt.value=0)}),Lu(mt,function(Tt){var qt;Tt.children||(Tt.value=+Ke.call(vt,Tt,Tt.depth)||0),(qt=Tt.parent)&&(qt.value+=Tt.value)})),mt},vt};function Ys(de,Pe){return h.rebind(de,Pe,"sort","children","value"),de.nodes=de,de.links=Df,de}function cc(de,Pe){for(var Ke=[de];(de=Ke.pop())!=null;)if(Pe(de),(mt=de.children)&&(vt=mt.length))for(var vt,mt;--vt>=0;)Ke.push(mt[vt])}function Lu(de,Pe){for(var Ke=[de],vt=[];(de=Ke.pop())!=null;)if(vt.push(de),(qt=de.children)&&(Tt=qt.length))for(var mt=-1,Tt,qt;++mtmt&&(mt=Vt),vt.push(Vt)}for(qt=0;qtvt&&(Ke=Pe,vt=mt);return Ke}function ru(de){return de.reduce(xu,0)}function xu(de,Pe){return de+Pe[1]}h.layout.histogram=function(){var de=!0,Pe=Number,Ke=wc,vt=Gc;function mt(Tt,ia){for(var Vt=[],or=Tt.map(Pe,this),Ir=Ke.call(this,or,ia),Lr=vt.call(this,Ir,or,ia),Zr,ia=-1,la=or.length,an=Lr.length-1,da=de?1:1/la,La;++ia0)for(ia=-1;++ia=Ir[0]&&La<=Ir[1]&&(Zr=Vt[h.bisect(Lr,La,1,an)-1],Zr.y+=da,Zr.push(Tt[ia]));return Vt}return mt.value=function(Tt){return arguments.length?(Pe=Tt,mt):Pe},mt.range=function(Tt){return arguments.length?(Ke=pt(Tt),mt):Ke},mt.bins=function(Tt){return arguments.length?(vt=typeof Tt=="number"?function(qt){return Ws(qt,Tt)}:pt(Tt),mt):vt},mt.frequency=function(Tt){return arguments.length?(de=!!Tt,mt):de},mt};function Gc(de,Pe){return Ws(de,Math.ceil(Math.log(Pe.length)/Math.LN2+1))}function Ws(de,Pe){for(var Ke=-1,vt=+de[0],mt=(de[1]-vt)/Pe,Tt=[];++Ke<=Pe;)Tt[Ke]=mt*Ke+vt;return Tt}function wc(de){return[h.min(de),h.max(de)]}h.layout.pack=function(){var de=h.layout.hierarchy().sort(ec),Pe=0,Ke=[1,1],vt;function mt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir=Ke[0],Lr=Ke[1],Zr=vt==null?Math.sqrt:typeof vt=="function"?vt:function(){return vt};if(or.x=or.y=0,Lu(or,function(la){la.r=+Zr(la.value)}),Lu(or,Ac),Pe){var ia=Pe*(vt?1:Math.max(2*or.r/Ir,2*or.r/Lr))/2;Lu(or,function(la){la.r+=ia}),Lu(or,Ac),Lu(or,function(la){la.r-=ia})}return Jc(or,Ir/2,Lr/2,vt?1:1/Math.max(2*or.r/Ir,2*or.r/Lr)),Vt}return mt.size=function(Tt){return arguments.length?(Ke=Tt,mt):Ke},mt.radius=function(Tt){return arguments.length?(vt=Tt==null||typeof Tt=="function"?Tt:+Tt,mt):vt},mt.padding=function(Tt){return arguments.length?(Pe=+Tt,mt):Pe},Ys(mt,de)};function ec(de,Pe){return de.value-Pe.value}function fu(de,Pe){var Ke=de._pack_next;de._pack_next=Pe,Pe._pack_prev=de,Pe._pack_next=Ke,Ke._pack_prev=Pe}function Tc(de,Pe){de._pack_next=Pe,Pe._pack_prev=de}function Pu(de,Pe){var Ke=Pe.x-de.x,vt=Pe.y-de.y,mt=de.r+Pe.r;return .999*mt*mt>Ke*Ke+vt*vt}function Ac(de){if(!(Pe=de.children)||!(ia=Pe.length))return;var Pe,Ke=1/0,vt=-1/0,mt=1/0,Tt=-1/0,qt,Vt,or,Ir,Lr,Zr,ia;function la(Fa){Ke=Math.min(Fa.x-Fa.r,Ke),vt=Math.max(Fa.x+Fa.r,vt),mt=Math.min(Fa.y-Fa.r,mt),Tt=Math.max(Fa.y+Fa.r,Tt)}if(Pe.forEach(gf),qt=Pe[0],qt.x=-qt.r,qt.y=0,la(qt),ia>1&&(Vt=Pe[1],Vt.x=Vt.r,Vt.y=0,la(Vt),ia>2))for(or=Pe[2],hu(qt,Vt,or),la(or),fu(qt,or),qt._pack_prev=or,fu(or,Vt),Vt=qt._pack_next,Ir=3;IrLa.x&&(La=Ln),Ln.depth>Oa.depth&&(Oa=Ln)});var Qa=Pe(da,La)/2-da.x,on=Ke[0]/(La.x+Pe(La,da)/2+Qa),Fa=Ke[1]/(Oa.depth||1);cc(la,function(Ln){Ln.x=(Ln.x+Qa)*on,Ln.y=Ln.depth*Fa})}return ia}function Tt(Lr){for(var Zr={A:null,children:[Lr]},ia=[Zr],la;(la=ia.pop())!=null;)for(var an=la.children,da,La=0,Oa=an.length;La0&&(Wl(tc(da,Lr,ia),Lr,Ln),Oa+=Ln,Qa+=Ln),on+=da.m,Oa+=la.m,Fa+=La.m,Qa+=an.m;da&&!nl(an)&&(an.t=da,an.m+=on-Qa),la&&!Iu(La)&&(La.t=la,La.m+=Oa-Fa,ia=Lr)}return ia}function Ir(Lr){Lr.x*=Ke[0],Lr.y=Lr.depth*Ke[1]}return mt.separation=function(Lr){return arguments.length?(Pe=Lr,mt):Pe},mt.size=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?Ir:null,mt):vt?null:Ke},mt.nodeSize=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?null:Ir,mt):vt?Ke:null},Ys(mt,de)};function qu(de,Pe){return de.parent==Pe.parent?1:2}function Iu(de){var Pe=de.children;return Pe.length?Pe[0]:de.t}function nl(de){var Pe=de.children,Ke;return(Ke=Pe.length)?Pe[Ke-1]:de.t}function Wl(de,Pe,Ke){var vt=Ke/(Pe.i-de.i);Pe.c-=vt,Pe.s+=Ke,de.c+=vt,Pe.z+=Ke,Pe.m+=Ke}function Js(de){for(var Pe=0,Ke=0,vt=de.children,mt=vt.length,Tt;--mt>=0;)Tt=vt[mt],Tt.z+=Pe,Tt.m+=Pe,Pe+=Tt.s+(Ke+=Tt.c)}function tc(de,Pe,Ke){return de.a.parent===Pe.parent?de.a:Ke}h.layout.cluster=function(){var de=h.layout.hierarchy().sort(null).value(null),Pe=qu,Ke=[1,1],vt=!1;function mt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir,Lr=0;Lu(or,function(da){var La=da.children;La&&La.length?(da.x=Hc(La),da.y=Ru(La)):(da.x=Ir?Lr+=Pe(da,Ir):0,da.y=0,Ir=da)});var Zr=Jt(or),ia=yr(or),la=Zr.x-Pe(Zr,ia)/2,an=ia.x+Pe(ia,Zr)/2;return Lu(or,vt?function(da){da.x=(da.x-or.x)*Ke[0],da.y=(or.y-da.y)*Ke[1]}:function(da){da.x=(da.x-la)/(an-la)*Ke[0],da.y=(1-(or.y?da.y/or.y:1))*Ke[1]}),Vt}return mt.separation=function(Tt){return arguments.length?(Pe=Tt,mt):Pe},mt.size=function(Tt){return arguments.length?(vt=(Ke=Tt)==null,mt):vt?null:Ke},mt.nodeSize=function(Tt){return arguments.length?(vt=(Ke=Tt)!=null,mt):vt?Ke:null},Ys(mt,de)};function Ru(de){return 1+h.max(de,function(Pe){return Pe.y})}function Hc(de){return de.reduce(function(Pe,Ke){return Pe+Ke.x},0)/de.length}function Jt(de){var Pe=de.children;return Pe&&Pe.length?Jt(Pe[0]):de}function yr(de){var Pe=de.children,Ke;return Pe&&(Ke=Pe.length)?yr(Pe[Ke-1]):de}h.layout.treemap=function(){var de=h.layout.hierarchy(),Pe=Math.round,Ke=[1,1],vt=null,mt=Kr,Tt=!1,qt,Vt="squarify",or=.5*(1+Math.sqrt(5));function Ir(da,La){for(var Oa=-1,Qa=da.length,on,Fa;++Oa0;)Qa.push(Fa=on[ai-1]),Qa.area+=Fa.area,Vt!=="squarify"||(oi=ia(Qa,Kn))<=Ln?(on.pop(),Ln=oi):(Qa.area-=Qa.pop().area,la(Qa,Kn,Oa,!1),Kn=Math.min(Oa.dx,Oa.dy),Qa.length=Qa.area=0,Ln=1/0);Qa.length&&(la(Qa,Kn,Oa,!0),Qa.length=Qa.area=0),La.forEach(Lr)}}function Zr(da){var La=da.children;if(La&&La.length){var Oa=mt(da),Qa=La.slice(),on,Fa=[];for(Ir(Qa,Oa.dx*Oa.dy/da.value),Fa.area=0;on=Qa.pop();)Fa.push(on),Fa.area+=on.area,on.z!=null&&(la(Fa,on.z?Oa.dx:Oa.dy,Oa,!Qa.length),Fa.length=Fa.area=0);La.forEach(Zr)}}function ia(da,La){for(var Oa=da.area,Qa,on=0,Fa=1/0,Ln=-1,oi=da.length;++Lnon&&(on=Qa));return Oa*=Oa,La*=La,Oa?Math.max(La*on*or/Oa,Oa/(La*Fa*or)):1/0}function la(da,La,Oa,Qa){var on=-1,Fa=da.length,Ln=Oa.x,oi=Oa.y,Kn=La?Pe(da.area/La):0,ai;if(La==Oa.dx){for((Qa||Kn>Oa.dy)&&(Kn=Oa.dy);++onOa.dx)&&(Kn=Oa.dx);++on1);return de+Pe*vt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var de=h.random.normal.apply(h,arguments);return function(){return Math.exp(de())}},bates:function(de){var Pe=h.random.irwinHall(de);return function(){return Pe()/de}},irwinHall:function(de){return function(){for(var Pe=0,Ke=0;Ke2?gn:Ya,Ir=vt?Zc:pf;return mt=or(de,Pe,Ir,Ke),Tt=or(Pe,de,Ir,No),Vt}function Vt(or){return mt(or)}return Vt.invert=function(or){return Tt(or)},Vt.domain=function(or){return arguments.length?(de=or.map(Number),qt()):de},Vt.range=function(or){return arguments.length?(Pe=or,qt()):Pe},Vt.rangeRound=function(or){return Vt.range(or).interpolate($u)},Vt.clamp=function(or){return arguments.length?(vt=or,qt()):vt},Vt.interpolate=function(or){return arguments.length?(Ke=or,qt()):Ke},Vt.ticks=function(or){return Ui(de,or)},Vt.tickFormat=function(or,Ir){return d3_scale_linearTickFormat(de,or,Ir)},Vt.nice=function(or){return vn(de,or),qt()},Vt.copy=function(){return qn(de,Pe,Ke,vt)},qt()}function Sn(de,Pe){return h.rebind(de,Pe,"range","rangeRound","interpolate","clamp")}function vn(de,Pe){return En(de,Rn(ii(de,Pe)[2])),En(de,Rn(ii(de,Pe)[2])),de}function ii(de,Pe){Pe==null&&(Pe=10);var Ke=pa(de),vt=Ke[1]-Ke[0],mt=Math.pow(10,Math.floor(Math.log(vt/Pe)/Math.LN10)),Tt=Pe/vt*mt;return Tt<=.15?mt*=10:Tt<=.35?mt*=5:Tt<=.75&&(mt*=2),Ke[0]=Math.ceil(Ke[0]/mt)*mt,Ke[1]=Math.floor(Ke[1]/mt)*mt+mt*.5,Ke[2]=mt,Ke}function Ui(de,Pe){return h.range.apply(h,ii(de,Pe))}h.scale.log=function(){return Di(h.scale.linear().domain([0,1]),10,!0,[1,10])};function Di(de,Pe,Ke,vt){function mt(Vt){return(Ke?Math.log(Vt<0?0:Vt):-Math.log(Vt>0?0:-Vt))/Math.log(Pe)}function Tt(Vt){return Ke?Math.pow(Pe,Vt):-Math.pow(Pe,-Vt)}function qt(Vt){return de(mt(Vt))}return qt.invert=function(Vt){return Tt(de.invert(Vt))},qt.domain=function(Vt){return arguments.length?(Ke=Vt[0]>=0,de.domain((vt=Vt.map(Number)).map(mt)),qt):vt},qt.base=function(Vt){return arguments.length?(Pe=+Vt,de.domain(vt.map(mt)),qt):Pe},qt.nice=function(){var Vt=En(vt.map(mt),Ke?Math:Hi);return de.domain(Vt),vt=Vt.map(Tt),qt},qt.ticks=function(){var Vt=pa(vt),or=[],Ir=Vt[0],Lr=Vt[1],Zr=Math.floor(mt(Ir)),ia=Math.ceil(mt(Lr)),la=Pe%1?2:Pe;if(isFinite(ia-Zr)){if(Ke){for(;Zr0;an--)or.push(Tt(Zr)*an);for(Zr=0;or[Zr]Lr;ia--);or=or.slice(Zr,ia)}return or},qt.copy=function(){return Di(de.copy(),Pe,Ke,vt)},Sn(qt,de)}var Hi={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};h.scale.pow=function(){return Vi(h.scale.linear(),1,[0,1])};function Vi(de,Pe,Ke){var vt=si(Pe),mt=si(1/Pe);function Tt(qt){return de(vt(qt))}return Tt.invert=function(qt){return mt(de.invert(qt))},Tt.domain=function(qt){return arguments.length?(de.domain((Ke=qt.map(Number)).map(vt)),Tt):Ke},Tt.ticks=function(qt){return Ui(Ke,qt)},Tt.tickFormat=function(qt,Vt){return d3_scale_linearTickFormat(Ke,qt,Vt)},Tt.nice=function(qt){return Tt.domain(vn(Ke,qt))},Tt.exponent=function(qt){return arguments.length?(vt=si(Pe=qt),mt=si(1/Pe),de.domain(Ke.map(vt)),Tt):Pe},Tt.copy=function(){return Vi(de.copy(),Pe,Ke)},Sn(Tt,de)}function si(de){return function(Pe){return Pe<0?-Math.pow(-Pe,de):Math.pow(Pe,de)}}h.scale.sqrt=function(){return h.scale.pow().exponent(.5)},h.scale.ordinal=function(){return Zn([],{t:"range",a:[[]]})};function Zn(de,Pe){var Ke,vt,mt;function Tt(Vt){return vt[((Ke.get(Vt)||(Pe.t==="range"?Ke.set(Vt,de.push(Vt)):NaN))-1)%vt.length]}function qt(Vt,or){return h.range(de.length).map(function(Ir){return Vt+or*Ir})}return Tt.domain=function(Vt){if(!arguments.length)return de;de=[],Ke=new A;for(var or=-1,Ir=Vt.length,Lr;++or0?Ke[Tt-1]:de[0],Ttia?0:1;if(Lr=Te)return or(Lr,an)+(Ir?or(Ir,1-an):"")+"Z";var da,La,Oa,Qa,on=0,Fa=0,Ln,oi,Kn,ai,Ti,ki,Go,Pi,oo=[];if((Qa=(+qt.apply(this,arguments)||0)/2)&&(Oa=vt===Ps?Math.sqrt(Ir*Ir+Lr*Lr):+vt.apply(this,arguments),an||(Fa*=-1),Lr&&(Fa=Mt(Oa/Lr*Math.sin(Qa))),Ir&&(on=Mt(Oa/Ir*Math.sin(Qa)))),Lr){Ln=Lr*Math.cos(Zr+Fa),oi=Lr*Math.sin(Zr+Fa),Kn=Lr*Math.cos(ia-Fa),ai=Lr*Math.sin(ia-Fa);var $o=Math.abs(ia-Zr-2*Fa)<=ge?0:1;if(Fa&&ql(Ln,oi,Kn,ai)===an^$o){var hl=(Zr+ia)/2;Ln=Lr*Math.cos(hl),oi=Lr*Math.sin(hl),Kn=ai=null}}else Ln=oi=0;if(Ir){Ti=Ir*Math.cos(ia-on),ki=Ir*Math.sin(ia-on),Go=Ir*Math.cos(Zr+on),Pi=Ir*Math.sin(Zr+on);var js=Math.abs(Zr-ia+2*on)<=ge?0:1;if(on&&ql(Ti,ki,Go,Pi)===1-an^js){var pi=(Zr+ia)/2;Ti=Ir*Math.cos(pi),ki=Ir*Math.sin(pi),Go=Pi=null}}else Ti=ki=0;if(la>We&&(da=Math.min(Math.abs(Lr-Ir)/2,+Ke.apply(this,arguments)))>.001){La=Ir0?0:1}function Xl(de,Pe,Ke,vt,mt){var Tt=de[0]-Pe[0],qt=de[1]-Pe[1],Vt=(mt?vt:-vt)/Math.sqrt(Tt*Tt+qt*qt),or=Vt*qt,Ir=-Vt*Tt,Lr=de[0]+or,Zr=de[1]+Ir,ia=Pe[0]+or,la=Pe[1]+Ir,an=(Lr+ia)/2,da=(Zr+la)/2,La=ia-Lr,Oa=la-Zr,Qa=La*La+Oa*Oa,on=Ke-vt,Fa=Lr*la-ia*Zr,Ln=(Oa<0?-1:1)*Math.sqrt(Math.max(0,on*on*Qa-Fa*Fa)),oi=(Fa*Oa-La*Ln)/Qa,Kn=(-Fa*La-Oa*Ln)/Qa,ai=(Fa*Oa+La*Ln)/Qa,Ti=(-Fa*La+Oa*Ln)/Qa,ki=oi-an,Go=Kn-da,Pi=ai-an,oo=Ti-da;return ki*ki+Go*Go>Pi*Pi+oo*oo&&(oi=ai,Kn=Ti),[[oi-or,Kn-Ir],[oi*Ke/on,Kn*Ke/on]]}function oc(){return!0}function Gl(de){var Pe=vi,Ke=Ei,vt=oc,mt=ll,Tt=mt.key,qt=.7;function Vt(or){var Ir=[],Lr=[],Zr=-1,ia=or.length,la,an=pt(Pe),da=pt(Ke);function La(){Ir.push("M",mt(de(Lr),qt))}for(;++Zr1?de.join("L"):de+"Z"}function Hu(de){return de.join("L")+"Z"}function Wi(de){for(var Pe=0,Ke=de.length,vt=de[0],mt=[vt[0],",",vt[1]];++Pe1&&mt.push("H",vt[0]),mt.join("")}function no(de){for(var Pe=0,Ke=de.length,vt=de[0],mt=[vt[0],",",vt[1]];++Pe1){Vt=Pe[1],Tt=de[or],or++,vt+="C"+(mt[0]+qt[0])+","+(mt[1]+qt[1])+","+(Tt[0]-Vt[0])+","+(Tt[1]-Vt[1])+","+Tt[0]+","+Tt[1];for(var Ir=2;Ir9&&(Tt=Ke*3/Math.sqrt(Tt),qt[Vt]=Tt*vt,qt[Vt+1]=Tt*mt));for(Vt=-1;++Vt<=or;)Tt=(de[Math.min(or,Vt+1)][0]-de[Math.max(0,Vt-1)][0])/(6*(1+qt[Vt]*qt[Vt])),Pe.push([Tt||0,qt[Vt]*Tt||0]);return Pe}function Ye(de){return de.length<3?ll(de):de[0]+P(de,Ve(de))}h.svg.line.radial=function(){var de=Gl(it);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function it(de){for(var Pe,Ke=-1,vt=de.length,mt,Tt;++Kege)+",1 "+Zr}function Ir(Lr,Zr,ia,la){return"Q 0,0 "+la}return Tt.radius=function(Lr){return arguments.length?(Ke=pt(Lr),Tt):Ke},Tt.source=function(Lr){return arguments.length?(de=pt(Lr),Tt):de},Tt.target=function(Lr){return arguments.length?(Pe=pt(Lr),Tt):Pe},Tt.startAngle=function(Lr){return arguments.length?(vt=pt(Lr),Tt):vt},Tt.endAngle=function(Lr){return arguments.length?(mt=pt(Lr),Tt):mt},Tt};function Lt(de){return de.radius}h.svg.diagonal=function(){var de=St,Pe=yt,Ke=nr;function vt(mt,Tt){var qt=de.call(this,mt,Tt),Vt=Pe.call(this,mt,Tt),or=(qt.y+Vt.y)/2,Ir=[qt,{x:qt.x,y:or},{x:Vt.x,y:or},Vt];return Ir=Ir.map(Ke),"M"+Ir[0]+"C"+Ir[1]+" "+Ir[2]+" "+Ir[3]}return vt.source=function(mt){return arguments.length?(de=pt(mt),vt):de},vt.target=function(mt){return arguments.length?(Pe=pt(mt),vt):Pe},vt.projection=function(mt){return arguments.length?(Ke=mt,vt):Ke},vt};function nr(de){return[de.x,de.y]}h.svg.diagonal.radial=function(){var de=h.svg.diagonal(),Pe=nr,Ke=de.projection;return de.projection=function(vt){return arguments.length?Ke(cr(Pe=vt)):Pe},de};function cr(de){return function(){var Pe=de.apply(this,arguments),Ke=Pe[0],vt=Pe[1]-Ue;return[Ke*Math.cos(vt),Ke*Math.sin(vt)]}}h.svg.symbol=function(){var de=Pr,Pe=gr;function Ke(vt,mt){return(oa.get(de.call(this,vt,mt))||Vr)(Pe.call(this,vt,mt))}return Ke.type=function(vt){return arguments.length?(de=pt(vt),Ke):de},Ke.size=function(vt){return arguments.length?(Pe=pt(vt),Ke):Pe},Ke};function gr(){return 64}function Pr(){return"circle"}function Vr(de){var Pe=Math.sqrt(de/ge);return"M0,"+Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+-Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+Pe+"Z"}var oa=h.map({circle:Vr,cross:function(de){var Pe=Math.sqrt(de/5)/2;return"M"+-3*Pe+","+-Pe+"H"+-Pe+"V"+-3*Pe+"H"+Pe+"V"+-Pe+"H"+3*Pe+"V"+Pe+"H"+Pe+"V"+3*Pe+"H"+-Pe+"V"+Pe+"H"+-3*Pe+"Z"},diamond:function(de){var Pe=Math.sqrt(de/(2*Aa)),Ke=Pe*Aa;return"M0,"+-Pe+"L"+Ke+",0 0,"+Pe+" "+-Ke+",0Z"},square:function(de){var Pe=Math.sqrt(de)/2;return"M"+-Pe+","+-Pe+"L"+Pe+","+-Pe+" "+Pe+","+Pe+" "+-Pe+","+Pe+"Z"},"triangle-down":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+Ke+"L"+Pe+","+-Ke+" "+-Pe+","+-Ke+"Z"},"triangle-up":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+-Ke+"L"+Pe+","+Ke+" "+-Pe+","+Ke+"Z"}});h.svg.symbolTypes=oa.keys();var ca=Math.sqrt(3),Aa=Math.tan(30*Xe);Q.transition=function(de){for(var Pe=Si||++li,Ke=Wo(de),vt=[],mt,Tt,qt=yi||{time:Date.now(),ease:zi,delay:0,duration:250},Vt=-1,or=this.length;++Vt0;)Zr[--Qa].call(de,Oa);if(La>=1)return qt.event&&qt.event.end.call(de,de.__data__,Pe),--Tt.count?delete Tt[vt]:delete de[Ke],1}qt||(Vt=mt.time,or=en(ia,0,Vt),qt=Tt[vt]={tween:new A,time:Vt,timer:or,delay:mt.delay,duration:mt.duration,ease:mt.ease,index:Pe},mt=null,++Tt.count)}h.svg.axis=function(){var de=h.scale.linear(),Pe=Jo,Ke=6,vt=6,mt=3,Tt=[10],qt=null,Vt;function or(Ir){Ir.each(function(){var Lr=h.select(this),Zr=this.__chart__||de,ia=this.__chart__=de.copy(),la=qt??(ia.ticks?ia.ticks.apply(ia,Tt):ia.domain()),an=Vt??(ia.tickFormat?ia.tickFormat.apply(ia,Tt):F),da=Lr.selectAll(".tick").data(la,ia),La=da.enter().insert("g",".domain").attr("class","tick").style("opacity",We),Oa=h.transition(da.exit()).style("opacity",We).remove(),Qa=h.transition(da.order()).style("opacity",1),on=Math.max(Ke,0)+mt,Fa,Ln=Ja(ia),oi=Lr.selectAll(".domain").data([0]),Kn=(oi.enter().append("path").attr("class","domain"),h.transition(oi));La.append("line"),La.append("text");var ai=La.select("line"),Ti=Qa.select("line"),ki=da.select("text").text(an),Go=La.select("text"),Pi=Qa.select("text"),oo=Pe==="top"||Pe==="left"?-1:1,$o,hl,js,pi;if(Pe==="bottom"||Pe==="top"?(Fa=Gs,$o="x",js="y",hl="x2",pi="y2",ki.attr("dy",oo<0?"0em":".71em").style("text-anchor","middle"),Kn.attr("d","M"+Ln[0]+","+oo*vt+"V0H"+Ln[1]+"V"+oo*vt)):(Fa=Mo,$o="y",js="x",hl="y2",pi="x2",ki.attr("dy",".32em").style("text-anchor",oo<0?"end":"start"),Kn.attr("d","M"+oo*vt+","+Ln[0]+"H0V"+Ln[1]+"H"+oo*vt)),ai.attr(pi,oo*Ke),Go.attr(js,oo*on),Ti.attr(hl,0).attr(pi,oo*Ke),Pi.attr($o,0).attr(js,oo*on),ia.rangeBand){var ko=ia,Xo=ko.rangeBand()/2;Zr=ia=function(Os){return ko(Os)+Xo}}else Zr.rangeBand?Zr=ia:Oa.call(Fa,ia,Zr);La.call(Fa,Zr,ia),Qa.call(Fa,ia,ia)})}return or.scale=function(Ir){return arguments.length?(de=Ir,or):de},or.orient=function(Ir){return arguments.length?(Pe=Ir in Qs?Ir+"":Jo,or):Pe},or.ticks=function(){return arguments.length?(Tt=S(arguments),or):Tt},or.tickValues=function(Ir){return arguments.length?(qt=Ir,or):qt},or.tickFormat=function(Ir){return arguments.length?(Vt=Ir,or):Vt},or.tickSize=function(Ir){var Lr=arguments.length;return Lr?(Ke=+Ir,vt=+arguments[Lr-1],or):Ke},or.innerTickSize=function(Ir){return arguments.length?(Ke=+Ir,or):Ke},or.outerTickSize=function(Ir){return arguments.length?(vt=+Ir,or):vt},or.tickPadding=function(Ir){return arguments.length?(mt=+Ir,or):mt},or.tickSubdivide=function(){return arguments.length&&or},or};var Jo="bottom",Qs={top:1,right:1,bottom:1,left:1};function Gs(de,Pe,Ke){de.attr("transform",function(vt){var mt=Pe(vt);return"translate("+(isFinite(mt)?mt:Ke(vt))+",0)"})}function Mo(de,Pe,Ke){de.attr("transform",function(vt){var mt=Pe(vt);return"translate(0,"+(isFinite(mt)?mt:Ke(vt))+")"})}h.svg.brush=function(){var de=oe(Lr,"brushstart","brush","brushend"),Pe=null,Ke=null,vt=[0,0],mt=[0,0],Tt,qt,Vt=!0,or=!0,Ir=fl[0];function Lr(da){da.each(function(){var La=h.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",an).on("touchstart.brush",an),Oa=La.selectAll(".background").data([0]);Oa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),La.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Qa=La.selectAll(".resize").data(Ir,F);Qa.exit().remove(),Qa.enter().append("g").attr("class",function(oi){return"resize "+oi}).style("cursor",function(oi){return Eo[oi]}).append("rect").attr("x",function(oi){return/[ew]$/.test(oi)?-3:null}).attr("y",function(oi){return/^[ns]/.test(oi)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Qa.style("display",Lr.empty()?"none":null);var on=h.transition(La),Fa=h.transition(Oa),Ln;Pe&&(Ln=Ja(Pe),Fa.attr("x",Ln[0]).attr("width",Ln[1]-Ln[0]),ia(on)),Ke&&(Ln=Ja(Ke),Fa.attr("y",Ln[0]).attr("height",Ln[1]-Ln[0]),la(on)),Zr(on)})}Lr.event=function(da){da.each(function(){var La=de.of(this,arguments),Oa={x:vt,y:mt,i:Tt,j:qt},Qa=this.__chart__||Oa;this.__chart__=Oa,Si?h.select(this).transition().each("start.brush",function(){Tt=Qa.i,qt=Qa.j,vt=Qa.x,mt=Qa.y,La({type:"brushstart"})}).tween("brush:brush",function(){var on=As(vt,Oa.x),Fa=As(mt,Oa.y);return Tt=qt=null,function(Ln){vt=Oa.x=on(Ln),mt=Oa.y=Fa(Ln),La({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Oa.i,qt=Oa.j,La({type:"brush",mode:"resize"}),La({type:"brushend"})}):(La({type:"brushstart"}),La({type:"brush",mode:"resize"}),La({type:"brushend"}))})};function Zr(da){da.selectAll(".resize").attr("transform",function(La){return"translate("+vt[+/e$/.test(La)]+","+mt[+/^s/.test(La)]+")"})}function ia(da){da.select(".extent").attr("x",vt[0]),da.selectAll(".extent,.n>rect,.s>rect").attr("width",vt[1]-vt[0])}function la(da){da.select(".extent").attr("y",mt[0]),da.selectAll(".extent,.e>rect,.w>rect").attr("height",mt[1]-mt[0])}function an(){var da=this,La=h.select(h.event.target),Oa=de.of(da,arguments),Qa=h.select(da),on=La.datum(),Fa=!/^(n|s)$/.test(on)&&Pe,Ln=!/^(e|w)$/.test(on)&&Ke,oi=La.classed("extent"),Kn=hr(da),ai,Ti=h.mouse(da),ki,Go=h.select(t(da)).on("keydown.brush",$o).on("keyup.brush",hl);if(h.event.changedTouches?Go.on("touchmove.brush",js).on("touchend.brush",ko):Go.on("mousemove.brush",js).on("mouseup.brush",ko),Qa.interrupt().selectAll("*").interrupt(),oi)Ti[0]=vt[0]-Ti[0],Ti[1]=mt[0]-Ti[1];else if(on){var Pi=+/w$/.test(on),oo=+/^n/.test(on);ki=[vt[1-Pi]-Ti[0],mt[1-oo]-Ti[1]],Ti[0]=vt[Pi],Ti[1]=mt[oo]}else h.event.altKey&&(ai=Ti.slice());Qa.style("pointer-events","none").selectAll(".resize").style("display",null),h.select("body").style("cursor",La.style("cursor")),Oa({type:"brushstart"}),js();function $o(){h.event.keyCode==32&&(oi||(ai=null,Ti[0]-=vt[1],Ti[1]-=mt[1],oi=2),ee())}function hl(){h.event.keyCode==32&&oi==2&&(Ti[0]+=vt[1],Ti[1]+=mt[1],oi=0,ee())}function js(){var Xo=h.mouse(da),Os=!1;ki&&(Xo[0]+=ki[0],Xo[1]+=ki[1]),oi||(h.event.altKey?(ai||(ai=[(vt[0]+vt[1])/2,(mt[0]+mt[1])/2]),Ti[0]=vt[+(Xo[0]0))return Wt;do Wt.push(dr=new Date(+Et)),De(Et,jt),he(Et);while(dr=Ct)for(;he(Ct),!Et(Ct);)Ct.setTime(Ct-1)},function(Ct,jt){if(Ct>=Ct)if(jt<0)for(;++jt<=0;)for(;De(Ct,-1),!Et(Ct););else for(;--jt>=0;)for(;De(Ct,1),!Et(Ct););})},tt&&($e.count=function(Et,Ct){return b.setTime(+Et),S.setTime(+Ct),he(b),he(S),Math.floor(tt(b,S))},$e.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?$e.filter(nt?function(Ct){return nt(Ct)%Et===0}:function(Ct){return $e.count(0,Ct)%Et===0}):$e}),$e}var e=E(function(){},function(he,De){he.setTime(+he+De)},function(he,De){return De-he});e.every=function(he){return he=Math.floor(he),!isFinite(he)||!(he>0)?null:he>1?E(function(De){De.setTime(Math.floor(De/he)*he)},function(De,tt){De.setTime(+De+tt*he)},function(De,tt){return(tt-De)/he}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=E(function(he){he.setTime(he-he.getMilliseconds())},function(he,De){he.setTime(+he+De*r)},function(he,De){return(De-he)/r},function(he){return he.getUTCSeconds()}),f=s.range,c=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getMinutes()}),p=c.range,d=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r-he.getMinutes()*o)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getHours()}),T=d.range,l=E(function(he){he.setHours(0,0,0,0)},function(he,De){he.setDate(he.getDate()+De)},function(he,De){return(De-he-(De.getTimezoneOffset()-he.getTimezoneOffset())*o)/i},function(he){return he.getDate()-1}),g=l.range;function x(he){return E(function(De){De.setDate(De.getDate()-(De.getDay()+7-he)%7),De.setHours(0,0,0,0)},function(De,tt){De.setDate(De.getDate()+tt*7)},function(De,tt){return(tt-De-(tt.getTimezoneOffset()-De.getTimezoneOffset())*o)/n})}var A=x(0),M=x(1),_=x(2),w=x(3),m=x(4),u=x(5),v=x(6),y=A.range,R=M.range,L=_.range,z=w.range,F=m.range,B=u.range,O=v.range,I=E(function(he){he.setDate(1),he.setHours(0,0,0,0)},function(he,De){he.setMonth(he.getMonth()+De)},function(he,De){return De.getMonth()-he.getMonth()+(De.getFullYear()-he.getFullYear())*12},function(he){return he.getMonth()}),N=I.range,U=E(function(he){he.setMonth(0,1),he.setHours(0,0,0,0)},function(he,De){he.setFullYear(he.getFullYear()+De)},function(he,De){return De.getFullYear()-he.getFullYear()},function(he){return he.getFullYear()});U.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setFullYear(Math.floor(De.getFullYear()/he)*he),De.setMonth(0,1),De.setHours(0,0,0,0)},function(De,tt){De.setFullYear(De.getFullYear()+tt*he)})};var X=U.range,ee=E(function(he){he.setUTCSeconds(0,0)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getUTCMinutes()}),ue=ee.range,oe=E(function(he){he.setUTCMinutes(0,0,0)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getUTCHours()}),le=oe.range,V=E(function(he){he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCDate(he.getUTCDate()+De)},function(he,De){return(De-he)/i},function(he){return he.getUTCDate()-1}),J=V.range;function te(he){return E(function(De){De.setUTCDate(De.getUTCDate()-(De.getUTCDay()+7-he)%7),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCDate(De.getUTCDate()+tt*7)},function(De,tt){return(tt-De)/n})}var Z=te(0),se=te(1),Q=te(2),q=te(3),re=te(4),ae=te(5),fe=te(6),be=Z.range,Me=se.range,Ie=Q.range,Le=q.range,je=re.range,et=ae.range,rt=fe.range,Je=E(function(he){he.setUTCDate(1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCMonth(he.getUTCMonth()+De)},function(he,De){return De.getUTCMonth()-he.getUTCMonth()+(De.getUTCFullYear()-he.getUTCFullYear())*12},function(he){return he.getUTCMonth()}),Ze=Je.range,Ee=E(function(he){he.setUTCMonth(0,1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCFullYear(he.getUTCFullYear()+De)},function(he,De){return De.getUTCFullYear()-he.getUTCFullYear()},function(he){return he.getUTCFullYear()});Ee.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setUTCFullYear(Math.floor(De.getUTCFullYear()/he)*he),De.setUTCMonth(0,1),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCFullYear(De.getUTCFullYear()+tt*he)})};var xe=Ee.range;h.timeDay=l,h.timeDays=g,h.timeFriday=u,h.timeFridays=B,h.timeHour=d,h.timeHours=T,h.timeInterval=E,h.timeMillisecond=e,h.timeMilliseconds=t,h.timeMinute=c,h.timeMinutes=p,h.timeMonday=M,h.timeMondays=R,h.timeMonth=I,h.timeMonths=N,h.timeSaturday=v,h.timeSaturdays=O,h.timeSecond=s,h.timeSeconds=f,h.timeSunday=A,h.timeSundays=y,h.timeThursday=m,h.timeThursdays=F,h.timeTuesday=_,h.timeTuesdays=L,h.timeWednesday=w,h.timeWednesdays=z,h.timeWeek=A,h.timeWeeks=y,h.timeYear=U,h.timeYears=X,h.utcDay=V,h.utcDays=J,h.utcFriday=ae,h.utcFridays=et,h.utcHour=oe,h.utcHours=le,h.utcMillisecond=e,h.utcMilliseconds=t,h.utcMinute=ee,h.utcMinutes=ue,h.utcMonday=se,h.utcMondays=Me,h.utcMonth=Je,h.utcMonths=Ze,h.utcSaturday=fe,h.utcSaturdays=rt,h.utcSecond=s,h.utcSeconds=f,h.utcSunday=Z,h.utcSundays=be,h.utcThursday=re,h.utcThursdays=je,h.utcTuesday=Q,h.utcTuesdays=Ie,h.utcWednesday=q,h.utcWednesdays=Le,h.utcWeek=Z,h.utcWeeks=be,h.utcYear=Ee,h.utcYears=xe,Object.defineProperty(h,"__esModule",{value:!0})})}}),bo=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,nc()):(h=h||self,b(h.d3=h.d3||{},h.d3))})(Y,function(h,b){function S(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return We.setFullYear(Fe.y),We}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function E(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return We.setUTCFullYear(Fe.y),We}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,We,Ae){return{y:Fe,m:We,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var We=Fe.dateTime,Ae=Fe.date,ge=Fe.time,pe=Fe.periods,Te=Fe.days,Ue=Fe.shortDays,Xe=Fe.months,bt=Fe.shortMonths,xt=f(pe),Mt=c(pe),Nt=f(Te),sr=c(Te),ar=f(Ue),tr=c(Ue),Tr=f(Xe),sa=c(Xe),Ea=f(bt),ba=c(bt),Ia={a:Ha,A:Va,b:Za,B:rn,c:null,d:I,e:I,f:ue,H:N,I:U,j:X,L:ee,m:oe,M:le,p:wa,q:Bn,Q:Ct,s:jt,S:V,u:J,U:te,V:Z,w:se,W:Q,x:null,X:null,y:q,Y:re,Z:ae,"%":Et},Ra={a:Hn,A:At,b:ft,B:pr,c:null,d:fe,e:fe,f:je,H:be,I:Me,j:Ie,L:Le,m:et,M:rt,p:Sr,q:Er,Q:Ct,s:jt,S:Je,u:Ze,U:Ee,V:xe,w:he,W:De,x:null,X:null,y:tt,Y:nt,Z:$e,"%":Et},ya={a:Zt,A:$t,b:Cr,B:qr,c:Jr,d:m,e:m,f:z,H:v,I:v,j:u,L,m:w,M:y,p:It,q:_,Q:B,s:O,S:R,u:d,U:T,V:l,w:p,W:g,x:aa,X:Ca,y:A,Y:x,Z:M,"%":F};Ia.x=tn(Ae,Ia),Ia.X=tn(ge,Ia),Ia.c=tn(We,Ia),Ra.x=tn(Ae,Ra),Ra.X=tn(ge,Ra),Ra.c=tn(We,Ra);function tn(_r,Mr){return function(Gr){var Fr=[],pt=-1,Kt=0,xr=_r.length,Hr,fa,xa;for(Gr instanceof Date||(Gr=new Date(+Gr));++pt53)return null;"w"in Fr||(Fr.w=1),"Z"in Fr?(Kt=E(e(Fr.y,0,1)),xr=Kt.getUTCDay(),Kt=xr>4||xr===0?b.utcMonday.ceil(Kt):b.utcMonday(Kt),Kt=b.utcDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getUTCFullYear(),Fr.m=Kt.getUTCMonth(),Fr.d=Kt.getUTCDate()+(Fr.w+6)%7):(Kt=S(e(Fr.y,0,1)),xr=Kt.getDay(),Kt=xr>4||xr===0?b.timeMonday.ceil(Kt):b.timeMonday(Kt),Kt=b.timeDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getFullYear(),Fr.m=Kt.getMonth(),Fr.d=Kt.getDate()+(Fr.w+6)%7)}else("W"in Fr||"U"in Fr)&&("w"in Fr||(Fr.w="u"in Fr?Fr.u%7:"W"in Fr?1:0),xr="Z"in Fr?E(e(Fr.y,0,1)).getUTCDay():S(e(Fr.y,0,1)).getDay(),Fr.m=0,Fr.d="W"in Fr?(Fr.w+6)%7+Fr.W*7-(xr+5)%7:Fr.w+Fr.U*7-(xr+6)%7);return"Z"in Fr?(Fr.H+=Fr.Z/100|0,Fr.M+=Fr.Z%100,E(Fr)):S(Fr)}}function Yt(_r,Mr,Gr,Fr){for(var pt=0,Kt=Mr.length,xr=Gr.length,Hr,fa;pt=xr)return-1;if(Hr=Mr.charCodeAt(pt++),Hr===37){if(Hr=Mr.charAt(pt++),fa=ya[Hr in r?Mr.charAt(pt++):Hr],!fa||(Fr=fa(_r,Gr,Fr))<0)return-1}else if(Hr!=Gr.charCodeAt(Fr++))return-1}return Fr}function It(_r,Mr,Gr){var Fr=xt.exec(Mr.slice(Gr));return Fr?(_r.p=Mt[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Zt(_r,Mr,Gr){var Fr=ar.exec(Mr.slice(Gr));return Fr?(_r.w=tr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function $t(_r,Mr,Gr){var Fr=Nt.exec(Mr.slice(Gr));return Fr?(_r.w=sr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Cr(_r,Mr,Gr){var Fr=Ea.exec(Mr.slice(Gr));return Fr?(_r.m=ba[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function qr(_r,Mr,Gr){var Fr=Tr.exec(Mr.slice(Gr));return Fr?(_r.m=sa[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Jr(_r,Mr,Gr){return Yt(_r,We,Mr,Gr)}function aa(_r,Mr,Gr){return Yt(_r,Ae,Mr,Gr)}function Ca(_r,Mr,Gr){return Yt(_r,ge,Mr,Gr)}function Ha(_r){return Ue[_r.getDay()]}function Va(_r){return Te[_r.getDay()]}function Za(_r){return bt[_r.getMonth()]}function rn(_r){return Xe[_r.getMonth()]}function wa(_r){return pe[+(_r.getHours()>=12)]}function Bn(_r){return 1+~~(_r.getMonth()/3)}function Hn(_r){return Ue[_r.getUTCDay()]}function At(_r){return Te[_r.getUTCDay()]}function ft(_r){return bt[_r.getUTCMonth()]}function pr(_r){return Xe[_r.getUTCMonth()]}function Sr(_r){return pe[+(_r.getUTCHours()>=12)]}function Er(_r){return 1+~~(_r.getUTCMonth()/3)}return{format:function(_r){var Mr=tn(_r+="",Ia);return Mr.toString=function(){return _r},Mr},parse:function(_r){var Mr=mn(_r+="",!1);return Mr.toString=function(){return _r},Mr},utcFormat:function(_r){var Mr=tn(_r+="",Ra);return Mr.toString=function(){return _r},Mr},utcParse:function(_r){var Mr=mn(_r+="",!0);return Mr.toString=function(){return _r},Mr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,We,Ae){var ge=Fe<0?"-":"",pe=(ge?-Fe:Fe)+"",Te=pe.length;return ge+(Te68?1900:2e3),Ae+ge[0].length):-1}function M(Fe,We,Ae){var ge=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(We.slice(Ae,Ae+6));return ge?(Fe.Z=ge[1]?0:-(ge[2]+(ge[3]||"00")),Ae+ge[0].length):-1}function _(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+1));return ge?(Fe.q=ge[0]*3-3,Ae+ge[0].length):-1}function w(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.m=ge[0]-1,Ae+ge[0].length):-1}function m(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.d=+ge[0],Ae+ge[0].length):-1}function u(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+3));return ge?(Fe.m=0,Fe.d=+ge[0],Ae+ge[0].length):-1}function v(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.H=+ge[0],Ae+ge[0].length):-1}function y(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.M=+ge[0],Ae+ge[0].length):-1}function R(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+2));return ge?(Fe.S=+ge[0],Ae+ge[0].length):-1}function L(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+3));return ge?(Fe.L=+ge[0],Ae+ge[0].length):-1}function z(Fe,We,Ae){var ge=o.exec(We.slice(Ae,Ae+6));return ge?(Fe.L=Math.floor(ge[0]/1e3),Ae+ge[0].length):-1}function F(Fe,We,Ae){var ge=a.exec(We.slice(Ae,Ae+1));return ge?Ae+ge[0].length:-1}function B(Fe,We,Ae){var ge=o.exec(We.slice(Ae));return ge?(Fe.Q=+ge[0],Ae+ge[0].length):-1}function O(Fe,We,Ae){var ge=o.exec(We.slice(Ae));return ge?(Fe.s=+ge[0],Ae+ge[0].length):-1}function I(Fe,We){return n(Fe.getDate(),We,2)}function N(Fe,We){return n(Fe.getHours(),We,2)}function U(Fe,We){return n(Fe.getHours()%12||12,We,2)}function X(Fe,We){return n(1+b.timeDay.count(b.timeYear(Fe),Fe),We,3)}function ee(Fe,We){return n(Fe.getMilliseconds(),We,3)}function ue(Fe,We){return ee(Fe,We)+"000"}function oe(Fe,We){return n(Fe.getMonth()+1,We,2)}function le(Fe,We){return n(Fe.getMinutes(),We,2)}function V(Fe,We){return n(Fe.getSeconds(),We,2)}function J(Fe){var We=Fe.getDay();return We===0?7:We}function te(Fe,We){return n(b.timeSunday.count(b.timeYear(Fe)-1,Fe),We,2)}function Z(Fe,We){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?b.timeThursday(Fe):b.timeThursday.ceil(Fe),n(b.timeThursday.count(b.timeYear(Fe),Fe)+(b.timeYear(Fe).getDay()===4),We,2)}function se(Fe){return Fe.getDay()}function Q(Fe,We){return n(b.timeMonday.count(b.timeYear(Fe)-1,Fe),We,2)}function q(Fe,We){return n(Fe.getFullYear()%100,We,2)}function re(Fe,We){return n(Fe.getFullYear()%1e4,We,4)}function ae(Fe){var We=Fe.getTimezoneOffset();return(We>0?"-":(We*=-1,"+"))+n(We/60|0,"0",2)+n(We%60,"0",2)}function fe(Fe,We){return n(Fe.getUTCDate(),We,2)}function be(Fe,We){return n(Fe.getUTCHours(),We,2)}function Me(Fe,We){return n(Fe.getUTCHours()%12||12,We,2)}function Ie(Fe,We){return n(1+b.utcDay.count(b.utcYear(Fe),Fe),We,3)}function Le(Fe,We){return n(Fe.getUTCMilliseconds(),We,3)}function je(Fe,We){return Le(Fe,We)+"000"}function et(Fe,We){return n(Fe.getUTCMonth()+1,We,2)}function rt(Fe,We){return n(Fe.getUTCMinutes(),We,2)}function Je(Fe,We){return n(Fe.getUTCSeconds(),We,2)}function Ze(Fe){var We=Fe.getUTCDay();return We===0?7:We}function Ee(Fe,We){return n(b.utcSunday.count(b.utcYear(Fe)-1,Fe),We,2)}function xe(Fe,We){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?b.utcThursday(Fe):b.utcThursday.ceil(Fe),n(b.utcThursday.count(b.utcYear(Fe),Fe)+(b.utcYear(Fe).getUTCDay()===4),We,2)}function he(Fe){return Fe.getUTCDay()}function De(Fe,We){return n(b.utcMonday.count(b.utcYear(Fe)-1,Fe),We,2)}function tt(Fe,We){return n(Fe.getUTCFullYear()%100,We,2)}function nt(Fe,We){return n(Fe.getUTCFullYear()%1e4,We,4)}function $e(){return"+0000"}function Et(){return"%"}function Ct(Fe){return+Fe}function jt(Fe){return Math.floor(+Fe/1e3)}var Wt;dr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dr(Fe){return Wt=t(Fe),h.timeFormat=Wt.format,h.timeParse=Wt.parse,h.utcFormat=Wt.utcFormat,h.utcParse=Wt.utcParse,Wt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function Dr(Fe){return Fe.toISOString()}var hr=Date.prototype.toISOString?Dr:h.utcFormat(vr);function Ar(Fe){var We=new Date(Fe);return isNaN(We)?null:We}var gt=+new Date("2000-01-01T00:00:00.000Z")?Ar:h.utcParse(vr);h.isoFormat=hr,h.isoParse=gt,h.timeFormatDefaultLocale=dr,h.timeFormatLocale=t,Object.defineProperty(h,"__esModule",{value:!0})})}}),Fc=He({"node_modules/d3-format/dist/d3-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h.d3=h.d3||{}))})(Y,function(h){function b(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function S(w,m){if((u=(w=m?w.toExponential(m-1):w.toExponential()).indexOf("e"))<0)return null;var u,v=w.slice(0,u);return[v.length>1?v[0]+v.slice(2):v,+w.slice(u+1)]}function E(w){return w=S(Math.abs(w)),w?w[1]:NaN}function e(w,m){return function(u,v){for(var y=u.length,R=[],L=0,z=w[0],F=0;y>0&&z>0&&(F+z+1>v&&(z=Math.max(1,v-F)),R.push(u.substring(y-=z,y+z)),!((F+=z+1)>v));)z=w[L=(L+1)%w.length];return R.reverse().join(m)}}function t(w){return function(m){return m.replace(/[0-9]/g,function(u){return w[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(w){if(!(m=r.exec(w)))throw new Error("invalid format: "+w);var m;return new a({fill:m[1],align:m[2],sign:m[3],symbol:m[4],zero:m[5],width:m[6],comma:m[7],precision:m[8]&&m[8].slice(1),trim:m[9],type:m[10]})}o.prototype=a.prototype;function a(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function i(w){e:for(var m=w.length,u=1,v=-1,y;u0&&(v=0);break}return v>0?w.slice(0,v)+w.slice(y+1):w}var n;function s(w,m){var u=S(w,m);if(!u)return w+"";var v=u[0],y=u[1],R=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,L=v.length;return R===L?v:R>L?v+new Array(R-L+1).join("0"):R>0?v.slice(0,R)+"."+v.slice(R):"0."+new Array(1-R).join("0")+S(w,Math.max(0,m+R-1))[0]}function f(w,m){var u=S(w,m);if(!u)return w+"";var v=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+v:v.length>y+1?v.slice(0,y+1)+"."+v.slice(y+1):v+new Array(y-v.length+2).join("0")}var c={"%":function(w,m){return(w*100).toFixed(m)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:b,e:function(w,m){return w.toExponential(m)},f:function(w,m){return w.toFixed(m)},g:function(w,m){return w.toPrecision(m)},o:function(w){return Math.round(w).toString(8)},p:function(w,m){return f(w*100,m)},r:f,s,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function p(w){return w}var d=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l(w){var m=w.grouping===void 0||w.thousands===void 0?p:e(d.call(w.grouping,Number),w.thousands+""),u=w.currency===void 0?"":w.currency[0]+"",v=w.currency===void 0?"":w.currency[1]+"",y=w.decimal===void 0?".":w.decimal+"",R=w.numerals===void 0?p:t(d.call(w.numerals,String)),L=w.percent===void 0?"%":w.percent+"",z=w.minus===void 0?"-":w.minus+"",F=w.nan===void 0?"NaN":w.nan+"";function B(I){I=o(I);var N=I.fill,U=I.align,X=I.sign,ee=I.symbol,ue=I.zero,oe=I.width,le=I.comma,V=I.precision,J=I.trim,te=I.type;te==="n"?(le=!0,te="g"):c[te]||(V===void 0&&(V=12),J=!0,te="g"),(ue||N==="0"&&U==="=")&&(ue=!0,N="0",U="=");var Z=ee==="$"?u:ee==="#"&&/[boxX]/.test(te)?"0"+te.toLowerCase():"",se=ee==="$"?v:/[%p]/.test(te)?L:"",Q=c[te],q=/[defgprs%]/.test(te);V=V===void 0?6:/[gprs]/.test(te)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function re(ae){var fe=Z,be=se,Me,Ie,Le;if(te==="c")be=Q(ae)+be,ae="";else{ae=+ae;var je=ae<0||1/ae<0;if(ae=isNaN(ae)?F:Q(Math.abs(ae),V),J&&(ae=i(ae)),je&&+ae==0&&X!=="+"&&(je=!1),fe=(je?X==="("?X:z:X==="-"||X==="("?"":X)+fe,be=(te==="s"?T[8+n/3]:"")+be+(je&&X==="("?")":""),q){for(Me=-1,Ie=ae.length;++MeLe||Le>57){be=(Le===46?y+ae.slice(Me+1):ae.slice(Me))+be,ae=ae.slice(0,Me);break}}}le&&!ue&&(ae=m(ae,1/0));var et=fe.length+ae.length+be.length,rt=et>1)+fe+ae+be+rt.slice(et);break;default:ae=rt+fe+ae+be;break}return R(ae)}return re.toString=function(){return I+""},re}function O(I,N){var U=B((I=o(I),I.type="f",I)),X=Math.max(-8,Math.min(8,Math.floor(E(N)/3)))*3,ee=Math.pow(10,-X),ue=T[8+X/3];return function(oe){return U(ee*oe)+ue}}return{format:B,formatPrefix:O}}var g;x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function x(w){return g=l(w),h.format=g.format,h.formatPrefix=g.formatPrefix,g}function A(w){return Math.max(0,-E(Math.abs(w)))}function M(w,m){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(m)/3)))*3-E(Math.abs(w)))}function _(w,m){return w=Math.abs(w),m=Math.abs(m)-w,Math.max(0,E(m)-E(w))+1}h.FormatSpecifier=a,h.formatDefaultLocale=x,h.formatLocale=l,h.formatSpecifier=o,h.precisionFixed=A,h.precisionPrefix=M,h.precisionRound=_,Object.defineProperty(h,"__esModule",{value:!0})})}}),Eh=He({"node_modules/is-string-blank/index.js"(Y,G){G.exports=function(h){for(var b=h.length,S,E=0;E13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),Bi=He({"node_modules/fast-isnumeric/index.js"(Y,G){var h=Eh();G.exports=function(b){var S=typeof b;if(S==="string"){var E=b;if(b=+b,b===0&&h(E))return!1}else if(S!=="number")return!1;return b-b<1}}}),Yo=He({"src/constants/numerical.js"(Y,G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),_p=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h["base64-arraybuffer"]={}))})(Y,function(h){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E>2],n+=b[(o[a]&3)<<4|o[a+1]>>4],n+=b[(o[a+1]&15)<<2|o[a+2]>>6],n+=b[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,f,c,p;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var d=new ArrayBuffer(o),T=new Uint8Array(d);for(i=0;i>4,T[n++]=(f&15)<<4|c>>2,T[n++]=(c&3)<<6|p&63;return d};h.decode=t,h.encode=e,Object.defineProperty(h,"__esModule",{value:!0})})}}),Kv=He({"src/lib/is_plain_object.js"(Y,G){G.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),lh=He({"src/lib/array.js"(Y){var G=_p().decode,h=Kv(),b=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Y.isTypedArray=e;function t(s){return b(s)||e(s)}Y.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Y.isArray1D=r,Y.ensureArray=function(s,f){return b(s)||(s=[]),s.length=f,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Y.isArrayBuffer=a,Y.decodeTypedArraySpec=function(s){var f=[],c=i(s),p=c.dtype,d=o[p];if(!d)throw new Error('Error in dtype: "'+p+'"');var T=d.BYTES_PER_ELEMENT,l=c.bdata;a(l)||(l=G(l));var g=c.shape===void 0?[l.byteLength/T]:(""+c.shape).split(",");g.reverse();var x=g.length,A,M,_=+g[0],w=T*_,m=0;if(x===1)f=new d(l);else if(x===2)for(A=+g[1],M=0;M2)return d[A]=d[A]|e,g.set(x,null);if(l){for(f=A;f0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return h(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),X5=He({"src/lib/relink_private.js"(Y,G){var h=lh().isArrayOrTypedArray,b=Kv();G.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(h(r)&&h(o)&&b(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;iE/2?S-Math.round(S/E)*E:S}G.exports={mod:h,modHalf:b}}}),If=He({"node_modules/tinycolor2/tinycolor.js"(Y,G){(function(h){var b=/^\s+/,S=/\s+$/,E=0,e=h.round,t=h.min,r=h.max,o=h.random;function a(q,re){if(q=q||"",re=re||{},q instanceof a)return q;if(!(this instanceof a))return new a(q,re);var ae=i(q);this._originalInput=q,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=e(100*this._a)/100,this._format=re.format||ae.format,this._gradientType=re.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=ae.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var q=this.toRgb();return(q.r*299+q.g*587+q.b*114)/1e3},getLuminance:function(){var q=this.toRgb(),re,ae,fe,be,Me,Ie;return re=q.r/255,ae=q.g/255,fe=q.b/255,re<=.03928?be=re/12.92:be=h.pow((re+.055)/1.055,2.4),ae<=.03928?Me=ae/12.92:Me=h.pow((ae+.055)/1.055,2.4),fe<=.03928?Ie=fe/12.92:Ie=h.pow((fe+.055)/1.055,2.4),.2126*be+.7152*Me+.0722*Ie},setAlpha:function(q){return this._a=I(q),this._roundA=e(100*this._a)/100,this},toHsv:function(){var q=c(this._r,this._g,this._b);return{h:q.h*360,s:q.s,v:q.v,a:this._a}},toHsvString:function(){var q=c(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.v*100);return this._a==1?"hsv("+re+", "+ae+"%, "+fe+"%)":"hsva("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var q=s(this._r,this._g,this._b);return{h:q.h*360,s:q.s,l:q.l,a:this._a}},toHslString:function(){var q=s(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.l*100);return this._a==1?"hsl("+re+", "+ae+"%, "+fe+"%)":"hsla("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHex:function(q){return d(this._r,this._g,this._b,q)},toHexString:function(q){return"#"+this.toHex(q)},toHex8:function(q){return T(this._r,this._g,this._b,this._a,q)},toHex8String:function(q){return"#"+this.toHex8(q)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(N(this._r,255)*100)+"%",g:e(N(this._g,255)*100)+"%",b:e(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%)":"rgba("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:B[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(q){var re="#"+l(this._r,this._g,this._b,this._a),ae=re,fe=this._gradientType?"GradientType = 1, ":"";if(q){var be=a(q);ae="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+re+",endColorstr="+ae+")"},toString:function(q){var re=!!q;q=q||this._format;var ae=!1,fe=this._a<1&&this._a>=0,be=!re&&fe&&(q==="hex"||q==="hex6"||q==="hex3"||q==="hex4"||q==="hex8"||q==="name");return be?q==="name"&&this._a===0?this.toName():this.toRgbString():(q==="rgb"&&(ae=this.toRgbString()),q==="prgb"&&(ae=this.toPercentageRgbString()),(q==="hex"||q==="hex6")&&(ae=this.toHexString()),q==="hex3"&&(ae=this.toHexString(!0)),q==="hex4"&&(ae=this.toHex8String(!0)),q==="hex8"&&(ae=this.toHex8String()),q==="name"&&(ae=this.toName()),q==="hsl"&&(ae=this.toHslString()),q==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(q,re){var ae=q.apply(null,[this].concat([].slice.call(re)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(q,re){return q.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(v,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(q,re){if(typeof q=="object"){var ae={};for(var fe in q)q.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=q[fe]:ae[fe]=le(q[fe]));q=ae}return a(q,re)};function i(q){var re={r:0,g:0,b:0},ae=1,fe=null,be=null,Me=null,Ie=!1,Le=!1;return typeof q=="string"&&(q=se(q)),typeof q=="object"&&(Z(q.r)&&Z(q.g)&&Z(q.b)?(re=n(q.r,q.g,q.b),Ie=!0,Le=String(q.r).substr(-1)==="%"?"prgb":"rgb"):Z(q.h)&&Z(q.s)&&Z(q.v)?(fe=le(q.s),be=le(q.v),re=p(q.h,fe,be),Ie=!0,Le="hsv"):Z(q.h)&&Z(q.s)&&Z(q.l)&&(fe=le(q.s),Me=le(q.l),re=f(q.h,fe,Me),Ie=!0,Le="hsl"),q.hasOwnProperty("a")&&(ae=q.a)),ae=I(ae),{ok:Ie,format:q.format||Le,r:t(255,r(re.r,0)),g:t(255,r(re.g,0)),b:t(255,r(re.b,0)),a:ae}}function n(q,re,ae){return{r:N(q,255)*255,g:N(re,255)*255,b:N(ae,255)*255}}function s(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=(fe+be)/2;if(fe==be)Me=Ie=0;else{var je=fe-be;switch(Ie=Le>.5?je/(2-fe-be):je/(fe+be),fe){case q:Me=(re-ae)/je+(re1&&(Je-=1),Je<1/6?et+(rt-et)*6*Je:Je<1/2?rt:Je<2/3?et+(rt-et)*(2/3-Je)*6:et}if(re===0)fe=be=Me=ae;else{var Le=ae<.5?ae*(1+re):ae+re-ae*re,je=2*ae-Le;fe=Ie(je,Le,q+1/3),be=Ie(je,Le,q),Me=Ie(je,Le,q-1/3)}return{r:fe*255,g:be*255,b:Me*255}}function c(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=fe,je=fe-be;if(Ie=fe===0?0:je/fe,fe==be)Me=0;else{switch(fe){case q:Me=(re-ae)/je+(re>1)+720)%360;--re;)fe.h=(fe.h+be)%360,Me.push(a(fe));return Me}function z(q,re){re=re||6;for(var ae=a(q).toHsv(),fe=ae.h,be=ae.s,Me=ae.v,Ie=[],Le=1/re;re--;)Ie.push(a({h:fe,s:be,v:Me})),Me=(Me+Le)%1;return Ie}a.mix=function(q,re,ae){ae=ae===0?0:ae||50;var fe=a(q).toRgb(),be=a(re).toRgb(),Me=ae/100,Ie={r:(be.r-fe.r)*Me+fe.r,g:(be.g-fe.g)*Me+fe.g,b:(be.b-fe.b)*Me+fe.b,a:(be.a-fe.a)*Me+fe.a};return a(Ie)},a.readability=function(q,re){var ae=a(q),fe=a(re);return(h.max(ae.getLuminance(),fe.getLuminance())+.05)/(h.min(ae.getLuminance(),fe.getLuminance())+.05)},a.isReadable=function(q,re,ae){var fe=a.readability(q,re),be,Me;switch(Me=!1,be=Q(ae),be.level+be.size){case"AAsmall":case"AAAlarge":Me=fe>=4.5;break;case"AAlarge":Me=fe>=3;break;case"AAAsmall":Me=fe>=7;break}return Me},a.mostReadable=function(q,re,ae){var fe=null,be=0,Me,Ie,Le,je;ae=ae||{},Ie=ae.includeFallbackColors,Le=ae.level,je=ae.size;for(var et=0;etbe&&(be=Me,fe=a(re[et]));return a.isReadable(q,fe,{level:Le,size:je})||!Ie?fe:(ae.includeFallbackColors=!1,a.mostReadable(q,["#fff","#000"],ae))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=a.hexNames=O(F);function O(q){var re={};for(var ae in q)q.hasOwnProperty(ae)&&(re[q[ae]]=ae);return re}function I(q){return q=parseFloat(q),(isNaN(q)||q<0||q>1)&&(q=1),q}function N(q,re){ee(q)&&(q="100%");var ae=ue(q);return q=t(re,r(0,parseFloat(q))),ae&&(q=parseInt(q*re,10)/100),h.abs(q-re)<1e-6?1:q%re/parseFloat(re)}function U(q){return t(1,r(0,q))}function X(q){return parseInt(q,16)}function ee(q){return typeof q=="string"&&q.indexOf(".")!=-1&&parseFloat(q)===1}function ue(q){return typeof q=="string"&&q.indexOf("%")!=-1}function oe(q){return q.length==1?"0"+q:""+q}function le(q){return q<=1&&(q=q*100+"%"),q}function V(q){return h.round(parseFloat(q)*255).toString(16)}function J(q){return X(q)/255}var te=function(){var q="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+re+")|(?:"+q+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",be="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+fe),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Z(q){return!!te.CSS_UNIT.exec(q)}function se(q){q=q.replace(b,"").replace(S,"").toLowerCase();var re=!1;if(F[q])q=F[q],re=!0;else if(q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=te.rgb.exec(q))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=te.rgba.exec(q))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=te.hsl.exec(q))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=te.hsla.exec(q))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=te.hsv.exec(q))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=te.hsva.exec(q))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=te.hex8.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),a:J(ae[4]),format:re?"name":"hex8"}:(ae=te.hex6.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),format:re?"name":"hex"}:(ae=te.hex4.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),a:J(ae[4]+""+ae[4]),format:re?"name":"hex8"}:(ae=te.hex3.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),format:re?"name":"hex"}:!1}function Q(q){var re,ae;return q=q||{level:"AA",size:"small"},re=(q.level||"AA").toUpperCase(),ae=(q.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:re,size:ae}}typeof G<"u"&&G.exports?G.exports=a:window.tinycolor=a})(Math)}}),Co=He({"src/lib/extend.js"(Y){var G=Kv(),h=Array.isArray;function b(E,e){var t,r;for(t=0;t=0)))return a;if(c===3)s[c]>1&&(s[c]=1);else if(s[c]>=1)return a}var p=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return f?"rgba("+p+", "+s[3]+")":"rgb("+p+")"}}}),Id=He({"src/constants/interactions.js"(Y,G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),C0=He({"src/lib/regex.js"(Y){Y.counter=function(G,h,b,S){var E=(h||"")+(b?"":"$"),e=S===!1?"":"^";return G==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+G+"([2-9]|[1-9][0-9]+)?"+E)}}}),Z5=He({"src/lib/coerce.js"(Y){var G=Bi(),h=If(),b=Co().extendFlat,S=Pl(),E=xp(),e=Ri(),t=Id().DESELECTDIM,r=Gm(),o=C0().counter,a=E0().modHalf,i=lh().isArrayOrTypedArray,n=lh().isTypedArraySpec,s=lh().decodeTypedArraySpec;Y.valObjectMeta={data_array:{coerceFunction:function(c,p,d){p.set(i(c)?c:n(c)?s(c):d)}},enumerated:{coerceFunction:function(c,p,d,T){T.coerceNumber&&(c=+c),T.values.indexOf(c)===-1?p.set(d):p.set(c)},validateFunction:function(c,p){p.coerceNumber&&(c=+c);for(var d=p.values,T=0;Tg===!0||g===!1;l(c)||T.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(l)?p.set(c):p.set(d)}},number:{coerceFunction:function(c,p,d,T){n(c)&&(c=s(c)),!G(c)||T.min!==void 0&&cT.max?p.set(d):p.set(+c)}},integer:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}n(c)&&(c=s(c)),c%1||!G(c)||T.min!==void 0&&cT.max?p.set(d):p.set(+c)}},string:{coerceFunction:function(c,p,d,T){if(typeof c!="string"){var l=typeof c=="number";T.strict===!0||!l?p.set(d):p.set(String(c))}else T.noBlank&&!c?p.set(d):p.set(c)}},color:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),h(c).isValid()?p.set(c):p.set(d)}},colorlist:{coerceFunction:function(c,p,d){function T(l){return h(l).isValid()}!Array.isArray(c)||!c.length?p.set(d):c.every(T)?p.set(c):p.set(d)}},colorscale:{coerceFunction:function(c,p,d){p.set(E.get(c,d))}},angle:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),c==="auto"?p.set("auto"):G(c)?p.set(a(+c,360)):p.set(d)}},subplotid:{coerceFunction:function(c,p,d,T){var l=T.regex||o(d);const g=x=>typeof x=="string"&&l.test(x);g(c)||T.arrayOk&&i(c)&&c.length>0&&c.every(g)?p.set(c):p.set(d)},validateFunction:function(c,p){var d=p.dflt;return c===d?!0:typeof c!="string"?!1:!!o(d).test(c)}},flaglist:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}if(typeof c!="string"){p.set(d);return}for(var l=c.split("+"),g=0;g/g),c=0;c1){var e=["LOG:"];for(E=0;E1){var t=[];for(E=0;E"),"long")}},S.warn=function(){var E;if(h.logging>0){var e=["WARN:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}},S.error=function(){var E;if(h.logging>0){var e=["ERROR:"];for(E=0;E0){var t=[];for(E=0;E"),"stick")}}}}),Xy=He({"src/lib/noop.js"(Y,G){G.exports=function(){}}}),nb=He({"src/lib/push_unique.js"(Y,G){G.exports=function(b,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;esh({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>sh({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Y.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),Yy=He({"src/components/shapes/label_texttemplate.js"(Y,G){function h(g,x){return x?x.d2l(g):g}function b(g,x){return x?x.l2d(g):g}function S(g){return g.x0}function E(g){return g.x1}function e(g){return g.y0}function t(g){return g.y1}function r(g){return g.x0shift||0}function o(g){return g.x1shift||0}function a(g){return g.y0shift||0}function i(g){return g.y1shift||0}function n(g,x){return h(g.x1,x)+o(g)-h(g.x0,x)-r(g)}function s(g,x,A){return h(g.y1,A)+i(g)-h(g.y0,A)-a(g)}function f(g,x){return Math.abs(n(g,x))}function c(g,x,A){return Math.abs(s(g,x,A))}function p(g,x,A){return g.type!=="line"?void 0:Math.sqrt(Math.pow(n(g,x),2)+Math.pow(s(g,x,A),2))}function d(g,x){return b((h(g.x1,x)+o(g)+h(g.x0,x)+r(g))/2,x)}function T(g,x,A){return b((h(g.y1,A)+i(g)+h(g.y0,A)+a(g))/2,A)}function l(g,x,A){return g.type!=="line"?void 0:s(g,x,A)/n(g,x)}G.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:n,dy:s,width:f,height:c,length:p,xcenter:d,ycenter:T}}}),TA=He({"src/components/shapes/draw_newshape/attributes.js"(Y,G){var h=Nu().overrideAll,b=Pl(),S=Su(),E=jf().dash,e=Co().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=bl(),o=Yy();G.exports=h({newshape:{visible:e({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},b.legend,{}),legendgroup:e({},b.legendgroup,{}),legendgrouptitle:{text:e({},b.legendgrouptitle.text,{}),font:S({})},legendrank:e({},b.legendrank,{}),legendwidth:e({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:e({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),AA=He({"src/components/selections/draw_newselection/attributes.js"(Y,G){var h=jf().dash,b=Co().extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},h,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ky=He({"src/plots/pad_attributes.js"(Y,G){G.exports=function(h){var b=h.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),L0=He({"src/plots/layout_attributes.js"(Y,G){var h=Su(),b=Xm(),S=hf(),E=TA(),e=AA(),t=Ky(),r=Co().extendFlat,o=h({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,G.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(t({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:S.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},b.transition,{editType:"none"})}}}),SA=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97")){var Y=document.createElement("style");Y.id="696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97",Y.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Y)}})()}}),Ni=He({"src/registry.js"(Y){var G=Rd(),h=Xy(),b=nb(),S=Kv(),E=Wm().addStyleRule,e=Co(),t=Pl(),r=L0(),o=e.extendFlat,a=e.extendDeepAll;Y.modules={},Y.allCategories={},Y.allTypes=[],Y.subplotsRegistry={},Y.componentsRegistry={},Y.layoutArrayContainers=[],Y.layoutArrayRegexes=[],Y.traceLayoutAttributes={},Y.localeRegistry={},Y.apiMethodRegistry={},Y.collectableSubplotTypes=null,Y.register=function(x){if(Y.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A=l&&F<=g?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var U=d(B),X=F.charAt(0);U&&(X==="G"||X==="g")&&(F=F.slice(1),B="");var ee=U&&B.slice(0,7)==="chinese",ue=F.match(ee?c:f);if(!ue)return e;var oe=ue[1],le=ue[3]||"1",V=Number(ue[5]||1),J=Number(ue[7]||0),te=Number(ue[9]||0),Z=Number(ue[11]||0);if(U){if(oe.length===2)return e;oe=Number(oe);var se;try{var Q=n.getComponentMethod("calendars","getCal")(B);if(ee){var q=le.charAt(le.length-1)==="i";le=parseInt(le,10),se=Q.newDate(oe,Q.toMonthIndex(oe,le,q),V)}else se=Q.newDate(oe,Number(le),V)}catch{return e}return se?(se.toJD()-i)*t+J*r+te*o+Z*a:e}oe.length===2?oe=(Number(oe)+2e3-p)%100+p:oe=Number(oe),le-=1;var re=new Date(Date.UTC(2e3,le,V,J,te));return re.setUTCFullYear(oe),re.getUTCMonth()!==le||re.getUTCDate()!==V?e:re.getTime()+Z*a},l=Y.MIN_MS=Y.dateTime2ms("-9999"),g=Y.MAX_MS=Y.dateTime2ms("9999-12-31 23:59:59.9999"),Y.isDateTime=function(F,B){return Y.dateTime2ms(F,B)!==e};function x(F,B){return String(F+Math.pow(10,B)).slice(1)}var A=90*t,M=3*r,_=5*o;Y.ms2DateTime=function(F,B,O){if(typeof F!="number"||!(F>=l&&F<=g))return e;B||(B=0);var I=Math.floor(S(F+.05,1)*10),N=Math.round(F-I/10),U,X,ee,ue,oe,le;if(d(O)){var V=Math.floor(N/t)+i,J=Math.floor(S(F,t));try{U=n.getComponentMethod("calendars","getCal")(O).fromJD(V).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(N))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;X=B=l+t&&F<=g-t))return e;var B=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-B/10)),I=G("%Y-%m-%d")(O),N=O.getHours(),U=O.getMinutes(),X=O.getSeconds(),ee=O.getUTCMilliseconds()*10+B;return w(I,N,U,X,ee)};function w(F,B,O,I,N){if((B||O||I||N)&&(F+=" "+x(B,2)+":"+x(O,2),(I||N)&&(F+=":"+x(I,2),N))){for(var U=4;N%10===0;)U-=1,N/=10;F+="."+x(N,U)}return F}Y.cleanDate=function(F,B,O){if(F===e)return B;if(Y.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(d(O))return b.error("JS Dates and milliseconds are incompatible with world calendars",F),B;if(F=Y.ms2DateTimeLocal(+F),!F&&B!==void 0)return B}else if(!Y.isDateTime(F,O))return b.error("unrecognized date",F),B;return F};var m=/%\d?f/g,u=/%h/g,v={1:"1",2:"1",3:"2",4:"2"};function y(F,B,O,I){F=F.replace(m,function(U){var X=Math.min(+U.charAt(1)||6,6),ee=(B/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return ee});var N=new Date(Math.floor(B+.05));if(F=F.replace(u,function(){return v[O("%q")(N)]}),d(I))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,B,I)}catch{return"Invalid"}return O(F)(N)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,B){var O=S(F+.05,t),I=x(Math.floor(O/r),2)+":"+x(S(Math.floor(O/o),60),2);if(B!=="M"){h(B)||(B=0);var N=Math.min(S(F/a,60),R[B]),U=(100+N).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),I+=":"+U}return I}Y.formatDate=function(F,B,O,I,N,U){if(N=d(N)&&N,!B)if(O==="y")B=U.year;else if(O==="m")B=U.month;else if(O==="d")B=U.dayMonth+` diff --git a/dashboard/static/index.html b/dashboard/static/index.html index c7749263..59174e42 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -6,8 +6,8 @@ AlphaTrion - - + + diff --git a/scripts/migrate_add_semantic_kind.sql b/scripts/migrate_add_semantic_kind.sql new file mode 100644 index 00000000..f1ad728a --- /dev/null +++ b/scripts/migrate_add_semantic_kind.sql @@ -0,0 +1,27 @@ +-- Migration script to add SemanticKind column to existing otel_spans table +-- This should be run on existing ClickHouse databases + +-- Step 1: Add SemanticKind column +ALTER TABLE alphatrion_traces.otel_spans +ADD COLUMN IF NOT EXISTS SemanticKind LowCardinality(String) DEFAULT '' CODEC(ZSTD(1)); + +-- Step 2: Populate SemanticKind for existing rows +-- This determines the semantic kind based on span attributes +ALTER TABLE alphatrion_traces.otel_spans +UPDATE SemanticKind = + CASE + WHEN mapContains(SpanAttributes, 'llm.usage.total_tokens') THEN 'llm' + WHEN mapContains(SpanAttributes, 'traceloop.span.kind') THEN SpanAttributes['traceloop.span.kind'] + ELSE 'unknown' + END +WHERE SemanticKind = ''; + +-- Step 3: Add index for efficient filtering +ALTER TABLE alphatrion_traces.otel_spans +ADD INDEX IF NOT EXISTS idx_semantic_kind SemanticKind TYPE set(0) GRANULARITY 1; + +-- Verify the migration +SELECT SemanticKind, COUNT(*) as count +FROM alphatrion_traces.otel_spans +GROUP BY SemanticKind +ORDER BY count DESC;