diff --git a/backend/src/main/java/com/zioinfo/fa/ai/controller/AiConfigController.java b/backend/src/main/java/com/zioinfo/fa/ai/controller/AiConfigController.java
new file mode 100644
index 0000000..f7a7913
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/controller/AiConfigController.java
@@ -0,0 +1,54 @@
+package com.zioinfo.fa.ai.controller;
+
+import com.zioinfo.fa.ai.dto.AiConfigDto;
+import com.zioinfo.fa.ai.dto.AiConfigUpdateRequest;
+import com.zioinfo.fa.ai.service.AiConfigService;
+import com.zioinfo.fa.common.ApiResponse;
+import com.zioinfo.fa.common.audit.AuditService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * AI 플랫폼(LLM provider) 설정 관리(ADMIN). [GUARDiA-FA]
+ * SecurityConfig {@code /api/admin/ai-config/** hasRole(ADMIN)} 게이트로 보호된다.
+ *
+ * fa_setting(key='ai.*')에 저장된 런타임 설정을 조회/갱신/테스트한다. API 키는 환경변수
+ * (ANTHROPIC_API_KEY)로만 주입 되어 응답·로그에 노출되지 않는다(GET 은 {@code claudeKeySet} 불리언만).
+ * 설정 변경은 재기동 없이 다음 AI 호출부터 반영된다.
+ *
+ *
+ * GET /api/admin/ai-config 현재 효과 설정(키 값 제외, keySet 불리언만)
+ * PUT /api/admin/ai-config provider/모델 갱신(화이트리스트 검증)
+ * POST /api/admin/ai-config/test 저장 설정 기준 선택 provider 연결 테스트(요약 결과만)
+ *
+ */
+@RestController
+@RequestMapping("/api/admin/ai-config")
+@RequiredArgsConstructor
+public class AiConfigController {
+
+ private final AiConfigService service;
+
+ @GetMapping
+ public ApiResponse get() {
+ return ApiResponse.ok(service.getConfig());
+ }
+
+ @PutMapping
+ public ApiResponse update(@RequestBody AiConfigUpdateRequest req) {
+ return ApiResponse.ok(service.update(req, AuditService.currentActor()));
+ }
+
+ @PostMapping("/test")
+ public ApiResponse test() {
+ AiConfigService.TestResult result = service.test();
+ return result.ok()
+ ? ApiResponse.ok(result)
+ : new ApiResponse<>(false, result.message(), result);
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/controller/AiFeedbackController.java b/backend/src/main/java/com/zioinfo/fa/ai/controller/AiFeedbackController.java
new file mode 100644
index 0000000..8c7709a
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/controller/AiFeedbackController.java
@@ -0,0 +1,61 @@
+package com.zioinfo.fa.ai.controller;
+
+import com.zioinfo.fa.ai.dto.AiFeedbackRequest;
+import com.zioinfo.fa.ai.service.LearningStore;
+import com.zioinfo.fa.ai.service.RagFeedbackClient;
+import com.zioinfo.fa.common.ApiResponse;
+import com.zioinfo.fa.common.audit.AuditService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * AI 답변 피드백 수집(인증 사용자). [GUARDiA-FA]
+ *
+ * {@code POST /api/ai/feedback} → ① 로컬 DuckDB 학습 저장소({@link LearningStore}) 기록 +
+ * ② 중앙 guardia-rag {@code /feedback} 전달({@link RagFeedbackClient}) 을 둘 다 수행한다.
+ * 저장 전 PII 마스킹. 저장소/중앙 미가용이어도 요청은 성공 처리(내결함성)하고 각 stored 플래그로 상태를 반환한다.
+ *
+ *
SecurityConfig {@code /api/ai/** authenticated} 게이트. verdict 는 up|down.
+ */
+@RestController
+@RequestMapping("/api/ai")
+@RequiredArgsConstructor
+public class AiFeedbackController {
+
+ private final LearningStore learningStore;
+ private final RagFeedbackClient ragFeedbackClient;
+
+ @PostMapping("/feedback")
+ public ApiResponse> feedback(@RequestBody AiFeedbackRequest req) {
+ String verdict = normalizeVerdict(req.verdict());
+ String actor = AuditService.currentActor();
+
+ // ① 로컬 DuckDB 기록(PII 마스킹은 저장소 내부에서 수행)
+ learningStore.recordFeedback(
+ req.feature(), req.question(), req.answer(), verdict, req.correction(), actor);
+
+ // ② 중앙 guardia-rag 전달(둘 다) — 실패는 degraded 로만 표시, 요청은 성공
+ Map central = ragFeedbackClient.forward(
+ req.answerId(), req.question(), req.answer(), verdict, req.correction(), actor);
+
+ Map out = new LinkedHashMap<>();
+ out.put("verdict", verdict);
+ out.put("localStored", learningStore.isAvailable());
+ out.put("centralStored", Boolean.TRUE.equals(central.get("stored")));
+ return ApiResponse.ok(out);
+ }
+
+ private static String normalizeVerdict(String v) {
+ if (v == null) {
+ return "up";
+ }
+ String s = v.trim().toLowerCase();
+ return ("down".equals(s) || "bad".equals(s) || "👎".equals(s)) ? "down" : "up";
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/dto/AiConfigDto.java b/backend/src/main/java/com/zioinfo/fa/ai/dto/AiConfigDto.java
new file mode 100644
index 0000000..be7cefa
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/dto/AiConfigDto.java
@@ -0,0 +1,20 @@
+package com.zioinfo.fa.ai.dto;
+
+/**
+ * AI 설정 조회 DTO — API 키 값 미반환(claudeKeySet 으로 설정 여부만). [GUARDiA-FA]
+ *
+ * @param provider 효과 provider(ollama/claude/qwen3/deepseek/glm)
+ * @param ollamaTextModel 효과 Ollama 텍스트 모델(provider 별 해석 결과)
+ * @param claudeModel 효과 Claude 모델 ID
+ * @param claudeKeySet 서버 환경변수 ANTHROPIC_API_KEY 존재 여부(값/길이/마스킹 일절 미포함)
+ * @param aiEnabled 전역 AI 사용 여부(off 시 규칙 기반 degraded)
+ * @param ramWarning 선택 Ollama 모델이 서버 RAM 여유를 초과할 수 있으면 true(glm4:9b 등 — 콜드로드 폴백 안내)
+ */
+public record AiConfigDto(
+ String provider,
+ String ollamaTextModel,
+ String claudeModel,
+ boolean claudeKeySet,
+ boolean aiEnabled,
+ boolean ramWarning) {
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/dto/AiConfigUpdateRequest.java b/backend/src/main/java/com/zioinfo/fa/ai/dto/AiConfigUpdateRequest.java
new file mode 100644
index 0000000..34bf14d
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/dto/AiConfigUpdateRequest.java
@@ -0,0 +1,14 @@
+package com.zioinfo.fa.ai.dto;
+
+/**
+ * AI 설정 저장 요청 — 화이트리스트 검증. [GUARDiA-FA]
+ *
+ * @param provider ollama/claude/qwen3/deepseek/glm (필수)
+ * @param claudeModel Claude 모델 ID(선택, 미제공 시 기존 유지)
+ * @param ollamaTextModel Ollama 텍스트 모델(선택, 미제공 시 기존 유지)
+ */
+public record AiConfigUpdateRequest(
+ String provider,
+ String claudeModel,
+ String ollamaTextModel) {
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/dto/AiFeedbackRequest.java b/backend/src/main/java/com/zioinfo/fa/ai/dto/AiFeedbackRequest.java
new file mode 100644
index 0000000..0102edd
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/dto/AiFeedbackRequest.java
@@ -0,0 +1,22 @@
+package com.zioinfo.fa.ai.dto;
+
+/**
+ * AI 답변 피드백 요청(👍/👎 + 교정). [GUARDiA-FA]
+ *
+ * 로컬 DuckDB 학습 저장소 기록 + 중앙 guardia-rag {@code /feedback} 전달(둘 다). 저장 전 PII 마스킹.
+ *
+ * @param feature 기능 구분(quality_defect·equipment_predict·inventory_optimize 등)
+ * @param question 사용자 질의/컨텍스트(선택)
+ * @param answer AI 답변(선택)
+ * @param verdict 평가(up|down)
+ * @param correction 교정 텍스트(선택, 👎 시 권장)
+ * @param answerId 중앙 rag answer_id(있으면 연계)
+ */
+public record AiFeedbackRequest(
+ String feature,
+ String question,
+ String answer,
+ String verdict,
+ String correction,
+ String answerId) {
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/service/AiConfigService.java b/backend/src/main/java/com/zioinfo/fa/ai/service/AiConfigService.java
new file mode 100644
index 0000000..4112198
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/service/AiConfigService.java
@@ -0,0 +1,266 @@
+package com.zioinfo.fa.ai.service;
+
+import com.zioinfo.fa.ai.dto.AiConfigDto;
+import com.zioinfo.fa.ai.dto.AiConfigUpdateRequest;
+import com.zioinfo.fa.common.ai.ClaudeTextClient;
+import com.zioinfo.fa.common.ai.OllamaTextClient;
+import com.zioinfo.fa.common.ai.TextAiClient.GenResult;
+import com.zioinfo.fa.common.audit.AuditService;
+import com.zioinfo.fa.domain.FaSetting;
+import com.zioinfo.fa.mapper.SettingMapper;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.util.Set;
+
+/**
+ * AI provider 런타임 설정(fa_setting, key='ai.*') 단일 출처 서비스. [GUARDiA-FA]
+ *
+ *
해상도 : DB(fa_setting) 우선 → 미설정 시 기본값/env 폴백. 시드(db/104) 미적용/키 비움 상태에서도
+ * 기존 Ollama 동작이 바이트 동일하게 유지된다(provider 기본 ollama).
+ *
+ *
보안 : Claude API 키는 본 서비스가 다루지 않는다. {@code claudeKeySet} 은
+ * {@link ClaudeTextClient#isConfigured()}(환경변수 존재 여부)만 반환 — 값/길이/마스킹 일절 미포함.
+ *
+ *
프로바이더 : claude / qwen3 / deepseek / glm / ollama. Ollama 계열(qwen3·deepseek·glm·ollama)은
+ * 각 해당 소형 텍스트 모델로 generate. claude 는 Claude→실패 시 Ollama(선택모델) 폴백(라우터).
+ * glm(glm4:9b)은 서버 RAM 여유 초과 가능 → 화이트리스트엔 등록하되 {@code ramWarning} 배지로 안내.
+ *
+ *
레퍼런스 : guardia-ocr {@code ai.service.AiConfigService} 미러(provider 에 glm 추가).
+ */
+@Service
+@RequiredArgsConstructor
+public class AiConfigService {
+
+ // --- fa_setting 키 (db/104 시드와 일치)
+ public static final String K_PROVIDER = "ai.provider"; // ENUM: ollama|claude|qwen3|deepseek|glm
+ public static final String K_CLAUDE_MODEL = "ai.claude.model"; // ENUM: 화이트리스트
+ public static final String K_OLLAMA_TEXT_MODEL = "ai.ollama.textModel"; // STRING (미설정 시 env 폴백)
+ public static final String K_ENABLED = "ai.enabled"; // BOOL (off=규칙기반 degraded)
+
+ public static final String PROVIDER_OLLAMA = "ollama";
+ public static final String PROVIDER_CLAUDE = "claude";
+ public static final String PROVIDER_QWEN3 = "qwen3";
+ public static final String PROVIDER_DEEPSEEK = "deepseek";
+ public static final String PROVIDER_GLM = "glm";
+ public static final String DEFAULT_CLAUDE_MODEL = "claude-sonnet-4-6";
+
+ // Ollama 계열 provider → 고정 소형 모델(서버 RAM 제약 준수)
+ public static final String MODEL_QWEN3 = "qwen3:1.7b";
+ public static final String MODEL_DEEPSEEK = "deepseek-r1:1.5b";
+ public static final String MODEL_GLM = "glm4:9b"; // RAM 여유 필요(콜드로드 실패 시 폴백)
+ public static final String MODEL_DEFAULT_OLLAMA = "llama3.2:1b";
+
+ /** 허용 provider(임의 문자열 거부). */
+ public static final Set ALLOWED_PROVIDERS =
+ Set.of(PROVIDER_OLLAMA, PROVIDER_CLAUDE, PROVIDER_QWEN3, PROVIDER_DEEPSEEK, PROVIDER_GLM);
+ /** 허용 Claude 모델 ID(임의 문자열 거부). */
+ public static final Set ALLOWED_CLAUDE_MODELS =
+ Set.of("claude-sonnet-4-6", "claude-haiku-4-5", "claude-opus-4-8");
+ /** 허용 Ollama 텍스트 모델(임의 문자열 거부). */
+ public static final Set ALLOWED_OLLAMA_MODELS =
+ Set.of(MODEL_QWEN3, MODEL_DEEPSEEK, MODEL_GLM, MODEL_DEFAULT_OLLAMA);
+ /** RAM 여유 초과 가능 모델(선택 허용하되 배지 경고). */
+ public static final Set RAM_HEAVY_MODELS = Set.of(MODEL_GLM);
+
+ private final SettingMapper repo;
+ private final ClaudeTextClient claudeClient;
+ private final OllamaTextClient ollamaTextClient; // 연결 테스트용 텍스트 generate
+ private final AuditService auditService;
+
+ /** 서버 기본 Ollama 텍스트 모델(application.yml guardia.ollama-text-model). */
+ @Value("${guardia.ollama-text-model:llama3.2:1b}")
+ private String defaultOllamaTextModel;
+
+ // ---------------------------------------------------------------- 효과값(DB 우선 → 기본)
+
+ /** 효과 provider. DB 우선, 미설정/비허용 시 ollama. */
+ public String provider() {
+ String v = dbVal(K_PROVIDER);
+ if (v != null) {
+ String p = v.trim().toLowerCase();
+ if (ALLOWED_PROVIDERS.contains(p)) {
+ return p;
+ }
+ }
+ return PROVIDER_OLLAMA;
+ }
+
+ /** 효과 Claude 모델 ID(DB 우선, 미설정/비허용 시 기본 sonnet-4-6). */
+ public String claudeModel() {
+ String v = dbVal(K_CLAUDE_MODEL);
+ if (v != null) {
+ String m = v.trim();
+ if (ALLOWED_CLAUDE_MODELS.contains(m)) {
+ return m;
+ }
+ }
+ return DEFAULT_CLAUDE_MODEL;
+ }
+
+ /**
+ * 효과 Ollama 텍스트 모델. provider=qwen3/deepseek/glm 이면 고정 소형 모델, 그 외(ollama·claude 폴백)는
+ * DB 설정(화이트리스트) 우선 → 미설정 시 env 기본(llama3.2:1b). 라우터의 Ollama 경로·Claude 폴백 공용.
+ */
+ public String ollamaTextModel() {
+ String p = provider();
+ if (PROVIDER_QWEN3.equals(p)) {
+ return MODEL_QWEN3;
+ }
+ if (PROVIDER_DEEPSEEK.equals(p)) {
+ return MODEL_DEEPSEEK;
+ }
+ if (PROVIDER_GLM.equals(p)) {
+ return MODEL_GLM;
+ }
+ String v = dbVal(K_OLLAMA_TEXT_MODEL);
+ if (v != null && ALLOWED_OLLAMA_MODELS.contains(v.trim())) {
+ return v.trim();
+ }
+ return defaultOllamaTextModel;
+ }
+
+ /** claude 폴백 시 사용할 안전 소형 모델(RAM 안전). glm 등 무거운 선택과 무관하게 llama3.2:1b 우선. */
+ public String fallbackOllamaModel() {
+ String v = dbVal(K_OLLAMA_TEXT_MODEL);
+ if (v != null && ALLOWED_OLLAMA_MODELS.contains(v.trim()) && !RAM_HEAVY_MODELS.contains(v.trim())) {
+ return v.trim();
+ }
+ return defaultOllamaTextModel;
+ }
+
+ /** 전역 AI 토글(ai.enabled). false 면 모든 AI 결과는 규칙기반(degraded). 기본 true. */
+ public boolean aiEnabled() {
+ String v = dbVal(K_ENABLED);
+ return v == null || !"false".equalsIgnoreCase(v.trim());
+ }
+
+ /** Claude API 키가 환경변수로 설정되어 있는지(여부만). */
+ public boolean claudeKeySet() {
+ return claudeClient.isConfigured();
+ }
+
+ /** 선택된 Ollama 모델이 서버 RAM 여유를 초과할 수 있는지(glm4:9b 등). */
+ public boolean ramWarning() {
+ return RAM_HEAVY_MODELS.contains(ollamaTextModel());
+ }
+
+ /**
+ * 실제 호출이 Claude 경로로 가야 하는지: provider=claude · 키 설정됨 · AI 전역 활성.
+ * false 면 호출자는 Ollama 경로/폴백을 사용한다(키 미설정/실패 시 자동 폴백 정책 반영).
+ */
+ public boolean isClaudeActive() {
+ return PROVIDER_CLAUDE.equals(provider()) && claudeKeySet() && aiEnabled();
+ }
+
+ // ---------------------------------------------------------------- ADMIN: 조회 / 갱신
+
+ /** 현재 효과 설정 조회. 키 값·길이·마스킹 일절 미포함(claudeKeySet 불리언만). */
+ public AiConfigDto getConfig() {
+ return new AiConfigDto(
+ provider(),
+ ollamaTextModel(),
+ claudeModel(),
+ claudeKeySet(),
+ aiEnabled(),
+ ramWarning());
+ }
+
+ /**
+ * 설정 갱신(upsert). 화이트리스트 검증: provider∈{ollama,claude,qwen3,deepseek,glm}, claudeModel∈허용셋,
+ * ollamaTextModel(선택)∈허용셋. 재기동 없이 다음 호출부터 반영.
+ */
+ public AiConfigDto update(AiConfigUpdateRequest req, String actor) {
+ String provider = req.provider() == null ? "" : req.provider().trim().toLowerCase();
+ if (!ALLOWED_PROVIDERS.contains(provider)) {
+ throw new IllegalArgumentException("ERR-AI-400: provider 는 ollama/claude/qwen3/deepseek/glm 중 하나여야 합니다.");
+ }
+ upsertAudited(K_PROVIDER, provider, actor);
+
+ if (req.claudeModel() != null && !req.claudeModel().isBlank()) {
+ String model = req.claudeModel().trim();
+ if (!ALLOWED_CLAUDE_MODELS.contains(model)) {
+ throw new IllegalArgumentException("ERR-AI-400: 허용되지 않은 Claude 모델 ID 입니다.");
+ }
+ upsertAudited(K_CLAUDE_MODEL, model, actor);
+ }
+
+ // ollamaTextModel 은 선택. 제공 시에만 갱신(미제공/공백 = 기존 유지).
+ if (req.ollamaTextModel() != null && !req.ollamaTextModel().isBlank()) {
+ String om = req.ollamaTextModel().trim();
+ if (!ALLOWED_OLLAMA_MODELS.contains(om)) {
+ throw new IllegalArgumentException("ERR-AI-400: 허용되지 않은 Ollama 텍스트 모델입니다.");
+ }
+ upsertAudited(K_OLLAMA_TEXT_MODEL, om, actor);
+ }
+ return getConfig();
+ }
+
+ // ---------------------------------------------------------------- ADMIN: 연결 테스트
+
+ /**
+ * 저장된 설정 기준으로 선택 provider 에 짧은 ping 생성을 요청해 연결을 확인한다.
+ * 결과 메시지에는 키·스택트레이스·내부 IP 를 절대 포함하지 않는다(요약만).
+ */
+ public TestResult test() {
+ if (isClaudeActive()) {
+ String model = claudeModel();
+ long start = System.currentTimeMillis();
+ GenResult r = claudeClient.generate("ping", model, 8);
+ long ms = System.currentTimeMillis() - start;
+ if (!r.degraded() && r.text() != null && !r.text().isBlank()) {
+ return new TestResult(true, false, "정상 · " + model + " · " + fmtMs(ms));
+ }
+ return new TestResult(false, true, "Claude 연결 실패 · 모델/네트워크/키 설정을 확인하세요.");
+ }
+ // provider=claude 인데 키 미설정 → 실제로는 Ollama 폴백 동작 안내(혼선 방지).
+ if (PROVIDER_CLAUDE.equals(provider()) && !claudeKeySet()) {
+ return new TestResult(false, true,
+ "Claude API 키가 설정되지 않아 Ollama(온프레미스)로 폴백 동작합니다. 서버 환경변수 설정 후 다시 시도하세요.");
+ }
+ // Ollama 계열 경로(ollama/qwen3/deepseek/glm)
+ if (!aiEnabled()) {
+ return new TestResult(false, true, "AI 기능이 비활성 상태입니다. 모든 AI 결과는 규칙 기반(degraded)으로 동작합니다.");
+ }
+ String model = ollamaTextModel();
+ long start = System.currentTimeMillis();
+ String txt = ollamaTextClient.generateText("ping", model);
+ long ms = System.currentTimeMillis() - start;
+ if (txt != null && !txt.isBlank()) {
+ return new TestResult(true, false, "정상 · " + model + " · " + fmtMs(ms));
+ }
+ String tail = RAM_HEAVY_MODELS.contains(model) ? " (RAM 여유 필요 모델 — 콜드로드 실패 시 소형 모델로 폴백)" : "";
+ return new TestResult(false, true, "Ollama 연결 실패 또는 모델 미가용 — 설정을 확인하세요." + tail);
+ }
+
+ private static String fmtMs(long ms) {
+ return String.format("%.1fs", ms / 1000.0);
+ }
+
+ /** 연결 테스트 결과(요약만 — 키/스택/IP 미노출). */
+ public record TestResult(boolean ok, boolean degraded, String message) {
+ }
+
+ // ---------------------------------------------------------------- helpers
+
+ /** DB 값(공백/null 은 '미설정'으로 보고 null 반환 → 기본/env 폴백 유도). */
+ private String dbVal(String key) {
+ FaSetting c = repo.findByKey(key);
+ if (c == null) {
+ return null;
+ }
+ String v = c.getSettingValue();
+ return (v != null && !v.isBlank()) ? v : null;
+ }
+
+ private void upsertAudited(String key, String val, String actor) {
+ FaSetting before = repo.findByKey(key);
+ String prev = before == null ? "(none)" : before.getSettingValue();
+ if (val.equals(prev)) {
+ return; // 변경 없음 → 감사 로그 생략
+ }
+ repo.upsert(key, val);
+ auditService.log(actor == null ? "SYSTEM" : actor, "AI_CONFIG_CHANGE", key, prev + " -> " + val);
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/service/AiTextRouter.java b/backend/src/main/java/com/zioinfo/fa/ai/service/AiTextRouter.java
new file mode 100644
index 0000000..b9f4a08
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/service/AiTextRouter.java
@@ -0,0 +1,86 @@
+package com.zioinfo.fa.ai.service;
+
+import com.zioinfo.fa.common.ai.ClaudeTextClient;
+import com.zioinfo.fa.common.ai.OllamaTextClient;
+import com.zioinfo.fa.common.ai.TextAiClient;
+import com.zioinfo.fa.common.ai.TextAiClient.GenResult;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * AI provider 선택 라우팅(런타임). 평문 텍스트 생성 진입점(불량분석·설비예측·재고최적화 등). [GUARDiA-FA]
+ * {@link AiConfigService#provider()} 를 읽어 Claude ↔ Ollama(qwen3/deepseek/glm/기존소형) 를 선택한다.
+ *
+ * 선택/폴백 정책 (AI_PLATFORM_SPEC §3):
+ *
+ * provider=claude · 키 설정됨 · AI 활성 → {@link ClaudeTextClient}. 실패(degraded)면
+ * Ollama 자동 폴백 (선택모델 → 안전 소형모델 llama3.2:1b).
+ * provider=qwen3/deepseek/glm/ollama → 해당 Ollama 텍스트 모델로 generate(실패 시 소형모델 폴백).
+ * provider=claude 인데 키 미설정 → 곧장 Ollama(폴백모델).
+ *
+ * 모든 경로 실패 시 {@code GenResult.degraded=true·text=null} → 호출자가 기존 규칙기반 폴백 유지(무회귀).
+ * 각 생성 시도는 {@link LearningStore#recordInfer} 로 로컬 DuckDB 에 기록한다(내결함성 — 실패 삼킴).
+ *
+ * 레퍼런스 : guardia-ocr {@code ai.service.AiTextRouter} 미러(FA Ollama 텍스트 경로·infer 로깅 추가).
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class AiTextRouter implements TextAiClient {
+
+ private final AiConfigService aiConfig;
+ private final ClaudeTextClient claudeClient;
+ private final OllamaTextClient ollamaTextClient;
+ private final LearningStore learningStore;
+
+ /**
+ * 선택된 provider 로 텍스트를 생성한다. Claude 선택·실패 시 Ollama 폴백. 예외를 던지지 않는다.
+ */
+ @Override
+ public GenResult generate(String prompt) {
+ if (aiConfig.isClaudeActive()) {
+ String model = aiConfig.claudeModel();
+ long start = System.currentTimeMillis();
+ GenResult r = claudeClient.generate(prompt, model);
+ long ms = System.currentTimeMillis() - start;
+ boolean ok = !r.degraded() && r.text() != null && !r.text().isBlank();
+ learningStore.recordInfer("claude", model, ms, !ok);
+ if (ok) {
+ return r;
+ }
+ // claude 실패/빈응답 → 온프레미스 Ollama 자동 폴백(선택모델 → 안전 소형모델).
+ log.warn("Claude path degraded -> Ollama fallback");
+ GenResult fb = ollamaGenerate("claude-fallback", prompt, aiConfig.ollamaTextModel());
+ if (!fb.degraded()) {
+ return fb;
+ }
+ return ollamaGenerate("claude-fallback", prompt, aiConfig.fallbackOllamaModel());
+ }
+ // provider = ollama / qwen3 / deepseek / glm → 해당 Ollama 모델
+ String provider = aiConfig.provider();
+ GenResult r = ollamaGenerate(provider, prompt, aiConfig.ollamaTextModel());
+ if (!r.degraded()) {
+ return r;
+ }
+ // 선택 모델 실패(glm4:9b RAM 초과 등) → 안전 소형모델 최종 폴백.
+ String safe = aiConfig.fallbackOllamaModel();
+ if (!safe.equals(aiConfig.ollamaTextModel())) {
+ return ollamaGenerate(provider, prompt, safe);
+ }
+ return r;
+ }
+
+ /** Ollama 평문 generate 를 GenResult 로 래핑(실패 시 degraded) + infer 로깅. */
+ private GenResult ollamaGenerate(String provider, String prompt, String model) {
+ long start = System.currentTimeMillis();
+ String txt = ollamaTextClient.generateText(prompt, model);
+ long ms = System.currentTimeMillis() - start;
+ boolean degraded = (txt == null || txt.isBlank());
+ learningStore.recordInfer(provider, model, ms, degraded);
+ if (degraded) {
+ return new GenResult(null, true);
+ }
+ return new GenResult(txt, false);
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/service/LearningStore.java b/backend/src/main/java/com/zioinfo/fa/ai/service/LearningStore.java
new file mode 100644
index 0000000..fcce25e
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/service/LearningStore.java
@@ -0,0 +1,131 @@
+package com.zioinfo.fa.ai.service;
+
+import com.zioinfo.fa.common.ai.PiiMasker;
+import jakarta.annotation.PostConstruct;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.sql.Timestamp;
+
+/**
+ * 로컬 임베디드 DuckDB AI 학습·추론 저장소. [GUARDiA-FA]
+ *
+ *
AI 피드백(ai_feedback)과 추론 로그(ai_infer_log)를 솔루션별 격리 DuckDB 파일
+ * ({@code /opt/guardia-fa/data/fa_learning.duckdb})에 기록한다. 스키마는 멱등 생성한다.
+ * PII·자격증명은 {@link PiiMasker} 로 마스킹 후 저장한다.
+ *
+ *
내결함성 불변 : 저장소 초기화/기록 실패는 절대 요청을 깨지 않는다(모든 오류 삼킴·요약 로그만).
+ * DuckDB 파일 경로가 없거나 드라이버 미가용이면 저장을 조용히 비활성화하고 서비스는 정상 동작한다.
+ *
+ *
스펙 : AI_PLATFORM_SPEC.md §5 (전 솔루션 DuckDB 로컬 학습 저장소).
+ */
+@Slf4j
+@Service
+public class LearningStore {
+
+ private static final String SOLUTION = "fa";
+ private static final int MAX_FIELD = 4000;
+
+ @Value("${fa.learning.duckdb-path:/opt/guardia-fa/data/fa_learning.duckdb}")
+ private String duckdbPath;
+
+ /** 저장 가능 여부(초기화 성공 시 true). 실패 시 조용히 비활성. */
+ private volatile boolean available = false;
+
+ @PostConstruct
+ void init() {
+ try {
+ File f = new File(duckdbPath);
+ File parent = f.getParentFile();
+ if (parent != null && !parent.exists()) {
+ // best-effort: 부모 디렉터리 생성(권한 없으면 무시하고 비활성).
+ if (!parent.mkdirs() && !parent.exists()) {
+ log.warn("[LearningStore] DuckDB 디렉터리 생성 불가 — 학습 저장 비활성");
+ return;
+ }
+ }
+ try (Connection c = open(); Statement st = c.createStatement()) {
+ st.execute("CREATE SEQUENCE IF NOT EXISTS ai_feedback_seq");
+ st.execute("CREATE SEQUENCE IF NOT EXISTS ai_infer_seq");
+ st.execute("CREATE TABLE IF NOT EXISTS ai_feedback ("
+ + "id BIGINT DEFAULT nextval('ai_feedback_seq') PRIMARY KEY,"
+ + "ts TIMESTAMP, solution VARCHAR, feature VARCHAR,"
+ + "question VARCHAR, answer VARCHAR, verdict VARCHAR,"
+ + "correction VARCHAR, user_masked VARCHAR)");
+ st.execute("CREATE TABLE IF NOT EXISTS ai_infer_log ("
+ + "id BIGINT DEFAULT nextval('ai_infer_seq') PRIMARY KEY,"
+ + "ts TIMESTAMP, provider VARCHAR, model VARCHAR,"
+ + "latency_ms BIGINT, degraded BOOLEAN)");
+ }
+ available = true;
+ log.info("[LearningStore] DuckDB 학습 저장소 준비 완료: {}", duckdbPath);
+ } catch (Throwable e) {
+ // 드라이버 미가용/권한/경로 문제 — 조용히 비활성(서비스 무영향).
+ available = false;
+ log.warn("[LearningStore] DuckDB 초기화 실패 — 학습 저장 비활성: {}", e.getClass().getSimpleName());
+ }
+ }
+
+ public boolean isAvailable() {
+ return available;
+ }
+
+ /** 피드백 1건 기록(PII 마스킹). 실패는 삼킨다. */
+ public synchronized void recordFeedback(String feature, String question, String answer,
+ String verdict, String correction, String userRef) {
+ if (!available) {
+ return;
+ }
+ String sql = "INSERT INTO ai_feedback"
+ + "(ts, solution, feature, question, answer, verdict, correction, user_masked)"
+ + " VALUES (?,?,?,?,?,?,?,?)";
+ try (Connection c = open(); PreparedStatement ps = c.prepareStatement(sql)) {
+ ps.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
+ ps.setString(2, SOLUTION);
+ ps.setString(3, clip(feature));
+ ps.setString(4, PiiMasker.maskAndClip(question, MAX_FIELD));
+ ps.setString(5, PiiMasker.maskAndClip(answer, MAX_FIELD));
+ ps.setString(6, clip(verdict));
+ ps.setString(7, PiiMasker.maskAndClip(correction, MAX_FIELD));
+ ps.setString(8, PiiMasker.maskAndClip(userRef, 200));
+ ps.executeUpdate();
+ } catch (Throwable e) {
+ log.warn("[LearningStore] 피드백 기록 실패(무시): {}", e.getClass().getSimpleName());
+ }
+ }
+
+ /** 추론 1건 기록. 실패는 삼킨다. */
+ public synchronized void recordInfer(String provider, String model, long latencyMs, boolean degraded) {
+ if (!available) {
+ return;
+ }
+ String sql = "INSERT INTO ai_infer_log(ts, provider, model, latency_ms, degraded) VALUES (?,?,?,?,?)";
+ try (Connection c = open(); PreparedStatement ps = c.prepareStatement(sql)) {
+ ps.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
+ ps.setString(2, clip(provider));
+ ps.setString(3, clip(model));
+ ps.setLong(4, latencyMs);
+ ps.setBoolean(5, degraded);
+ ps.executeUpdate();
+ } catch (Throwable e) {
+ log.warn("[LearningStore] 추론 로그 기록 실패(무시): {}", e.getClass().getSimpleName());
+ }
+ }
+
+ private Connection open() throws Exception {
+ return DriverManager.getConnection("jdbc:duckdb:" + duckdbPath);
+ }
+
+ private static String clip(String s) {
+ if (s == null) {
+ return null;
+ }
+ return s.length() > 200 ? s.substring(0, 200) : s;
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/ai/service/RagFeedbackClient.java b/backend/src/main/java/com/zioinfo/fa/ai/service/RagFeedbackClient.java
new file mode 100644
index 0000000..e034188
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/ai/service/RagFeedbackClient.java
@@ -0,0 +1,78 @@
+package com.zioinfo.fa.ai.service;
+
+import com.zioinfo.fa.common.ai.PiiMasker;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import java.time.Duration;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * 중앙 guardia-rag {@code /feedback} 얇은 전달 클라이언트 (solution=fa 격리). [GUARDiA-FA]
+ *
+ *
피드백을 로컬 DuckDB 기록과 동시에 중앙 학습·평가 게이트(guardia-rag, 기본 :8020)로 전달한다.
+ * 미가용/타임아웃 시 예외를 전파하지 않고 {@code {stored:false, degraded:true}} 를 돌려준다(로컬 기록은 유지).
+ * 전송 전 PII 마스킹. 온프레미스 전용(외부 API 아님).
+ */
+@Slf4j
+@Service
+public class RagFeedbackClient {
+
+ @Value("${guardia.rag.base-url:http://localhost:8020}")
+ private String baseUrl;
+
+ @Value("${guardia.rag.enabled:true}")
+ private boolean enabled;
+
+ @Value("${guardia.rag.timeout-ms:2500}")
+ private long timeoutMs;
+
+ /** 중앙 rag 로 피드백 전달. 실패는 삼키고 degraded 반환. */
+ public Map forward(String answerId, String question, String answer,
+ String verdict, String correction, String userRef) {
+ if (!enabled) {
+ return Map.of("stored", false, "degraded", true);
+ }
+ try {
+ Map body = new LinkedHashMap<>();
+ body.put("solution", "fa");
+ if (answerId != null) body.put("answer_id", answerId);
+ if (question != null) body.put("query", PiiMasker.mask(question));
+ if (answer != null) body.put("answer", PiiMasker.mask(answer));
+ body.put("verdict", verdict);
+ if (correction != null) body.put("correction", PiiMasker.mask(correction));
+ if (userRef != null) body.put("user_ref", PiiMasker.maskAndClip(userRef, 200));
+
+ RestTemplate local = new RestTemplate();
+ local.setRequestFactory(factory(timeoutMs));
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ headers.set("X-Solution-Key", "fa");
+ @SuppressWarnings("rawtypes")
+ Map res = local.postForObject(baseUrl + "/rag/feedback", new HttpEntity<>(body, headers), Map.class);
+ if (res == null) {
+ return Map.of("stored", false, "degraded", true);
+ }
+ @SuppressWarnings("unchecked")
+ Map out = res;
+ return out;
+ } catch (Exception e) {
+ log.warn("중앙 rag /feedback 전달 일시 불가(무시): {}", e.getClass().getSimpleName());
+ return Map.of("stored", false, "degraded", true);
+ }
+ }
+
+ private static org.springframework.http.client.SimpleClientHttpRequestFactory factory(long timeoutMs) {
+ org.springframework.http.client.SimpleClientHttpRequestFactory f =
+ new org.springframework.http.client.SimpleClientHttpRequestFactory();
+ f.setConnectTimeout(Duration.ofMillis(Math.min(timeoutMs, 2000)));
+ f.setReadTimeout(Duration.ofMillis(timeoutMs));
+ return f;
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/ApiResponse.java b/backend/src/main/java/com/zioinfo/fa/common/ApiResponse.java
new file mode 100644
index 0000000..4452eb1
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/ApiResponse.java
@@ -0,0 +1,18 @@
+package com.zioinfo.fa.common;
+
+/**
+ * 표준 API 응답 봉투. [GUARDiA-FA]
+ *
+ * {@code {success, message, data}} 형태. 프론트(adminAiConfig.ts)는 {@code r.data.data} 로 페이로드를 읽는다.
+ * 오류 메시지에는 스택트레이스·자격증명·키를 절대 포함하지 않는다(요약만).
+ */
+public record ApiResponse(boolean success, String message, T data) {
+
+ public static ApiResponse ok(T data) {
+ return new ApiResponse<>(true, "OK", data);
+ }
+
+ public static ApiResponse ok(String message, T data) {
+ return new ApiResponse<>(true, message, data);
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/GlobalExceptionHandler.java b/backend/src/main/java/com/zioinfo/fa/common/GlobalExceptionHandler.java
new file mode 100644
index 0000000..2d5557a
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/GlobalExceptionHandler.java
@@ -0,0 +1,26 @@
+package com.zioinfo.fa.common;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+/**
+ * 전역 예외 → 표준 ApiResponse 매핑(요약만·스택트레이스 미노출). [GUARDiA-FA]
+ *
+ * 범위 최소화(무회귀) : AI 설정 검증에서 던지는 {@link IllegalArgumentException} 만 400 으로
+ * 매핑한다(예: ERR-AI-400 화이트리스트 위반). 그 외 예외는 기존 스프링 기본 처리에 위임(다른 엔드포인트
+ * 응답 형태를 바꾸지 않음). 메시지에 키·자격증명·스택트레이스는 포함하지 않는다.
+ */
+@Slf4j
+@RestControllerAdvice
+public class GlobalExceptionHandler {
+
+ @ExceptionHandler(IllegalArgumentException.class)
+ public ResponseEntity> handleBadRequest(IllegalArgumentException e) {
+ String msg = e.getMessage() == null ? "잘못된 요청입니다." : e.getMessage();
+ return ResponseEntity.status(HttpStatus.BAD_REQUEST)
+ .body(new ApiResponse<>(false, msg, null));
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/ai/ClaudeTextClient.java b/backend/src/main/java/com/zioinfo/fa/common/ai/ClaudeTextClient.java
new file mode 100644
index 0000000..ec7464f
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/ai/ClaudeTextClient.java
@@ -0,0 +1,168 @@
+package com.zioinfo.fa.common.ai;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zioinfo.fa.common.ai.TextAiClient.GenResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.time.Duration;
+
+/**
+ * 외부 Claude(Anthropic) Messages API 텍스트 생성 클라이언트. [ISSUER=GUARDiA-FA]
+ *
+ * 외부 호출 예외 허용 : 본 클라이언트는 소유자 승인(폐쇄망 아님)에 따라 {@code api.anthropic.com}
+ * 호출이 허용된 유일한 외부 경로다. 그 외 외부 API 호출은 여전히 금지(Ollama localhost 전용).
+ *
+ *
API 키 보안(최우선) : 키는 환경변수 {@code ANTHROPIC_API_KEY} 에서만 로드하며
+ * ({@code @Value("${ANTHROPIC_API_KEY:}")}), DB·코드·커밋·로그·응답·예외 메시지 어디에도 기록하지 않는다.
+ * 키는 오직 HTTP 헤더 {@code x-api-key} 로만 전달된다. 로그는 상태코드/예외 클래스명만 남긴다(본문·키 미기록).
+ *
+ *
실패 처리 : 키 미설정/타임아웃/비200/예외 시 {@code GenResult.degraded=true·text=null} 반환
+ * (예외를 던지지 않음 → 호출자는 Ollama 폴백). 신규 라이브러리 0 — JDK {@link HttpClient} 사용.
+ *
+ *
레퍼런스 : guardia-ocr {@code common.ai.ClaudeTextClient} 미러(패키지·ISSUER 치환).
+ */
+@Slf4j
+@Service
+public class ClaudeTextClient implements TextAiClient {
+
+ /** Anthropic Messages API 엔드포인트(외부 호출 예외 허용 단일 경로). */
+ private static final String API_URL = "https://api.anthropic.com/v1/messages";
+ /** Anthropic 버전 헤더(고정). */
+ private static final String ANTHROPIC_VERSION = "2023-06-01";
+ /** 기본 모델(키 검증된 화이트리스트의 기본값). */
+ static final String DEFAULT_MODEL = "claude-sonnet-4-6";
+ /** 일반 생성 max_tokens. */
+ private static final int DEFAULT_MAX_TOKENS = 1024;
+ /** 콜드 응답 대비 요청 타임아웃(초). Ollama timeout 과 동급. */
+ private static final int TIMEOUT_SEC = 120;
+ private static final int CONNECT_TIMEOUT_SEC = 15;
+
+ private static final ObjectMapper MAPPER = new ObjectMapper();
+
+ /** 환경변수 전용 주입. 미설정 시 빈 문자열(=미구성). 값은 절대 외부 노출/로그 금지. */
+ @Value("${ANTHROPIC_API_KEY:}")
+ private String apiKey;
+
+ /** API 키가 환경변수로 설정되어 있는지(여부만 — 값/길이/마스킹 일절 미노출). */
+ public boolean isConfigured() {
+ return apiKey != null && !apiKey.isBlank();
+ }
+
+ /** {@link TextAiClient} 계약: 기본 모델로 생성. */
+ @Override
+ public GenResult generate(String prompt) {
+ return generate(prompt, DEFAULT_MODEL);
+ }
+
+ /** 지정 모델로 생성(라우터가 화이트리스트 검증된 모델 ID 전달). */
+ public GenResult generate(String prompt, String model) {
+ return generate(prompt, model, DEFAULT_MAX_TOKENS);
+ }
+
+ /**
+ * Anthropic Messages API 호출. 실패 시 {@code degraded=true·text=null}.
+ * 키·요청본문·응답본문은 로그에 남기지 않는다(상태코드/예외 클래스명만).
+ */
+ public GenResult generate(String prompt, String model, int maxTokens) {
+ if (!isConfigured()) {
+ return new GenResult(null, true);
+ }
+ if (prompt == null || prompt.isBlank()) {
+ return new GenResult(null, true);
+ }
+ String useModel = (model == null || model.isBlank()) ? DEFAULT_MODEL : model.trim();
+ int tokens = maxTokens > 0 ? maxTokens : DEFAULT_MAX_TOKENS;
+ try {
+ String payload = "{"
+ + "\"model\":" + str(useModel) + ","
+ + "\"max_tokens\":" + tokens + ","
+ + "\"messages\":[{\"role\":\"user\",\"content\":" + str(prompt) + "}]"
+ + "}";
+
+ HttpClient client = HttpClient.newBuilder()
+ .connectTimeout(Duration.ofSeconds(CONNECT_TIMEOUT_SEC))
+ .build();
+ HttpRequest req = HttpRequest.newBuilder()
+ .uri(URI.create(API_URL))
+ .timeout(Duration.ofSeconds(TIMEOUT_SEC))
+ .header("content-type", "application/json")
+ .header("x-api-key", apiKey) // 키는 헤더로만 — 로그/응답 미노출
+ .header("anthropic-version", ANTHROPIC_VERSION)
+ .POST(HttpRequest.BodyPublishers.ofString(payload))
+ .build();
+ HttpResponse resp = client.send(req, HttpResponse.BodyHandlers.ofString());
+ if (resp.statusCode() != 200) {
+ log.warn("Claude API status {} -> degraded fallback", resp.statusCode()); // 본문 미기록
+ return new GenResult(null, true);
+ }
+ String text = extractText(resp.body());
+ if (text == null || text.isBlank()) {
+ return new GenResult(null, true);
+ }
+ return new GenResult(text.trim(), false);
+ } catch (Exception e) {
+ log.warn("Claude API call failed -> degraded fallback: {}", e.getClass().getSimpleName()); // 메시지·키 미기록
+ return new GenResult(null, true);
+ }
+ }
+
+ /** Messages API 응답에서 content[].text(type=text) 추출·연결. */
+ private static String extractText(String body) {
+ if (body == null || body.isBlank()) {
+ return null;
+ }
+ try {
+ JsonNode root = MAPPER.readTree(body);
+ JsonNode content = root.get("content");
+ if (content == null || !content.isArray()) {
+ return null;
+ }
+ StringBuilder sb = new StringBuilder();
+ for (JsonNode block : content) {
+ JsonNode type = block.get("type");
+ if (type != null && "text".equals(type.asText())) {
+ JsonNode t = block.get("text");
+ if (t != null && !t.isNull()) {
+ sb.append(t.asText());
+ }
+ }
+ }
+ String out = sb.toString();
+ return out.isBlank() ? null : out;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /** JSON 문자열 이스케이프. */
+ private static String str(String s) {
+ if (s == null) {
+ return "\"\"";
+ }
+ StringBuilder sb = new StringBuilder("\"");
+ for (char c : s.toCharArray()) {
+ switch (c) {
+ case '"' -> sb.append("\\\"");
+ case '\\' -> sb.append("\\\\");
+ case '\n' -> sb.append("\\n");
+ case '\r' -> sb.append("\\r");
+ case '\t' -> sb.append("\\t");
+ default -> {
+ if (c < 0x20) {
+ sb.append(String.format("\\u%04x", (int) c));
+ } else {
+ sb.append(c);
+ }
+ }
+ }
+ }
+ return sb.append("\"").toString();
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/ai/OllamaTextClient.java b/backend/src/main/java/com/zioinfo/fa/common/ai/OllamaTextClient.java
new file mode 100644
index 0000000..908ed9b
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/ai/OllamaTextClient.java
@@ -0,0 +1,96 @@
+package com.zioinfo.fa.common.ai;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.client.RestClientException;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * 온프레미스 Ollama 평문 텍스트 생성 클라이언트. [GUARDiA-FA]
+ *
+ * AiTextRouter 의 Ollama 경로/폴백 진입점이며 AiConfigService 연결 테스트에도 쓰인다. FA 에는 기존
+ * OllamaClient 가 없어 신규 도입한다(기존 서비스의 RestTemplate 직접 호출 스타일과 동일 라이브러리).
+ *
+ *
보안 불변 : localhost Ollama 만 호출(외부 API 금지). 실패/빈응답/타임아웃 시 {@code null} 반환
+ * (예외 미전파·스택트레이스 미노출) → 라우터가 degraded 로 래핑한다.
+ *
+ *
레퍼런스 : guardia-ocr {@code engine.OllamaOcrService#generateText} 미러(경량화).
+ */
+@Slf4j
+@Service
+public class OllamaTextClient {
+
+ private static final ObjectMapper MAPPER = new ObjectMapper();
+
+ @Value("${ollama.base-url:http://localhost:11434}")
+ private String ollamaUrl;
+
+ /** 서버 기본 Ollama 텍스트 모델(미지정 시 폴백). */
+ @Value("${guardia.ollama-text-model:llama3.2:1b}")
+ private String defaultTextModel;
+
+ private final RestTemplate rt = new RestTemplate();
+
+ /**
+ * 온프레미스 Ollama 평문 텍스트 생성(이미지 없음).
+ *
+ * @param prompt 지시문
+ * @param model 화이트리스트 검증된 Ollama 텍스트 모델(qwen3:1.7b/deepseek-r1:1.5b/glm4:9b/llama3.2:1b 등)
+ * @return 생성 텍스트, 실패 시 null
+ */
+ public String generateText(String prompt, String model) {
+ if (prompt == null || prompt.isBlank()) {
+ return null;
+ }
+ String useModel = (model == null || model.isBlank()) ? defaultTextModel : model.trim();
+ try {
+ Map body = new LinkedHashMap<>();
+ body.put("model", useModel);
+ body.put("prompt", prompt);
+ body.put("stream", false);
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ @SuppressWarnings("rawtypes")
+ Map resp = rt.postForObject(ollamaUrl + "/api/generate", new HttpEntity<>(body, headers), Map.class);
+ if (resp == null) {
+ return null;
+ }
+ Object response = resp.get("response");
+ if (response == null) {
+ return null;
+ }
+ String txt = response.toString().trim();
+ return txt.isBlank() ? null : txt;
+ } catch (RestClientException e) {
+ // 스택트레이스 미노출 — 요약 로그만
+ log.warn("Ollama 텍스트 생성 실패: {}", e.getClass().getSimpleName());
+ return null;
+ } catch (Exception e) {
+ log.warn("Ollama 텍스트 생성 실패: {}", e.getClass().getSimpleName());
+ return null;
+ }
+ }
+
+ /** 진단용 파싱 헬퍼(향후 확장). 현재 미사용이지만 응답 파싱 규칙 일원화. */
+ static String parseResponse(String raw) {
+ if (raw == null || raw.isBlank()) {
+ return null;
+ }
+ try {
+ JsonNode root = MAPPER.readTree(raw);
+ String response = root.path("response").asText("");
+ return response.isBlank() ? null : response.trim();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/ai/PiiMasker.java b/backend/src/main/java/com/zioinfo/fa/common/ai/PiiMasker.java
new file mode 100644
index 0000000..0e4ba1c
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/ai/PiiMasker.java
@@ -0,0 +1,43 @@
+package com.zioinfo.fa.common.ai;
+
+/**
+ * 학습 저장 전 PII·자격증명 마스킹 유틸. [GUARDiA-FA]
+ *
+ * DuckDB 로컬 학습 저장소(ai_feedback)와 중앙 rag 전달 전에 사용자 입력/답변에서 개인정보·비밀번호·
+ * 내부 IP 등을 마스킹한다. 규칙 기반(정규식) — 외부 호출 없음. 완전 무해화는 아니며 저장 위험 최소화 목적.
+ */
+public final class PiiMasker {
+
+ private PiiMasker() {
+ }
+
+ /** 주민번호·카드·전화·이메일·IPv4·비밀번호 키워드 마스킹. null 안전. */
+ public static String mask(String s) {
+ if (s == null || s.isBlank()) {
+ return s;
+ }
+ String out = s;
+ // 주민등록번호 6-7
+ out = out.replaceAll("\\b\\d{6}[-\\s]?\\d{7}\\b", "######-#######");
+ // 카드번호 4-4-4-4
+ out = out.replaceAll("\\b\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4}[-\\s]?\\d{4}\\b", "****-****-****-****");
+ // 전화번호
+ out = out.replaceAll("\\b01[016789][-\\s]?\\d{3,4}[-\\s]?\\d{4}\\b", "***-****-****");
+ // 이메일
+ out = out.replaceAll("\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b", "***@***");
+ // IPv4
+ out = out.replaceAll("\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b", "***.***.***.***");
+ // 비밀번호/시크릿 키=값
+ out = out.replaceAll("(?i)(password|passwd|pw|secret|token|api[_-]?key)\\s*[:=]\\s*\\S+", "$1=***");
+ return out;
+ }
+
+ /** 저장 컬럼 길이 상한 적용(과대 입력 방지). */
+ public static String maskAndClip(String s, int max) {
+ String m = mask(s);
+ if (m == null) {
+ return null;
+ }
+ return m.length() > max ? m.substring(0, max) : m;
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/ai/TextAiClient.java b/backend/src/main/java/com/zioinfo/fa/common/ai/TextAiClient.java
new file mode 100644
index 0000000..1abe41b
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/ai/TextAiClient.java
@@ -0,0 +1,27 @@
+package com.zioinfo.fa.common.ai;
+
+/**
+ * 텍스트 생성 공용 인터페이스 (AI provider 추상화). [GUARDiA-FA]
+ *
+ *
온프레미스 Ollama({@link OllamaTextClient})와 외부 Claude({@link ClaudeTextClient})를 동일 계약으로
+ * 다루기 위한 얇은 추상화. 구현체는 어떤 사유로든(비활성/실패/타임아웃/키미설정) 실패 시
+ * {@link GenResult#degraded()}=true · {@link GenResult#text()}=null 을 반환하고, 호출자가 폴백을 책임진다.
+ *
+ *
provider 선택/폴백 라우팅은 {@code ai.service.AiTextRouter} 가 담당한다(이 인터페이스를 구현).
+ *
+ *
레퍼런스 : guardia-ocr {@code common.ai.TextAiClient} 미러(패키지·ISSUER 치환).
+ */
+public interface TextAiClient {
+
+ /**
+ * 프롬프트로 텍스트를 생성한다. 실패 시 {@code degraded=true·text=null}(예외를 던지지 않음).
+ *
+ * @param prompt 한국어 지시문(컨텍스트 포함)
+ * @return 생성 결과(텍스트 또는 degraded 폴백 신호)
+ */
+ GenResult generate(String prompt);
+
+ /** 생성 결과: 텍스트(폴백 시 null) + degraded(폴백 여부). */
+ record GenResult(String text, boolean degraded) {
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/common/audit/AuditService.java b/backend/src/main/java/com/zioinfo/fa/common/audit/AuditService.java
new file mode 100644
index 0000000..3a9112f
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/common/audit/AuditService.java
@@ -0,0 +1,40 @@
+package com.zioinfo.fa.common.audit;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.stereotype.Service;
+
+/**
+ * 경량 감사 로그 서비스. [GUARDiA-FA]
+ *
+ *
FA 는 별도 감사 테이블을 두지 않으므로, 관리자 설정 변경 등의 감사는 slf4j 로만 남긴다
+ * (키·비밀번호·PII·스택트레이스 미기록 — actor/action/target/요약 델타만). 향후 DB 감사 도입 시
+ * 이 계약을 유지한 채 저장소만 교체하면 된다.
+ *
+ *
레퍼런스 : guardia-ocr {@code admin.AuditService}(DB 저장 → FA 는 slf4j 경량화).
+ */
+@Slf4j
+@Service
+public class AuditService {
+
+ /** 현재 인증 주체(username)로 감사 로그를 기록한다. */
+ public void log(String action, String target, String detail) {
+ log(currentActor(), action, target, detail);
+ }
+
+ public void log(String actor, String action, String target, String detail) {
+ // 키/비밀번호/PII 는 호출자가 전달하지 않는다(설정 델타 요약만).
+ log.info("[AUDIT] actor={} action={} target={} detail={}",
+ actor == null ? "system" : actor, action, target, detail);
+ }
+
+ /** SecurityContext 의 JWT subject(username)를 추출. 없으면 system. */
+ public static String currentActor() {
+ Authentication auth = SecurityContextHolder.getContext().getAuthentication();
+ if (auth != null && auth.getName() != null && !auth.getName().isBlank()) {
+ return auth.getName();
+ }
+ return "system";
+ }
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/config/SecurityConfig.java b/backend/src/main/java/com/zioinfo/fa/config/SecurityConfig.java
index 3f93393..0bd7a6d 100644
--- a/backend/src/main/java/com/zioinfo/fa/config/SecurityConfig.java
+++ b/backend/src/main/java/com/zioinfo/fa/config/SecurityConfig.java
@@ -44,6 +44,12 @@ public class SecurityConfig {
"/index.html",
"/favicon.ico"
).permitAll()
+ // AI 플랫폼(LLM provider) 설정은 ADMIN 전용(조회/갱신/연결테스트)
+ .requestMatchers("/api/admin/ai-config", "/api/admin/ai-config/**").hasRole("ADMIN")
+ // 기타 관리자 API 는 ADMIN 전용(향후 확장 방어)
+ .requestMatchers("/api/admin/**").hasRole("ADMIN")
+ // AI 피드백 수집은 인증 사용자
+ .requestMatchers("/api/ai/**").authenticated()
.requestMatchers("/api/fa/**").authenticated()
.anyRequest().permitAll()
)
diff --git a/backend/src/main/java/com/zioinfo/fa/domain/FaSetting.java b/backend/src/main/java/com/zioinfo/fa/domain/FaSetting.java
new file mode 100644
index 0000000..ca505e2
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/domain/FaSetting.java
@@ -0,0 +1,16 @@
+package com.zioinfo.fa.domain;
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 시스템 설정 (fa_setting 테이블 매핑). [GUARDiA-FA]
+ * AI 플랫폼 런타임 설정(key='ai.*')의 단일 저장소. FA 에는 기존 설정 테이블이 없어 신규 도입(멱등).
+ */
+@Data
+public class FaSetting {
+ private String settingKey;
+ private String settingValue;
+ private LocalDateTime updatedAt;
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/mapper/SettingMapper.java b/backend/src/main/java/com/zioinfo/fa/mapper/SettingMapper.java
new file mode 100644
index 0000000..854dae3
--- /dev/null
+++ b/backend/src/main/java/com/zioinfo/fa/mapper/SettingMapper.java
@@ -0,0 +1,22 @@
+package com.zioinfo.fa.mapper;
+
+import com.zioinfo.fa.domain.FaSetting;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * fa_setting 설정 저장소 매퍼. [GUARDiA-FA]
+ * {@code @Mapper} 필수 — FaApplication 은 {@code @MapperScan(annotationClass = Mapper.class)}.
+ */
+@Mapper
+public interface SettingMapper {
+
+ List findAll();
+
+ FaSetting findByKey(@Param("key") String key);
+
+ /** upsert (ON CONFLICT). */
+ int upsert(@Param("key") String key, @Param("value") String value);
+}
diff --git a/backend/src/main/java/com/zioinfo/fa/service/EquipmentService.java b/backend/src/main/java/com/zioinfo/fa/service/EquipmentService.java
index 5cdcbde..f8f3cae 100644
--- a/backend/src/main/java/com/zioinfo/fa/service/EquipmentService.java
+++ b/backend/src/main/java/com/zioinfo/fa/service/EquipmentService.java
@@ -1,11 +1,10 @@
package com.zioinfo.fa.service;
+import com.zioinfo.fa.ai.service.AiTextRouter;
+import com.zioinfo.fa.common.ai.TextAiClient.GenResult;
import com.zioinfo.fa.domain.Equipment;
import com.zioinfo.fa.mapper.EquipmentMapper;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
import java.util.HashMap;
import java.util.List;
@@ -14,12 +13,11 @@ import java.util.Map;
@Service
public class EquipmentService {
private final EquipmentMapper mapper;
+ private final AiTextRouter aiTextRouter;
- @Value("${ollama.base-url:http://localhost:11434}")
- private String ollamaUrl;
-
- public EquipmentService(EquipmentMapper mapper) {
+ public EquipmentService(EquipmentMapper mapper, AiTextRouter aiTextRouter) {
this.mapper = mapper;
+ this.aiTextRouter = aiTextRouter;
}
public List findAll(String status, String workstationCode) {
@@ -66,19 +64,14 @@ public class EquipmentService {
return mapper.findById(id);
}
+ /** 설비 예지보전·고장위험 AI 예측. provider 선택은 AiTextRouter(Claude→Ollama 폴백)가 담당. */
public Map aiPredict(Map req) {
Map result = new HashMap<>();
- try {
- RestTemplate rt = new RestTemplate();
- String prompt = "Equipment: " + req.get("equipmentCode") +
- ". OEE trend: " + req.get("oeeTrend") +
- ". Predict maintenance need and breakdown risk in Korean.";
- Map body = Map.of("model", "llama3", "prompt", prompt, "stream", false);
- ResponseEntity resp = rt.postForEntity(ollamaUrl + "/api/generate", body, Map.class);
- result.put("prediction", resp.getBody() != null ? resp.getBody().get("response") : "예측 불가");
- } catch (Exception e) {
- result.put("prediction", "AI 예측 일시 중단. 설비 이력을 수동 확인하세요.");
- }
+ String prompt = "Equipment: " + req.get("equipmentCode") +
+ ". OEE trend: " + req.get("oeeTrend") +
+ ". Predict maintenance need and breakdown risk in Korean.";
+ GenResult r = aiTextRouter.generate(prompt);
+ result.put("prediction", (!r.degraded() && r.text() != null) ? r.text() : "AI 예측 일시 중단. 설비 이력을 수동 확인하세요.");
result.put("success", true);
return result;
}
diff --git a/backend/src/main/java/com/zioinfo/fa/service/InventoryService.java b/backend/src/main/java/com/zioinfo/fa/service/InventoryService.java
index fd3b7fc..ae1c0e1 100644
--- a/backend/src/main/java/com/zioinfo/fa/service/InventoryService.java
+++ b/backend/src/main/java/com/zioinfo/fa/service/InventoryService.java
@@ -1,11 +1,10 @@
package com.zioinfo.fa.service;
+import com.zioinfo.fa.ai.service.AiTextRouter;
+import com.zioinfo.fa.common.ai.TextAiClient.GenResult;
import com.zioinfo.fa.domain.FactoryInventory;
import com.zioinfo.fa.mapper.FactoryInventoryMapper;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
import java.util.HashMap;
import java.util.List;
@@ -14,12 +13,11 @@ import java.util.Map;
@Service
public class InventoryService {
private final FactoryInventoryMapper mapper;
+ private final AiTextRouter aiTextRouter;
- @Value("${ollama.base-url:http://localhost:11434}")
- private String ollamaUrl;
-
- public InventoryService(FactoryInventoryMapper mapper) {
+ public InventoryService(FactoryInventoryMapper mapper, AiTextRouter aiTextRouter) {
this.mapper = mapper;
+ this.aiTextRouter = aiTextRouter;
}
public List findAll(String locationCode) {
@@ -41,18 +39,13 @@ public class InventoryService {
return mapper.findLowStock();
}
+ /** 안전재고·발주 최적화 AI 권고. provider 선택은 AiTextRouter(Claude→Ollama 폴백)가 담당. */
public Map aiOptimize(Map req) {
Map result = new HashMap<>();
- try {
- RestTemplate rt = new RestTemplate();
- String prompt = "Optimize inventory for factory. Current low stock items: " +
- req.get("lowStockItems") + ". Suggest reorder quantities in Korean.";
- Map body = Map.of("model", "llama3", "prompt", prompt, "stream", false);
- ResponseEntity resp = rt.postForEntity(ollamaUrl + "/api/generate", body, Map.class);
- result.put("optimization", resp.getBody() != null ? resp.getBody().get("response") : "최적화 불가");
- } catch (Exception e) {
- result.put("optimization", "AI 최적화 일시 중단. 안전재고 기준으로 발주하세요.");
- }
+ String prompt = "Optimize inventory for factory. Current low stock items: " +
+ req.get("lowStockItems") + ". Suggest reorder quantities in Korean.";
+ GenResult r = aiTextRouter.generate(prompt);
+ result.put("optimization", (!r.degraded() && r.text() != null) ? r.text() : "AI 최적화 일시 중단. 안전재고 기준으로 발주하세요.");
result.put("success", true);
return result;
}
diff --git a/backend/src/main/java/com/zioinfo/fa/service/QualityService.java b/backend/src/main/java/com/zioinfo/fa/service/QualityService.java
index 28cb69b..90ae99e 100644
--- a/backend/src/main/java/com/zioinfo/fa/service/QualityService.java
+++ b/backend/src/main/java/com/zioinfo/fa/service/QualityService.java
@@ -1,23 +1,21 @@
package com.zioinfo.fa.service;
+import com.zioinfo.fa.ai.service.AiTextRouter;
+import com.zioinfo.fa.common.ai.TextAiClient.GenResult;
import com.zioinfo.fa.domain.QualityInspection;
import com.zioinfo.fa.mapper.QualityInspectionMapper;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.*;
import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
import java.util.*;
@Service
public class QualityService {
private final QualityInspectionMapper mapper;
+ private final AiTextRouter aiTextRouter;
- @Value("${ollama.base-url:http://localhost:11434}")
- private String ollamaUrl;
-
- public QualityService(QualityInspectionMapper mapper) {
+ public QualityService(QualityInspectionMapper mapper, AiTextRouter aiTextRouter) {
this.mapper = mapper;
+ this.aiTextRouter = aiTextRouter;
}
public List findAll(String type, String result) {
@@ -50,19 +48,15 @@ public class QualityService {
return mapper.getDashboardSummary();
}
+ /** 품질 불량 원인·개선안 AI 분석. provider 선택은 AiTextRouter(Claude→Ollama 폴백)가 담당. */
public Map aiAnalyze(Map req) {
Map result = new HashMap<>();
- try {
- RestTemplate rt = new RestTemplate();
- String prompt = "Analyze quality defect: " + req.get("defectDescription") +
- ". Product: " + req.get("productCode") +
- ". Suggest root cause and corrective action in Korean.";
- Map body = Map.of("model", "llama3", "prompt", prompt, "stream", false);
- ResponseEntity resp = rt.postForEntity(ollamaUrl + "/api/generate", body, Map.class);
- result.put("analysis", resp.getBody() != null ? resp.getBody().get("response") : "분석 불가");
- } catch (Exception e) {
- result.put("analysis", "AI 분석 일시 중단. 수동 검토가 필요합니다.");
- }
+ String prompt = "Analyze quality defect: " + req.get("defectDescription") +
+ ". Product: " + req.get("productCode") +
+ ". Suggest root cause and corrective action in Korean.";
+ GenResult r = aiTextRouter.generate(prompt);
+ // 실패(degraded) 시 기존 규칙기반 폴백 메시지 유지(무회귀).
+ result.put("analysis", (!r.degraded() && r.text() != null) ? r.text() : "AI 분석 일시 중단. 수동 검토가 필요합니다.");
result.put("success", true);
return result;
}
diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml
index 56f5790..bc4c52f 100644
--- a/backend/src/main/resources/application.yml
+++ b/backend/src/main/resources/application.yml
@@ -21,6 +21,17 @@ jwt:
expiration: 86400000
ollama:
base-url: http://localhost:11434
+# AI 플랫폼 — Claude 전환 + 온프레미스 Ollama 폴백 + 로컬 학습 저장소(DuckDB) + 중앙 rag 연계
+guardia:
+ ollama-text-model: llama3.2:1b # Ollama 계열/Claude 폴백 기본 소형 모델(RAM 안전)
+ rag:
+ base-url: http://localhost:8020
+ enabled: true
+ timeout-ms: 2500
+fa:
+ learning:
+ duckdb-path: /opt/guardia-fa/data/fa_learning.duckdb # 로컬 AI 학습·추론 저장소(솔루션 격리)
+# ANTHROPIC_API_KEY 는 서버 환경변수(systemd EnvironmentFile)로만 주입 — 여기에 절대 기재 금지.
logging:
level:
com.zioinfo.fa: DEBUG
diff --git a/backend/src/main/resources/db/104_seed_ai_config.sql b/backend/src/main/resources/db/104_seed_ai_config.sql
new file mode 100644
index 0000000..736457d
--- /dev/null
+++ b/backend/src/main/resources/db/104_seed_ai_config.sql
@@ -0,0 +1,27 @@
+-- =====================================================================
+-- GUARDiA FA — 104. AI 플랫폼(LLM provider) 설정 시드 (멱등)
+-- 대상 DB : fa_db (테이블 fa_setting — schema.sql 에서 생성)
+-- 적용 : 운영 psql 로 schema.sql 적용 후 본 파일 실행(또는 setup 스크립트에 등재).
+-- ON CONFLICT DO NOTHING 으로 재실행 안전.
+-- 설명 : 외부 Claude(Anthropic) API 를 온프레미스 Ollama 와 병행·선택형으로 추가.
+-- 관리자(ADMIN)가 런타임으로 provider/모델을 선택(재기동 불요, AiConfigService).
+-- * ai.provider : ollama(기본) / claude / qwen3 / deepseek / glm
+-- * ai.claude.model : claude-sonnet-4-6(기본) / claude-haiku-4-5 / claude-opus-4-8
+-- * ai.ollama.textModel: 빈값(=서버 프로퍼티 guardia.ollama-text-model 폴백, llama3.2:1b)
+-- * ai.enabled : true(기본, off=규칙기반 degraded)
+-- 보안 : Claude API 키는 DB 에 저장하지 않는다 — 서버 환경변수 ANTHROPIC_API_KEY 로만 주입.
+-- 본 시드에 키/시크릿/IP/비밀번호 일절 미포함.
+-- 무회귀 : 기본 provider=ollama → 설정 미변경 시 기존 Ollama 동작과 바이트 동일.
+-- 멱등 : INSERT ... ON CONFLICT (setting_key) DO NOTHING.
+-- =====================================================================
+
+SET client_encoding = 'UTF8';
+
+INSERT INTO fa_setting (setting_key, setting_value) VALUES
+ ('ai.provider', 'ollama'),
+ ('ai.claude.model', 'claude-sonnet-4-6'),
+ ('ai.ollama.textModel', ''),
+ ('ai.enabled', 'true')
+ON CONFLICT (setting_key) DO NOTHING;
+
+-- end 104_seed_ai_config.sql
diff --git a/backend/src/main/resources/db/schema.sql b/backend/src/main/resources/db/schema.sql
index 99671ee..e944695 100644
--- a/backend/src/main/resources/db/schema.sql
+++ b/backend/src/main/resources/db/schema.sql
@@ -1,6 +1,14 @@
-- GUARDiA FA Database Schema
-- DB: fa_db / User: fa_user / Password: fa_pass2026
+-- AI 플랫폼(LLM provider) 런타임 설정 저장소 (key='ai.*'). 멱등. [GUARDiA-FA]
+-- 시드는 db/104_seed_ai_config.sql. 미적용/키 비움 시에도 provider 기본 ollama → 무회귀.
+CREATE TABLE IF NOT EXISTS fa_setting (
+ setting_key VARCHAR(100) PRIMARY KEY,
+ setting_value TEXT,
+ updated_at TIMESTAMP DEFAULT NOW()
+);
+
CREATE TABLE IF NOT EXISTS fa_epaper_displays (
id BIGSERIAL PRIMARY KEY,
display_id VARCHAR(50) UNIQUE NOT NULL,
diff --git a/backend/src/main/resources/mapper/SettingMapper.xml b/backend/src/main/resources/mapper/SettingMapper.xml
new file mode 100644
index 0000000..7673feb
--- /dev/null
+++ b/backend/src/main/resources/mapper/SettingMapper.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ SELECT setting_key, setting_value, updated_at
+ FROM fa_setting
+ ORDER BY setting_key
+
+
+
+ SELECT setting_key, setting_value, updated_at
+ FROM fa_setting
+ WHERE setting_key = #{key}
+
+
+
+ INSERT INTO fa_setting (setting_key, setting_value, updated_at)
+ VALUES (#{key}, #{value}, NOW())
+ ON CONFLICT (setting_key)
+ DO UPDATE SET setting_value = EXCLUDED.setting_value, updated_at = NOW()
+
+
+
diff --git a/backend/src/main/resources/static/assets/index-DqQ9Pbce.css b/backend/src/main/resources/static/assets/index-DqQ9Pbce.css
new file mode 100644
index 0000000..ec07473
--- /dev/null
+++ b/backend/src/main/resources/static/assets/index-DqQ9Pbce.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}.fixed{position:fixed}.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}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.ml-60{margin-left:15rem}.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}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-1\.5{height:.375rem}.h-2{height:.5rem}.h-6{height:1.5rem}.h-screen{height:100vh}.max-h-48{max-height:12rem}.min-h-screen{min-height:100vh}.w-16{width:4rem}.w-32{width:8rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-8{width:2rem}.w-96{width:24rem}.w-full{width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-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-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-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-500\/40{border-color:#f59e0b66}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.border-emerald-500\/40{border-color:#10b98166}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(21 128 61 / var(--tw-border-opacity, 1))}.border-orange-600{--tw-border-opacity: 1;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(126 34 206 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity, 1))}.border-rose-500\/40{border-color:#f43f5e66}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-700\/50{border-color:#33415580}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.border-yellow-600{--tw-border-opacity: 1;border-color:rgb(202 138 4 / var(--tw-border-opacity, 1))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.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-blue-600\/15{background-color:#2563eb26}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.bg-blue-800{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity, 1))}.bg-blue-900\/30{background-color:#1e3a8a4d}.bg-emerald-500\/15{background-color:#10b98126}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.bg-orange-700{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))}.bg-orange-800{--tw-bg-opacity: 1;background-color:rgb(154 52 18 / var(--tw-bg-opacity, 1))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(126 34 206 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.bg-red-800{--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.bg-red-900\/30{background-color:#7f1d1d4d}.bg-rose-500\/10{background-color:#f43f5e1a}.bg-rose-500\/15{background-color:#f43f5e26}.bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.bg-slate-700\/50{background-color:#33415580}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/20{background-color:#fff3}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.bg-yellow-800{--tw-bg-opacity: 1;background-color:rgb(133 77 14 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-relaxed{line-height:1.625}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-green-200{--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-orange-200{--tw-text-opacity: 1;color:rgb(254 215 170 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.outline-none{outline:2px solid transparent;outline-offset:2px}.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-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}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,sans-serif;background:#0f172a;color:#e2e8f0}.hover\:border-blue-500\/50:hover{border-color:#3b82f680}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / 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-purple-600:hover{--tw-bg-opacity: 1;background-color:rgb(147 51 234 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-500:hover{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-700\/30:hover{background-color:#3341554d}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/30:hover{background-color:#ffffff4d}.hover\:text-emerald-400:hover{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-rose-400:hover{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
diff --git a/backend/src/main/resources/static/assets/index-aXX4xDhy.js b/backend/src/main/resources/static/assets/index-aXX4xDhy.js
new file mode 100644
index 0000000..4c60abc
--- /dev/null
+++ b/backend/src/main/resources/static/assets/index-aXX4xDhy.js
@@ -0,0 +1,306 @@
+function bN(e,t){for(var n=0;nr[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var os=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nw={exports:{}},Bf={};/**
+ * @license React
+ * react-jsx-runtime.production.js
+ *
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var xN=Symbol.for("react.transitional.element"),SN=Symbol.for("react.fragment");function rw(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:xN,type:e,key:r,ref:t!==void 0?t:null,props:n}}Bf.Fragment=SN;Bf.jsx=rw;Bf.jsxs=rw;nw.exports=Bf;var v=nw.exports,aw={exports:{}},te={};/**
+ * @license React
+ * react.production.js
+ *
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var Xm=Symbol.for("react.transitional.element"),ON=Symbol.for("react.portal"),wN=Symbol.for("react.fragment"),AN=Symbol.for("react.strict_mode"),_N=Symbol.for("react.profiler"),EN=Symbol.for("react.consumer"),TN=Symbol.for("react.context"),jN=Symbol.for("react.forward_ref"),NN=Symbol.for("react.suspense"),MN=Symbol.for("react.memo"),iw=Symbol.for("react.lazy"),CN=Symbol.for("react.activity"),p0=Symbol.iterator;function $N(e){return e===null||typeof e!="object"?null:(e=p0&&e[p0]||e["@@iterator"],typeof e=="function"?e:null)}var lw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ow=Object.assign,uw={};function Al(e,t,n){this.props=e,this.context=t,this.refs=uw,this.updater=n||lw}Al.prototype.isReactComponent={};Al.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("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")};Al.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sw(){}sw.prototype=Al.prototype;function Vm(e,t,n){this.props=e,this.context=t,this.refs=uw,this.updater=n||lw}var Km=Vm.prototype=new sw;Km.constructor=Vm;ow(Km,Al.prototype);Km.isPureReactComponent=!0;var y0=Array.isArray;function gp(){}var ke={H:null,A:null,T:null,S:null},cw=Object.prototype.hasOwnProperty;function Fm(e,t,n){var r=n.ref;return{$$typeof:Xm,type:e,key:t,ref:r!==void 0?r:null,props:n}}function PN(e,t){return Fm(e.type,t,e.props)}function Wm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xm}function DN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var m0=/\/+/g;function eh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?DN(""+e.key):t.toString(36)}function RN(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(gp,gp):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function pi(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Xm:case ON:l=!0;break;case iw:return l=e._init,pi(l(e._payload),t,n,r,a)}}if(l)return a=a(e),l=r===""?"."+eh(e,0):r,y0(a)?(n="",l!=null&&(n=l.replace(m0,"$&/")+"/"),pi(a,t,n,"",function(s){return s})):a!=null&&(Wm(a)&&(a=PN(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(m0,"$&/")+"/")+l)),t.push(a)),1;l=0;var o=r===""?".":r+":";if(y0(e))for(var u=0;u>>1,q=N[H];if(0>>1;Ha(Q,D))iea(Ae,Q)?(N[H]=Ae,N[ie]=D,H=ie):(N[H]=Q,N[G]=D,H=G);else if(iea(Ae,D))N[H]=Ae,N[ie]=D,H=ie;else break e}}return R}function a(N,R){var D=N.sortIndex-R.sortIndex;return D!==0?D:N.id-R.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var u=[],s=[],f=1,c=null,d=3,h=!1,x=!1,b=!1,m=!1,p=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function O(N){for(var R=n(s);R!==null;){if(R.callback===null)r(s);else if(R.startTime<=N)r(s),R.sortIndex=R.expirationTime,t(u,R);else break;R=n(s)}}function S(N){if(b=!1,O(N),!x)if(n(u)!==null)x=!0,w||(w=!0,M());else{var R=n(s);R!==null&&B(S,R.startTime-N)}}var w=!1,A=-1,_=5,T=-1;function $(){return m?!0:!(e.unstable_now()-T<_)}function P(){if(m=!1,w){var N=e.unstable_now();T=N;var R=!0;try{e:{x=!1,b&&(b=!1,y(A),A=-1),h=!0;var D=d;try{t:{for(O(N),c=n(u);c!==null&&!(c.expirationTime>N&&$());){var H=c.callback;if(typeof H=="function"){c.callback=null,d=c.priorityLevel;var q=H(c.expirationTime<=N);if(N=e.unstable_now(),typeof q=="function"){c.callback=q,O(N),R=!0;break t}c===n(u)&&r(u),O(N)}else r(u);c=n(u)}if(c!==null)R=!0;else{var K=n(s);K!==null&&B(S,K.startTime-N),R=!1}}break e}finally{c=null,d=D,h=!1}R=void 0}}finally{R?M():w=!1}}}var M;if(typeof g=="function")M=function(){g(P)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,z=k.port2;k.port1.onmessage=P,M=function(){z.postMessage(null)}}else M=function(){p(P,0)};function B(N,R){A=p(function(){N(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125H?(N.sortIndex=D,t(s,N),n(u)===null&&N===n(s)&&(b?(y(A),A=-1):b=!0,B(S,D-H))):(N.sortIndex=q,t(u,N),x||h||(x=!0,w||(w=!0,M()))),N},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(N){var R=d;return function(){var D=d;d=R;try{return N.apply(this,arguments)}finally{d=D}}}})(hw);dw.exports=hw;var UN=dw.exports,pw={exports:{}},Rt={};/**
+ * @license React
+ * react-dom.production.js
+ *
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var kN=E;function yw(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mw)}catch(e){console.error(e)}}mw(),pw.exports=Rt;var qN=pw.exports;/**
+ * @license React
+ * react-dom-client.production.js
+ *
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var st=UN,vw=E,GN=qN;function U(e){var t="https://react.dev/errors/"+e;if(1gi||(e.current=Ap[gi],Ap[gi]=null,gi--)}function De(e,t){gi++,Ap[gi]=e.current,e.current=t}var In=Xn(null),Lo=Xn(null),Yr=Xn(null),rc=Xn(null);function ac(e,t){switch(De(Yr,t),De(Lo,e),De(In,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_b(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_b(t),e=q_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}yt(In),De(In,e)}function qi(){yt(In),yt(Lo),yt(Yr)}function _p(e){e.memoizedState!==null&&De(rc,e);var t=In.current,n=q_(t,e.type);t!==n&&(De(Lo,e),De(In,n))}function ic(e){Lo.current===e&&(yt(In),yt(Lo)),rc.current===e&&(yt(rc),Fo._currentValue=Ma)}var th,x0;function ga(e){if(th===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);th=t&&t[1]||"",x0=-1)":-1a||u[r]!==s[a]){var f=`
+`+u[r].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{nh=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ga(n):""}function FN(e,t){switch(e.tag){case 26:case 27:case 5:return ga(e.type);case 16:return ga("Lazy");case 13:return e.child!==t&&t!==null?ga("Suspense Fallback"):ga("Suspense");case 19:return ga("SuspenseList");case 0:case 15:return rh(e.type,!1);case 11:return rh(e.type.render,!1);case 1:return rh(e.type,!0);case 31:return ga("Activity");default:return""}}function S0(e){try{var t="",n=null;do t+=FN(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
+Error generating stack: `+r.message+`
+`+r.stack}}var Ep=Object.prototype.hasOwnProperty,Jm=st.unstable_scheduleCallback,ah=st.unstable_cancelCallback,WN=st.unstable_shouldYield,QN=st.unstable_requestPaint,tn=st.unstable_now,ZN=st.unstable_getCurrentPriorityLevel,Aw=st.unstable_ImmediatePriority,_w=st.unstable_UserBlockingPriority,lc=st.unstable_NormalPriority,JN=st.unstable_LowPriority,Ew=st.unstable_IdlePriority,eM=st.log,tM=st.unstable_setDisableYieldValue,Lu=null,nn=null;function Lr(e){if(typeof eM=="function"&&tM(e),nn&&typeof nn.setStrictMode=="function")try{nn.setStrictMode(Lu,e)}catch{}}var rn=Math.clz32?Math.clz32:aM,nM=Math.log,rM=Math.LN2;function aM(e){return e>>>=0,e===0?32:31-(nM(e)/rM|0)|0}var cs=256,fs=262144,ds=4194304;function ba(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function kf(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=ba(r):(l&=o,l!==0?a=ba(l):n||(n=o&~e,n!==0&&(a=ba(n))))):(o=r&~i,o!==0?a=ba(o):l!==0?a=ba(l):n||(n=r&~e,n!==0&&(a=ba(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function Uu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function iM(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tw(){var e=ds;return ds<<=1,!(ds&62914560)&&(ds=4194304),e}function ih(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ku(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lM(e,t,n,r,a,i){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,u=e.expirationTimes,s=e.hiddenUpdates;for(n=l&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dM=/[\n"\\]/g;function yn(e){return e.replace(dM,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Np(e,t,n,r,a,i,l,o){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Mp(e,l,dn(t)):n!=null?Mp(e,l,dn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+dn(o):e.removeAttribute("name")}function zw(e,t,n,r,a,i,l,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){jp(e);return}n=n!=null?""+dn(n):"",t=t!=null?""+dn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),jp(e)}function Mp(e,t,n){t==="number"&&oc(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Pi(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$p=!1;if(mr)try{var Wl={};Object.defineProperty(Wl,"passive",{get:function(){$p=!0}}),window.addEventListener("test",Wl,Wl),window.removeEventListener("test",Wl,Wl)}catch{$p=!1}var Ur=null,iv=null,Is=null;function Iw(){if(Is)return Is;var e,t=iv,n=t.length,r,a="value"in Ur?Ur.value:Ur.textContent,i=a.length;for(e=0;e=So),$0=" ",P0=!1;function qw(e,t){switch(e){case"keyup":return kM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Si=!1;function HM(e,t){switch(e){case"compositionend":return Gw(t);case"keypress":return t.which!==32?null:(P0=!0,$0);case"textInput":return e=t.data,e===$0&&P0?null:e;default:return null}}function qM(e,t){if(Si)return e==="compositionend"||!ov&&qw(e,t)?(e=Iw(),Is=iv=Ur=null,Si=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=L0(n)}}function Kw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fw(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=oc(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oc(e.document)}return t}function uv(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")}var QM=mr&&"documentMode"in document&&11>=document.documentMode,Oi=null,Pp=null,wo=null,Dp=!1;function k0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dp||Oi==null||Oi!==oc(r)||(r=Oi,"selectionStart"in r&&uv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wo&&Io(wo,r)||(wo=r,r=_c(Pp,"onSelect"),0>=l,a-=l,Bn=1<<32-rn(t)+a|n<_?(T=A,A=null):T=A.sibling;var $=d(p,A,g[_],O);if($===null){A===null&&(A=T);break}e&&A&&$.alternate===null&&t(p,A),y=i($,y,_),w===null?S=$:w.sibling=$,w=$,A=T}if(_===g.length)return n(p,A),de&&nr(p,_),S;if(A===null){for(;__?(T=A,A=null):T=A.sibling;var P=d(p,A,$.value,O);if(P===null){A===null&&(A=T);break}e&&A&&P.alternate===null&&t(p,A),y=i(P,y,_),w===null?S=P:w.sibling=P,w=P,A=T}if($.done)return n(p,A),de&&nr(p,_),S;if(A===null){for(;!$.done;_++,$=g.next())$=c(p,$.value,O),$!==null&&(y=i($,y,_),w===null?S=$:w.sibling=$,w=$);return de&&nr(p,_),S}for(A=r(A);!$.done;_++,$=g.next())$=h(A,p,_,$.value,O),$!==null&&(e&&$.alternate!==null&&A.delete($.key===null?_:$.key),y=i($,y,_),w===null?S=$:w.sibling=$,w=$);return e&&A.forEach(function(M){return t(p,M)}),de&&nr(p,_),S}function m(p,y,g,O){if(typeof g=="object"&&g!==null&&g.type===vi&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case ss:e:{for(var S=g.key;y!==null;){if(y.key===S){if(S=g.type,S===vi){if(y.tag===7){n(p,y.sibling),O=a(y,g.props.children),O.return=p,p=O;break e}}else if(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Mr&&xa(S)===y.type){n(p,y.sibling),O=a(y,g.props),Zl(O,g),O.return=p,p=O;break e}n(p,y);break}else t(p,y);y=y.sibling}g.type===vi?(O=Ca(g.props.children,p.mode,O,g.key),O.return=p,p=O):(O=qs(g.type,g.key,g.props,null,p.mode,O),Zl(O,g),O.return=p,p=O)}return l(p);case po:e:{for(S=g.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===g.containerInfo&&y.stateNode.implementation===g.implementation){n(p,y.sibling),O=a(y,g.children||[]),O.return=p,p=O;break e}else{n(p,y);break}else t(p,y);y=y.sibling}O=ph(g,p.mode,O),O.return=p,p=O}return l(p);case Mr:return g=xa(g),m(p,y,g,O)}if(yo(g))return x(p,y,g,O);if(Fl(g)){if(S=Fl(g),typeof S!="function")throw Error(U(150));return g=S.call(g),b(p,y,g,O)}if(typeof g.then=="function")return m(p,y,ms(g),O);if(g.$$typeof===ar)return m(p,y,ys(p,g),O);vs(p,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,y!==null&&y.tag===6?(n(p,y.sibling),O=a(y,g),O.return=p,p=O):(n(p,y),O=hh(g,p.mode,O),O.return=p,p=O),l(p)):n(p,y)}return function(p,y,g,O){try{Go=0;var S=m(p,y,g,O);return zi=null,S}catch(A){if(A===jl||A===Xf)throw A;var w=Zt(29,A,null,p.mode);return w.lanes=O,w.return=p,w}finally{}}}var Ia=cA(!0),fA=cA(!1),Cr=!1;function vv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ip(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Kr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=sc(e),nA(e,null,n),t}return Yf(e,r,t,n),sc(e)}function _o(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nw(e,n)}}function mh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Hp=!1;function Eo(){if(Hp){var e=Ri;if(e!==null)throw e}}function To(e,t,n,r){Hp=!1;var a=e.updateQueue;Cr=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var u=o,s=u.next;u.next=null,l===null?i=s:l.next=s,l=u;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==l&&(o===null?f.firstBaseUpdate=s:o.next=s,f.lastBaseUpdate=u))}if(i!==null){var c=a.baseState;l=0,f=s=u=null,o=i;do{var d=o.lane&-536870913,h=d!==o.lane;if(h?(ce&d)===d:(r&d)===d){d!==0&&d===Xi&&(Hp=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var x=e,b=o;d=t;var m=n;switch(b.tag){case 1:if(x=b.payload,typeof x=="function"){c=x.call(m,c,d);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=b.payload,d=typeof x=="function"?x.call(m,c,d):x,d==null)break e;c=Ie({},c,d);break e;case 2:Cr=!0}}d=o.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=a.callbacks,h===null?a.callbacks=[d]:h.push(d))}else h={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(s=f=h,u=c):f=f.next=h,l|=d;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;h=o,o=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);f===null&&(u=c),a.baseState=u,a.firstBaseUpdate=s,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),ia|=l,e.lanes=l,e.memoizedState=c}}function dA(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function hA(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ei?i:8;var l=J.T,o={};J.T=o,Mv(e,!1,t,n);try{var u=a(),s=J.S;if(s!==null&&s(o,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=lC(u,r);jo(e,t,f,an(e))}else jo(e,t,r,an(e))}catch(c){jo(e,t,{then:function(){},status:"rejected",reason:c},an())}finally{ge.p=i,l!==null&&o.types!==null&&(l.types=o.types),J.T=l}}function dC(){}function Vp(e,t,n,r){if(e.tag!==5)throw Error(U(476));var a=LA(e).queue;BA(e,a,t,Ma,n===null?dC:function(){return UA(e),n(r)})}function LA(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ma,baseState:Ma,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:Ma},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function UA(e){var t=LA(e);t.next===null&&(t=e.alternate.memoizedState),jo(e,t.next.queue,{},an())}function Nv(){return wt(Fo)}function kA(){return We().memoizedState}function IA(){return We().memoizedState}function hC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=an();e=Vr(n);var r=Kr(t,e,n);r!==null&&(Ht(r,t,n),_o(r,t,n)),t={cache:pv()},e.payload=t;return}t=t.return}}function pC(e,t,n){var r=an();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Wf(e)?qA(t,n):(n=cv(e,t,n,r),n!==null&&(Ht(n,e,r),GA(n,t,r)))}function HA(e,t,n){var r=an();jo(e,t,n,r)}function jo(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wf(e))qA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(a.hasEagerState=!0,a.eagerState=o,ln(o,l))return Yf(e,t,a,0),Ce===null&&Gf(),!1}catch{}finally{}if(n=cv(e,t,a,r),n!==null)return Ht(n,e,r),GA(n,t,r),!0}return!1}function Mv(e,t,n,r){if(r={lane:2,revertLane:Uv(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Wf(e)){if(t)throw Error(U(479))}else t=cv(e,n,r,2),t!==null&&Ht(t,e,2)}function Wf(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function qA(e,t){Bi=yc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function GA(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Nw(e,n)}}var Xo={readContext:wt,use:Kf,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useLayoutEffect:Xe,useInsertionEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useSyncExternalStore:Xe,useId:Xe,useHostTransitionStatus:Xe,useFormState:Xe,useActionState:Xe,useOptimistic:Xe,useMemoCache:Xe,useCacheRefresh:Xe};Xo.useEffectEvent=Xe;var YA={readContext:wt,use:Kf,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:tb,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Xs(4194308,4,$A.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){Xs(4,2,e,t)},useMemo:function(e,t){var n=$t();t=t===void 0?null:t;var r=e();if(Ha){Lr(!0);try{e()}finally{Lr(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=$t();if(n!==void 0){var a=n(t);if(Ha){Lr(!0);try{n(t)}finally{Lr(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=pC.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=Yp(e);var t=e.queue,n=HA.bind(null,ae,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Tv,useDeferredValue:function(e,t){var n=$t();return jv(n,e,t)},useTransition:function(){var e=Yp(!1);return e=BA.bind(null,ae,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ae,a=$t();if(de){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ce===null)throw Error(U(349));ce&127||gA(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,tb(xA.bind(null,r,i,e),[e]),r.flags|=2048,Ki(9,{destroy:void 0},bA.bind(null,r,i,n,t),null),n},useId:function(){var e=$t(),t=Ce.identifierPrefix;if(de){var n=Ln,r=Bn;n=(r&~(1<<32-rn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=mc++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?l.createElement(a,{is:r.is}):l.createElement(a)}}i[xt]=t,i[Gt]=r;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=i;e:switch(_t(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Qn(t)}}return ze(t),Ah(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(e=Yr.current,oi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=St,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||H_(e.nodeValue,n)),e||ra(t,!0)}else e=Ec(e).createTextNode(r),e[xt]=t,t.stateNode=e}return ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oi(t),n!==null){if(e===null){if(!r)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[xt]=t}else Ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else n=yh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Qt(t),t):(Qt(t),null);if(t.flags&128)throw Error(U(558))}return ze(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[xt]=t}else Ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),a=!1}else a=yh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Qt(t),t):(Qt(t),null)}return Qt(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gs(t,t.updateQueue),ze(t),null);case 4:return qi(),e===null&&kv(t.stateNode.containerInfo),ze(t),null;case 10:return fr(t.type),ze(t),null;case 19:if(yt(Fe),r=t.memoizedState,r===null)return ze(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)Jl(r,!1);else{if(Ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=pc(e),i!==null){for(t.flags|=128,Jl(r,!1),e=i.updateQueue,t.updateQueue=e,gs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rA(n,e),n=n.sibling;return De(Fe,Fe.current&1|2),de&&nr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&tn()>xc&&(t.flags|=128,a=!0,Jl(r,!1),t.lanes=4194304)}else{if(!a)if(e=pc(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gs(t,e),Jl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!de)return ze(t),null}else 2*tn()-r.renderingStartTime>xc&&n!==536870912&&(t.flags|=128,a=!0,Jl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=tn(),e.sibling=null,n=Fe.current,De(Fe,a?n&1|2:n&1),de&&nr(t,r.treeForkCount),e):(ze(t),null);case 22:case 23:return Qt(t),gv(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),n=t.updateQueue,n!==null&&gs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&yt($a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),fr(tt),ze(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function bC(e,t){switch(hv(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fr(tt),qi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ic(t),null;case 31:if(t.memoizedState!==null){if(Qt(t),t.alternate===null)throw Error(U(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return yt(Fe),null;case 4:return qi(),null;case 10:return fr(t.type),null;case 22:case 23:return Qt(t),gv(),e!==null&&yt($a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fr(tt),null;case 25:return null;default:return null}}function r_(e,t){switch(hv(t),t.tag){case 3:fr(tt),qi();break;case 26:case 27:case 5:ic(t);break;case 4:qi();break;case 31:t.memoizedState!==null&&Qt(t);break;case 13:Qt(t);break;case 19:yt(Fe);break;case 10:fr(t.type);break;case 22:case 23:Qt(t),gv(),e!==null&&yt($a);break;case 24:fr(tt)}}function Yu(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,l=n.inst;r=i(),l.destroy=r}n=n.next}while(n!==a)}}catch(o){Oe(t,t.return,o)}}function aa(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var l=r.inst,o=l.destroy;if(o!==void 0){l.destroy=void 0,a=t;var u=n,s=o;try{s()}catch(f){Oe(a,u,f)}}}r=r.next}while(r!==i)}}catch(f){Oe(t,t.return,f)}}function a_(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{hA(t,n)}catch(r){Oe(e,e.return,r)}}}function i_(e,t,n){n.props=qa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Oe(e,t,r)}}function No(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Oe(e,t,a)}}function Un(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Oe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Oe(e,t,a)}else n.current=null}function l_(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Oe(e,e.return,a)}}function _h(e,t,n){try{var r=e.stateNode;IC(r,e.type,n,t),r[Gt]=t}catch(a){Oe(e,e.return,a)}}function o_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ua(e.type)||e.tag===4}function Eh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||o_(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.tag===27&&ua(e.type)||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 Zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ir));else if(r!==4&&(r===27&&ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zp(e,t,n),e=e.sibling;e!==null;)Zp(e,t,n),e=e.sibling}function bc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(bc(e,t,n),e=e.sibling;e!==null;)bc(e,t,n),e=e.sibling}function u_(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);_t(t,r,n),t[xt]=e,t[Gt]=n}catch(i){Oe(e,e.return,i)}}var rr=!1,et=!1,Th=!1,pb=typeof WeakSet=="function"?WeakSet:Set,dt=null;function xC(e,t){if(e=e.containerInfo,iy=Mc,e=Fw(e),uv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,u=-1,s=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||a!==0&&c.nodeType!==3||(o=l+a),c!==i||r!==0&&c.nodeType!==3||(u=l+r),c.nodeType===3&&(l+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++s===a&&(o=l),d===i&&++f===r&&(u=l),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ly={focusedElem:e,selectionRange:n},Mc=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){switch(t=dt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),_t(i,r,n),i[xt]=e,ht(i),r=i;break e;case"link":var l=Db("link","href",a).get(r+(n.href||""));if(l){for(var o=0;om&&(l=m,m=b,b=l);var p=U0(o,b),y=U0(o,m);if(p&&y&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var g=c.createRange();g.setStart(p.node,p.offset),h.removeAllRanges(),b>m?(h.addRange(g),h.extend(y.node,y.offset)):(g.setEnd(y.node,y.offset),h.addRange(g))}}}}for(c=[],h=o;h=h.parentNode;)h.nodeType===1&&c.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;on?32:n,J.T=null,n=ty,ty=null;var i=Wr,l=dr;if(ot=0,Wi=Wr=null,dr=0,ye&6)throw Error(U(331));var o=ye;if(ye|=4,b_(i.current),m_(i,i.current,l,n),ye=o,Xu(0,!1),nn&&typeof nn.onPostCommitFiberRoot=="function")try{nn.onPostCommitFiberRoot(Lu,i)}catch{}return!0}finally{ge.p=a,J.T=r,D_(e,t)}}function gb(e,t,n){t=mn(n,t),t=Fp(e.stateNode,t,2),e=Kr(e,t,2),e!==null&&(ku(e,2),Vn(e))}function Oe(e,t,n){if(e.tag===3)gb(e,e,n);else for(;t!==null;){if(t.tag===3){gb(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fr===null||!Fr.has(r))){e=mn(n,e),n=WA(2),r=Kr(t,n,2),r!==null&&(QA(n,r,t,e),ku(r,2),Vn(r));break}}t=t.return}}function Nh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wC;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(zv=!0,a.add(n),e=jC.bind(null,e,t,n),t.then(e,e))}function jC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ce===e&&(ce&n)===n&&(Ke===4||Ke===3&&(ce&62914560)===ce&&300>tn()-Qf?!(ye&2)&&Qi(e,0):Bv|=n,Fi===ce&&(Fi=0)),Vn(e)}function z_(e,t){t===0&&(t=Tw()),e=ei(e,t),e!==null&&(ku(e,t),Vn(e))}function NC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),z_(e,n)}function MC(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(U(314))}r!==null&&r.delete(t),z_(e,n)}function CC(e,t){return Jm(e,t)}var wc=null,mi=null,ry=!1,Ac=!1,Mh=!1,Hr=0;function Vn(e){e!==mi&&e.next===null&&(mi===null?wc=mi=e:mi=mi.next=e),Ac=!0,ry||(ry=!0,PC())}function Xu(e,t){if(!Mh&&Ac){Mh=!0;do for(var n=!1,r=wc;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var l=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-rn(42|e)+1)-1,i&=a&~(l&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,bb(r,i))}else i=ce,i=kf(r,r===Ce?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||Uu(r,i)||(n=!0,bb(r,i));r=r.next}while(n);Mh=!1}}function $C(){B_()}function B_(){Ac=ry=!1;var e=0;Hr!==0&&qC()&&(e=Hr);for(var t=tn(),n=null,r=wc;r!==null;){var a=r.next,i=L_(r,t);i===0?(r.next=null,n===null?wc=a:n.next=a,a===null&&(mi=n)):(n=r,(e!==0||i&3)&&(Ac=!0)),r=a}ot!==0&&ot!==5||Xu(e),Hr!==0&&(Hr=0)}function L_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0o)break;var f=u.transferSize,c=u.initiatorType;f&&Ab(c)&&(u=u.responseEnd,l+=f*(u"u"?null:document;function V_(e,t,n){var r=Ml;if(r&&typeof t=="string"&&t){var a=yn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Cb.has(a)||(Cb.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),_t(t,"link",e),ht(t),r.head.appendChild(t)))}}function ZC(e){Ar.D(e),V_("dns-prefetch",e,null)}function JC(e,t){Ar.C(e,t),V_("preconnect",e,t)}function e$(e,t,n){Ar.L(e,t,n);var r=Ml;if(r&&e&&t){var a='link[rel="preload"][as="'+yn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+yn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+yn(n.imageSizes)+'"]')):a+='[href="'+yn(e)+'"]';var i=a;switch(t){case"style":i=Zi(e);break;case"script":i=Cl(e)}On.has(i)||(e=Ie({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Vu(i))||t==="script"&&r.querySelector(Ku(i))||(t=r.createElement("link"),_t(t,"link",e),ht(t),r.head.appendChild(t)))}}function t$(e,t){Ar.m(e,t);var n=Ml;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+yn(r)+'"][href="'+yn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Cl(e)}if(!On.has(i)&&(e=Ie({rel:"modulepreload",href:e},t),On.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ku(i)))return}r=n.createElement("link"),_t(r,"link",e),ht(r),n.head.appendChild(r)}}}function n$(e,t,n){Ar.S(e,t,n);var r=Ml;if(r&&e){var a=$i(r).hoistableStyles,i=Zi(e);t=t||"default";var l=a.get(i);if(!l){var o={loading:0,preload:null};if(l=r.querySelector(Vu(i)))o.loading=5;else{e=Ie({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(i))&&Iv(e,n);var u=l=r.createElement("link");ht(u),_t(u,"link",e),u._p=new Promise(function(s,f){u.onload=s,u.onerror=f}),u.addEventListener("load",function(){o.loading|=1}),u.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Ws(l,t,r)}l={type:"stylesheet",instance:l,count:1,state:o},a.set(i,l)}}}function r$(e,t){Ar.X(e,t);var n=Ml;if(n&&e){var r=$i(n).hoistableScripts,a=Cl(e),i=r.get(a);i||(i=n.querySelector(Ku(a)),i||(e=Ie({src:e,async:!0},t),(t=On.get(a))&&Hv(e,t),i=n.createElement("script"),ht(i),_t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function a$(e,t){Ar.M(e,t);var n=Ml;if(n&&e){var r=$i(n).hoistableScripts,a=Cl(e),i=r.get(a);i||(i=n.querySelector(Ku(a)),i||(e=Ie({src:e,async:!0,type:"module"},t),(t=On.get(a))&&Hv(e,t),i=n.createElement("script"),ht(i),_t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function $b(e,t,n,r){var a=(a=Yr.current)?Tc(a):null;if(!a)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Zi(n.href),n=$i(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Zi(n.href);var i=$i(a).hoistableStyles,l=i.get(e);if(l||(a=a.ownerDocument||a,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,l),(i=a.querySelector(Vu(e)))&&!i._p&&(l.instance=i,l.state.loading=5),On.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},On.set(e,n),i||i$(a,e,n,l.state))),t&&r===null)throw Error(U(528,""));return l}if(t&&r!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Cl(n),n=$i(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function Zi(e){return'href="'+yn(e)+'"'}function Vu(e){return'link[rel="stylesheet"]['+e+"]"}function K_(e){return Ie({},e,{"data-precedence":e.precedence,precedence:null})}function i$(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),_t(t,"link",n),ht(t),e.head.appendChild(t))}function Cl(e){return'[src="'+yn(e)+'"]'}function Ku(e){return"script[async]"+e}function Pb(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+yn(n.href)+'"]');if(r)return t.instance=r,ht(r),r;var a=Ie({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),ht(r),_t(r,"style",a),Ws(r,n.precedence,e),t.instance=r;case"stylesheet":a=Zi(n.href);var i=e.querySelector(Vu(a));if(i)return t.state.loading|=4,t.instance=i,ht(i),i;r=K_(n),(a=On.get(a))&&Iv(r,a),i=(e.ownerDocument||e).createElement("link"),ht(i);var l=i;return l._p=new Promise(function(o,u){l.onload=o,l.onerror=u}),_t(i,"link",r),t.state.loading|=4,Ws(i,n.precedence,e),t.instance=i;case"script":return i=Cl(n.src),(a=e.querySelector(Ku(i)))?(t.instance=a,ht(a),a):(r=n,(a=On.get(i))&&(r=Ie({},n),Hv(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),ht(a),_t(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Ws(r,n.precedence,e));return t.instance}function Ws(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,l=0;l title"):null)}function l$(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function F_(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function o$(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=Zi(r.href),i=t.querySelector(Vu(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=jc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ht(i);return}i=t.ownerDocument||t,r=K_(r),(a=On.get(a))&&Iv(r,a),i=i.createElement("link"),ht(i);var l=i;l._p=new Promise(function(o,u){l.onload=o,l.onerror=u}),_t(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=jc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var zh=0;function u$(e,t){return e.stylesheets&&e.count===0&&Zs(e,e.stylesheets),0zh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function jc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Nc=null;function Zs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Nc=new Map,t.forEach(s$,e),Nc=null,jc.call(e))}function s$(e,t){if(!(t.state.loading&4)){var n=Nc.get(e);if(n)var r=n.get(null);else{n=new Map,Nc.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rE)}catch(e){console.error(e)}}rE(),fw.exports=Lf;var v$=fw.exports;const g$=Ne(v$);/**
+ * @remix-run/router v1.23.3
+ *
+ * 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 Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Vv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function x$(){return Math.random().toString(36).substr(2,8)}function qb(e,t){return{usr:e.state,key:e.key,idx:t}}function py(e,t,n,r){return n===void 0&&(n=null),Zo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?$l(t):t,{state:n,key:t&&t.key||r||x$()})}function $c(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function $l(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function S$(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o=qr.Pop,u=null,s=f();s==null&&(s=0,l.replaceState(Zo({},l.state,{idx:s}),""));function f(){return(l.state||{idx:null}).idx}function c(){o=qr.Pop;let m=f(),p=m==null?null:m-s;s=m,u&&u({action:o,location:b.location,delta:p})}function d(m,p){o=qr.Push;let y=py(b.location,m,p);s=f()+1;let g=qb(y,s),O=b.createHref(y);try{l.pushState(g,"",O)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;a.location.assign(O)}i&&u&&u({action:o,location:b.location,delta:1})}function h(m,p){o=qr.Replace;let y=py(b.location,m,p);s=f();let g=qb(y,s),O=b.createHref(y);l.replaceState(g,"",O),i&&u&&u({action:o,location:b.location,delta:0})}function x(m){let p=a.location.origin!=="null"?a.location.origin:a.location.href,y=typeof m=="string"?m:$c(m);return y=y.replace(/ $/,"%20"),Ye(p,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,p)}let b={get action(){return o},get location(){return e(a,l)},listen(m){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Hb,c),u=m,()=>{a.removeEventListener(Hb,c),u=null}},createHref(m){return t(a,m)},createURL:x,encodeLocation(m){let p=x(m);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:h,go(m){return l.go(m)}};return b}var Gb;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gb||(Gb={}));function O$(e,t,n){return n===void 0&&(n="/"),w$(e,t,n)}function w$(e,t,n,r){let a=typeof t=="string"?$l(t):t,i=el(a.pathname||"/",n);if(i==null)return null;let l=aE(e);A$(l);let o=null,u=R$(i);for(let s=0;o==null&&s{let u={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};u.relativePath.startsWith("/")&&(Ye(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let s=ea([r,u.relativePath]),f=n.concat(u);i.children&&i.children.length>0&&(Ye(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),aE(i.children,t,f,s)),!(i.path==null&&!i.index)&&t.push({path:s,score:C$(s,i.index),routesMeta:f})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let u of iE(i.path))a(i,l,u)}),t}function iE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=iE(r.join("/")),o=[];return o.push(...l.map(u=>u===""?i:[i,u].join("/"))),a&&o.push(...l),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function A$(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$$(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _$=/^:[\w-]+$/,E$=3,T$=2,j$=1,N$=10,M$=-2,Yb=e=>e==="*";function C$(e,t){let n=e.split("/"),r=n.length;return n.some(Yb)&&(r+=M$),t&&(r+=T$),n.filter(a=>!Yb(a)).reduce((a,i)=>a+(_$.test(i)?E$:i===""?j$:N$),r)}function $$(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function P$(e,t,n){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o{let{paramName:d,isOptional:h}=f;if(d==="*"){let b=o[c]||"";l=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const x=o[c];return h&&!x?s[d]=void 0:s[d]=(x||"").replace(/%2F/g,"/"),s},{}),pathname:i,pathnameBase:l,pattern:e}}function D$(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Vv(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 r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function R$(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vv(!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 el(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const z$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,B$=e=>z$.test(e);function L$(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?$l(e):e,i;if(n)if(B$(n))i=n;else{if(n.includes("//")){let l=n;n=lE(n),Vv(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?i=Xb(n.substring(1),"/"):i=Xb(n,t)}else i=t;return{pathname:i,search:I$(r),hash:H$(a)}}function Xb(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Bh(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function U$(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Kv(e,t){let n=U$(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Fv(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=$l(e):(a=Zo({},e),Ye(!a.pathname||!a.pathname.includes("?"),Bh("?","pathname","search",a)),Ye(!a.pathname||!a.pathname.includes("#"),Bh("#","pathname","hash",a)),Ye(!a.search||!a.search.includes("#"),Bh("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=n;else{let c=t.length-1;if(!r&&l.startsWith("..")){let d=l.split("/");for(;d[0]==="..";)d.shift(),c-=1;a.pathname=d.join("/")}o=c>=0?t[c]:"/"}let u=L$(a,o),s=l&&l!=="/"&&l.endsWith("/"),f=(i||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}const lE=e=>e.replace(/\/\/+/g,"/"),ea=e=>lE(e.join("/")),k$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),I$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,H$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function q$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const oE=["post","put","patch","delete"];new Set(oE);const G$=["get",...oE];new Set(G$);/**
+ * React Router v6.30.4
+ *
+ * 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 Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),E.useCallback(function(s,f){if(f===void 0&&(f={}),!o.current)return;if(typeof s=="number"){r.go(s);return}let c=Fv(s,JSON.parse(l),i,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:ea([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,l,i,e])}function ad(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(_r),{matches:a}=E.useContext(sa),{pathname:i}=Dl(),l=JSON.stringify(Kv(a,r.v7_relativeSplatPath));return E.useMemo(()=>Fv(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function V$(e,t){return K$(e,t)}function K$(e,t,n,r){Pl()||Ye(!1);let{navigator:a}=E.useContext(_r),{matches:i}=E.useContext(sa),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let s=Dl(),f;if(t){var c;let m=typeof t=="string"?$l(t):t;u==="/"||(c=m.pathname)!=null&&c.startsWith(u)||Ye(!1),f=m}else f=s;let d=f.pathname||"/",h=d;if(u!=="/"){let m=u.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let x=O$(e,{pathname:h}),b=J$(x&&x.map(m=>Object.assign({},m,{params:Object.assign({},o,m.params),pathname:ea([u,a.encodeLocation?a.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?u:ea([u,a.encodeLocation?a.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),i,n,r);return t&&b?E.createElement(rd.Provider,{value:{location:Jo({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:qr.Pop}},b):b}function F$(){let e=r3(),t=q$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:a},n):null,null)}const W$=E.createElement(F$,null);class Q$ extends E.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement(sa.Provider,{value:this.props.routeContext},E.createElement(sE.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Z$(e){let{routeContext:t,match:n,children:r}=e,a=E.useContext(nd);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(sa.Provider,{value:t},r)}function J$(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(a=n)==null?void 0:a.errors;if(o!=null){let f=l.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);f>=0||Ye(!1),l=l.slice(0,Math.min(l.length,f+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?l=l.slice(0,s+1):l=[l[0]];break}}}return l.reduceRight((f,c,d)=>{let h,x=!1,b=null,m=null;n&&(h=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||W$,u&&(s<0&&d===0?(i3("route-fallback"),x=!0,m=null):s===d&&(x=!0,m=c.route.hydrateFallbackElement||null)));let p=t.concat(l.slice(0,d+1)),y=()=>{let g;return h?g=b:x?g=m:c.route.Component?g=E.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=f,E.createElement(Z$,{match:c,routeContext:{outlet:f,matches:p,isDataRoute:n!=null},children:g})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?E.createElement(Q$,{location:n.location,revalidation:n.revalidation,component:b,error:h,children:y(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):y()},null)}var fE=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(fE||{}),dE=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}(dE||{});function e3(e){let t=E.useContext(nd);return t||Ye(!1),t}function t3(e){let t=E.useContext(uE);return t||Ye(!1),t}function n3(e){let t=E.useContext(sa);return t||Ye(!1),t}function hE(e){let t=n3(),n=t.matches[t.matches.length-1];return n.route.id||Ye(!1),n.route.id}function r3(){var e;let t=E.useContext(sE),n=t3(),r=hE();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function a3(){let{router:e}=e3(fE.UseNavigateStable),t=hE(dE.UseNavigateStable),n=E.useRef(!1);return cE(()=>{n.current=!0}),E.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Jo({fromRouteId:t},i)))},[e,t])}const Vb={};function i3(e,t,n){Vb[e]||(Vb[e]=!0)}function l3(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function pE(e){let{to:t,replace:n,state:r,relative:a}=e;Pl()||Ye(!1);let{future:i,static:l}=E.useContext(_r),{matches:o}=E.useContext(sa),{pathname:u}=Dl(),s=Wv(),f=Fv(t,Kv(o,i.v7_relativeSplatPath),u,a==="path"),c=JSON.stringify(f);return E.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:a}),[s,c,a,n,r]),null}function Ct(e){Ye(!1)}function o3(e){let{basename:t="/",children:n=null,location:r,navigationType:a=qr.Pop,navigator:i,static:l=!1,future:o}=e;Pl()&&Ye(!1);let u=t.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:u,navigator:i,static:l,future:Jo({v7_relativeSplatPath:!1},o)}),[u,o,i,l]);typeof r=="string"&&(r=$l(r));let{pathname:f="/",search:c="",hash:d="",state:h=null,key:x="default"}=r,b=E.useMemo(()=>{let m=el(f,u);return m==null?null:{location:{pathname:m,search:c,hash:d,state:h,key:x},navigationType:a}},[u,f,c,d,h,x,a]);return b==null?null:E.createElement(_r.Provider,{value:s},E.createElement(rd.Provider,{children:n,value:b}))}function Kb(e){let{children:t,location:n}=e;return V$(my(t),n)}new Promise(()=>{});function my(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,a)=>{if(!E.isValidElement(r))return;let i=[...t,a];if(r.type===E.Fragment){n.push.apply(n,my(r.props.children,i));return}r.type!==Ct&&Ye(!1),!r.props.index||!r.props.children||Ye(!1);let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=my(r.props.children,i)),n.push(l)}),n}/**
+ * React Router DOM v6.30.4
+ *
+ * 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 Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s&&Fb?Fb(()=>u(c)):u(c)},[u,s]);return E.useLayoutEffect(()=>l.listen(f),[l,f]),E.useEffect(()=>l3(r),[r]),E.createElement(o3,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:l,future:r})}const m3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",v3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,g3=E.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:l,state:o,target:u,to:s,preventScrollReset:f,viewTransition:c}=t,d=yE(t,c3),{basename:h}=E.useContext(_r),x,b=!1;if(typeof s=="string"&&v3.test(s)&&(x=s,m3))try{let g=new URL(window.location.href),O=s.startsWith("//")?new URL(g.protocol+s):new URL(s),S=el(O.pathname,h);O.origin===g.origin&&S!=null?s=S+O.search+O.hash:b=!0}catch{}let m=Y$(s,{relative:a}),p=S3(s,{replace:l,state:o,target:u,preventScrollReset:f,relative:a,viewTransition:c});function y(g){r&&r(g),g.defaultPrevented||p(g)}return E.createElement("a",Pc({},d,{href:x||m,onClick:b||i?r:y,ref:n,target:u}))}),b3=E.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:l=!1,style:o,to:u,viewTransition:s,children:f}=t,c=yE(t,f3),d=ad(u,{relative:c.relative}),h=Dl(),x=E.useContext(uE),{navigator:b,basename:m}=E.useContext(_r),p=x!=null&&O3(d)&&s===!0,y=b.encodeLocation?b.encodeLocation(d).pathname:d.pathname,g=h.pathname,O=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(g=g.toLowerCase(),O=O?O.toLowerCase():null,y=y.toLowerCase()),O&&m&&(O=el(O,m)||O);const S=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let w=g===y||!l&&g.startsWith(y)&&g.charAt(S)==="/",A=O!=null&&(O===y||!l&&O.startsWith(y)&&O.charAt(y.length)==="/"),_={isActive:w,isPending:A,isTransitioning:p},T=w?r:void 0,$;typeof i=="function"?$=i(_):$=[i,w?"active":null,A?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let P=typeof o=="function"?o(_):o;return E.createElement(g3,Pc({},c,{"aria-current":T,className:$,ref:n,style:P,to:u,viewTransition:s}),typeof f=="function"?f(_):f)});var vy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vy||(vy={}));var Wb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Wb||(Wb={}));function x3(e){let t=E.useContext(nd);return t||Ye(!1),t}function S3(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,u=Wv(),s=Dl(),f=ad(e,{relative:l});return E.useCallback(c=>{if(s3(c,n)){c.preventDefault();let d=r!==void 0?r:$c(s)===$c(f);u(e,{replace:d,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[s,u,f,r,a,n,e,i,l,o])}function O3(e,t){t===void 0&&(t={});let n=E.useContext(h3);n==null&&Ye(!1);let{basename:r}=x3(vy.useViewTransitionState),a=ad(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=el(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=el(n.nextLocation.pathname,r)||n.nextLocation.pathname;return yy(a.pathname,l)!=null||yy(a.pathname,i)!=null}/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const w3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mE=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */var A3={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.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const _3=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...o},u)=>E.createElement("svg",{ref:u,...A3,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mE("lucide",a),...o},[...l.map(([s,f])=>E.createElement(s,f)),...Array.isArray(i)?i:[i]]));/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const $e=(e,t)=>{const n=E.forwardRef(({className:r,...a},i)=>E.createElement(_3,{ref:i,iconNode:t,className:mE(`lucide-${w3(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const E3=$e("Battery",[["rect",{width:"16",height:"10",x:"2",y:"7",rx:"2",ry:"2",key:"1w10f2"}],["line",{x1:"22",x2:"22",y1:"11",y2:"13",key:"4dh1rd"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const T3=$e("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const eu=$e("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const vE=$e("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const gy=$e("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
+ * @license lucide-react v0.400.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("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const N3=$e("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const M3=$e("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const C3=$e("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const $3=$e("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
+ * @license lucide-react v0.400.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("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const P3=$e("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const D3=$e("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const R3=$e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const z3=$e("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const B3=$e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const L3=$e("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const U3=$e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const k3=$e("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const I3=$e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const H3=$e("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
+ * @license lucide-react v0.400.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("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const G3=$e("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const Qv=$e("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const Y3=$e("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const X3=$e("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
+ * @license lucide-react v0.400.0 - ISC
+ *
+ * This source code is licensed under the ISC license.
+ * See the LICENSE file in the root directory of this source tree.
+ */const bE=$e("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);function xE(e,t){return function(){return e.apply(t,arguments)}}const{toString:V3}=Object.prototype,{getPrototypeOf:tl}=Object,{iterator:Fu,toStringTag:SE}=Symbol,Dc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),tu=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Dc(n,t))return!0;n=tl(n)}return!1},K3=(e,t)=>e!=null&&tu(e,t)?e[t]:void 0,Zv=(e=>t=>{const n=V3.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dn=e=>(e=e.toLowerCase(),t=>Zv(t)===e),id=e=>t=>typeof t===e,{isArray:Ga}=Array,nl=id("undefined");function Rl(e){return e!==null&&!nl(e)&&e.constructor!==null&&!nl(e.constructor)&&qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const OE=Dn("ArrayBuffer");function F3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&OE(e.buffer),t}const W3=id("string"),qt=id("function"),wE=id("number"),zl=e=>e!==null&&typeof e=="object",Q3=e=>e===!0||e===!1,ec=e=>{if(!zl(e))return!1;const t=tl(e);return(t===null||t===Object.prototype||tl(t)===null)&&!tu(e,SE)&&!tu(e,Fu)},Z3=e=>{if(!zl(e)||Rl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},J3=Dn("Date"),e4=Dn("File"),t4=e=>!!(e&&typeof e.uri<"u"),n4=e=>e&&typeof e.getParts<"u",r4=Dn("Blob"),a4=Dn("FileList"),i4=e=>zl(e)&&qt(e.pipe);function l4(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qb=l4(),Zb=typeof Qb.FormData<"u"?Qb.FormData:void 0,o4=e=>{if(!e)return!1;if(Zb&&e instanceof Zb)return!0;const t=tl(e);if(!t||t===Object.prototype||!qt(e.append))return!1;const n=Zv(e);return n==="formdata"||n==="object"&&qt(e.toString)&&e.toString()==="[object FormData]"},u4=Dn("URLSearchParams"),[s4,c4,f4,d4]=["ReadableStream","Request","Response","Headers"].map(Dn),h4=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wu(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Ga(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const _a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_E=e=>!nl(e)&&e!==_a;function by(...e){const{caseless:t,skipUndefined:n}=_E(this)&&this||{},r={},a=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const o=t&&typeof l=="string"&&AE(r,l)||l,u=Dc(r,o)?r[o]:void 0;ec(u)&&ec(i)?r[o]=by(u,i):ec(i)?r[o]=by({},i):Ga(i)?r[o]=i.slice():(!n||!nl(i))&&(r[o]=i)};for(let i=0,l=e.length;i(Wu(t,(a,i)=>{n&&qt(a)?Object.defineProperty(e,i,{__proto__:null,value:xE(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),y4=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),m4=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},v4=(e,t,n,r)=>{let a,i,l;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)l=a[i],(!r||r(l,e,t))&&!o[l]&&(t[l]=e[l],o[l]=!0);e=n!==!1&&tl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},g4=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},b4=e=>{if(!e)return null;if(Ga(e))return e;let t=e.length;if(!wE(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},x4=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tl(Uint8Array)),S4=(e,t)=>{const r=(e&&e[Fu]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},O4=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},w4=Dn("HTMLFormElement"),A4=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),{propertyIsEnumerable:_4}=Object.prototype,E4=Dn("RegExp"),EE=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Wu(n,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(r[i]=l||a)}),Object.defineProperties(e,r)},T4=e=>{EE(e,(t,n)=>{if(qt(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(qt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},j4=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return Ga(e)?r(e):r(String(e).split(t)),n},N4=()=>{},M4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function C4(e){return!!(e&&qt(e.append)&&e[SE]==="FormData"&&e[Fu])}const $4=e=>{const t=new WeakSet,n=r=>{if(zl(r)){if(t.has(r))return;if(Rl(r))return r;if(!("toJSON"in r)){t.add(r);const a=Ga(r)?[]:{};return Wu(r,(i,l)=>{const o=n(i);!nl(o)&&(a[l]=o)}),t.delete(r),a}}return r};return n(e)},P4=Dn("AsyncFunction"),D4=e=>e&&(zl(e)||qt(e))&&qt(e.then)&&qt(e.catch),TE=((e,t)=>e?setImmediate:t?((n,r)=>(_a.addEventListener("message",({source:a,data:i})=>{a===_a&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),_a.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qt(_a.postMessage)),R4=typeof queueMicrotask<"u"?queueMicrotask.bind(_a):typeof process<"u"&&process.nextTick||TE,jE=e=>e!=null&&qt(e[Fu]),z4=e=>e!=null&&tu(e,Fu)&&jE(e),j={isArray:Ga,isArrayBuffer:OE,isBuffer:Rl,isFormData:o4,isArrayBufferView:F3,isString:W3,isNumber:wE,isBoolean:Q3,isObject:zl,isPlainObject:ec,isEmptyObject:Z3,isReadableStream:s4,isRequest:c4,isResponse:f4,isHeaders:d4,isUndefined:nl,isDate:J3,isFile:e4,isReactNativeBlob:t4,isReactNative:n4,isBlob:r4,isRegExp:E4,isFunction:qt,isStream:i4,isURLSearchParams:u4,isTypedArray:x4,isFileList:a4,forEach:Wu,merge:by,extend:p4,trim:h4,stripBOM:y4,inherits:m4,toFlatObject:v4,kindOf:Zv,kindOfTest:Dn,endsWith:g4,toArray:b4,forEachEntry:S4,matchAll:O4,isHTMLForm:w4,hasOwnProperty:Dc,hasOwnProp:Dc,hasOwnInPrototypeChain:tu,getSafeProp:K3,reduceDescriptors:EE,freezeMethods:T4,toObjectSet:j4,toCamelCase:A4,noop:N4,toFiniteNumber:M4,findKey:AE,global:_a,isContextDefined:_E,isSpecCompliantForm:C4,toJSONObject:$4,isAsyncFn:P4,isThenable:D4,setImmediate:TE,asap:R4,isIterable:jE,isSafeIterable:z4},B4=j.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"]),L4=e=>{const t={};let n,r,a;return e&&e.split(`
+`).forEach(function(l){a=l.indexOf(":"),n=l.substring(0,a).trim().toLowerCase(),r=l.substring(a+1).trim(),!(!n||t[n]&&B4[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function U4(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const k4=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),I4=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Jv(e,t){return j.isArray(e)?e.map(n=>Jv(n,t)):U4(String(e).replace(t,""))}const H4=e=>Jv(e,k4),q4=e=>Jv(e,I4);function NE(e){const t=Object.create(null);return j.forEach(e.toJSON(),(n,r)=>{t[r]=q4(n)}),t}const Jb=Symbol("internals");function no(e){return e&&String(e).trim().toLowerCase()}function tc(e){return e===!1||e==null?e:j.isArray(e)?e.map(tc):H4(String(e))}function G4(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Y4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Lh(e,t,n,r,a){if(j.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!j.isString(t)){if(j.isString(r))return t.indexOf(r)!==-1;if(j.isRegExp(r))return r.test(t)}}function X4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function V4(e,t){const n=j.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,l){return this[r].call(this,t,a,i,l)},configurable:!0})})}let Mt=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,u,s){const f=no(u);if(!f)return;const c=j.findKey(a,f);(!c||a[c]===void 0||s===!0||s===void 0&&a[c]!==!1)&&(a[c||u]=tc(o))}const l=(o,u)=>j.forEach(o,(s,f)=>i(s,f,u));if(j.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(j.isString(t)&&(t=t.trim())&&!Y4(t))l(L4(t),n);else if(j.isObject(t)&&j.isSafeIterable(t)){let o=Object.create(null),u,s;for(const f of t){if(!j.isArray(f))throw new TypeError("Object iterator must return a key-value pair");s=f[0],j.hasOwnProp(o,s)?(u=o[s],o[s]=j.isArray(u)?[...u,f[1]]:[u,f[1]]):o[s]=f[1]}l(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=no(t),t){const r=j.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return G4(a);if(j.isFunction(n))return n.call(this,a,r);if(j.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=no(t),t){const r=j.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Lh(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=no(l),l){const o=j.findKey(r,l);o&&(!n||Lh(r,r[o],o,n))&&(delete r[o],a=!0)}}return j.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||Lh(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return j.forEach(this,(a,i)=>{const l=j.findKey(r,i);if(l){n[l]=tc(a),delete n[i];return}const o=t?X4(i):String(i).trim();o!==i&&delete n[i],n[o]=tc(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return j.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&j.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
+`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[Jb]=this[Jb]={accessors:{}}).accessors,a=this.prototype;function i(l){const o=no(l);r[o]||(V4(a,l),r[o]=!0)}return j.isArray(t)?t.forEach(i):i(t),this}};Mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors(Mt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});j.freezeMethods(Mt);const K4="[REDACTED ****]";function F4(e){if(j.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(j.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function W4(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||j.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof Mt&&(i=i.toJSON()),r.push(i);let l;if(j.isArray(i))l=[],i.forEach((o,u)=>{const s=a(o);j.isUndefined(s)||(l[u]=s)});else{if(!j.isPlainObject(i)&&F4(i))return r.pop(),i;l=Object.create(null);for(const[o,u]of Object.entries(i)){const s=n.has(o.toLowerCase())?K4:a(u);j.isUndefined(s)||(l[o]=s)}}return r.pop(),l};return a(e)}let X=class ME extends Error{static from(t,n,r,a,i,l){const o=new ME(t.message,n||t.code,r,a,i);return Object.defineProperty(o,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),l&&Object.assign(o,l),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&j.hasOwnProp(t,"redact")?t.redact:void 0,r=j.isArray(n)&&n.length>0?W4(t,n):j.toJSONObject(t);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:r,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";X.ERR_BAD_OPTION="ERR_BAD_OPTION";X.ECONNABORTED="ECONNABORTED";X.ETIMEDOUT="ETIMEDOUT";X.ECONNREFUSED="ECONNREFUSED";X.ERR_NETWORK="ERR_NETWORK";X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";X.ERR_DEPRECATED="ERR_DEPRECATED";X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";X.ERR_BAD_REQUEST="ERR_BAD_REQUEST";X.ERR_CANCELED="ERR_CANCELED";X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";X.ERR_INVALID_URL="ERR_INVALID_URL";X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Q4=null,CE=100;function xy(e){return j.isPlainObject(e)||j.isArray(e)}function $E(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function Uh(e,t,n){return e?e.concat(t).map(function(a,i){return a=$E(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function Z4(e){return j.isArray(e)&&!e.some(xy)}const J4=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function ld(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!j.isUndefined(g[y])});const r=n.metaTokens,a=n.visitor||x,i=n.dots,l=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,u=n.maxDepth===void 0?CE:n.maxDepth,s=o&&j.isSpecCompliantForm(t),f=[];if(!j.isFunction(a))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(j.isDate(p))return p.toISOString();if(j.isBoolean(p))return p.toString();if(!s&&j.isBlob(p))throw new X("Blob is not supported. Use a Buffer instead.");if(j.isArrayBuffer(p)||j.isTypedArray(p)){if(s&&typeof o=="function")return new o([p]);if(typeof Buffer<"u")return Buffer.from(p);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return p}function d(p){if(p>u)throw new X("Object is too deeply nested ("+p+" levels). Max depth: "+u,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(p,y){if(u===1/0)return JSON.stringify(p);const g=[];return JSON.stringify(p,function(S,w){if(!j.isObject(w))return w;for(;g.length&&g[g.length-1]!==this;)g.pop();return g.push(w),d(y+g.length-1),w})}function x(p,y,g){let O=p;if(j.isReactNative(t)&&j.isReactNativeBlob(p))return t.append(Uh(g,y,i),c(p)),!1;if(p&&!g&&typeof p=="object"){if(j.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=h(p,1);else if(j.isArray(p)&&Z4(p)||(j.isFileList(p)||j.endsWith(y,"[]"))&&(O=j.toArray(p)))return y=$E(y),O.forEach(function(w,A){!(j.isUndefined(w)||w===null)&&t.append(l===!0?Uh([y],A,i):l===null?y:y+"[]",c(w))}),!1}return xy(p)?!0:(t.append(Uh(g,y,i),c(p)),!1)}const b=Object.assign(J4,{defaultVisitor:x,convertValue:c,isVisitable:xy});function m(p,y,g=0){if(!j.isUndefined(p)){if(d(g),f.indexOf(p)!==-1)throw new Error("Circular reference detected in "+y.join("."));f.push(p),j.forEach(p,function(S,w){(!(j.isUndefined(S)||S===null)&&a.call(t,S,j.isString(w)?w.trim():w,y,b))===!0&&m(S,y?y.concat(w):[w],g+1)}),f.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return m(e),t}function ex(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function eg(e,t){this._pairs=[],e&&ld(e,this,t)}const PE=eg.prototype;PE.append=function(t,n){this._pairs.push([t,n])};PE.toString=function(t){const n=t?r=>t.call(this,r,ex):ex;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function eP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function DE(e,t,n){if(!t)return e;e=e||"";const r=j.isFunction(n)?{serialize:n}:n,a=j.getSafeProp(r,"encode")||eP,i=j.getSafeProp(r,"serialize");let l;if(i?l=i(t,r):l=j.isURLSearchParams(t)?t.toString():new eg(t,r).toString(a),l){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class tx{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){j.forEach(this.handlers,function(r){r!==null&&t(r)})}}const tg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},tP=typeof URLSearchParams<"u"?URLSearchParams:eg,nP=typeof FormData<"u"?FormData:null,rP=typeof Blob<"u"?Blob:null,aP={isBrowser:!0,classes:{URLSearchParams:tP,FormData:nP,Blob:rP},protocols:["http","https","file","blob","url","data"]},ng=typeof window<"u"&&typeof document<"u",Sy=typeof navigator=="object"&&navigator||void 0,iP=ng&&(!Sy||["ReactNative","NativeScript","NS"].indexOf(Sy.product)<0),lP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oP=ng&&window.location.href||"http://localhost",uP=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ng,hasStandardBrowserEnv:iP,hasStandardBrowserWebWorkerEnv:lP,navigator:Sy,origin:oP},Symbol.toStringTag,{value:"Module"})),Ot={...uP,...aP};function sP(e,t){return ld(e,new Ot.classes.URLSearchParams,{visitor:function(n,r,a,i){return Ot.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const nx=CE;function RE(e){if(e>nx)throw new X("FormData field is too deeply nested ("+e+" levels). Max depth: "+nx,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function cP(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)RE(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function fP(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r=n.length;return l=!l&&j.isArray(a)?a.length:l,u?(j.hasOwnProp(a,l)?a[l]=j.isArray(a[l])?a[l].concat(r):[a[l],r]:a[l]=r,!o):((!j.hasOwnProp(a,l)||!j.isObject(a[l]))&&(a[l]=[]),t(n,r,a[l],i)&&j.isArray(a[l])&&(a[l]=fP(a[l])),!o)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,a)=>{t(cP(r),a,n,0)}),n}return null}const si=(e,t)=>e!=null&&j.hasOwnProp(e,t)?e[t]:void 0;function dP(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qu={transitional:tg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=j.isObject(t);if(i&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return a?JSON.stringify(zE(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const u=si(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return sP(t,u).toString();if((o=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=si(this,"env"),f=s&&s.FormData;return ld(o?{"files[]":t}:t,f&&new f,u)}}return i||a?(n.setContentType("application/json",!1),dP(t)):t}],transformResponse:[function(t){const n=si(this,"transitional")||Qu.transitional,r=n&&n.forcedJSONParsing,a=si(this,"responseType"),i=a==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,si(this,"parseReviver"))}catch(u){if(o)throw u.name==="SyntaxError"?X.from(u,X.ERR_BAD_RESPONSE,this,null,si(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch","query"],e=>{Qu.headers[e]={}});function kh(e,t){const n=this||Qu,r=t||n,a=Mt.from(r.headers);let i=r.data;return j.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function BE(e){return!!(e&&e.__CANCEL__)}let Zu=class extends X{constructor(t,n,r){super(t??"canceled",X.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function LE(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new X("Request failed with status code "+n.status,n.status>=400&&n.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,n.config,n.request,n))}function hP(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function pP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(u){const s=Date.now(),f=r[i];l||(l=s),n[a]=u,r[a]=s;let c=i,d=0;for(;c!==a;)d+=n[c++],c=c%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-l{n=f,a=null,i&&(clearTimeout(i),i=null),e(...s)};return[(...s)=>{const f=Date.now(),c=f-n;c>=r?l(s,f):(a=s,i||(i=setTimeout(()=>{i=null,l(a)},r-c)))},()=>a&&l(a)]}const Rc=(e,t,n=3)=>{let r=0;const a=pP(50,250);return yP(i=>{if(!i||typeof i.loaded!="number")return;const l=i.loaded,o=i.lengthComputable?i.total:void 0,u=o!=null?Math.min(l,o):l,s=Math.max(0,u-r),f=a(s);r=Math.max(r,u);const c={loaded:u,total:o,progress:o?u/o:void 0,bytes:s,rate:f||void 0,estimated:f&&o?(o-u)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(c)},n)},rx=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ax=e=>(...t)=>j.asap(()=>e(...t)),mP=Ot.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ot.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ot.origin),Ot.navigator&&/(msie|trident)/i.test(Ot.navigator.userAgent)):()=>!0,vP=Ot.hasStandardBrowserEnv?{write(e,t,n,r,a,i,l){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];j.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),j.isString(r)&&o.push(`path=${r}`),j.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),j.isString(l)&&o.push(`SameSite=${l}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof Mt?{...e}:e;function Ya(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,c,d,h){return j.isPlainObject(f)&&j.isPlainObject(c)?j.merge.call({caseless:h},f,c):j.isPlainObject(c)?j.merge({},c):j.isArray(c)?c.slice():c}function a(f,c,d,h){if(j.isUndefined(c)){if(!j.isUndefined(f))return r(void 0,f,d,h)}else return r(f,c,d,h)}function i(f,c){if(!j.isUndefined(c))return r(void 0,c)}function l(f,c){if(j.isUndefined(c)){if(!j.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function o(f){const c=j.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!j.isUndefined(c))if(j.isPlainObject(c)){if(j.hasOwnProp(c,f))return c[f]}else return;const d=j.hasOwnProp(e,"transitional")?e.transitional:void 0;if(j.isPlainObject(d)&&j.hasOwnProp(d,f))return d[f]}function u(f,c,d){if(j.hasOwnProp(t,d))return r(f,c);if(j.hasOwnProp(e,d))return r(void 0,f)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:u,headers:(f,c,d)=>a(lx(f),lx(c),d,!0)};return j.forEach(Object.keys({...e,...t}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=j.hasOwnProp(s,c)?s[c]:a,h=j.hasOwnProp(e,c)?e[c]:void 0,x=j.hasOwnProp(t,c)?t[c]:void 0,b=d(h,x,c);j.isUndefined(b)&&d!==u||(n[c]=b)}),j.hasOwnProp(t,"validateStatus")&&j.isUndefined(t.validateStatus)&&o("validateStatusUndefinedResolves")===!1&&(j.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const AP=["content-type","content-length"];function _P(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,a])=>{AP.includes(r.toLowerCase())&&e.set(r,a)})}const EP=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function kE(e){const t=Ya({},e),n=d=>j.hasOwnProp(t,d)?t[d]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let o=n("headers");const u=n("auth"),s=n("baseURL"),f=n("allowAbsoluteUrls"),c=n("url");if(t.headers=o=Mt.from(o),t.url=DE(UE(s,c,f,t),n("params"),n("paramsSerializer")),u){const d=j.getSafeProp(u,"username")||"",h=j.getSafeProp(u,"password")||"";try{o.set("Authorization","Basic "+btoa(d+":"+(h?EP(h):"")))}catch(x){throw X.from(x,X.ERR_BAD_OPTION_VALUE,e)}}if(j.isFormData(r)&&(Ot.hasStandardBrowserEnv||Ot.hasStandardBrowserWebWorkerEnv||j.isReactNative(r)?o.setContentType(void 0):j.isFunction(r.getHeaders)&&_P(o,r.getHeaders(),n("formDataHeaderPolicy"))),Ot.hasStandardBrowserEnv&&(j.isFunction(a)&&(a=a(t)),a===!0||a==null&&mP(t.url))){const h=i&&l&&vP.read(l);h&&o.set(i,h)}return t}const TP=typeof XMLHttpRequest<"u",jP=TP&&function(e){return new Promise(function(n,r){const a=kE(e);let i=a.data;const l=Mt.from(a.headers).normalize();let{responseType:o,onUploadProgress:u,onDownloadProgress:s}=a,f,c,d,h,x;function b(){h&&h(),x&&x(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(a.method.toUpperCase(),a.url,!0),m.timeout=a.timeout;function p(){if(!m)return;const g=Mt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),S={data:!o||o==="text"||o==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:g,config:e,request:m};LE(function(A){n(A),b()},function(A){r(A),b()},S),m=null}"onloadend"in m?m.onloadend=p:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(p)},m.onabort=function(){m&&(r(new X("Request aborted",X.ECONNABORTED,e,m)),b(),m=null)},m.onerror=function(O){const S=O&&O.message?O.message:"Network Error",w=new X(S,X.ERR_NETWORK,e,m);w.event=O||null,r(w),b(),m=null},m.ontimeout=function(){let O=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const S=a.transitional||tg;a.timeoutErrorMessage&&(O=a.timeoutErrorMessage),r(new X(O,S.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,m)),b(),m=null},i===void 0&&l.setContentType(null),"setRequestHeader"in m&&j.forEach(NE(l),function(O,S){m.setRequestHeader(S,O)}),j.isUndefined(a.withCredentials)||(m.withCredentials=!!a.withCredentials),o&&o!=="json"&&(m.responseType=a.responseType),s&&([d,x]=Rc(s,!0),m.addEventListener("progress",d)),u&&m.upload&&([c,h]=Rc(u),m.upload.addEventListener("progress",c),m.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(f=g=>{m&&(r(!g||g.type?new Zu(null,e,m):g),m.abort(),b(),m=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const y=hP(a.url);if(y&&!Ot.protocols.includes(y)){r(new X("Unsupported protocol "+y+":",X.ERR_BAD_REQUEST,e)),b();return}m.send(i||null)})},NP=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(u){if(!r){r=!0,l();const s=u instanceof Error?u:this.reason;n.abort(s instanceof X?s:new Zu(s instanceof Error?s.message:s))}};let i=t&&setTimeout(()=>{i=null,a(new X(`timeout of ${t}ms exceeded`,X.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a,{once:!0}));const{signal:o}=n;return o.unsubscribe=()=>j.asap(l),o},MP=function*(e,t){let n=e.byteLength;if(n{const a=CP(e,t);let i=0,l,o=u=>{l||(l=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:s,value:f}=await a.next();if(s){o(),u.close();return}let c=f.byteLength;if(n){let d=i+=c;n(d)}u.enqueue(new Uint8Array(f))}catch(s){throw o(s),s}},cancel(u){return o(u),a.return()}},{highWaterMark:2})},zc=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,PP=(e,t,n)=>t+2h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);s>=0&&(r.charCodeAt(s)===61?(u++,s--):f(s)&&(u++,s-=3)),u===1&&s>=0&&(r.charCodeAt(s)===61||f(s))&&u++;const d=Math.floor(l/4)*3-(u||0);return d>0?d:0}let i=0;for(let l=0,o=r.length;l=55296&&u<=56319&&l+1=56320&&s<=57343?(i+=4,l++):i+=3}else i+=3}return i}const rg="1.18.1",ux=64*1024,{isFunction:As}=j,RP=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),sx=e=>{if(!j.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},cx=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zP=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},BP=e=>{const t=j.global!==void 0&&j.global!==null?j.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=j.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:l}=e,o=a?As(a):typeof fetch=="function",u=As(i),s=As(l);if(!o)return!1;const f=o&&As(n),c=o&&(typeof r=="function"?(p=>y=>p.encode(y))(new r):async p=>new Uint8Array(await new i(p).arrayBuffer())),d=u&&f&&cx(()=>{let p=!1;const y=new i(Ot.origin,{body:new n,method:"POST",get duplex(){return p=!0,"half"}}),g=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),p&&!g}),h=s&&f&&cx(()=>j.isReadableStream(new l("").body)),x={stream:h&&(p=>p.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!x[p]&&(x[p]=(y,g)=>{let O=y&&y[p];if(O)return O.call(y);throw new X(`Response type '${p}' is not supported`,X.ERR_NOT_SUPPORT,g)})});const b=async p=>{if(p==null)return 0;if(j.isBlob(p))return p.size;if(j.isSpecCompliantForm(p))return(await new i(Ot.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(j.isArrayBufferView(p)||j.isArrayBuffer(p))return p.byteLength;if(j.isURLSearchParams(p)&&(p=p+""),j.isString(p))return(await c(p)).byteLength},m=async(p,y)=>{const g=j.toFiniteNumber(p.getContentLength());return g??b(y)};return async p=>{let{url:y,method:g,data:O,signal:S,cancelToken:w,timeout:A,onDownloadProgress:_,onUploadProgress:T,responseType:$,headers:P,withCredentials:M="same-origin",fetchOptions:k,maxContentLength:z,maxBodyLength:B}=kE(p);const N=j.isNumber(z)&&z>-1,R=j.isNumber(B)&&B>-1,D=ne=>j.hasOwnProp(p,ne)?p[ne]:void 0;let H=a||fetch;$=$?($+"").toLowerCase():"text";let q=NP([S,w&&w.toAbortSignal()],A),K=null;const G=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let Q,ie=null;const Ae=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,p,K);try{let ne;const Qe=D("auth");if(Qe){const W=j.getSafeProp(Qe,"username")||"",_e=j.getSafeProp(Qe,"password")||"";ne={username:W,password:_e}}if(zP(y)){const W=new URL(y,Ot.origin);if(!ne&&(W.username||W.password)){const _e=sx(W.username),vt=sx(W.password);ne={username:_e,password:vt}}(W.username||W.password)&&(W.username="",W.password="",y=W.href)}if(ne&&(P.delete("authorization"),P.set("Authorization","Basic "+btoa(RP((ne.username||"")+":"+(ne.password||""))))),N&&typeof y=="string"&&y.startsWith("data:")&&DP(y)>z)throw new X("maxContentLength size of "+z+" exceeded",X.ERR_BAD_RESPONSE,p,K);if(R&&g!=="get"&&g!=="head"){const W=await b(O);if(typeof W=="number"&&isFinite(W)&&(Q=W,W>B))throw Ae()}const at=R&&(j.isReadableStream(O)||j.isStream(O)),V=(W,_e,vt)=>ox(W,ux,zt=>{if(R&&zt>B)throw ie=Ae();_e&&_e(zt)},vt);if(d&&g!=="get"&&g!=="head"&&(T||at)){if(Q=Q??await m(P,O),Q!==0||at){let W=new i(y,{method:"POST",body:O,duplex:"half"}),_e;if(j.isFormData(O)&&(_e=W.headers.get("content-type"))&&P.setContentType(_e),W.body){const[vt,zt]=T&&rx(Q,Rc(ax(T)))||[];O=V(W.body,vt,zt)}}}else if(at&&!u&&f&&g!=="get"&&g!=="head")O=V(O);else if(at&&u&&!d&&g!=="get"&&g!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,p,K);j.isString(M)||(M=M?"include":"omit");const ee=u&&"credentials"in i.prototype;if(j.isFormData(O)){const W=P.getContentType();W&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&P.delete("content-type")}P.set("User-Agent","axios/"+rg,!1);const re={...k,signal:q,method:g.toUpperCase(),headers:NE(P.normalize()),body:O,duplex:"half",credentials:ee?M:void 0};K=u&&new i(y,re);let I=await(u?H(K,k):H(y,re));const Re=Mt.from(I.headers);if(N){const W=j.toFiniteNumber(Re.getContentLength());if(W!=null&&W>z)throw new X("maxContentLength size of "+z+" exceeded",X.ERR_BAD_RESPONSE,p,K)}const oe=h&&($==="stream"||$==="response");if(h&&I.body&&(_||N||oe&&G)){const W={};["status","statusText","headers"].forEach(Vt=>{W[Vt]=I[Vt]});const _e=j.toFiniteNumber(Re.getContentLength()),[vt,zt]=_&&rx(_e,Rc(ax(_),!0))||[];let ya=0;const Fn=Vt=>{if(N&&(ya=Vt,ya>z))throw new X("maxContentLength size of "+z+" exceeded",X.ERR_BAD_RESPONSE,p,K);vt&&vt(Vt)};I=new l(ox(I.body,ux,Fn,()=>{zt&&zt(),G&&G()}),W)}$=$||"text";let xe=await x[j.findKey(x,$)||"text"](I,p);if(N&&!h&&!oe){let W;if(xe!=null&&(typeof xe.byteLength=="number"?W=xe.byteLength:typeof xe.size=="number"?W=xe.size:typeof xe=="string"&&(W=typeof r=="function"?new r().encode(xe).byteLength:xe.length)),typeof W=="number"&&W>z)throw new X("maxContentLength size of "+z+" exceeded",X.ERR_BAD_RESPONSE,p,K)}return!oe&&G&&G(),await new Promise((W,_e)=>{LE(W,_e,{data:xe,headers:Mt.from(I.headers),status:I.status,statusText:I.statusText,config:p,request:K})})}catch(ne){if(G&&G(),q&&q.aborted&&q.reason instanceof X){const Qe=q.reason;throw Qe.config=p,K&&(Qe.request=K),ne!==Qe&&Object.defineProperty(Qe,"cause",{__proto__:null,value:ne,writable:!0,enumerable:!1,configurable:!0}),Qe}if(ie)throw K&&!ie.request&&(ie.request=K),ie;if(ne instanceof X)throw K&&!ne.request&&(ne.request=K),ne;if(ne&&ne.name==="TypeError"&&/Load failed|fetch/i.test(ne.message)){const Qe=new X("Network Error",X.ERR_NETWORK,p,K,ne&&ne.response);throw Object.defineProperty(Qe,"cause",{__proto__:null,value:ne.cause||ne,writable:!0,enumerable:!1,configurable:!0}),Qe}throw X.from(ne,ne&&ne.code,p,K,ne&&ne.response)}}},LP=new Map,IE=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let l=i.length,o=l,u,s,f=LP;for(;o--;)u=i[o],s=f.get(u),s===void 0&&f.set(u,s=o?new Map:BP(t)),f=s;return s};IE();const ag={http:Q4,xhr:jP,fetch:{get:IE}};j.forEach(ag,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const fx=e=>`- ${e}`,UP=e=>j.isFunction(e)||e===null||e===!1;function kP(e,t){e=j.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let l=0;l`adapter ${u} `+(s===!1?"is not supported by the environment":"is not available in the build"));let o=n?l.length>1?`since :
+`+l.map(fx).join(`
+`):" "+fx(l[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+o,X.ERR_NOT_SUPPORT)}return a}const HE={getAdapter:kP,adapters:ag};function Ih(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zu(null,e)}function dx(e){return Ih(e),e.headers=Mt.from(e.headers),e.data=kh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),HE.getAdapter(e.adapter||Qu.adapter,e)(e).then(function(r){Ih(e),e.response=r;try{r.data=kh.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Mt.from(r.headers),r},function(r){if(!BE(r)&&(Ih(e),r&&r.response)){e.response=r.response;try{r.response.data=kh.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Mt.from(r.response.headers)}return Promise.reject(r)})}const od={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{od[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const hx={};od.transitional=function(t,n,r){function a(i,l){return"[Axios v"+rg+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,o)=>{if(t===!1)throw new X(a(l," has been removed"+(n?" in "+n:"")),X.ERR_DEPRECATED);return n&&!hx[l]&&(hx[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,o):!0}};od.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function IP(e,t,n){if(typeof e!="object"||e===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],l=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(l){const o=e[i],u=o===void 0||l(o,i,e);if(u!==!0)throw new X("option "+i+" must be "+u,X.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new X("Unknown option "+i,X.ERR_BAD_OPTION)}}const nc={assertOptions:IP,validators:od},Et=nc.validators;let Ra=class{constructor(t){this.defaults=t||{},this.interceptors={request:new tx,response:new tx}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const l=a.stack.indexOf(`
+`);return l===-1?"":a.stack.slice(l+1)})();try{if(!r.stack)r.stack=i;else if(i){const l=i.indexOf(`
+`),o=l===-1?-1:i.indexOf(`
+`,l+1),u=o===-1?"":i.slice(o+1);String(r.stack).endsWith(u)||(r.stack+=`
+`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ya(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&nc.assertOptions(r,{silentJSONParsing:Et.transitional(Et.boolean),forcedJSONParsing:Et.transitional(Et.boolean),clarifyTimeoutError:Et.transitional(Et.boolean),legacyInterceptorReqResOrdering:Et.transitional(Et.boolean),advertiseZstdAcceptEncoding:Et.transitional(Et.boolean),validateStatusUndefinedResolves:Et.transitional(Et.boolean)},!1),a!=null&&(j.isFunction(a)?n.paramsSerializer={serialize:a}:nc.assertOptions(a,{encode:Et.function,serialize:Et.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),nc.assertOptions(n,{baseUrl:Et.spelling("baseURL"),withXsrfToken:Et.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&j.merge(i.common,i[n.method]);i&&j.forEach(["delete","get","head","post","put","patch","query","common"],x=>{delete i[x]}),n.headers=Mt.concat(l,i);const o=[];let u=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;u=u&&b.synchronous;const m=n.transitional||tg;m&&m.legacyInterceptorReqResOrdering?o.unshift(b.fulfilled,b.rejected):o.push(b.fulfilled,b.rejected)});const s=[];this.interceptors.response.forEach(function(b){s.push(b.fulfilled,b.rejected)});let f,c=0,d;if(!u){const x=[dx.bind(this),void 0];for(x.unshift(...o),x.push(...s),d=x.length,f=Promise.resolve(n);c{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(o=>{r.subscribe(o),i=o}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,o){r.reason||(r.reason=new Zu(i,l,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new qE(function(a){t=a}),cancel:t}}};function qP(e){return function(n){return e.apply(null,n)}}function GP(e){return j.isObject(e)&&e.isAxiosError===!0}const Oy={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Oy).forEach(([e,t])=>{Oy[t]=e});function GE(e){const t=new Ra(e),n=xE(Ra.prototype.request,t);return j.extend(n,Ra.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return GE(Ya(e,a))},n}const Ge=GE(Qu);Ge.Axios=Ra;Ge.CanceledError=Zu;Ge.CancelToken=HP;Ge.isCancel=BE;Ge.VERSION=rg;Ge.toFormData=ld;Ge.AxiosError=X;Ge.Cancel=Ge.CanceledError;Ge.all=function(t){return Promise.all(t)};Ge.spread=qP;Ge.isAxiosError=GP;Ge.mergeConfig=Ya;Ge.AxiosHeaders=Mt;Ge.formToJSON=e=>zE(j.isHTMLForm(e)?new FormData(e):e);Ge.getAdapter=HE.getAdapter;Ge.HttpStatusCode=Oy;Ge.default=Ge;const{Axios:Qne,AxiosError:Zne,CanceledError:Jne,isCancel:ere,CancelToken:tre,VERSION:nre,all:rre,Cancel:are,isAxiosError:ire,spread:lre,toFormData:ore,AxiosHeaders:ure,HttpStatusCode:sre,formToJSON:cre,getAdapter:fre,mergeConfig:dre,create:hre}=Ge;function YP(){const[e,t]=E.useState(""),[n,r]=E.useState(""),[a,i]=E.useState(""),[l,o]=E.useState(!1),u=Wv(),s=async f=>{var c,d;f.preventDefault(),o(!0),i("");try{const h=await Ge.post("/api/fa/auth/login",{username:e,password:n});localStorage.setItem("fa_token",h.data.token),localStorage.setItem("fa_user",JSON.stringify({username:h.data.username,role:h.data.role,workstationCode:h.data.workstationCode})),u("/dashboard")}catch(h){i(((d=(c=h.response)==null?void 0:c.data)==null?void 0:d.error)||"로그인 실패")}finally{o(!1)}};return v.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center",children:v.jsxs("div",{className:"bg-slate-800 rounded-xl p-8 w-96 border border-slate-700",children:[v.jsxs("div",{className:"text-center mb-8",children:[v.jsx("div",{className:"text-blue-400 text-3xl font-bold mb-2",children:"GUARDiA FA"}),v.jsx("div",{className:"text-slate-400 text-sm",children:"Factory Automation Platform"}),v.jsx("div",{className:"text-slate-500 text-xs mt-1",children:"e-Paper · QR WIP · MES 통합 플랫폼"})]}),v.jsxs("form",{onSubmit:s,className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm text-slate-300 mb-1",children:"사용자명"}),v.jsx("input",{type:"text",value:e,onChange:f=>t(f.target.value),className:"w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-blue-500",placeholder:"username",required:!0})]}),v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm text-slate-300 mb-1",children:"비밀번호"}),v.jsx("input",{type:"password",value:n,onChange:f=>r(f.target.value),className:"w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-white text-sm focus:outline-none focus:border-blue-500",placeholder:"password",required:!0})]}),a&&v.jsx("div",{className:"text-red-400 text-sm",children:a}),v.jsx("button",{type:"submit",disabled:l,className:"w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-50 text-white rounded-lg py-2.5 text-sm font-medium transition-colors",children:l?"로그인 중...":"로그인"})]}),v.jsx("div",{className:"mt-4 text-xs text-slate-500 text-center",children:"기본 계정: admin / admin123"})]})})}const fe=Ge.create({baseURL:"/api/fa",timeout:15e3});fe.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});fe.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("fa_token"),localStorage.removeItem("fa_user"),window.location.href="/login"),Promise.reject(e)});function XP(){const[e,t]=E.useState({}),[n,r]=E.useState({}),[a,i]=E.useState({}),[l,o]=E.useState({});E.useEffect(()=>{Promise.all([fe.get("/dashboard/overview"),fe.get("/dashboard/oee-summary"),fe.get("/dashboard/andon-summary"),fe.get("/dashboard/epaper-status")]).then(([f,c,d,h])=>{t(f.data),r(c.data),i(d.data),o(h.data)}).catch(console.error)},[]);const u=[{name:"가동률",value:Math.round((n.availability||.92)*100),fill:"#3b82f6"},{name:"성능률",value:Math.round((n.performance||.88)*100),fill:"#10b981"},{name:"품질률",value:Math.round((n.quality||.97)*100),fill:"#f59e0b"}],s=({title:f,value:c,sub:d,color:h})=>v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("div",{className:"text-slate-400 text-sm mb-1",children:f}),v.jsx("div",{className:`text-3xl font-bold ${h||"text-white"}`,children:c??"-"}),d&&v.jsx("div",{className:"text-slate-500 text-xs mt-1",children:d})]});return v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"공장 전체 현황 대시보드"}),v.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[v.jsx(s,{title:"총 작업장",value:e.workstations,color:"text-blue-400",sub:"운영 중"}),v.jsx(s,{title:"오늘 생산 오더",value:e.todayOrders,color:"text-green-400",sub:"건"}),v.jsx(s,{title:"활성 안돈",value:e.activeAndon,color:"text-red-400",sub:"건 대응 필요"}),v.jsx(s,{title:"e-Paper 온라인",value:l.online,color:"text-emerald-400",sub:`전체 ${l.total}대`})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"OEE 지표 (종합 설비 효율)"}),v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsxs("div",{className:"text-center",children:[v.jsxs("div",{className:"text-4xl font-bold text-blue-400",children:[Math.round((n.availability||.92)*(n.performance||.88)*(n.quality||.97)*100),"%"]}),v.jsx("div",{className:"text-slate-500 text-xs mt-1",children:"종합 OEE"})]}),v.jsx("div",{className:"flex-1",children:u.map(f=>v.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[v.jsx("div",{className:"text-xs text-slate-400 w-16",children:f.name}),v.jsx("div",{className:"flex-1 bg-slate-700 rounded-full h-2",children:v.jsx("div",{className:"h-2 rounded-full",style:{width:`${f.value}%`,backgroundColor:f.fill}})}),v.jsxs("div",{className:"text-xs text-slate-300 w-8 text-right",children:[f.value,"%"]})]},f.name))})]})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"e-Paper 디스플레이 현황"}),v.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[v.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-emerald-400",children:l.online||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"온라인"})]}),v.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-slate-400",children:l.offline||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"오프라인"})]}),v.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-yellow-400",children:l.batteryLow||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"배터리 부족"})]}),v.jsxs("div",{className:"bg-slate-700 rounded-lg p-3 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-blue-400",children:l.total||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"전체"})]})]})]})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"안돈 통계 (오늘)"}),v.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-white",children:(a==null?void 0:a.total_today)||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"총 발생"})]}),v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-green-400",children:(a==null?void 0:a.resolved)||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"해결"})]}),v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-red-400",children:(a==null?void 0:a.active)||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"활성"})]}),v.jsxs("div",{className:"text-center",children:[v.jsxs("div",{className:"text-2xl font-bold text-yellow-400",children:[Math.round((a==null?void 0:a.avg_response_time)||0),"초"]}),v.jsx("div",{className:"text-xs text-slate-400",children:"평균 응답시간"})]})]})]})]})}const VP={GREEN:"bg-green-600 border-green-500",YELLOW:"bg-yellow-600 border-yellow-500",RED:"bg-red-600 border-red-500",BLUE:"bg-blue-600 border-blue-500"};function KP(){const[e,t]=E.useState([]);E.useEffect(()=>{fe.get("/workstations/floor-map").then(r=>t(r.data)).catch(console.error)},[]);const n=Array.from(new Set(e.map(r=>r.lineCode||"DEFAULT")));return v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"공장 배치도 (Floor Map)"}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-6 border border-slate-700",children:[v.jsxs("div",{className:"text-sm text-slate-400 mb-4",children:["안돈 상태:",v.jsx("span",{className:"ml-2 px-2 py-0.5 bg-green-600 rounded text-xs",children:"GREEN 정상"}),v.jsx("span",{className:"ml-2 px-2 py-0.5 bg-yellow-600 rounded text-xs",children:"YELLOW 주의"}),v.jsx("span",{className:"ml-2 px-2 py-0.5 bg-red-600 rounded text-xs",children:"RED 긴급"}),v.jsx("span",{className:"ml-2 px-2 py-0.5 bg-blue-600 rounded text-xs",children:"BLUE 도움요청"})]}),n.map(r=>v.jsxs("div",{className:"mb-6",children:[v.jsx("h3",{className:"text-slate-300 text-sm font-medium mb-3 border-b border-slate-700 pb-2",children:r}),v.jsx("div",{className:"flex flex-wrap gap-4",children:e.filter(a=>(a.lineCode||"DEFAULT")===r).map(a=>v.jsxs("div",{className:`border-2 rounded-xl p-4 w-48 ${VP[a.andonStatus]||"bg-slate-700 border-slate-600"}`,children:[v.jsx("div",{className:"font-bold text-white text-sm",children:a.workstationCode}),v.jsx("div",{className:"text-xs text-white/80 mt-1",children:a.workstationName}),v.jsxs("div",{className:"mt-3 space-y-1",children:[v.jsxs("div",{className:"text-xs text-white/70",children:["공정: ",a.processCode]}),v.jsxs("div",{className:"text-xs text-white/70",children:["상태: ",a.status]}),v.jsxs("div",{className:"flex justify-between mt-2",children:[v.jsx("span",{className:"text-xs text-white/70",children:"목표"}),v.jsx("span",{className:"text-xs font-bold text-white",children:a.targetCount||0})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-xs text-white/70",children:"실적"}),v.jsx("span",{className:"text-xs font-bold text-white",children:a.actualCount||0})]}),a.oee&&v.jsxs("div",{className:"mt-2",children:[v.jsxs("div",{className:"flex justify-between text-xs text-white/70 mb-1",children:[v.jsx("span",{children:"OEE"}),v.jsxs("span",{children:[Math.round(a.oee*100),"%"]})]}),v.jsx("div",{className:"bg-white/20 rounded-full h-1.5",children:v.jsx("div",{className:"bg-white h-1.5 rounded-full",style:{width:`${a.oee*100}%`}})})]})]})]},a.id))})]},r)),e.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-8",children:"작업장 데이터가 없습니다."})]})]})}const FP={ONLINE:"text-green-400",OFFLINE:"text-slate-500",UPDATING:"text-yellow-400",ERROR:"text-red-400"};function WP(){const[e,t]=E.useState([]),[n,r]=E.useState({}),[a,i]=E.useState(""),l=()=>{fe.get("/epaper",{params:a?{status:a}:{}}).then(s=>t(s.data)),fe.get("/epaper/dashboard").then(s=>r(s.data))};E.useEffect(()=>{l()},[a]);const o=async s=>{const f=prompt("푸시할 내용 (JSON 형식):");f&&(await fe.post(`/epaper/${s}/push`,{content:f,templateId:"default"}),l())},u=async s=>{await fe.post(`/epaper/${s}/refresh`),alert("갱신 요청 완료")};return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"e-Paper 표시기 관리"}),v.jsx("div",{className:"flex gap-2",children:["","ONLINE","OFFLINE","ERROR"].map(s=>v.jsx("button",{onClick:()=>i(s),className:`px-3 py-1.5 rounded text-xs transition-colors ${a===s?"bg-blue-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:s||"전체"},s))})]}),v.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"전체",value:n.total,color:"text-white"},{label:"온라인",value:n.online,color:"text-green-400"},{label:"오프라인",value:n.offline,color:"text-slate-400"},{label:"배터리 부족",value:n.batteryLow,color:"text-yellow-400"}].map(({label:s,value:f,color:c})=>v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsx("div",{className:`text-2xl font-bold ${c}`,children:f??"-"}),v.jsx("div",{className:"text-xs text-slate-400 mt-1",children:s})]},s))}),v.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"디스플레이 ID"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업장"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"크기/타입"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"배터리"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"신호"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"상태"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"프로토콜"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업"})]})}),v.jsx("tbody",{children:e.map(s=>{var f;return v.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[v.jsx("td",{className:"px-4 py-3 font-mono text-blue-400",children:s.displayId}),v.jsx("td",{className:"px-4 py-3 text-slate-300",children:s.workstationId||"-"}),v.jsxs("td",{className:"px-4 py-3 text-slate-300",children:[s.displaySize," / ",s.displayType]}),v.jsx("td",{className:"px-4 py-3",children:v.jsxs("span",{className:`flex items-center gap-1 ${(s.batteryLevel||0)<20?"text-red-400":"text-green-400"}`,children:[v.jsx(E3,{size:12}),((f=s.batteryLevel)==null?void 0:f.toFixed(0))||0,"%"]})}),v.jsx("td",{className:"px-4 py-3",children:v.jsxs("span",{className:"flex items-center gap-1 text-slate-300",children:[v.jsx(X3,{size:12}),s.signalStrength||"-"," dBm"]})}),v.jsx("td",{className:"px-4 py-3",children:v.jsx("span",{className:`font-medium ${FP[s.status]||"text-slate-400"}`,children:s.status})}),v.jsx("td",{className:"px-4 py-3 text-slate-400 text-xs",children:s.protocol}),v.jsx("td",{className:"px-4 py-3",children:v.jsxs("div",{className:"flex gap-2",children:[v.jsxs("button",{onClick:()=>o(s.id),className:"flex items-center gap-1 px-2 py-1 bg-blue-700 hover:bg-blue-600 rounded text-xs text-white transition-colors",children:[v.jsx(k3,{size:10})," 푸시"]}),v.jsxs("button",{onClick:()=>u(s.id),className:"flex items-center gap-1 px-2 py-1 bg-slate-600 hover:bg-slate-500 rounded text-xs text-white transition-colors",children:[v.jsx(B3,{size:10})," 갱신"]})]})})]},s.id)})})]}),e.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-8",children:"등록된 e-Paper 표시기가 없습니다."})]})]})}function QP(){const[e,t]=E.useState(""),[n,r]=E.useState(null),[a,i]=E.useState([]),[l,o]=E.useState([]),[u,s]=E.useState(""),[f,c]=E.useState([]),d=async()=>{if(e.trim())try{const[b,m,p]=await Promise.all([fe.get(`/qr/${e}`),fe.get(`/qr/${e}/history`),fe.get(`/qr/${e}/route`)]);r(b.data),i(m.data),o(p.data)}catch{r(null)}},h=async()=>{const b=prompt("제품 코드:");if(!b)return;const m=prompt("LOT 번호:"),p=prompt("수량:"),y=await fe.post("/qr/generate",{codeType:"WIP",productCode:b,lotNumber:m,quantity:parseInt(p||"1"),currentProcess:"START"});alert(`QR 코드 생성: ${y.data.qrCode}`)},x={IN_PROCESS:"bg-blue-700 text-blue-200",WAITING:"bg-yellow-700 text-yellow-200",COMPLETED:"bg-green-700 text-green-200",HOLD:"bg-orange-700 text-orange-200",REJECTED:"bg-red-700 text-red-200"};return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"QR WIP 추적"}),v.jsxs("button",{onClick:h,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg text-sm transition-colors",children:[v.jsx(R3,{size:14})," QR 생성"]})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-3",children:"QR 코드 조회"}),v.jsxs("div",{className:"flex gap-2 mb-4",children:[v.jsx("input",{value:e,onChange:b=>t(b.target.value),placeholder:"QR 코드 입력...",className:"flex-1 bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:border-blue-500"}),v.jsx("button",{onClick:d,className:"px-3 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition-colors",children:v.jsx(U3,{size:16})})]}),n&&v.jsxs("div",{className:"space-y-2 text-sm",children:[v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-slate-400",children:"제품코드"}),v.jsx("span",{className:"text-white font-mono",children:n.productCode})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-slate-400",children:"LOT 번호"}),v.jsx("span",{className:"text-white font-mono",children:n.lotNumber})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-slate-400",children:"현재 공정"}),v.jsx("span",{className:"text-white",children:n.currentProcess})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-slate-400",children:"현재 작업장"}),v.jsx("span",{className:"text-white",children:n.currentWorkstation})]}),v.jsxs("div",{className:"flex justify-between",children:[v.jsx("span",{className:"text-slate-400",children:"상태"}),v.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${x[n.status]||"bg-slate-600 text-slate-200"}`,children:n.status})]})]})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-3",children:"공정 경로"}),l.length>0?v.jsx("div",{className:"space-y-2",children:l.map((b,m)=>v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"w-6 h-6 rounded-full bg-blue-600 text-white text-xs flex items-center justify-center font-bold",children:b.sequence||m+1}),v.jsxs("div",{children:[v.jsx("div",{className:"text-sm text-white",children:b.processName}),v.jsxs("div",{className:"text-xs text-slate-400",children:[b.workstationCode," · ",b.standardTime,"분"]})]})]},b.id))}):v.jsx("div",{className:"text-slate-500 text-sm",children:"QR 코드를 조회하면 공정 경로가 표시됩니다."})]})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-3",children:"스캔 이력"}),v.jsxs("div",{className:"overflow-x-auto",children:[v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"시간"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"작업장"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"스캔 타입"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"결과"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"작업자"})]})}),v.jsx("tbody",{children:a.map(b=>{var m;return v.jsxs("tr",{className:"border-b border-slate-700/50",children:[v.jsx("td",{className:"px-3 py-2 text-slate-300 text-xs",children:(m=b.scannedAt)==null?void 0:m.replace("T"," ").slice(0,16)}),v.jsx("td",{className:"px-3 py-2 text-slate-300",children:b.workstationId}),v.jsx("td",{className:"px-3 py-2 text-slate-300",children:b.scanType}),v.jsx("td",{className:"px-3 py-2",children:v.jsx("span",{className:b.result==="OK"?"text-green-400":"text-red-400",children:b.result})}),v.jsx("td",{className:"px-3 py-2 text-slate-400",children:b.operatorId})]},b.id)})})]}),a.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-4",children:"스캔 이력이 없습니다."})]})]})]})}const ZP={PLANNED:"bg-slate-600 text-slate-200",RELEASED:"bg-blue-700 text-blue-200",IN_PROGRESS:"bg-yellow-700 text-yellow-200",COMPLETED:"bg-green-700 text-green-200"};function JP(){const[e,t]=E.useState([]),[n,r]=E.useState({}),[a,i]=E.useState(""),l=()=>{fe.get("/orders",{params:a?{status:a}:{}}).then(s=>t(s.data)),fe.get("/orders/dashboard").then(s=>r(s.data))};E.useEffect(()=>{l()},[a]);const o=async s=>{await fe.post(`/orders/${s}/release`),l()},u=async s=>{await fe.post(`/orders/${s}/complete`),l()};return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"생산 오더"}),v.jsx("div",{className:"flex gap-2",children:["","PLANNED","RELEASED","IN_PROGRESS","COMPLETED"].map(s=>v.jsx("button",{onClick:()=>i(s),className:`px-3 py-1.5 rounded text-xs transition-colors ${a===s?"bg-blue-600 text-white":"bg-slate-700 text-slate-300 hover:bg-slate-600"}`,children:s||"전체"},s))})]}),v.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-white",children:n.todayTotal||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"오늘 오더"})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-yellow-400",children:n.inProgress||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"진행 중"})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsx("div",{className:"text-2xl font-bold text-green-400",children:n.completed||0}),v.jsx("div",{className:"text-xs text-slate-400",children:"완료"})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsxs("div",{className:"text-2xl font-bold text-blue-400",children:[Math.round(n.completionRate||0),"%"]}),v.jsx("div",{className:"text-xs text-slate-400",children:"완료율"})]})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"오더 번호"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"제품"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"라인"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"계획 수량"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"진행 수량"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"진척률"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"상태"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업"})]})}),v.jsx("tbody",{children:e.map(s=>{var c,d;const f=s.plannedQty?Math.round((s.completedQty||0)*100/s.plannedQty):0;return v.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[v.jsx("td",{className:"px-4 py-3 font-mono text-blue-400",children:s.orderNumber}),v.jsx("td",{className:"px-4 py-3 text-white",children:s.productName}),v.jsx("td",{className:"px-4 py-3 text-slate-300",children:s.lineCode}),v.jsx("td",{className:"px-4 py-3 text-slate-300",children:(c=s.plannedQty)==null?void 0:c.toLocaleString()}),v.jsx("td",{className:"px-4 py-3 text-slate-300",children:((d=s.completedQty)==null?void 0:d.toLocaleString())||0}),v.jsx("td",{className:"px-4 py-3 w-32",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"flex-1 bg-slate-700 rounded-full h-1.5",children:v.jsx("div",{className:"bg-blue-500 h-1.5 rounded-full",style:{width:`${f}%`}})}),v.jsxs("span",{className:"text-xs text-slate-400",children:[f,"%"]})]})}),v.jsx("td",{className:"px-4 py-3",children:v.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${ZP[s.status]||""}`,children:s.status})}),v.jsx("td",{className:"px-4 py-3",children:v.jsxs("div",{className:"flex gap-1",children:[s.status==="PLANNED"&&v.jsxs("button",{onClick:()=>o(s.id),className:"flex items-center gap-1 px-2 py-1 bg-blue-700 hover:bg-blue-600 text-white rounded text-xs",children:[v.jsx(P3,{size:10})," 릴리즈"]}),s.status==="IN_PROGRESS"&&v.jsxs("button",{onClick:()=>u(s.id),className:"flex items-center gap-1 px-2 py-1 bg-green-700 hover:bg-green-600 text-white rounded text-xs",children:[v.jsx(vE,{size:10})," 완료"]})]})})]},s.id)})})]}),e.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-8",children:"생산 오더가 없습니다."})]})]})}const eD={QUALITY:"bg-yellow-800 border-yellow-600",MATERIAL:"bg-orange-800 border-orange-600",MACHINE:"bg-red-800 border-red-600",SAFETY:"bg-red-900 border-red-500",HELP:"bg-blue-800 border-blue-600"},px={INFO:"text-blue-400",WARNING:"text-yellow-400",CRITICAL:"text-red-400"};function tD(){const[e,t]=E.useState([]),[n,r]=E.useState([]),[a,i]=E.useState({}),l=()=>{fe.get("/andon/board").then(s=>t(s.data)),fe.get("/andon/events").then(s=>r(s.data)),fe.get("/andon/stats").then(s=>i(s.data))};E.useEffect(()=>{l();const s=setInterval(l,1e4);return()=>clearInterval(s)},[]);const o=async s=>{const f=JSON.parse(localStorage.getItem("fa_user")||"{}");await fe.put(`/andon/${s}/respond`,{responseBy:f.username}),l()},u=async s=>{await fe.put(`/andon/${s}/resolve`),l()};return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"안돈 현황판"}),v.jsx("div",{className:"text-xs text-slate-500",children:"10초마다 자동 갱신"})]}),v.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"오늘 발생",value:a.total_today,color:"text-white"},{label:"해결 완료",value:a.resolved,color:"text-green-400"},{label:"현재 활성",value:a.active,color:"text-red-400"},{label:"평균 응답",value:`${Math.round(a.avg_response_time||0)}초`,color:"text-yellow-400"}].map(({label:s,value:f,color:c})=>v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsx("div",{className:`text-2xl font-bold ${c}`,children:f??"-"}),v.jsx("div",{className:"text-xs text-slate-400 mt-1",children:s})]},s))}),e.length>0&&v.jsxs("div",{children:[v.jsxs("h2",{className:"text-sm font-medium text-red-400 mb-3",children:["활성 안돈 (",e.length,"건)"]}),v.jsx("div",{className:"grid grid-cols-3 gap-4",children:e.map(s=>{var f;return v.jsxs("div",{className:`border-2 rounded-xl p-4 ${eD[s.andonType]||"bg-slate-800 border-slate-600"}`,children:[v.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[v.jsx(Qv,{size:16,className:px[s.severity]||"text-yellow-400"}),v.jsx("span",{className:"font-bold text-white",children:s.workstationCode}),v.jsx("span",{className:"text-xs text-white/60",children:s.andonType})]}),v.jsx("div",{className:"text-sm text-white/80 mb-3",children:s.description}),v.jsxs("div",{className:"text-xs text-white/60 mb-3",children:["호출: ",s.calledBy," · ",(f=s.calledAt)==null?void 0:f.replace("T"," ").slice(0,16)]}),v.jsxs("div",{className:"flex gap-2",children:[!s.respondedAt&&v.jsxs("button",{onClick:()=>o(s.id),className:"flex items-center gap-1 px-2 py-1 bg-white/20 hover:bg-white/30 text-white rounded text-xs",children:[v.jsx(Y3,{size:10})," 응답"]}),v.jsxs("button",{onClick:()=>u(s.id),className:"flex items-center gap-1 px-2 py-1 bg-green-700 hover:bg-green-600 text-white rounded text-xs",children:[v.jsx(vE,{size:10})," 해결"]})]})]},s.id)})})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[v.jsx("div",{className:"px-4 py-3 border-b border-slate-700",children:v.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"안돈 이벤트 이력"})}),v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"작업장"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"타입"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"심각도"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"설명"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"호출 시각"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"상태"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"응답시간"})]})}),v.jsx("tbody",{children:n.slice(0,20).map(s=>{var f;return v.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[v.jsx("td",{className:"px-4 py-2 font-bold text-white",children:s.workstationCode}),v.jsx("td",{className:"px-4 py-2 text-slate-300",children:s.andonType}),v.jsx("td",{className:"px-4 py-2",children:v.jsx("span",{className:px[s.severity]||"text-slate-400",children:s.severity})}),v.jsx("td",{className:"px-4 py-2 text-slate-300 max-w-xs truncate",children:s.description}),v.jsx("td",{className:"px-4 py-2 text-slate-400 text-xs",children:(f=s.calledAt)==null?void 0:f.replace("T"," ").slice(0,16)}),v.jsx("td",{className:"px-4 py-2",children:v.jsx("span",{className:s.resolvedAt?"text-green-400":s.respondedAt?"text-yellow-400":"text-red-400",children:s.resolvedAt?"RESOLVED":s.respondedAt?"IN_PROGRESS":"OPEN"})}),v.jsx("td",{className:"px-4 py-2 text-slate-400",children:s.responseTimeSeconds?`${s.responseTimeSeconds}초`:"-"})]},s.id)})})]})]})]})}function YE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t-1}var e5=JR,t5=sd;function n5(e,t){var n=this.__data__,r=t5(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var r5=n5,a5=kR,i5=KR,l5=QR,o5=e5,u5=r5;function kl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Ea=function(t){return Xa(t)&&t.indexOf("%")===t.length-1},Y=function(t){return j6(t)&&!es(t)},$6=function(t){return ve(t)},ut=function(t){return Y(t)||Xa(t)},P6=0,wd=function(t){var n=++P6;return"".concat(t||"").concat(n)},Va=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Y(t)&&!Xa(t))return r;var i;if(Ea(t)){var l=t.indexOf("%");i=n*parseFloat(t.slice(0,l))/100}else i=+t;return es(i)&&(i=r),a&&i>n&&(i=n),i},Br=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},D6=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I6(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ex={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"},hr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Tx=null,Gh=null,mg=function e(t){if(t===Tx&&Array.isArray(Gh))return Gh;var n=[];return E.Children.forEach(t,function(r){ve(r)||(w6.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Gh=n,Tx=t,n};function $n(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return hr(a)}):r=[hr(t)],mg(e).forEach(function(a){var i=Sn(a,"type.displayName")||Sn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function Wt(e,t){var n=$n(e,t);return n&&n[0]}var jx=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!Y(r)||r<=0||!Y(a)||a<=0)},H6=["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"],q6=function(t){return t&&t.type&&Xa(t.type)&&H6.indexOf(t.type)>=0},G6=function(t,n,r,a){var i,l=(i=qh==null?void 0:qh[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!le(t)&&(a&&l.includes(n)||B6.includes(n))||r&&yg.includes(n)},pe=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(E.isValidElement(t)&&(a=t.props),!Ll(a))return null;var i={};return Object.keys(a).forEach(function(l){var o;G6((o=a)===null||o===void 0?void 0:o[l],l,n,r)&&(i[l]=a[l])}),i},_y=function e(t,n){if(t===n)return!0;var r=E.Children.count(t);if(r!==E.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Nx(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function F6(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ty(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,l=e.style,o=e.title,u=e.desc,s=K6(e,V6),f=a||{width:n,height:r,x:0,y:0},c=me("recharts-surface",i);return C.createElement("svg",Ey({},pe(s,!0,"svg"),{className:c,width:n,height:r,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),C.createElement("title",null,o),C.createElement("desc",null,u),t)}var W6=["children","className"];function jy(){return jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z6(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var pt=C.forwardRef(function(e,t){var n=e.children,r=e.className,a=Q6(e,W6),i=me("recharts-layer",r);return C.createElement("g",jy({className:i},pe(a,!0),{ref:t}),n)}),pr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;ia?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r=r?e:tz(e,t,n)}var rz=nz,az="\\ud800-\\udfff",iz="\\u0300-\\u036f",lz="\\ufe20-\\ufe2f",oz="\\u20d0-\\u20ff",uz=iz+lz+oz,sz="\\ufe0e\\ufe0f",cz="\\u200d",fz=RegExp("["+cz+az+uz+sz+"]");function dz(e){return fz.test(e)}var a2=dz;function hz(e){return e.split("")}var pz=hz,i2="\\ud800-\\udfff",yz="\\u0300-\\u036f",mz="\\ufe20-\\ufe2f",vz="\\u20d0-\\u20ff",gz=yz+mz+vz,bz="\\ufe0e\\ufe0f",xz="["+i2+"]",Ny="["+gz+"]",My="\\ud83c[\\udffb-\\udfff]",Sz="(?:"+Ny+"|"+My+")",l2="[^"+i2+"]",o2="(?:\\ud83c[\\udde6-\\uddff]){2}",u2="[\\ud800-\\udbff][\\udc00-\\udfff]",Oz="\\u200d",s2=Sz+"?",c2="["+bz+"]?",wz="(?:"+Oz+"(?:"+[l2,o2,u2].join("|")+")"+c2+s2+")*",Az=c2+s2+wz,_z="(?:"+[l2+Ny+"?",Ny,o2,u2,xz].join("|")+")",Ez=RegExp(My+"(?="+My+")|"+_z+Az,"g");function Tz(e){return e.match(Ez)||[]}var jz=Tz,Nz=pz,Mz=a2,Cz=jz;function $z(e){return Mz(e)?Cz(e):Nz(e)}var Pz=$z,Dz=rz,Rz=a2,zz=Pz,Bz=ZE;function Lz(e){return function(t){t=Bz(t);var n=Rz(t)?zz(t):void 0,r=n?n[0]:t.charAt(0),a=n?Dz(n,1).join(""):t.slice(1);return r[e]()+a}}var Uz=Lz,kz=Uz,Iz=kz("toUpperCase"),Hz=Iz;const Ad=Ne(Hz);function Pe(e){return function(){return e}}const f2=Math.cos,Uc=Math.sin,Rn=Math.sqrt,kc=Math.PI,_d=2*kc,Cy=Math.PI,$y=2*Cy,Oa=1e-6,qz=$y-Oa;function d2(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return d2;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;aOa)if(!(Math.abs(c*u-s*f)>Oa)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-l,x=a-o,b=u*u+s*s,m=h*h+x*x,p=Math.sqrt(b),y=Math.sqrt(d),g=i*Math.tan((Cy-Math.acos((b+d-m)/(2*p*y)))/2),O=g/y,S=g/p;Math.abs(O-1)>Oa&&this._append`L${t+O*f},${n+O*c}`,this._append`A${i},${i},0,0,${+(c*h>f*x)},${this._x1=t+S*u},${this._y1=n+S*s}`}}arc(t,n,r,a,i,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),u=r*Math.sin(a),s=t+o,f=n+u,c=1^l,d=l?a-i:i-a;this._x1===null?this._append`M${s},${f}`:(Math.abs(this._x1-s)>Oa||Math.abs(this._y1-f)>Oa)&&this._append`L${s},${f}`,r&&(d<0&&(d=d%$y+$y),d>qz?this._append`A${r},${r},0,1,${c},${t-o},${n-u}A${r},${r},0,1,${c},${this._x1=s},${this._y1=f}`:d>Oa&&this._append`A${r},${r},0,${+(d>=Cy)},${c},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function vg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Yz(t)}function gg(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function h2(e){this._context=e}h2.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 Ed(e){return new h2(e)}function p2(e){return e[0]}function y2(e){return e[1]}function m2(e,t){var n=Pe(!0),r=null,a=Ed,i=null,l=vg(o);e=typeof e=="function"?e:e===void 0?p2:Pe(e),t=typeof t=="function"?t:t===void 0?y2:Pe(t);function o(u){var s,f=(u=gg(u)).length,c,d=!1,h;for(r==null&&(i=a(h=l())),s=0;s<=f;++s)!(s=h;--x)o.point(g[x],O[x]);o.lineEnd(),o.areaEnd()}p&&(g[d]=+e(m,d,c),O[d]=+t(m,d,c),o.point(r?+r(m,d,c):g[d],n?+n(m,d,c):O[d]))}if(y)return o=null,y+""||null}function f(){return m2().defined(a).curve(l).context(i)}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Pe(+c),r=null,s):e},s.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Pe(+c),s):e},s.x1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Pe(+c),s):r},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Pe(+c),n=null,s):t},s.y0=function(c){return arguments.length?(t=typeof c=="function"?c:Pe(+c),s):t},s.y1=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Pe(+c),s):n},s.lineX0=s.lineY0=function(){return f().x(e).y(t)},s.lineY1=function(){return f().x(e).y(n)},s.lineX1=function(){return f().x(r).y(t)},s.defined=function(c){return arguments.length?(a=typeof c=="function"?c:Pe(!!c),s):a},s.curve=function(c){return arguments.length?(l=c,i!=null&&(o=l(i)),s):l},s.context=function(c){return arguments.length?(c==null?i=o=null:o=l(i=c),s):i},s}class v2{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Xz(e){return new v2(e,!0)}function Vz(e){return new v2(e,!1)}const bg={draw(e,t){const n=Rn(t/kc);e.moveTo(n,0),e.arc(0,0,n,0,_d)}},Kz={draw(e,t){const n=Rn(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},g2=Rn(1/3),Fz=g2*2,Wz={draw(e,t){const n=Rn(t/Fz),r=n*g2;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Qz={draw(e,t){const n=Rn(t),r=-n/2;e.rect(r,r,n,n)}},Zz=.8908130915292852,b2=Uc(kc/10)/Uc(7*kc/10),Jz=Uc(_d/10)*b2,eB=-f2(_d/10)*b2,tB={draw(e,t){const n=Rn(t*Zz),r=Jz*n,a=eB*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const l=_d*i/5,o=f2(l),u=Uc(l);e.lineTo(u*n,-o*n),e.lineTo(o*r-u*a,u*r+o*a)}e.closePath()}},Yh=Rn(3),nB={draw(e,t){const n=-Rn(t/(Yh*3));e.moveTo(0,n*2),e.lineTo(-Yh*n,-n),e.lineTo(Yh*n,-n),e.closePath()}},un=-.5,sn=Rn(3)/2,Py=1/Rn(12),rB=(Py/2+1)*3,aB={draw(e,t){const n=Rn(t/rB),r=n/2,a=n*Py,i=r,l=n*Py+n,o=-i,u=l;e.moveTo(r,a),e.lineTo(i,l),e.lineTo(o,u),e.lineTo(un*r-sn*a,sn*r+un*a),e.lineTo(un*i-sn*l,sn*i+un*l),e.lineTo(un*o-sn*u,sn*o+un*u),e.lineTo(un*r+sn*a,un*a-sn*r),e.lineTo(un*i+sn*l,un*l-sn*i),e.lineTo(un*o+sn*u,un*u-sn*o),e.closePath()}};function iB(e,t){let n=null,r=vg(a);e=typeof e=="function"?e:Pe(e||bg),t=typeof t=="function"?t:Pe(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Pe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Pe(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Ic(){}function Hc(e,t,n){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+n)/6)}function x2(e){this._context=e}x2.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:Hc(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:Hc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lB(e){return new x2(e)}function S2(e){this._context=e}S2.prototype={areaStart:Ic,areaEnd:Ic,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:Hc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oB(e){return new S2(e)}function O2(e){this._context=e}O2.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Hc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uB(e){return new O2(e)}function w2(e){this._context=e}w2.prototype={areaStart:Ic,areaEnd:Ic,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 sB(e){return new w2(e)}function Cx(e){return e<0?-1:1}function $x(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),o=(i*a+l*r)/(r+a);return(Cx(i)+Cx(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(o))||0}function Px(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Xh(e,t,n){var r=e._x0,a=e._y0,i=e._x1,l=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,l-o*n,i,l)}function qc(e){this._context=e}qc.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:Xh(this,this._t0,Px(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 n=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,Xh(this,Px(this,n=$x(this,e,t)),n);break;default:Xh(this,this._t0,n=$x(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function A2(e){this._context=new _2(e)}(A2.prototype=Object.create(qc.prototype)).point=function(e,t){qc.prototype.point.call(this,t,e)};function _2(e){this._context=e}_2.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,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function cB(e){return new qc(e)}function fB(e){return new A2(e)}function E2(e){this._context=e}E2.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Dx(e),a=Dx(t),i=0,l=1;l=0;--t)a[t]=(l[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function hB(e){return new Td(e,.5)}function pB(e){return new Td(e,0)}function yB(e){return new Td(e,1)}function rl(e,t){if((l=e.length)>1)for(var n=1,r,a,i=e[t[0]],l,o=i.length;n=0;)n[t]=t;return n}function mB(e,t){return e[t]}function vB(e){const t=[];return t.key=e,t}function gB(){var e=Pe([]),t=Dy,n=rl,r=mB;function a(i){var l=Array.from(e.apply(this,arguments),vB),o,u=l.length,s=-1,f;for(const c of i)for(o=0,++s;o0){for(var n,r,a=0,i=e[0].length,l;a0){for(var n=0,r=e[t[0]],a,i=r.length;n0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,l;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TB(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var T2={symbolCircle:bg,symbolCross:Kz,symbolDiamond:Wz,symbolSquare:Qz,symbolStar:tB,symbolTriangle:nB,symbolWye:aB},jB=Math.PI/180,NB=function(t){var n="symbol".concat(Ad(t));return T2[n]||bg},MB=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*jB;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},CB=function(t,n){T2["symbol".concat(Ad(t))]=n},xg=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,l=t.sizeType,o=l===void 0?"area":l,u=EB(t,OB),s=zx(zx({},u),{},{type:r,size:i,sizeType:o}),f=function(){var m=NB(r),p=iB().type(m).size(MB(i,o,r));return p()},c=s.className,d=s.cx,h=s.cy,x=pe(s,!0);return d===+d&&h===+h&&i===+i?C.createElement("path",Ry({},x,{className:me("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(h,")"),d:f()})):null};xg.registerSymbol=CB;function al(e){"@babel/helpers - typeof";return al=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},al(e)}function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t `);var y=h.inactive?s:h.color;return C.createElement("li",zy({className:m,style:c,key:"legend-item-".concat(x)},Lc(r.props,h,x)),C.createElement(Ty,{width:l,height:l,viewBox:f,style:d},r.renderIcon(h)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},b?b(p,h,x):p))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,l=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(E.PureComponent);ru(Sg,"displayName","Legend");ru(Sg,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var IB=cd;function HB(){this.__data__=new IB,this.size=0}var qB=HB;function GB(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var YB=GB;function XB(e){return this.__data__.get(e)}var VB=XB;function KB(e){return this.__data__.has(e)}var FB=KB,WB=cd,QB=ug,ZB=sg,JB=200;function e8(e,t){var n=this.__data__;if(n instanceof WB){var r=n.__data__;if(!QB||r.lengtho))return!1;var s=i.get(e),f=i.get(t);if(s&&f)return s==t&&f==e;var c=-1,d=!0,h=n&O8?new g8:void 0;for(i.set(e,t),i.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=EL}var _g=TL,jL=Er,NL=_g,ML=Tr,CL="[object Arguments]",$L="[object Array]",PL="[object Boolean]",DL="[object Date]",RL="[object Error]",zL="[object Function]",BL="[object Map]",LL="[object Number]",UL="[object Object]",kL="[object RegExp]",IL="[object Set]",HL="[object String]",qL="[object WeakMap]",GL="[object ArrayBuffer]",YL="[object DataView]",XL="[object Float32Array]",VL="[object Float64Array]",KL="[object Int8Array]",FL="[object Int16Array]",WL="[object Int32Array]",QL="[object Uint8Array]",ZL="[object Uint8ClampedArray]",JL="[object Uint16Array]",eU="[object Uint32Array]",Be={};Be[XL]=Be[VL]=Be[KL]=Be[FL]=Be[WL]=Be[QL]=Be[ZL]=Be[JL]=Be[eU]=!0;Be[CL]=Be[$L]=Be[GL]=Be[PL]=Be[YL]=Be[DL]=Be[RL]=Be[zL]=Be[BL]=Be[LL]=Be[UL]=Be[kL]=Be[IL]=Be[HL]=Be[qL]=!1;function tU(e){return ML(e)&&NL(e.length)&&!!Be[jL(e)]}var nU=tU;function rU(e){return function(t){return e(t)}}var L2=rU,Vc={exports:{}};Vc.exports;(function(e,t){var n=XE,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i&&n.process,o=function(){try{var u=a&&a.require&&a.require("util").types;return u||l&&l.binding&&l.binding("util")}catch{}}();e.exports=o})(Vc,Vc.exports);var aU=Vc.exports,iU=nU,lU=L2,qx=aU,Gx=qx&&qx.isTypedArray,oU=Gx?lU(Gx):iU,U2=oU,uU=fL,sU=wg,cU=Xt,fU=B2,dU=Ag,hU=U2,pU=Object.prototype,yU=pU.hasOwnProperty;function mU(e,t){var n=cU(e),r=!n&&sU(e),a=!n&&!r&&fU(e),i=!n&&!r&&!a&&hU(e),l=n||r||a||i,o=l?uU(e.length,String):[],u=o.length;for(var s in e)(t||yU.call(e,s))&&!(l&&(s=="length"||a&&(s=="offset"||s=="parent")||i&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||dU(s,u)))&&o.push(s);return o}var vU=mU,gU=Object.prototype;function bU(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||gU;return e===n}var xU=bU;function SU(e,t){return function(n){return e(t(n))}}var k2=SU,OU=k2,wU=OU(Object.keys,Object),AU=wU,_U=xU,EU=AU,TU=Object.prototype,jU=TU.hasOwnProperty;function NU(e){if(!_U(e))return EU(e);var t=[];for(var n in Object(e))jU.call(e,n)&&n!="constructor"&&t.push(n);return t}var MU=NU,CU=lg,$U=_g;function PU(e){return e!=null&&$U(e.length)&&!CU(e)}var ts=PU,DU=vU,RU=MU,zU=ts;function BU(e){return zU(e)?DU(e):RU(e)}var jd=BU,LU=J8,UU=sL,kU=jd;function IU(e){return LU(e,kU,UU)}var HU=IU,Yx=HU,qU=1,GU=Object.prototype,YU=GU.hasOwnProperty;function XU(e,t,n,r,a,i){var l=n&qU,o=Yx(e),u=o.length,s=Yx(t),f=s.length;if(u!=f&&!l)return!1;for(var c=u;c--;){var d=o[c];if(!(l?d in t:YU.call(t,d)))return!1}var h=i.get(e),x=i.get(t);if(h&&x)return h==t&&x==e;var b=!0;i.set(e,t),i.set(t,e);for(var m=l;++c-1}var Gk=qk;function Yk(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=l9){var s=t?null:a9(e);if(s)return i9(s);l=!1,a=r9,u=new e9}else u=t?[]:o;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function O9(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function w9(e){return e.value}function A9(e,t){if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return C.createElement(e,t);t.ref;var n=S9(t,h9);return C.createElement(Sg,n)}var o1=1,ki=function(e){function t(){var n;p9(this,t);for(var r=arguments.length,a=new Array(r),i=0;io1||Math.abs(a.height-this.lastBoundingBox.height)>o1)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?er({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,l=a.align,o=a.verticalAlign,u=a.margin,s=a.chartWidth,f=a.chartHeight,c,d;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();c={left:((s||0)-h.width)/2}}else c=l==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var x=this.getBBoxSnapshot();d={top:((f||0)-x.height)/2}}else d=o==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return er(er({},c),d)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,l=a.width,o=a.height,u=a.wrapperStyle,s=a.payloadUniqBy,f=a.payload,c=er(er({position:"absolute",width:l||"auto",height:o||"auto"},this.getDefaultPosition(u)),u);return C.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(h){r.wrapperNode=h}},A9(i,er(er({},this.props),{},{payload:V2(f,s,w9)})))}}],[{key:"getWithHeight",value:function(r,a){var i=er(er({},this.defaultProps),r.props),l=i.layout;return l==="vertical"&&Y(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])}(E.PureComponent);Nd(ki,"displayName","Legend");Nd(ki,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var u1=Ju,_9=wg,E9=Xt,s1=u1?u1.isConcatSpreadable:void 0;function T9(e){return E9(e)||_9(e)||!!(s1&&e&&e[s1])}var j9=T9,N9=R2,M9=j9;function W2(e,t,n,r,a){var i=-1,l=e.length;for(n||(n=M9),a||(a=[]);++i0&&n(o)?t>1?W2(o,t-1,n,r,a):N9(a,o):r||(a[a.length]=o)}return a}var Q2=W2;function C9(e){return function(t,n,r){for(var a=-1,i=Object(t),l=r(t),o=l.length;o--;){var u=l[e?o:++a];if(n(i[u],u,i)===!1)break}return t}}var $9=C9,P9=$9,D9=P9(),R9=D9,z9=R9,B9=jd;function L9(e,t){return e&&z9(e,t,B9)}var Z2=L9,U9=ts;function k9(e,t){return function(n,r){if(n==null)return n;if(!U9(n))return e(n,r);for(var a=n.length,i=t?a:-1,l=Object(n);(t?i--:++it||i&&l&&u&&!o&&!s||r&&l&&u||!n&&u||!a)return 1;if(!r&&!i&&!s&&e=o)return u;var s=n[r];return u*(s=="desc"?-1:1)}}return e.index-t.index}var eI=J9,Wh=fg,tI=dg,nI=fa,rI=J2,aI=F9,iI=L2,lI=eI,oI=Gl,uI=Xt;function sI(e,t,n){t.length?t=Wh(t,function(i){return uI(i)?function(l){return tI(l,i.length===1?i[0]:i)}:i}):t=[oI];var r=-1;t=Wh(t,iI(nI));var a=rI(e,function(i,l,o){var u=Wh(t,function(s){return s(i)});return{criteria:u,index:++r,value:i}});return aI(a,function(i,l){return lI(i,l,n)})}var cI=sI;function fI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var dI=fI,hI=dI,f1=Math.max;function pI(e,t,n){return t=f1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=f1(r.length-t,0),l=Array(i);++a0){if(++t>=AI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var jI=TI,NI=wI,MI=jI,CI=MI(NI),$I=CI,PI=Gl,DI=yI,RI=$I;function zI(e,t){return RI(DI(e,t,PI),e+"")}var BI=zI,LI=og,UI=ts,kI=Ag,II=ca;function HI(e,t,n){if(!II(n))return!1;var r=typeof t;return(r=="number"?UI(n)&&kI(t,n.length):r=="string"&&t in n)?LI(n[t],e):!1}var Md=HI,qI=Q2,GI=cI,YI=BI,h1=Md,XI=YI(function(e,t){if(e==null)return[];var n=t.length;return n>1&&h1(e,t[0],t[1])?t=[]:n>2&&h1(t[0],t[1],t[2])&&(t=[t[0]]),GI(e,qI(t,1),[])}),VI=XI;const jg=Ne(VI);function au(e){"@babel/helpers - typeof";return au=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},au(e)}function Gy(){return Gy=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(ao,"-left"),Y(n)&&t&&Y(t.x)&&n=t.y),"".concat(ao,"-top"),Y(r)&&t&&Y(t.y)&&rb?Math.max(f,u[r]):Math.max(c,u[r])}function uH(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function sH(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipBox,o=e.useTranslate3d,u=e.viewBox,s,f,c;return l.height>0&&l.width>0&&n?(f=m1({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.width,viewBox:u,viewBoxDimension:u.width}),c=m1({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.height,viewBox:u,viewBoxDimension:u.height}),s=uH({translateX:f,translateY:c,useTranslate3d:o})):s=lH,{cssProperties:s,cssClasses:oH({translateX:f,translateY:c,coordinate:n})}}function ll(e){"@babel/helpers - typeof";return ll=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},ll(e)}function v1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function g1(e){for(var t=1;tb1||Math.abs(r.height-this.state.lastBoundingBox.height)>b1)&&this.setState({lastBoundingBox:{width:r.width,height:r.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 r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,o=a.animationDuration,u=a.animationEasing,s=a.children,f=a.coordinate,c=a.hasPayload,d=a.isAnimationActive,h=a.offset,x=a.position,b=a.reverseDirection,m=a.useTranslate3d,p=a.viewBox,y=a.wrapperStyle,g=sH({allowEscapeViewBox:l,coordinate:f,offsetTopLeft:h,position:x,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:p}),O=g.cssClasses,S=g.cssProperties,w=g1(g1({transition:d&&i?"transform ".concat(o,"ms ").concat(u):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&c?"visible":"hidden",position:"absolute",top:0,left:0},y);return C.createElement("div",{tabIndex:-1,className:O,style:w,ref:function(_){r.wrapperNode=_}},s)}}])}(E.PureComponent),bH=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ns={isSsr:bH()};function ol(e){"@babel/helpers - typeof";return ol=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},ol(e)}function x1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function S1(e){for(var t=1;t0;return C.createElement(gH,{allowEscapeViewBox:l,animationDuration:o,animationEasing:u,isAnimationActive:d,active:i,coordinate:f,hasPayload:w,offset:h,position:m,reverseDirection:p,useTranslate3d:y,viewBox:g,wrapperStyle:O},NH(s,S1(S1({},this.props),{},{payload:S})))}}])}(E.PureComponent);Ng(zn,"displayName","Tooltip");Ng(zn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ns.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 MH=Kn,CH=function(){return MH.Date.now()},$H=CH,PH=/\s/;function DH(e){for(var t=e.length;t--&&PH.test(e.charAt(t)););return t}var RH=DH,zH=RH,BH=/^\s+/;function LH(e){return e&&e.slice(0,zH(e)+1).replace(BH,"")}var UH=LH,kH=UH,O1=ca,IH=Bl,w1=NaN,HH=/^[-+]0x[0-9a-f]+$/i,qH=/^0b[01]+$/i,GH=/^0o[0-7]+$/i,YH=parseInt;function XH(e){if(typeof e=="number")return e;if(IH(e))return w1;if(O1(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=O1(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=kH(e);var n=qH.test(e);return n||GH.test(e)?YH(e.slice(2),n?2:8):HH.test(e)?w1:+e}var iT=XH,VH=ca,Zh=$H,A1=iT,KH="Expected a function",FH=Math.max,WH=Math.min;function QH(e,t,n){var r,a,i,l,o,u,s=0,f=!1,c=!1,d=!0;if(typeof e!="function")throw new TypeError(KH);t=A1(t)||0,VH(n)&&(f=!!n.leading,c="maxWait"in n,i=c?FH(A1(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(w){var A=r,_=a;return r=a=void 0,s=w,l=e.apply(_,A),l}function x(w){return s=w,o=setTimeout(p,t),f?h(w):l}function b(w){var A=w-u,_=w-s,T=t-A;return c?WH(T,i-_):T}function m(w){var A=w-u,_=w-s;return u===void 0||A>=t||A<0||c&&_>=i}function p(){var w=Zh();if(m(w))return y(w);o=setTimeout(p,b(w))}function y(w){return o=void 0,d&&r?h(w):(r=a=void 0,l)}function g(){o!==void 0&&clearTimeout(o),s=0,r=u=a=o=void 0}function O(){return o===void 0?l:y(Zh())}function S(){var w=Zh(),A=m(w);if(r=arguments,a=this,u=w,A){if(o===void 0)return x(u);if(c)return clearTimeout(o),o=setTimeout(p,t),h(u)}return o===void 0&&(o=setTimeout(p,t)),l}return S.cancel=g,S.flush=O,S}var ZH=QH,JH=ZH,eq=ca,tq="Expected a function";function nq(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(tq);return eq(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),JH(e,t,{leading:r,maxWait:t,trailing:a})}var rq=nq;const lT=Ne(rq);function lu(e){"@babel/helpers - typeof";return lu=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},lu(e)}function _1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function js(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(k=lT(k,b,{trailing:!0,leading:!1}));var z=new ResizeObserver(k),B=S.current.getBoundingClientRect(),N=B.width,R=B.height;return P(N,R),z.observe(S.current),function(){z.disconnect()}},[P,b]);var M=E.useMemo(function(){var k=T.containerWidth,z=T.containerHeight;if(k<0||z<0)return null;pr(Ea(l)||Ea(u),`The width(%s) and height(%s) are both fixed numbers,
+ maybe you don't need to use a ResponsiveContainer.`,l,u),pr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var B=Ea(l)?k:l,N=Ea(u)?z:u;n&&n>0&&(B?N=B/n:N&&(B=N*n),d&&N>d&&(N=d)),pr(B>0||N>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.`,B,N,l,u,f,c,n);var R=!Array.isArray(h)&&hr(h.type).endsWith("Chart");return C.Children.map(h,function(D){return C.isValidElement(D)?E.cloneElement(D,js({width:B,height:N},R?{style:js({height:"100%",width:"100%",maxHeight:N,maxWidth:B},D.props.style)}:{})):D})},[n,h,u,d,c,f,T,l]);return C.createElement("div",{id:m?"".concat(m):void 0,className:me("recharts-responsive-container",p),style:js(js({},O),{},{width:l,height:u,minWidth:f,minHeight:c,maxHeight:d}),ref:S},M)}),oT=function(t){return null};oT.displayName="Cell";function ou(e){"@babel/helpers - typeof";return ou=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},ou(e)}function T1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ky(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ns.isSsr)return{width:0,height:0};var r=gq(n),a=JSON.stringify({text:t,copyStyle:r});if(fi.widthCache[a])return fi.widthCache[a];try{var i=document.getElementById(j1);i||(i=document.createElement("span"),i.setAttribute("id",j1),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=Ky(Ky({},vq),r);Object.assign(i.style,l),i.textContent="".concat(t);var o=i.getBoundingClientRect(),u={width:o.width,height:o.height};return fi.widthCache[a]=u,++fi.cacheCount>mq&&(fi.cacheCount=0,fi.widthCache={}),u}catch{return{width:0,height:0}}},bq=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Qc(e,t){return wq(e)||Oq(e,t)||Sq(e,t)||xq()}function xq(){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 Sq(e,t){if(e){if(typeof e=="string")return N1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N1(e,t)}}function N1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bq(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function R1(e,t){return Iq(e)||kq(e,t)||Uq(e,t)||Lq()}function Lq(){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 Uq(e,t){if(e){if(typeof e=="string")return z1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z1(e,t)}}function z1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return B.reduce(function(N,R){var D=R.word,H=R.width,q=N[N.length-1];if(q&&(a==null||i||q.width+H+rR.width?N:R})};if(!f)return h;for(var b="…",m=function(B){var N=c.slice(0,B),R=fT({breakAll:s,style:u,children:N+b}).wordsWithComputedWidth,D=d(R),H=D.length>l||x(D).width>Number(a);return[H,D]},p=0,y=c.length-1,g=0,O;p<=y&&g<=c.length-1;){var S=Math.floor((p+y)/2),w=S-1,A=m(w),_=R1(A,2),T=_[0],$=_[1],P=m(S),M=R1(P,1),k=M[0];if(!T&&!k&&(p=S+1),T&&k&&(y=S-1),!T&&k){O=$;break}g++}return O||h},B1=function(t){var n=ve(t)?[]:t.toString().split(cT);return[{words:n}]},qq=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,l=t.breakAll,o=t.maxLines;if((n||r)&&!ns.isSsr){var u,s,f=fT({breakAll:l,children:a,style:i});if(f){var c=f.wordsWithComputedWidth,d=f.spaceWidth;u=c,s=d}else return B1(a);return Hq({breakAll:l,children:a,maxLines:o,style:i},u,s,n,r)}return B1(a)},L1="#808080",Zc=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.lineHeight,o=l===void 0?"1em":l,u=t.capHeight,s=u===void 0?"0.71em":u,f=t.scaleToFit,c=f===void 0?!1:f,d=t.textAnchor,h=d===void 0?"start":d,x=t.verticalAnchor,b=x===void 0?"end":x,m=t.fill,p=m===void 0?L1:m,y=D1(t,Rq),g=E.useMemo(function(){return qq({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:c,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,c,y.style,y.width]),O=y.dx,S=y.dy,w=y.angle,A=y.className,_=y.breakAll,T=D1(y,zq);if(!ut(r)||!ut(i))return null;var $=r+(Y(O)?O:0),P=i+(Y(S)?S:0),M;switch(b){case"start":M=Jh("calc(".concat(s,")"));break;case"middle":M=Jh("calc(".concat((g.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:M=Jh("calc(".concat(g.length-1," * -").concat(o,")"));break}var k=[];if(c){var z=g[0].width,B=y.width;k.push("scale(".concat((Y(B)?B/z:1)/z,")"))}return w&&k.push("rotate(".concat(w,", ").concat($,", ").concat(P,")")),k.length&&(T.transform=k.join(" ")),C.createElement("text",Fy({},pe(T,!0),{x:$,y:P,className:me("recharts-text",A),textAnchor:h,fill:p.includes("url")?L1:p}),g.map(function(N,R){var D=N.words.join(_?"":" ");return C.createElement("tspan",{x:$,dy:R===0?M:o,key:"".concat(D,"-").concat(R)},D)}))};function ta(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Gq(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Mg(e){let t,n,r;e.length!==2?(t=ta,n=(o,u)=>ta(e(o),u),r=(o,u)=>e(o)-u):(t=e===ta||e===Gq?e:Yq,n=e,r=e);function a(o,u,s=0,f=o.length){if(s>>1;n(o[c],u)<0?s=c+1:f=c}while(s>>1;n(o[c],u)<=0?s=c+1:f=c}while(ss&&r(o[c-1],u)>-r(o[c],u)?c-1:c}return{left:a,center:l,right:i}}function Yq(){return 0}function dT(e){return e===null?NaN:+e}function*Xq(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Vq=Mg(ta),rs=Vq.right;Mg(dT).center;class U1 extends Map{constructor(t,n=Wq){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(k1(this,t))}has(t){return super.has(k1(this,t))}set(t,n){return super.set(Kq(this,t),n)}delete(t){return super.delete(Fq(this,t))}}function k1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Kq({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Fq({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Wq(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Qq(e=ta){if(e===ta)return hT;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function hT(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Zq=Math.sqrt(50),Jq=Math.sqrt(10),eG=Math.sqrt(2);function Jc(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),l=i>=Zq?10:i>=Jq?5:i>=eG?2:1;let o,u,s;return a<0?(s=Math.pow(10,-a)/l,o=Math.round(e*s),u=Math.round(t*s),o/st&&--u,s=-s):(s=Math.pow(10,a)*l,o=Math.round(e/s),u=Math.round(t/s),o*st&&--u),u0))return[];if(e===t)return[e];const r=t=a))return[];const o=i-a+1,u=new Array(o);if(r)if(l<0)for(let s=0;s=r)&&(n=r);return n}function H1(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function pT(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?hT:Qq(a);r>n;){if(r-n>600){const u=r-n+1,s=t-n+1,f=Math.log(u),c=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*c*(u-c)/u)*(s-u/2<0?-1:1),h=Math.max(n,Math.floor(t-s*c/u+d)),x=Math.min(r,Math.floor(t+(u-s)*c/u+d));pT(e,t,h,x,a)}const i=e[t];let l=n,o=r;for(io(e,n,t),a(e[r],i)>0&&io(e,n,r);l0;)--o}a(e[n],i)===0?io(e,n,o):(++o,io(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function io(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function tG(e,t,n){if(e=Float64Array.from(Xq(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return H1(e);if(t>=1)return I1(e);var r,a=(r-1)*t,i=Math.floor(a),l=I1(pT(e,i).subarray(0,i+1)),o=H1(e.subarray(i+1));return l+(o-l)*(a-i)}}function nG(e,t,n=dT){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),l=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return l+(o-l)*(a-i)}}function rG(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ms(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=iG.exec(e))?new It(t[1],t[2],t[3],1):(t=lG.exec(e))?new It(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=oG.exec(e))?Ms(t[1],t[2],t[3],t[4]):(t=uG.exec(e))?Ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sG.exec(e))?F1(t[1],t[2]/100,t[3]/100,1):(t=cG.exec(e))?F1(t[1],t[2]/100,t[3]/100,t[4]):q1.hasOwnProperty(e)?X1(q1[e]):e==="transparent"?new It(NaN,NaN,NaN,0):null}function X1(e){return new It(e>>16&255,e>>8&255,e&255,1)}function Ms(e,t,n,r){return r<=0&&(e=t=n=NaN),new It(e,t,n,r)}function hG(e){return e instanceof as||(e=du(e)),e?(e=e.rgb(),new It(e.r,e.g,e.b,e.opacity)):new It}function em(e,t,n,r){return arguments.length===1?hG(e):new It(e,t,n,r??1)}function It(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$g(It,em,mT(as,{brighter(e){return e=e==null?ef:Math.pow(ef,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cu:Math.pow(cu,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new It(za(this.r),za(this.g),za(this.b),tf(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:V1,formatHex:V1,formatHex8:pG,formatRgb:K1,toString:K1}));function V1(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function pG(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}${Ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function K1(){const e=tf(this.opacity);return`${e===1?"rgb(":"rgba("}${za(this.r)}, ${za(this.g)}, ${za(this.b)}${e===1?")":`, ${e})`}`}function tf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function za(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ta(e){return e=za(e),(e<16?"0":"")+e.toString(16)}function F1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,r)}function vT(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof as||(e=du(e)),!e)return new Mn;if(e instanceof Mn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),l=NaN,o=i-a,u=(i+a)/2;return o?(t===i?l=(n-r)/o+(n0&&u<1?0:l,new Mn(l,o,u,e.opacity)}function yG(e,t,n,r){return arguments.length===1?vT(e):new Mn(e,t,n,r??1)}function Mn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$g(Mn,yG,mT(as,{brighter(e){return e=e==null?ef:Math.pow(ef,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cu:Math.pow(cu,e),new Mn(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,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new It(ep(e>=240?e-240:e+120,a,r),ep(e,a,r),ep(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Mn(W1(this.h),Cs(this.s),Cs(this.l),tf(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=tf(this.opacity);return`${e===1?"hsl(":"hsla("}${W1(this.h)}, ${Cs(this.s)*100}%, ${Cs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function W1(e){return e=(e||0)%360,e<0?e+360:e}function Cs(e){return Math.max(0,Math.min(1,e||0))}function ep(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Pg=e=>()=>e;function mG(e,t){return function(n){return e+n*t}}function vG(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function gG(e){return(e=+e)==1?gT:function(t,n){return n-t?vG(t,n,e):Pg(isNaN(t)?n:t)}}function gT(e,t){var n=t-e;return n?mG(e,n):Pg(isNaN(e)?t:e)}const Q1=function e(t){var n=gG(t);function r(a,i){var l=n((a=em(a)).r,(i=em(i)).r),o=n(a.g,i.g),u=n(a.b,i.b),s=gT(a.opacity,i.opacity);return function(f){return a.r=l(f),a.g=o(f),a.b=u(f),a.opacity=s(f),a+""}}return r.gamma=e,r}(1);function bG(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;an&&(i=t.slice(n,i),o[l]?o[l]+=i:o[++l]=i),(r=r[0])===(a=a[0])?o[l]?o[l]+=a:o[++l]=a:(o[++l]=null,u.push({i:l,x:nf(r,a)})),n=tp.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function MG(e,t,n){var r=e[0],a=e[1],i=t[0],l=t[1];return a2?CG:MG,u=s=null,c}function c(d){return d==null||isNaN(d=+d)?i:(u||(u=o(e.map(r),t,n)))(r(l(d)))}return c.invert=function(d){return l(a((s||(s=o(t,e.map(r),nf)))(d)))},c.domain=function(d){return arguments.length?(e=Array.from(d,rf),f()):e.slice()},c.range=function(d){return arguments.length?(t=Array.from(d),f()):t.slice()},c.rangeRound=function(d){return t=Array.from(d),n=Dg,f()},c.clamp=function(d){return arguments.length?(l=d?!0:Dt,f()):l!==Dt},c.interpolate=function(d){return arguments.length?(n=d,f()):n},c.unknown=function(d){return arguments.length?(i=d,c):i},function(d,h){return r=d,a=h,f()}}function Rg(){return Cd()(Dt,Dt)}function $G(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function af(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function ul(e){return e=af(Math.abs(e)),e?e[1]:NaN}function PG(e,t){return function(n,r){for(var a=n.length,i=[],l=0,o=e[0],u=0;a>0&&o>0&&(u+o+1>r&&(o=Math.max(1,r-u)),i.push(n.substring(a-=o,a+o)),!((u+=o+1)>r));)o=e[l=(l+1)%e.length];return i.reverse().join(t)}}function DG(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var RG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hu(e){if(!(t=RG.exec(e)))throw new Error("invalid format: "+e);var t;return new zg({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]})}hu.prototype=zg.prototype;function zg(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+""}zg.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 zG(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var lf;function BG(e,t){var n=af(e,t);if(!n)return lf=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(lf=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return i===l?r:i>l?r+new Array(i-l+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+af(e,Math.max(0,t+i-1))[0]}function J1(e,t){var n=af(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const eS={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:$G,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)=>J1(e*100,t),r:J1,s:BG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tS(e){return e}var nS=Array.prototype.map,rS=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LG(e){var t=e.grouping===void 0||e.thousands===void 0?tS:PG(nS.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?tS:DG(nS.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function s(c,d){c=hu(c);var h=c.fill,x=c.align,b=c.sign,m=c.symbol,p=c.zero,y=c.width,g=c.comma,O=c.precision,S=c.trim,w=c.type;w==="n"?(g=!0,w="g"):eS[w]||(O===void 0&&(O=12),S=!0,w="g"),(p||h==="0"&&x==="=")&&(p=!0,h="0",x="=");var A=(d&&d.prefix!==void 0?d.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),_=(m==="$"?r:/[%p]/.test(w)?l:"")+(d&&d.suffix!==void 0?d.suffix:""),T=eS[w],$=/[defgprs%]/.test(w);O=O===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function P(M){var k=A,z=_,B,N,R;if(w==="c")z=T(M)+z,M="";else{M=+M;var D=M<0||1/M<0;if(M=isNaN(M)?u:T(Math.abs(M),O),S&&(M=zG(M)),D&&+M==0&&b!=="+"&&(D=!1),k=(D?b==="("?b:o:b==="-"||b==="("?"":b)+k,z=(w==="s"&&!isNaN(M)&&lf!==void 0?rS[8+lf/3]:"")+z+(D&&b==="("?")":""),$){for(B=-1,N=M.length;++BR||R>57){z=(R===46?a+M.slice(B+1):M.slice(B))+z,M=M.slice(0,B);break}}}g&&!p&&(M=t(M,1/0));var H=k.length+M.length+z.length,q=H>1)+k+M+z+q.slice(H);break;default:M=q+k+M+z;break}return i(M)}return P.toString=function(){return c+""},P}function f(c,d){var h=Math.max(-8,Math.min(8,Math.floor(ul(d)/3)))*3,x=Math.pow(10,-h),b=s((c=hu(c),c.type="f",c),{suffix:rS[8+h/3]});return function(m){return b(x*m)}}return{format:s,formatPrefix:f}}var $s,Bg,bT;UG({thousands:",",grouping:[3],currency:["$",""]});function UG(e){return $s=LG(e),Bg=$s.format,bT=$s.formatPrefix,$s}function kG(e){return Math.max(0,-ul(Math.abs(e)))}function IG(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ul(t)/3)))*3-ul(Math.abs(e)))}function HG(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,ul(t)-ul(e))+1}function xT(e,t,n,r){var a=Zy(e,t,n),i;switch(r=hu(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=IG(a,l))&&(r.precision=i),bT(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=HG(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=kG(a))&&(r.precision=i-(r.type==="%")*2);break}}return Bg(r)}function da(e){var t=e.domain;return e.ticks=function(n){var r=t();return Wy(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return xT(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,l=r[a],o=r[i],u,s,f=10;for(o0;){if(s=Qy(l,o,n),s===u)return r[a]=l,r[i]=o,t(r);if(s>0)l=Math.floor(l/s)*s,o=Math.ceil(o/s)*s;else if(s<0)l=Math.ceil(l*s)/s,o=Math.floor(o*s)/s;else break;u=s}return e},e}function of(){var e=Rg();return e.copy=function(){return is(e,of())},_n.apply(e,arguments),da(e)}function ST(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,rf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return ST(e).unknown(t)},e=arguments.length?Array.from(e,rf):[0,1],da(n)}function OT(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],l;return iMath.pow(e,t)}function VG(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 lS(e){return(t,n)=>-e(-t,n)}function Lg(e){const t=e(aS,iS),n=t.domain;let r=10,a,i;function l(){return a=VG(r),i=XG(r),n()[0]<0?(a=lS(a),i=lS(i),e(qG,GG)):e(aS,iS),t}return t.base=function(o){return arguments.length?(r=+o,l()):r},t.domain=function(o){return arguments.length?(n(o),l()):n()},t.ticks=o=>{const u=n();let s=u[0],f=u[u.length-1];const c=f0){for(;d<=h;++d)for(x=1;xf)break;p.push(b)}}else for(;d<=h;++d)for(x=r-1;x>=1;--x)if(b=d>0?x/i(-d):x*i(d),!(bf)break;p.push(b)}p.length*2{if(o==null&&(o=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=hu(u)).precision==null&&(u.trim=!0),u=Bg(u)),o===1/0)return u;const s=Math.max(1,r*o/t.ticks().length);return f=>{let c=f/i(Math.round(a(f)));return c*rn(OT(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function wT(){const e=Lg(Cd()).domain([1,10]);return e.copy=()=>is(e,wT()).base(e.base()),_n.apply(e,arguments),e}function oS(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function uS(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ug(e){var t=1,n=e(oS(t),uS(t));return n.constant=function(r){return arguments.length?e(oS(t=+r),uS(t)):t},da(n)}function AT(){var e=Ug(Cd());return e.copy=function(){return is(e,AT()).constant(e.constant())},_n.apply(e,arguments)}function sS(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function KG(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function FG(e){return e<0?-e*e:e*e}function kg(e){var t=e(Dt,Dt),n=1;function r(){return n===1?e(Dt,Dt):n===.5?e(KG,FG):e(sS(n),sS(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},da(t)}function Ig(){var e=kg(Cd());return e.copy=function(){return is(e,Ig()).exponent(e.exponent())},_n.apply(e,arguments),e}function WG(){return Ig.apply(null,arguments).exponent(.5)}function cS(e){return Math.sign(e)*e*e}function QG(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function _T(){var e=Rg(),t=[0,1],n=!1,r;function a(i){var l=QG(e(i));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(i){return e.invert(cS(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,rf)).map(cS)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return _T(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},_n.apply(a,arguments),da(a)}function ET(){var e=[],t=[],n=[],r;function a(){var l=0,o=Math.max(1,t.length);for(n=new Array(o-1);++l0?n[o-1]:e[0],o=n?[r[n-1],t]:[r[s-1],r[s]]},l.unknown=function(u){return arguments.length&&(i=u),l},l.thresholds=function(){return r.slice()},l.copy=function(){return TT().domain([e,t]).range(a).unknown(i)},_n.apply(da(l),arguments)}function jT(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[rs(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var l=t.indexOf(i);return[e[l-1],e[l]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return jT().domain(e).range(t).unknown(n)},_n.apply(a,arguments)}const np=new Date,rp=new Date;function ct(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const l=a(i),o=a.ceil(i);return i-l(t(i=new Date(+i),l==null?1:Math.floor(l)),i),a.range=(i,l,o)=>{const u=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i0))return u;let s;do u.push(s=new Date(+i)),t(i,o),e(i);while(sct(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,o)=>{if(l>=l)if(o<0)for(;++o<=0;)for(;t(l,-1),!i(l););else for(;--o>=0;)for(;t(l,1),!i(l););}),n&&(a.count=(i,l)=>(np.setTime(+i),rp.setTime(+l),e(np),e(rp),Math.floor(n(np,rp))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?l=>r(l)%i===0:l=>a.count(0,l)%i===0):a)),a}const uf=ct(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ct(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):uf);uf.range;const or=1e3,gn=or*60,ur=gn*60,Sr=ur*24,Hg=Sr*7,fS=Sr*30,ap=Sr*365,ja=ct(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*or)},(e,t)=>(t-e)/or,e=>e.getUTCSeconds());ja.range;const qg=ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*or)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getMinutes());qg.range;const Gg=ct(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getUTCMinutes());Gg.range;const Yg=ct(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*or-e.getMinutes()*gn)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getHours());Yg.range;const Xg=ct(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ur)},(e,t)=>(t-e)/ur,e=>e.getUTCHours());Xg.range;const ls=ct(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gn)/Sr,e=>e.getDate()-1);ls.range;const $d=ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Sr,e=>e.getUTCDate()-1);$d.range;const NT=ct(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Sr,e=>Math.floor(e/Sr));NT.range;function ri(e){return ct(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*gn)/Hg)}const Pd=ri(0),sf=ri(1),ZG=ri(2),JG=ri(3),sl=ri(4),eY=ri(5),tY=ri(6);Pd.range;sf.range;ZG.range;JG.range;sl.range;eY.range;tY.range;function ai(e){return ct(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Hg)}const Dd=ai(0),cf=ai(1),nY=ai(2),rY=ai(3),cl=ai(4),aY=ai(5),iY=ai(6);Dd.range;cf.range;nY.range;rY.range;cl.range;aY.range;iY.range;const Vg=ct(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());Vg.range;const Kg=ct(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());Kg.range;const Or=ct(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());Or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ct(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Or.range;const wr=ct(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());wr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ct(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});wr.range;function MT(e,t,n,r,a,i){const l=[[ja,1,or],[ja,5,5*or],[ja,15,15*or],[ja,30,30*or],[i,1,gn],[i,5,5*gn],[i,15,15*gn],[i,30,30*gn],[a,1,ur],[a,3,3*ur],[a,6,6*ur],[a,12,12*ur],[r,1,Sr],[r,2,2*Sr],[n,1,Hg],[t,1,fS],[t,3,3*fS],[e,1,ap]];function o(s,f,c){const d=fm).right(l,d);if(h===l.length)return e.every(Zy(s/ap,f/ap,c));if(h===0)return uf.every(Math.max(Zy(s,f,c),1));const[x,b]=l[d/l[h-1][2]53)return null;"w"in I||(I.w=1),"Z"in I?(oe=lp(lo(I.y,0,1)),xe=oe.getUTCDay(),oe=xe>4||xe===0?cf.ceil(oe):cf(oe),oe=$d.offset(oe,(I.V-1)*7),I.y=oe.getUTCFullYear(),I.m=oe.getUTCMonth(),I.d=oe.getUTCDate()+(I.w+6)%7):(oe=ip(lo(I.y,0,1)),xe=oe.getDay(),oe=xe>4||xe===0?sf.ceil(oe):sf(oe),oe=ls.offset(oe,(I.V-1)*7),I.y=oe.getFullYear(),I.m=oe.getMonth(),I.d=oe.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),xe="Z"in I?lp(lo(I.y,0,1)).getUTCDay():ip(lo(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(xe+5)%7:I.w+I.U*7-(xe+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,lp(I)):ip(I)}}function _(V,ee,re,I){for(var Re=0,oe=ee.length,xe=re.length,W,_e;Re=xe)return-1;if(W=ee.charCodeAt(Re++),W===37){if(W=ee.charAt(Re++),_e=S[W in dS?ee.charAt(Re++):W],!_e||(I=_e(V,re,I))<0)return-1}else if(W!=re.charCodeAt(I++))return-1}return I}function T(V,ee,re){var I=s.exec(ee.slice(re));return I?(V.p=f.get(I[0].toLowerCase()),re+I[0].length):-1}function $(V,ee,re){var I=h.exec(ee.slice(re));return I?(V.w=x.get(I[0].toLowerCase()),re+I[0].length):-1}function P(V,ee,re){var I=c.exec(ee.slice(re));return I?(V.w=d.get(I[0].toLowerCase()),re+I[0].length):-1}function M(V,ee,re){var I=p.exec(ee.slice(re));return I?(V.m=y.get(I[0].toLowerCase()),re+I[0].length):-1}function k(V,ee,re){var I=b.exec(ee.slice(re));return I?(V.m=m.get(I[0].toLowerCase()),re+I[0].length):-1}function z(V,ee,re){return _(V,t,ee,re)}function B(V,ee,re){return _(V,n,ee,re)}function N(V,ee,re){return _(V,r,ee,re)}function R(V){return l[V.getDay()]}function D(V){return i[V.getDay()]}function H(V){return u[V.getMonth()]}function q(V){return o[V.getMonth()]}function K(V){return a[+(V.getHours()>=12)]}function G(V){return 1+~~(V.getMonth()/3)}function Q(V){return l[V.getUTCDay()]}function ie(V){return i[V.getUTCDay()]}function Ae(V){return u[V.getUTCMonth()]}function ne(V){return o[V.getUTCMonth()]}function Qe(V){return a[+(V.getUTCHours()>=12)]}function at(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var ee=w(V+="",g);return ee.toString=function(){return V},ee},parse:function(V){var ee=A(V+="",!1);return ee.toString=function(){return V},ee},utcFormat:function(V){var ee=w(V+="",O);return ee.toString=function(){return V},ee},utcParse:function(V){var ee=A(V+="",!0);return ee.toString=function(){return V},ee}}}var dS={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,fY=/^%/,dY=/[\\^$*+?|[\]().{}]/g;function he(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function pY(e,t,n){var r=mt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yY(e,t,n){var r=mt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function mY(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function vY(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function gY(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function hS(e,t,n){var r=mt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function pS(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xY(e,t,n){var r=mt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function SY(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function yS(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function OY(e,t,n){var r=mt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function mS(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wY(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function AY(e,t,n){var r=mt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _Y(e,t,n){var r=mt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function EY(e,t,n){var r=mt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function TY(e,t,n){var r=fY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function jY(e,t,n){var r=mt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function NY(e,t,n){var r=mt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function vS(e,t){return he(e.getDate(),t,2)}function MY(e,t){return he(e.getHours(),t,2)}function CY(e,t){return he(e.getHours()%12||12,t,2)}function $Y(e,t){return he(1+ls.count(Or(e),e),t,3)}function CT(e,t){return he(e.getMilliseconds(),t,3)}function PY(e,t){return CT(e,t)+"000"}function DY(e,t){return he(e.getMonth()+1,t,2)}function RY(e,t){return he(e.getMinutes(),t,2)}function zY(e,t){return he(e.getSeconds(),t,2)}function BY(e){var t=e.getDay();return t===0?7:t}function LY(e,t){return he(Pd.count(Or(e)-1,e),t,2)}function $T(e){var t=e.getDay();return t>=4||t===0?sl(e):sl.ceil(e)}function UY(e,t){return e=$T(e),he(sl.count(Or(e),e)+(Or(e).getDay()===4),t,2)}function kY(e){return e.getDay()}function IY(e,t){return he(sf.count(Or(e)-1,e),t,2)}function HY(e,t){return he(e.getFullYear()%100,t,2)}function qY(e,t){return e=$T(e),he(e.getFullYear()%100,t,2)}function GY(e,t){return he(e.getFullYear()%1e4,t,4)}function YY(e,t){var n=e.getDay();return e=n>=4||n===0?sl(e):sl.ceil(e),he(e.getFullYear()%1e4,t,4)}function XY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+he(t/60|0,"0",2)+he(t%60,"0",2)}function gS(e,t){return he(e.getUTCDate(),t,2)}function VY(e,t){return he(e.getUTCHours(),t,2)}function KY(e,t){return he(e.getUTCHours()%12||12,t,2)}function FY(e,t){return he(1+$d.count(wr(e),e),t,3)}function PT(e,t){return he(e.getUTCMilliseconds(),t,3)}function WY(e,t){return PT(e,t)+"000"}function QY(e,t){return he(e.getUTCMonth()+1,t,2)}function ZY(e,t){return he(e.getUTCMinutes(),t,2)}function JY(e,t){return he(e.getUTCSeconds(),t,2)}function eX(e){var t=e.getUTCDay();return t===0?7:t}function tX(e,t){return he(Dd.count(wr(e)-1,e),t,2)}function DT(e){var t=e.getUTCDay();return t>=4||t===0?cl(e):cl.ceil(e)}function nX(e,t){return e=DT(e),he(cl.count(wr(e),e)+(wr(e).getUTCDay()===4),t,2)}function rX(e){return e.getUTCDay()}function aX(e,t){return he(cf.count(wr(e)-1,e),t,2)}function iX(e,t){return he(e.getUTCFullYear()%100,t,2)}function lX(e,t){return e=DT(e),he(e.getUTCFullYear()%100,t,2)}function oX(e,t){return he(e.getUTCFullYear()%1e4,t,4)}function uX(e,t){var n=e.getUTCDay();return e=n>=4||n===0?cl(e):cl.ceil(e),he(e.getUTCFullYear()%1e4,t,4)}function sX(){return"+0000"}function bS(){return"%"}function xS(e){return+e}function SS(e){return Math.floor(+e/1e3)}var di,RT,zT;cX({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 cX(e){return di=cY(e),RT=di.format,di.parse,zT=di.utcFormat,di.utcParse,di}function fX(e){return new Date(e)}function dX(e){return e instanceof Date?+e:+new Date(+e)}function Fg(e,t,n,r,a,i,l,o,u,s){var f=Rg(),c=f.invert,d=f.domain,h=s(".%L"),x=s(":%S"),b=s("%I:%M"),m=s("%I %p"),p=s("%a %d"),y=s("%b %d"),g=s("%B"),O=s("%Y");function S(w){return(u(w)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>tG(e,i/r))},n.copy=function(){return kT(t).domain(e)},jr.apply(n,arguments)}function zd(){var e=0,t=.5,n=1,r=1,a,i,l,o,u,s=Dt,f,c=!1,d;function h(b){return isNaN(b=+b)?d:(b=.5+((b=+f(b))-i)*(r*bt}var xX=bX,SX=GT,OX=xX,wX=Gl;function AX(e){return e&&e.length?SX(e,wX,OX):void 0}var _X=AX;const Bd=Ne(_X);function EX(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};F.decimalPlaces=F.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};F.dividedBy=F.div=function(e){return yr(this,new this.constructor(e))};F.dividedToIntegerBy=F.idiv=function(e){var t=this,n=t.constructor;return Me(yr(t,new n(e),0,1),n.precision)};F.equals=F.eq=function(e){return!this.cmp(e)};F.exponent=function(){return rt(this)};F.greaterThan=F.gt=function(e){return this.cmp(e)>0};F.greaterThanOrEqualTo=F.gte=function(e){return this.cmp(e)>=0};F.isInteger=F.isint=function(){return this.e>this.d.length-2};F.isNegative=F.isneg=function(){return this.s<0};F.isPositive=F.ispos=function(){return this.s>0};F.isZero=function(){return this.s===0};F.lessThan=F.lt=function(e){return this.cmp(e)<0};F.lessThanOrEqualTo=F.lte=function(e){return this.cmp(e)<1};F.logarithm=F.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Jt))throw Error(wn+"NaN");if(n.s<1)throw Error(wn+(n.s?"NaN":"-Infinity"));return n.eq(Jt)?new r(0):(qe=!1,t=yr(pu(n,i),pu(e,i),i),qe=!0,Me(t,a))};F.minus=F.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?KT(t,e):XT(t,(e.s=-e.s,e))};F.modulo=F.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(wn+"NaN");return n.s?(qe=!1,t=yr(n,e,0,1).times(e),qe=!0,n.minus(t)):Me(new r(n),a)};F.naturalExponential=F.exp=function(){return VT(this)};F.naturalLogarithm=F.ln=function(){return pu(this)};F.negated=F.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};F.plus=F.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?XT(t,e):KT(t,(e.s=-e.s,e))};F.precision=F.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ba+e);if(t=rt(a)+1,r=a.d.length-1,n=r*Le+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};F.squareRoot=F.sqrt=function(){var e,t,n,r,a,i,l,o=this,u=o.constructor;if(o.s<1){if(!o.s)return new u(0);throw Error(wn+"NaN")}for(e=rt(o),qe=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=kn(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Vl((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(a.toString()),n=u.precision,a=l=n+3;;)if(i=r,r=i.plus(yr(o,i,l+2)).times(.5),kn(i.d).slice(0,l)===(t=kn(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(Me(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;l+=4}return qe=!0,Me(r,n)};F.times=F.mul=function(e){var t,n,r,a,i,l,o,u,s,f=this,c=f.constructor,d=f.d,h=(e=new c(e)).d;if(!f.s||!e.s)return new c(0);for(e.s*=f.s,n=f.e+e.e,u=d.length,s=h.length,u=0;){for(t=0,a=u+r;a>r;)o=i[a]+h[r]*d[a-r-1]+t,i[a--]=o%ft|0,t=o/ft|0;i[a]=(i[a]+t)%ft|0}for(;!i[--l];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,qe?Me(e,c.precision):e};F.toDecimalPlaces=F.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Gn(e,0,Xl),t===void 0?t=r.rounding:Gn(t,0,8),Me(n,e+rt(n)+1,t))};F.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Ka(r,!0):(Gn(e,0,Xl),t===void 0?t=a.rounding:Gn(t,0,8),r=Me(new a(r),e+1,t),n=Ka(r,!0,e+1)),n};F.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?Ka(a):(Gn(e,0,Xl),t===void 0?t=i.rounding:Gn(t,0,8),r=Me(new i(a),e+rt(a)+1,t),n=Ka(r.abs(),!1,e+rt(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};F.toInteger=F.toint=function(){var e=this,t=e.constructor;return Me(new t(e),rt(e)+1,t.rounding)};F.toNumber=function(){return+this};F.toPower=F.pow=function(e){var t,n,r,a,i,l,o=this,u=o.constructor,s=12,f=+(e=new u(e));if(!e.s)return new u(Jt);if(o=new u(o),!o.s){if(e.s<1)throw Error(wn+"Infinity");return o}if(o.eq(Jt))return o;if(r=u.precision,e.eq(Jt))return Me(o,r);if(t=e.e,n=e.d.length-1,l=t>=n,i=o.s,l){if((n=f<0?-f:f)<=YT){for(a=new u(Jt),t=Math.ceil(r/Le+4),qe=!1;n%2&&(a=a.times(o),AS(a.d,t)),n=Vl(n/2),n!==0;)o=o.times(o),AS(o.d,t);return qe=!0,e.s<0?new u(Jt).div(a):Me(a,r)}}else if(i<0)throw Error(wn+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,qe=!1,a=e.times(pu(o,r+s)),qe=!0,a=VT(a),a.s=i,a};F.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=rt(a),r=Ka(a,n<=i.toExpNeg||n>=i.toExpPos)):(Gn(e,1,Xl),t===void 0?t=i.rounding:Gn(t,0,8),a=Me(new i(a),e,t),n=rt(a),r=Ka(a,e<=n||n<=i.toExpNeg,e)),r};F.toSignificantDigits=F.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Gn(e,1,Xl),t===void 0?t=r.rounding:Gn(t,0,8)),Me(new r(n),e,t)};F.toString=F.valueOf=F.val=F.toJSON=F[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=rt(e),n=e.constructor;return Ka(e,t<=n.toExpNeg||t>=n.toExpPos)};function XT(e,t){var n,r,a,i,l,o,u,s,f=e.constructor,c=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),qe?Me(t,c):t;if(u=e.d,s=t.d,l=e.e,a=t.e,u=u.slice(),i=l-a,i){for(i<0?(r=u,i=-i,o=s.length):(r=s,a=l,o=u.length),l=Math.ceil(c/Le),o=l>o?l+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=u.length,i=s.length,o-i<0&&(i=o,r=s,s=u,u=r),n=0;i;)n=(u[--i]=u[i]+s[i]+n)/ft|0,u[i]%=ft;for(n&&(u.unshift(n),++a),o=u.length;u[--o]==0;)u.pop();return t.d=u,t.e=a,qe?Me(t,c):t}function Gn(e,t,n){if(e!==~~e||en)throw Error(Ba+e)}function kn(e){var t,n,r,a=e.length-1,i="",l=e[0];if(a>0){for(i+=l,t=1;tl?1:-1;else for(o=u=0;oa[o]?1:-1;break}return u}function n(r,a,i){for(var l=0;i--;)r[i]-=l,l=r[i]1;)r.shift()}return function(r,a,i,l){var o,u,s,f,c,d,h,x,b,m,p,y,g,O,S,w,A,_,T=r.constructor,$=r.s==a.s?1:-1,P=r.d,M=a.d;if(!r.s)return new T(r);if(!a.s)throw Error(wn+"Division by zero");for(u=r.e-a.e,A=M.length,S=P.length,h=new T($),x=h.d=[],s=0;M[s]==(P[s]||0);)++s;if(M[s]>(P[s]||0)&&--u,i==null?y=i=T.precision:l?y=i+(rt(r)-rt(a))+1:y=i,y<0)return new T(0);if(y=y/Le+2|0,s=0,A==1)for(f=0,M=M[0],y++;(s1&&(M=e(M,f),P=e(P,f),A=M.length,S=P.length),O=A,b=P.slice(0,A),m=b.length;m=ft/2&&++w;do f=0,o=t(M,b,A,m),o<0?(p=b[0],A!=m&&(p=p*ft+(b[1]||0)),f=p/w|0,f>1?(f>=ft&&(f=ft-1),c=e(M,f),d=c.length,m=b.length,o=t(c,b,d,m),o==1&&(f--,n(c,A16)throw Error(Jg+rt(e));if(!e.s)return new f(Jt);for(qe=!1,o=c,l=new f(.03125);e.abs().gte(.1);)e=e.times(l),s+=5;for(r=Math.log(Aa(2,s))/Math.LN10*2+5|0,o+=r,n=a=i=new f(Jt),f.precision=o;;){if(a=Me(a.times(e),o),n=n.times(++u),l=i.plus(yr(a,n,o)),kn(l.d).slice(0,o)===kn(i.d).slice(0,o)){for(;s--;)i=Me(i.times(i),o);return f.precision=c,t==null?(qe=!0,Me(i,c)):i}i=l}}function rt(e){for(var t=e.e*Le,n=e.d[0];n>=10;n/=10)t++;return t}function op(e,t,n){if(t>e.LN10.sd())throw qe=!0,n&&(e.precision=n),Error(wn+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function $r(e){for(var t="";e--;)t+="0";return t}function pu(e,t){var n,r,a,i,l,o,u,s,f,c=1,d=10,h=e,x=h.d,b=h.constructor,m=b.precision;if(h.s<1)throw Error(wn+(h.s?"NaN":"-Infinity"));if(h.eq(Jt))return new b(0);if(t==null?(qe=!1,s=m):s=t,h.eq(10))return t==null&&(qe=!0),op(b,s);if(s+=d,b.precision=s,n=kn(x),r=n.charAt(0),i=rt(h),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=kn(h.d),r=n.charAt(0),c++;i=rt(h),r>1?(h=new b("0."+n),i++):h=new b(r+"."+n.slice(1))}else return u=op(b,s+2,m).times(i+""),h=pu(new b(r+"."+n.slice(1)),s-d).plus(u),b.precision=m,t==null?(qe=!0,Me(h,m)):h;for(o=l=h=yr(h.minus(Jt),h.plus(Jt),s),f=Me(h.times(h),s),a=3;;){if(l=Me(l.times(f),s),u=o.plus(yr(l,new b(a),s)),kn(u.d).slice(0,s)===kn(o.d).slice(0,s))return o=o.times(2),i!==0&&(o=o.plus(op(b,s+2,m).times(i+""))),o=yr(o,new b(c),s),b.precision=m,t==null?(qe=!0,Me(o,m)):o;o=u,a+=2}}function wS(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Vl(n/Le),e.d=[],r=(n+1)%Le,n<0&&(r+=Le),rff||e.e<-ff))throw Error(Jg+n)}else e.s=0,e.e=0,e.d=[0];return e}function Me(e,t,n){var r,a,i,l,o,u,s,f,c=e.d;for(l=1,i=c[0];i>=10;i/=10)l++;if(r=t-l,r<0)r+=Le,a=t,s=c[f=0];else{if(f=Math.ceil((r+1)/Le),i=c.length,f>=i)return e;for(s=i=c[f],l=1;i>=10;i/=10)l++;r%=Le,a=r-Le+l}if(n!==void 0&&(i=Aa(10,l-a-1),o=s/i%10|0,u=t<0||c[f+1]!==void 0||s%i,u=n<4?(o||u)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||u||n==6&&(r>0?a>0?s/Aa(10,l-a):0:c[f-1])%10&1||n==(e.s<0?8:7))),t<1||!c[0])return u?(i=rt(e),c.length=1,t=t-i-1,c[0]=Aa(10,(Le-t%Le)%Le),e.e=Vl(-t/Le)||0):(c.length=1,c[0]=e.e=e.s=0),e;if(r==0?(c.length=f,i=1,f--):(c.length=f+1,i=Aa(10,Le-r),c[f]=a>0?(s/Aa(10,l-a)%Aa(10,a)|0)*i:0),u)for(;;)if(f==0){(c[0]+=i)==ft&&(c[0]=1,++e.e);break}else{if(c[f]+=i,c[f]!=ft)break;c[f--]=0,i=1}for(r=c.length;c[--r]===0;)c.pop();if(qe&&(e.e>ff||e.e<-ff))throw Error(Jg+rt(e));return e}function KT(e,t){var n,r,a,i,l,o,u,s,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),qe?Me(t,h):t;if(u=e.d,c=t.d,r=t.e,s=e.e,u=u.slice(),l=s-r,l){for(f=l<0,f?(n=u,l=-l,o=c.length):(n=c,r=s,o=u.length),a=Math.max(Math.ceil(h/Le),o)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=u.length,o=c.length,f=a0;--a)u[o++]=0;for(a=c.length;a>l;){if(u[--a]0?i=i.charAt(0)+"."+i.slice(1)+$r(r):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+$r(-a-1)+i,n&&(r=n-l)>0&&(i+=$r(r))):a>=l?(i+=$r(a+1-l),n&&(r=n-a-1)>0&&(i=i+"."+$r(r))):((r=a+1)0&&(a+1===l&&(i+="."),i+=$r(r))),e.s<0?"-"+i:i}function AS(e,t){if(e.length>t)return e.length=t,!0}function FT(e){var t,n,r;function a(i){var l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,i instanceof a){l.s=i.s,l.e=i.e,l.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Ba+i);if(i>0)l.s=1;else if(i<0)i=-i,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(i===~~i&&i<1e7){l.e=0,l.d=[i];return}return wS(l,i.toString())}else if(typeof i!="string")throw Error(Ba+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,KX.test(i))wS(l,i);else throw Error(Ba+i)}if(a.prototype=F,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=FT,a.config=a.set=FX,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Ba+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ba+n+": "+r);return this}var e0=FT(VX);Jt=new e0(1);const Te=e0;function WX(e){return eV(e)||JX(e)||ZX(e)||QX()}function QX(){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 ZX(e,t){if(e){if(typeof e=="string")return rm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rm(e,t)}}function JX(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function eV(e){if(Array.isArray(e))return rm(e)}function rm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,a):e(t-l,_S(function(){for(var o=arguments.length,u=new Array(o),s=0;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var l=e[Symbol.iterator](),o;!(r=(o=l.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(u){a=!0,i=u}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw i}}return n}}function yV(e){if(Array.isArray(e))return e}function ej(e){var t=yu(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function tj(e,t,n){if(e.lte(0))return new Te(0);var r=kd.getDigitCount(e.toNumber()),a=new Te(10).pow(r),i=e.div(a),l=r!==1?.05:.1,o=new Te(Math.ceil(i.div(l).toNumber())).add(n).mul(l),u=o.mul(a);return t?u:new Te(Math.ceil(u))}function mV(e,t,n){var r=1,a=new Te(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Te(10).pow(kd.getDigitCount(e)-1),a=new Te(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Te(Math.floor(e)))}else e===0?a=new Te(Math.floor((t-1)/2)):n||(a=new Te(Math.floor(e)));var l=Math.floor((t-1)/2),o=aV(rV(function(u){return a.add(new Te(u-l).mul(r)).toNumber()}),am);return o(0,t)}function nj(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Te(0),tickMin:new Te(0),tickMax:new Te(0)};var i=tj(new Te(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Te(0):(l=new Te(e).add(t).div(2),l=l.sub(new Te(l).mod(i)));var o=Math.ceil(l.sub(e).div(i).toNumber()),u=Math.ceil(new Te(t).sub(l).div(i).toNumber()),s=o+u+1;return s>n?nj(e,t,n,r,a+1):(s0?u+(n-s):u,o=t>0?o:o+(n-s)),{step:i,tickMin:l.sub(new Te(o).mul(i)),tickMax:l.add(new Te(u).mul(i))})}function vV(e){var t=yu(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),o=ej([n,r]),u=yu(o,2),s=u[0],f=u[1];if(s===-1/0||f===1/0){var c=f===1/0?[s].concat(lm(am(0,a-1).map(function(){return 1/0}))):[].concat(lm(am(0,a-1).map(function(){return-1/0})),[f]);return n>r?im(c):c}if(s===f)return mV(s,a,i);var d=nj(s,f,l,i),h=d.step,x=d.tickMin,b=d.tickMax,m=kd.rangeStep(x,b.add(new Te(.1).mul(h)),h);return n>r?im(m):m}function gV(e,t){var n=yu(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=ej([r,a]),o=yu(l,2),u=o[0],s=o[1];if(u===-1/0||s===1/0)return[r,a];if(u===s)return[u];var f=Math.max(t,2),c=tj(new Te(s).sub(u).div(f-1),i,0),d=[].concat(lm(kd.rangeStep(new Te(u),new Te(s).sub(new Te(.99).mul(c)),c)),[s]);return r>a?im(d):d}var bV=ZT(vV),xV=ZT(gV),SV="Invariant failed";function Fa(e,t){throw new Error(SV)}var OV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function fl(e){"@babel/helpers - typeof";return fl=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},fl(e)}function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CV(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var u=i.range,s=0;s0?a[s-1].coordinate:a[o-1].coordinate,c=a[s].coordinate,d=s>=o-1?a[0].coordinate:a[s+1].coordinate,h=void 0;if(Cn(c-f)!==Cn(d-c)){var x=[];if(Cn(d-c)===Cn(u[1]-u[0])){h=d;var b=c+u[1]-u[0];x[0]=Math.min(b,(b+f)/2),x[1]=Math.max(b,(b+f)/2)}else{h=f;var m=d+u[1]-u[0];x[0]=Math.min(c,(m+c)/2),x[1]=Math.max(c,(m+c)/2)}var p=[Math.min(c,(h+c)/2),Math.max(c,(h+c)/2)];if(t>p[0]&&t<=p[1]||t>=x[0]&&t<=x[1]){l=a[s].index;break}}else{var y=Math.min(f,d),g=Math.max(f,d);if(t>(y+c)/2&&t<=(g+c)/2){l=a[s].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===o-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){l=r[O].index;break}return l},t0=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ve(Ve({},t.type.defaultProps),t.props):t.props,l=i.stroke,o=i.fill,u;switch(a){case"Line":u=l;break;case"Area":case"Radar":u=l&&l!=="none"?l:o;break;default:u=o;break}return u},KV=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var l={},o=Object.keys(i),u=0,s=o.length;u=0});if(p&&p.length){var y=p[0].type.defaultProps,g=y!==void 0?Ve(Ve({},y),p[0].props):p[0].props,O=g.barSize,S=g[m];l[S]||(l[S]=[]);var w=ve(O)?n:O;l[S].push({item:p[0],stackList:p.slice(1),barSize:ve(w)?void 0:Va(w,r,0)})}}return l},FV=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,o=t.maxBarSize,u=l.length;if(u<1)return null;var s=Va(n,a,0,!0),f,c=[];if(l[0].barSize===+l[0].barSize){var d=!1,h=a/u,x=l.reduce(function(O,S){return O+S.barSize||0},0);x+=(u-1)*s,x>=a&&(x-=(u-1)*s,s=0),x>=a&&h>0&&(d=!0,h*=.9,x=u*h);var b=(a-x)/2>>0,m={offset:b-s,size:0};f=l.reduce(function(O,S){var w={item:S.item,position:{offset:m.offset+m.size+s,size:d?h:S.barSize}},A=[].concat(jS(O),[w]);return m=A[A.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(_){A.push({item:_,position:m})}),A},c)}else{var p=Va(r,a,0,!0);a-2*p-(u-1)*s<=0&&(s=0);var y=(a-2*p-(u-1)*s)/u;y>1&&(y>>=0);var g=o===+o?Math.min(y,o):y;f=l.reduce(function(O,S,w){var A=[].concat(jS(O),[{item:S.item,position:{offset:p+(y+s)*w+(y-g)/2,size:g}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(_){A.push({item:_,position:A[A.length-1].position})}),A},c)}return f},WV=function(t,n,r,a){var i=r.children,l=r.width,o=r.margin,u=l-(o.left||0)-(o.right||0),s=lj({children:i,legendWidth:u});if(s){var f=a||{},c=f.width,d=f.height,h=s.align,x=s.verticalAlign,b=s.layout;if((b==="vertical"||b==="horizontal"&&x==="middle")&&h!=="center"&&Y(t[h]))return Ve(Ve({},t),{},Hi({},h,t[h]+(c||0)));if((b==="horizontal"||b==="vertical"&&h==="center")&&x!=="middle"&&Y(t[x]))return Ve(Ve({},t),{},Hi({},x,t[x]+(d||0)))}return t},QV=function(t,n,r){return ve(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},oj=function(t,n,r,a,i){var l=n.props.children,o=$n(l,Id).filter(function(s){return QV(a,i,s.props.direction)});if(o&&o.length){var u=o.map(function(s){return s.props.dataKey});return t.reduce(function(s,f){var c=Yn(f,r);if(ve(c))return s;var d=Array.isArray(c)?[Ld(c),Bd(c)]:[c,c],h=u.reduce(function(x,b){var m=Yn(f,b,0),p=d[0]-Math.abs(Array.isArray(m)?m[0]:m),y=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(p,x[0]),Math.max(y,x[1])]},[1/0,-1/0]);return[Math.min(h[0],s[0]),Math.max(h[1],s[1])]},[1/0,-1/0])}return null},ZV=function(t,n,r,a,i){var l=n.map(function(o){return oj(t,o,r,i,a)}).filter(function(o){return!ve(o)});return l&&l.length?l.reduce(function(o,u){return[Math.min(o[0],u[0]),Math.max(o[1],u[1])]},[1/0,-1/0]):null},uj=function(t,n,r,a,i){var l=n.map(function(u){var s=u.props.dataKey;return r==="number"&&s&&oj(t,u,s,a)||zo(t,s,r,i)});if(r==="number")return l.reduce(function(u,s){return[Math.min(u[0],s[0]),Math.max(u[1],s[1])]},[1/0,-1/0]);var o={};return l.reduce(function(u,s){for(var f=0,c=s.length;f=2?Cn(o[0]-o[1])*2*s:s,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(c){var d=i?i.indexOf(c):c;return{coordinate:a(d)+s,value:c,offset:s}});return f.filter(function(c){return!es(c.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(c,d){return{coordinate:a(c)+s,value:c,index:d,offset:s}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(c){return{coordinate:a(c)+s,value:c,offset:s}}):a.domain().map(function(c,d){return{coordinate:a(c)+s,value:i?i[c]:c,index:d,offset:s}})},up=new WeakMap,Ps=function(t,n){if(typeof n!="function")return t;up.has(t)||up.set(t,new WeakMap);var r=up.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},JV=function(t,n,r){var a=t.scale,i=t.type,l=t.layout,o=t.axisType;if(a==="auto")return l==="radial"&&o==="radiusAxis"?{scale:su(),realScaleType:"band"}:l==="radial"&&o==="angleAxis"?{scale:of(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ro(),realScaleType:"point"}:i==="category"?{scale:su(),realScaleType:"band"}:{scale:of(),realScaleType:"linear"};if(Xa(a)){var u="scale".concat(Ad(a));return{scale:(OS[u]||Ro)(),realScaleType:OS[u]?u:"point"}}return le(a)?{scale:a}:{scale:Ro(),realScaleType:"point"}},MS=1e-4,eK=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-MS,l=Math.max(a[0],a[1])+MS,o=t(n[0]),u=t(n[r-1]);(ol||ul)&&t.domain([n[0],n[r-1]])}},tK=function(t,n){if(!t)return null;for(var r=0,a=t.length;ra)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]=0?(t[o][r][0]=i,t[o][r][1]=i+u,i=t[o][r][1]):(t[o][r][0]=l,t[o][r][1]=l+u,l=t[o][r][1])}},aK=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r=0?(t[l][r][0]=i,t[l][r][1]=i+o,i=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},iK={sign:rK,expand:bB,none:rl,silhouette:xB,wiggle:SB,positive:aK},lK=function(t,n,r){var a=n.map(function(o){return o.props.dataKey}),i=iK[r],l=gB().keys(a).value(function(o,u){return+Yn(o,u,0)}).order(Dy).offset(i);return l(t)},oK=function(t,n,r,a,i,l){if(!t)return null;var o=l?n.reverse():n,u={},s=o.reduce(function(c,d){var h,x=(h=d.type)!==null&&h!==void 0&&h.defaultProps?Ve(Ve({},d.type.defaultProps),d.props):d.props,b=x.stackId,m=x.hide;if(m)return c;var p=x[r],y=c[p]||{hasStack:!1,stackGroups:{}};if(ut(b)){var g=y.stackGroups[b]||{numericAxisId:r,cateAxisId:a,items:[]};g.items.push(d),y.hasStack=!0,y.stackGroups[b]=g}else y.stackGroups[wd("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[d]};return Ve(Ve({},c),{},Hi({},p,y))},u),f={};return Object.keys(s).reduce(function(c,d){var h=s[d];if(h.hasStack){var x={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(b,m){var p=h.stackGroups[m];return Ve(Ve({},b),{},Hi({},m,{numericAxisId:r,cateAxisId:a,items:p.items,stackedData:lK(t,p.items,i)}))},x)}return Ve(Ve({},c),{},Hi({},d,h))},f)},uK=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,l=n.originalDomain,o=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(i&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var s=t.domain();if(!s.length)return null;var f=bV(s,i,o);return t.domain([Ld(f),Bd(f)]),{niceTicks:f}}if(i&&a==="number"){var c=t.domain(),d=xV(c,i,o);return{niceTicks:d}}return null},CS=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,l=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+a:null;var u=Yn(l,n.dataKey,n.domain[o]);return ve(u)?null:n.scale(u)-i/2+a},sK=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},cK=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ve(Ve({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(ut(i)){var l=n[i];if(l){var o=l.items.indexOf(t);return o>=0?l.stackedData[o]:null}}return null},fK=function(t){return t.reduce(function(n,r){return[Ld(r.concat([n[0]]).filter(Y)),Bd(r.concat([n[1]]).filter(Y))]},[1/0,-1/0])},fj=function(t,n,r){return Object.keys(t).reduce(function(a,i){var l=t[i],o=l.stackedData,u=o.reduce(function(s,f){var c=fK(f.slice(n,r+1));return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]);return[Math.min(u[0],a[0]),Math.max(u[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},$S=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cm=function(t,n,r){if(le(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(Y(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if($S.test(t[0])){var i=+$S.exec(t[0])[1];a[0]=n[0]-i}else le(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Y(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(PS.test(t[1])){var l=+PS.exec(t[1])[1];a[1]=n[1]+l}else le(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},pf=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=jg(n,function(c){return c.coordinate}),l=1/0,o=1,u=i.length;ol&&(s=2*Math.PI-s),{radius:o,angle:yK(s),angleInRadian:s}},gK=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),l=Math.min(a,i);return{startAngle:n-l*360,endAngle:r-l*360}},bK=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),l=Math.floor(a/360),o=Math.min(i,l);return t+o*360},BS=function(t,n){var r=t.x,a=t.y,i=vK({x:r,y:a},n),l=i.radius,o=i.angle,u=n.innerRadius,s=n.outerRadius;if(ls)return!1;if(l===0)return!0;var f=gK(n),c=f.startAngle,d=f.endAngle,h=o,x;if(c<=d){for(;h>d;)h-=360;for(;h=c&&h<=d}else{for(;h>c;)h-=360;for(;h=d&&h<=c}return x?zS(zS({},n),{},{radius:l,angle:bK(h,n)}):null};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)}var xK=["offset"];function SK(e){return _K(e)||AK(e)||wK(e)||OK()}function OK(){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 wK(e,t){if(e){if(typeof e=="string")return fm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fm(e,t)}}function AK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _K(e){if(Array.isArray(e))return fm(e)}function fm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t=0?1:-1,g,O;a==="insideStart"?(g=h+y*l,O=b):a==="insideEnd"?(g=x-y*l,O=!b):a==="end"&&(g=x+y*l,O=b),O=p<=0?O:!O;var S=At(s,f,m,g),w=At(s,f,m,g+(O?1:-1)*359),A="M".concat(S.x,",").concat(S.y,`
+ A`).concat(m,",").concat(m,",0,1,").concat(O?0:1,`,
+ `).concat(w.x,",").concat(w.y),_=ve(t.id)?wd("recharts-radial-line-"):t.id;return C.createElement("text",xu({},r,{dominantBaseline:"central",className:me("recharts-radial-bar-label",o)}),C.createElement("defs",null,C.createElement("path",{id:_,d:A})),C.createElement("textPath",{xlinkHref:"#".concat(_)},n))},DK=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,l=i.cx,o=i.cy,u=i.innerRadius,s=i.outerRadius,f=i.startAngle,c=i.endAngle,d=(f+c)/2;if(a==="outside"){var h=At(l,o,s+r,d),x=h.x,b=h.y;return{x,y:b,textAnchor:x>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"end"};var m=(u+s)/2,p=At(l,o,m,d),y=p.x,g=p.y;return{x:y,y:g,textAnchor:"middle",verticalAnchor:"middle"}},RK=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,l=n,o=l.x,u=l.y,s=l.width,f=l.height,c=f>=0?1:-1,d=c*a,h=c>0?"end":"start",x=c>0?"start":"end",b=s>=0?1:-1,m=b*a,p=b>0?"end":"start",y=b>0?"start":"end";if(i==="top"){var g={x:o+s/2,y:u-c*a,textAnchor:"middle",verticalAnchor:h};return lt(lt({},g),r?{height:Math.max(u-r.y,0),width:s}:{})}if(i==="bottom"){var O={x:o+s/2,y:u+f+d,textAnchor:"middle",verticalAnchor:x};return lt(lt({},O),r?{height:Math.max(r.y+r.height-(u+f),0),width:s}:{})}if(i==="left"){var S={x:o-m,y:u+f/2,textAnchor:p,verticalAnchor:"middle"};return lt(lt({},S),r?{width:Math.max(S.x-r.x,0),height:f}:{})}if(i==="right"){var w={x:o+s+m,y:u+f/2,textAnchor:y,verticalAnchor:"middle"};return lt(lt({},w),r?{width:Math.max(r.x+r.width-w.x,0),height:f}:{})}var A=r?{width:s,height:f}:{};return i==="insideLeft"?lt({x:o+m,y:u+f/2,textAnchor:y,verticalAnchor:"middle"},A):i==="insideRight"?lt({x:o+s-m,y:u+f/2,textAnchor:p,verticalAnchor:"middle"},A):i==="insideTop"?lt({x:o+s/2,y:u+d,textAnchor:"middle",verticalAnchor:x},A):i==="insideBottom"?lt({x:o+s/2,y:u+f-d,textAnchor:"middle",verticalAnchor:h},A):i==="insideTopLeft"?lt({x:o+m,y:u+d,textAnchor:y,verticalAnchor:x},A):i==="insideTopRight"?lt({x:o+s-m,y:u+d,textAnchor:p,verticalAnchor:x},A):i==="insideBottomLeft"?lt({x:o+m,y:u+f-d,textAnchor:y,verticalAnchor:h},A):i==="insideBottomRight"?lt({x:o+s-m,y:u+f-d,textAnchor:p,verticalAnchor:h},A):Ll(i)&&(Y(i.x)||Ea(i.x))&&(Y(i.y)||Ea(i.y))?lt({x:o+Va(i.x,s),y:u+Va(i.y,f),textAnchor:"end",verticalAnchor:"end"},A):lt({x:o+s/2,y:u+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},zK=function(t){return"cx"in t&&Y(t.cx)};function jt(e){var t=e.offset,n=t===void 0?5:t,r=EK(e,xK),a=lt({offset:n},r),i=a.viewBox,l=a.position,o=a.value,u=a.children,s=a.content,f=a.className,c=f===void 0?"":f,d=a.textBreakAll;if(!i||ve(o)&&ve(u)&&!E.isValidElement(s)&&!le(s))return null;if(E.isValidElement(s))return E.cloneElement(s,a);var h;if(le(s)){if(h=E.createElement(s,a),E.isValidElement(h))return h}else h=CK(a);var x=zK(i),b=pe(a,!0);if(x&&(l==="insideStart"||l==="insideEnd"||l==="end"))return PK(a,h,b);var m=x?DK(a):RK(a);return C.createElement(Zc,xu({className:me("recharts-label",c)},b,m,{breakAll:d}),h)}jt.displayName="Label";var hj=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,l=t.endAngle,o=t.r,u=t.radius,s=t.innerRadius,f=t.outerRadius,c=t.x,d=t.y,h=t.top,x=t.left,b=t.width,m=t.height,p=t.clockWise,y=t.labelViewBox;if(y)return y;if(Y(b)&&Y(m)){if(Y(c)&&Y(d))return{x:c,y:d,width:b,height:m};if(Y(h)&&Y(x))return{x:h,y:x,width:b,height:m}}return Y(c)&&Y(d)?{x:c,y:d,width:0,height:0}:Y(n)&&Y(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:l||a||0,innerRadius:s||0,outerRadius:f||u||o||0,clockWise:p}:t.viewBox?t.viewBox:{}},BK=function(t,n){return t?t===!0?C.createElement(jt,{key:"label-implicit",viewBox:n}):ut(t)?C.createElement(jt,{key:"label-implicit",viewBox:n,value:t}):E.isValidElement(t)?t.type===jt?E.cloneElement(t,{key:"label-implicit",viewBox:n}):C.createElement(jt,{key:"label-implicit",content:t,viewBox:n}):le(t)?C.createElement(jt,{key:"label-implicit",content:t,viewBox:n}):Ll(t)?C.createElement(jt,xu({viewBox:n},t,{key:"label-implicit"})):null:null},LK=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,i=hj(t),l=$n(a,jt).map(function(u,s){return E.cloneElement(u,{viewBox:n||i,key:"label-".concat(s)})});if(!r)return l;var o=BK(t.label,n||i);return[o].concat(SK(l))};jt.parseViewBox=hj;jt.renderCallByParent=LK;function UK(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var kK=UK;const IK=Ne(kK);function Su(e){"@babel/helpers - typeof";return Su=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},Su(e)}var HK=["valueAccessor"],qK=["data","dataKey","clockWise","id","textBreakAll"];function GK(e){return KK(e)||VK(e)||XK(e)||YK()}function YK(){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 XK(e,t){if(e){if(typeof e=="string")return dm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dm(e,t)}}function VK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KK(e){if(Array.isArray(e))return dm(e)}function dm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var JK=function(t){return Array.isArray(t.value)?IK(t.value):t.value};function La(e){var t=e.valueAccessor,n=t===void 0?JK:t,r=IS(e,HK),a=r.data,i=r.dataKey,l=r.clockWise,o=r.id,u=r.textBreakAll,s=IS(r,qK);return!a||!a.length?null:C.createElement(pt,{className:"recharts-label-list"},a.map(function(f,c){var d=ve(i)?n(f,c):Yn(f&&f.payload,i),h=ve(o)?{}:{id:"".concat(o,"-").concat(c)};return C.createElement(jt,mf({},pe(f,!0),s,h,{parentViewBox:f.parentViewBox,value:d,textBreakAll:u,viewBox:jt.parseViewBox(ve(l)?f:kS(kS({},f),{},{clockWise:l})),key:"label-".concat(c),index:c}))}))}La.displayName="LabelList";function eF(e,t){return e?e===!0?C.createElement(La,{key:"labelList-implicit",data:t}):C.isValidElement(e)||le(e)?C.createElement(La,{key:"labelList-implicit",data:t,content:e}):Ll(e)?C.createElement(La,mf({data:t},e,{key:"labelList-implicit"})):null:null}function tF(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=$n(r,La).map(function(l,o){return E.cloneElement(l,{data:t,key:"labelList-".concat(o)})});if(!n)return a;var i=eF(e.label,t);return[i].concat(GK(a))}La.renderCallByParent=tF;function Ou(e){"@babel/helpers - typeof";return Ou=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},Ou(e)}function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(l>s),`,
+ `).concat(c.x,",").concat(c.y,`
+ `);if(a>0){var h=At(n,r,a,l),x=At(n,r,a,s);d+="L ".concat(x.x,",").concat(x.y,`
+ A `).concat(a,",").concat(a,`,0,
+ `).concat(+(Math.abs(u)>180),",").concat(+(l<=s),`,
+ `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},lF=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,o=t.forceCornerRadius,u=t.cornerIsExternal,s=t.startAngle,f=t.endAngle,c=Cn(f-s),d=Ds({cx:n,cy:r,radius:i,angle:s,sign:c,cornerRadius:l,cornerIsExternal:u}),h=d.circleTangency,x=d.lineTangency,b=d.theta,m=Ds({cx:n,cy:r,radius:i,angle:f,sign:-c,cornerRadius:l,cornerIsExternal:u}),p=m.circleTangency,y=m.lineTangency,g=m.theta,O=u?Math.abs(s-f):Math.abs(s-f)-b-g;if(O<0)return o?"M ".concat(x.x,",").concat(x.y,`
+ a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
+ a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
+ `):pj({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:s,endAngle:f});var S="M ".concat(x.x,",").concat(x.y,`
+ A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(h.x,",").concat(h.y,`
+ A`).concat(i,",").concat(i,",0,").concat(+(O>180),",").concat(+(c<0),",").concat(p.x,",").concat(p.y,`
+ A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(y.x,",").concat(y.y,`
+ `);if(a>0){var w=Ds({cx:n,cy:r,radius:a,angle:s,sign:c,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),A=w.circleTangency,_=w.lineTangency,T=w.theta,$=Ds({cx:n,cy:r,radius:a,angle:f,sign:-c,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),P=$.circleTangency,M=$.lineTangency,k=$.theta,z=u?Math.abs(s-f):Math.abs(s-f)-T-k;if(z<0&&l===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(M.x,",").concat(M.y,`
+ A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(P.x,",").concat(P.y,`
+ A`).concat(a,",").concat(a,",0,").concat(+(z>180),",").concat(+(c>0),",").concat(A.x,",").concat(A.y,`
+ A`).concat(l,",").concat(l,",0,0,").concat(+(c<0),",").concat(_.x,",").concat(_.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},oF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},yj=function(t){var n=qS(qS({},oF),t),r=n.cx,a=n.cy,i=n.innerRadius,l=n.outerRadius,o=n.cornerRadius,u=n.forceCornerRadius,s=n.cornerIsExternal,f=n.startAngle,c=n.endAngle,d=n.className;if(l0&&Math.abs(f-c)<360?m=lF({cx:r,cy:a,innerRadius:i,outerRadius:l,cornerRadius:Math.min(b,x/2),forceCornerRadius:u,cornerIsExternal:s,startAngle:f,endAngle:c}):m=pj({cx:r,cy:a,innerRadius:i,outerRadius:l,startAngle:f,endAngle:c}),C.createElement("path",hm({},pe(n,!0),{className:h,d:m,role:"img"}))};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 pm(){return pm=Object.assign?Object.assign.bind():function(e){for(var t=1;txF.call(e,t));function ii(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const wF="__v",AF="__o",_F="_owner",{getOwnPropertyDescriptor:FS,keys:WS}=Object;function EF(e,t){return e.byteLength===t.byteLength&&vf(new Uint8Array(e),new Uint8Array(t))}function TF(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function jF(e,t){return e.byteLength===t.byteLength&&vf(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function NF(e,t){return ii(e.getTime(),t.getTime())}function MF(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function CF(e,t){return e===t}function QS(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.entries();let l,o,u=0;for(;(l=i.next())&&!l.done;){const s=t.entries();let f=!1,c=0;for(;(o=s.next())&&!o.done;){if(a[c]){c++;continue}const d=l.value,h=o.value;if(n.equals(d[0],h[0],u,c,e,t,n)&&n.equals(d[1],h[1],d[0],h[0],e,t,n)){f=a[c]=!0;break}c++}if(!f)return!1;u++}return!0}const $F=ii;function PF(e,t,n){const r=WS(e);let a=r.length;if(WS(t).length!==a)return!1;for(;a-- >0;)if(!bj(e,t,n,r[a]))return!1;return!0}function fo(e,t,n){const r=KS(e);let a=r.length;if(KS(t).length!==a)return!1;let i,l,o;for(;a-- >0;)if(i=r[a],!bj(e,t,n,i)||(l=FS(e,i),o=FS(t,i),(l||o)&&(!l||!o||l.configurable!==o.configurable||l.enumerable!==o.enumerable||l.writable!==o.writable)))return!1;return!0}function DF(e,t){return ii(e.valueOf(),t.valueOf())}function RF(e,t){return e.source===t.source&&e.flags===t.flags}function ZS(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.values();let l,o;for(;(l=i.next())&&!l.done;){const u=t.values();let s=!1,f=0;for(;(o=u.next())&&!o.done;){if(!a[f]&&n.equals(l.value,o.value,l.value,o.value,e,t,n)){s=a[f]=!0;break}f++}if(!s)return!1}return!0}function vf(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function zF(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 bj(e,t,n,r){return(r===_F||r===AF||r===wF)&&(e.$$typeof||t.$$typeof)?!0:OF(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const BF="[object ArrayBuffer]",LF="[object Arguments]",UF="[object Boolean]",kF="[object DataView]",IF="[object Date]",HF="[object Error]",qF="[object Map]",GF="[object Number]",YF="[object Object]",XF="[object RegExp]",VF="[object Set]",KF="[object String]",FF={"[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},WF="[object URL]",QF=Object.prototype.toString;function ZF({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:l,areNumbersEqual:o,areObjectsEqual:u,arePrimitiveWrappersEqual:s,areRegExpsEqual:f,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:h,unknownTagComparators:x}){return function(m,p,y){if(m===p)return!0;if(m==null||p==null)return!1;const g=typeof m;if(g!==typeof p)return!1;if(g!=="object")return g==="number"?o(m,p,y):g==="function"?i(m,p,y):!1;const O=m.constructor;if(O!==p.constructor)return!1;if(O===Object)return u(m,p,y);if(Array.isArray(m))return t(m,p,y);if(O===Date)return r(m,p,y);if(O===RegExp)return f(m,p,y);if(O===Map)return l(m,p,y);if(O===Set)return c(m,p,y);const S=QF.call(m);if(S===IF)return r(m,p,y);if(S===XF)return f(m,p,y);if(S===qF)return l(m,p,y);if(S===VF)return c(m,p,y);if(S===YF)return typeof m.then!="function"&&typeof p.then!="function"&&u(m,p,y);if(S===WF)return h(m,p,y);if(S===HF)return a(m,p,y);if(S===LF)return u(m,p,y);if(FF[S])return d(m,p,y);if(S===BF)return e(m,p,y);if(S===kF)return n(m,p,y);if(S===UF||S===GF||S===KF)return s(m,p,y);if(x){let w=x[S];if(!w){const A=SF(m);A&&(w=x[A])}if(w)return w(m,p,y)}return!1}}function JF({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:EF,areArraysEqual:n?fo:TF,areDataViewsEqual:jF,areDatesEqual:NF,areErrorsEqual:MF,areFunctionsEqual:CF,areMapsEqual:n?sp(QS,fo):QS,areNumbersEqual:$F,areObjectsEqual:n?fo:PF,arePrimitiveWrappersEqual:DF,areRegExpsEqual:RF,areSetsEqual:n?sp(ZS,fo):ZS,areTypedArraysEqual:n?sp(vf,fo):vf,areUrlsEqual:zF,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=zs(r.areArraysEqual),i=zs(r.areMapsEqual),l=zs(r.areObjectsEqual),o=zs(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:l,areSetsEqual:o})}return r}function eW(e){return function(t,n,r,a,i,l,o){return e(t,n,o)}}function tW({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(o,u){const{cache:s=e?new WeakMap:void 0,meta:f}=n();return t(o,u,{cache:s,equals:r,meta:f,strict:a})};if(e)return function(o,u){return t(o,u,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const i={cache:void 0,equals:r,meta:void 0,strict:a};return function(o,u){return t(o,u,i)}}const nW=pa();pa({strict:!0});pa({circular:!0});pa({circular:!0,strict:!0});pa({createInternalComparator:()=>ii});pa({strict:!0,createInternalComparator:()=>ii});pa({circular:!0,createInternalComparator:()=>ii});pa({circular:!0,createInternalComparator:()=>ii,strict:!0});function pa(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,i=JF(e),l=ZF(i),o=n?n(l):eW(l);return tW({circular:t,comparator:l,createState:r,equals:o,strict:a})}function rW(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function JS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):rW(a)};requestAnimationFrame(r)}function ym(e){"@babel/helpers - typeof";return ym=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},ym(e)}function aW(e){return uW(e)||oW(e)||lW(e)||iW()}function iW(){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 lW(e,t){if(e){if(typeof e=="string")return eO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eO(e,t)}}function eO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:p<0?0:p},b=function(p){for(var y=p>1?1:p,g=y,O=0;O<8;++O){var S=c(g)-y,w=h(g);if(Math.abs(S-y)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,l=t.dt,o=l===void 0?17:l,u=function(f,c,d){var h=-(f-c)*r,x=d*i,b=d+(h-x)*o/1e3,m=d*o/1e3+f;return Math.abs(m-c)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UW(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i=0)&&(n[a]=e[a]);return n}function cp(e){return qW(e)||HW(e)||IW(e)||kW()}function kW(){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 IW(e,t){if(e){if(typeof e=="string")return xm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xm(e,t)}}function HW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qW(e){if(Array.isArray(e))return xm(e)}function xm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"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 xf(e){return xf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xf(e)}var la=function(e){KW(n,e);var t=FW(n);function n(r,a){var i;GW(this,n),i=t.call(this,r,a);var l=i.props,o=l.isActive,u=l.attributeName,s=l.from,f=l.to,c=l.steps,d=l.children,h=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(wm(i)),i.changeStyle=i.changeStyle.bind(wm(i)),!o||h<=0)return i.state={style:{}},typeof d=="function"&&(i.state={style:f}),Om(i);if(c&&c.length)i.state={style:c[0].style};else if(s){if(typeof d=="function")return i.state={style:s},Om(i);i.state={style:u?bo({},u,s):s}}else i.state={style:{}};return i}return XW(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,l=a.canBegin;this.mounted=!0,!(!i||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,l=i.isActive,o=i.canBegin,u=i.attributeName,s=i.shouldReAnimate,f=i.to,c=i.from,d=this.state.style;if(o){if(!l){var h={style:u?bo({},u,f):f};this.state&&d&&(u&&d[u]!==f||!u&&d!==f)&&this.setState(h);return}if(!(nW(a.to,f)&&a.canBegin&&a.isActive)){var x=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=x||s?c:a.to;if(this.state&&d){var m={style:u?bo({},u,b):b};(u&&d[u]!==b||!u&&d!==b)&&this.setState(m)}this.runAnimation(Tn(Tn({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,l=a.from,o=a.to,u=a.duration,s=a.easing,f=a.begin,c=a.onAnimationEnd,d=a.onAnimationStart,h=zW(l,o,_W(s),u,this.changeStyle),x=function(){i.stopJSAnimation=h()};this.manager.start([d,f,x,u,c])}},{key:"runStepAnimation",value:function(a){var i=this,l=a.steps,o=a.begin,u=a.onAnimationStart,s=l[0],f=s.style,c=s.duration,d=c===void 0?0:c,h=function(b,m,p){if(p===0)return b;var y=m.duration,g=m.easing,O=g===void 0?"ease":g,S=m.style,w=m.properties,A=m.onAnimationEnd,_=p>0?l[p-1]:m,T=w||Object.keys(S);if(typeof O=="function"||O==="spring")return[].concat(cp(b),[i.runJSAnimation.bind(i,{from:_.style,to:S,duration:y,easing:O}),y]);var $=rO(T,y,O),P=Tn(Tn(Tn({},_.style),S),{},{transition:$});return[].concat(cp(b),[P,y,A]).filter(hW)};return this.manager.start([u].concat(cp(l.reduce(h,[f,Math.max(d,o)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=sW());var i=a.begin,l=a.duration,o=a.attributeName,u=a.to,s=a.easing,f=a.onAnimationStart,c=a.onAnimationEnd,d=a.steps,h=a.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof s=="function"||typeof h=="function"||s==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var b=o?bo({},o,u):u,m=rO(Object.keys(b),l,s);x.start([f,i,Tn(Tn({},b),{},{transition:m}),l,c])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var o=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var u=LW(a,BW),s=E.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!o||s===0||l<=0)return i;var c=function(h){var x=h.props,b=x.style,m=b===void 0?{}:b,p=x.className,y=E.cloneElement(h,Tn(Tn({},u),{},{style:Tn(Tn({},m),f),className:p}));return y};return s===1?c(E.Children.only(i)):C.createElement("div",null,E.Children.map(i,function(d){return c(d)}))}}]),n}(E.PureComponent);la.displayName="Animate";la.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};la.propTypes={from:be.oneOfType([be.object,be.string]),to:be.oneOfType([be.object,be.string]),attributeName:be.string,duration:be.number,begin:be.number,easing:be.oneOfType([be.string,be.func]),steps:be.arrayOf(be.shape({duration:be.number.isRequired,style:be.object.isRequired,easing:be.oneOfType([be.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),be.func]),properties:be.arrayOf("string"),onAnimationEnd:be.func})),children:be.oneOfType([be.node,be.func]),isActive:be.bool,canBegin:be.bool,onAnimationEnd:be.func,shouldReAnimate:be.bool,onAnimationStart:be.func,onAnimationReStart:be.func};function Eu(e){"@babel/helpers - typeof";return Eu=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},Eu(e)}function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,u=r>=0?1:-1,s=a>=0&&r>=0||a<0&&r<0?1:0,f;if(l>0&&i instanceof Array){for(var c=[0,0,0,0],d=0,h=4;dl?l:i[d];f="M".concat(t,",").concat(n+o*c[0]),c[0]>0&&(f+="A ".concat(c[0],",").concat(c[0],",0,0,").concat(s,",").concat(t+u*c[0],",").concat(n)),f+="L ".concat(t+r-u*c[1],",").concat(n),c[1]>0&&(f+="A ".concat(c[1],",").concat(c[1],",0,0,").concat(s,`,
+ `).concat(t+r,",").concat(n+o*c[1])),f+="L ".concat(t+r,",").concat(n+a-o*c[2]),c[2]>0&&(f+="A ".concat(c[2],",").concat(c[2],",0,0,").concat(s,`,
+ `).concat(t+r-u*c[2],",").concat(n+a)),f+="L ".concat(t+u*c[3],",").concat(n+a),c[3]>0&&(f+="A ".concat(c[3],",").concat(c[3],",0,0,").concat(s,`,
+ `).concat(t,",").concat(n+a-o*c[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var x=Math.min(l,i);f="M ".concat(t,",").concat(n+o*x,`
+ A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t+u*x,",").concat(n,`
+ L `).concat(t+r-u*x,",").concat(n,`
+ A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t+r,",").concat(n+o*x,`
+ L `).concat(t+r,",").concat(n+a-o*x,`
+ A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t+r-u*x,",").concat(n+a,`
+ L `).concat(t+u*x,",").concat(n+a,`
+ A `).concat(x,",").concat(x,",0,0,").concat(s,",").concat(t,",").concat(n+a-o*x," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return f},iQ=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,l=n.y,o=n.width,u=n.height;if(Math.abs(o)>0&&Math.abs(u)>0){var s=Math.min(i,i+o),f=Math.max(i,i+o),c=Math.min(l,l+u),d=Math.max(l,l+u);return r>=s&&r<=f&&a>=c&&a<=d}return!1},lQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},n0=function(t){var n=fO(fO({},lQ),t),r=E.useRef(),a=E.useState(-1),i=QW(a,2),l=i[0],o=i[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&o(O)}catch{}},[]);var u=n.x,s=n.y,f=n.width,c=n.height,d=n.radius,h=n.className,x=n.animationEasing,b=n.animationDuration,m=n.animationBegin,p=n.isAnimationActive,y=n.isUpdateAnimationActive;if(u!==+u||s!==+s||f!==+f||c!==+c||f===0||c===0)return null;var g=me("recharts-rectangle",h);return y?C.createElement(la,{canBegin:l>0,from:{width:f,height:c,x:u,y:s},to:{width:f,height:c,x:u,y:s},duration:b,animationEasing:x,isActive:y},function(O){var S=O.width,w=O.height,A=O.x,_=O.y;return C.createElement(la,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:b,isActive:p,easing:x},C.createElement("path",Sf({},pe(n,!0),{className:g,d:dO(A,_,S,w,d),ref:r})))}):C.createElement("path",Sf({},pe(n,!0),{className:g,d:dO(u,s,f,c,d)}))};function Am(){return Am=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var pQ=function(t,n,r,a,i,l){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},yQ=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.top,o=l===void 0?0:l,u=t.left,s=u===void 0?0:u,f=t.width,c=f===void 0?0:f,d=t.height,h=d===void 0?0:d,x=t.className,b=dQ(t,oQ),m=uQ({x:r,y:i,top:o,left:s,width:c,height:h},b);return!Y(r)||!Y(i)||!Y(c)||!Y(h)||!Y(o)||!Y(s)?null:C.createElement("path",_m({},pe(m,!0),{className:me("recharts-cross",x),d:pQ(r,i,c,h,o,s)}))},mQ=k2,vQ=mQ(Object.getPrototypeOf,Object),gQ=vQ,bQ=Er,xQ=gQ,SQ=Tr,OQ="[object Object]",wQ=Function.prototype,AQ=Object.prototype,Tj=wQ.toString,_Q=AQ.hasOwnProperty,EQ=Tj.call(Object);function TQ(e){if(!SQ(e)||bQ(e)!=OQ)return!1;var t=xQ(e);if(t===null)return!0;var n=_Q.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Tj.call(n)==EQ}var jQ=TQ;const NQ=Ne(jQ);var MQ=Er,CQ=Tr,$Q="[object Boolean]";function PQ(e){return e===!0||e===!1||CQ(e)&&MQ(e)==$Q}var DQ=PQ;const RQ=Ne(DQ);function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:d,x:u,y:s},to:{upperWidth:f,lowerWidth:c,height:d,x:u,y:s},duration:b,animationEasing:x,isActive:p},function(g){var O=g.upperWidth,S=g.lowerWidth,w=g.height,A=g.x,_=g.y;return C.createElement(la,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:b,easing:x},C.createElement("path",Of({},pe(n,!0),{className:y,d:vO(A,_,O,S,w),ref:r})))}):C.createElement("g",null,C.createElement("path",Of({},pe(n,!0),{className:y,d:vO(u,s,f,c,d)})))},XQ=["option","shapeType","propTransformer","activeClassName","isActive"];function Nu(e){"@babel/helpers - typeof";return Nu=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},Nu(e)}function VQ(e,t){if(e==null)return{};var n=KQ(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wf(e){for(var t=1;t0&&r.handleDrag(a.changedTouches[0])}),Kt(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,l=a.onDragEnd,o=a.startIndex;l==null||l({endIndex:i,startIndex:o})}),r.detachDragEndListener()}),Kt(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Kt(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Kt(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Kt(r,"handleSlideDragStart",function(a){var i=_O(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return $Z(t,e),jZ(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,l=this.state.scaleValues,o=this.props,u=o.gap,s=o.data,f=s.length-1,c=Math.min(a,i),d=Math.max(a,i),h=t.getIndexInRange(l,c),x=t.getIndexInRange(l,d);return{startIndex:h-h%u,endIndex:x===f?f:x-x%u}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,l=a.tickFormatter,o=a.dataKey,u=Yn(i[r],o,r);return le(l)?l(u,r):u}},{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(r){var a=this.state,i=a.slideMoveStartX,l=a.startX,o=a.endX,u=this.props,s=u.x,f=u.width,c=u.travellerWidth,d=u.startIndex,h=u.endIndex,x=u.onChange,b=r.pageX-i;b>0?b=Math.min(b,s+f-c-o,s+f-c-l):b<0&&(b=Math.max(b,s-l,s-o));var m=this.getIndex({startX:l+b,endX:o+b});(m.startIndex!==d||m.endIndex!==h)&&x&&x(m),this.setState({startX:l+b,endX:o+b,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=_O(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,l=a.movingTravellerId,o=a.endX,u=a.startX,s=this.state[l],f=this.props,c=f.x,d=f.width,h=f.travellerWidth,x=f.onChange,b=f.gap,m=f.data,p={startX:this.state.startX,endX:this.state.endX},y=r.pageX-i;y>0?y=Math.min(y,c+d-h-s):y<0&&(y=Math.max(y,c-s)),p[l]=s+y;var g=this.getIndex(p),O=g.startIndex,S=g.endIndex,w=function(){var _=m.length-1;return l==="startX"&&(o>u?O%b===0:S%b===0)||ou?S%b===0:O%b===0)||o>u&&S===_};this.setState(Kt(Kt({},l,s+y),"brushMoveStartX",r.pageX),function(){x&&w()&&x(g)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,l=this.state,o=l.scaleValues,u=l.startX,s=l.endX,f=this.state[a],c=o.indexOf(f);if(c!==-1){var d=c+r;if(!(d===-1||d>=o.length)){var h=o[d];a==="startX"&&h>=s||a==="endX"&&h<=u||this.setState(Kt({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,u=r.fill,s=r.stroke;return C.createElement("rect",{stroke:s,fill:u,x:a,y:i,width:l,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,u=r.data,s=r.children,f=r.padding,c=E.Children.only(s);return c?C.cloneElement(c,{x:a,y:i,width:l,height:o,margin:f,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,l,o=this,u=this.props,s=u.y,f=u.travellerWidth,c=u.height,d=u.traveller,h=u.ariaLabel,x=u.data,b=u.startIndex,m=u.endIndex,p=Math.max(r,this.props.x),y=dp(dp({},pe(this.props,!1)),{},{x:p,y:s,width:f,height:c}),g=h||"Min value: ".concat((i=x[b])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=x[m])===null||l===void 0?void 0:l.name);return C.createElement(pt,{tabIndex:0,role:"slider","aria-label":g,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),o.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,y))}},{key:"renderSlide",value:function(r,a){var i=this.props,l=i.y,o=i.height,u=i.stroke,s=i.travellerWidth,f=Math.min(r,a)+s,c=Math.max(Math.abs(a-r)-s,0);return C.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:f,y:l,width:c,height:o})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,l=r.y,o=r.height,u=r.travellerWidth,s=r.stroke,f=this.state,c=f.startX,d=f.endX,h=5,x={pointerEvents:"none",fill:s};return C.createElement(pt,{className:"recharts-brush-texts"},C.createElement(Zc,_f({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,d)-h,y:l+o/2},x),this.getTextOfTick(a)),C.createElement(Zc,_f({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,d)+u+h,y:l+o/2},x),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,l=r.children,o=r.x,u=r.y,s=r.width,f=r.height,c=r.alwaysShowText,d=this.state,h=d.startX,x=d.endX,b=d.isTextActive,m=d.isSlideMoving,p=d.isTravellerMoving,y=d.isTravellerFocused;if(!a||!a.length||!Y(o)||!Y(u)||!Y(s)||!Y(f)||s<=0||f<=0)return null;var g=me("recharts-brush",i),O=C.Children.count(l)===1,S=EZ("userSelect","none");return C.createElement(pt,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(h,x),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(x,"endX"),(b||m||p||y||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,l=r.width,o=r.height,u=r.stroke,s=Math.floor(i+o/2)-1;return C.createElement(C.Fragment,null,C.createElement("rect",{x:a,y:i,width:l,height:o,fill:u,stroke:"none"}),C.createElement("line",{x1:a+1,y1:s,x2:a+l-1,y2:s,fill:"none",stroke:"#fff"}),C.createElement("line",{x1:a+1,y1:s+2,x2:a+l-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return C.isValidElement(r)?i=C.cloneElement(r,a):le(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,l=r.width,o=r.x,u=r.travellerWidth,s=r.updateId,f=r.startIndex,c=r.endIndex;if(i!==a.prevData||s!==a.prevUpdateId)return dp({prevData:i,prevTravellerWidth:u,prevUpdateId:s,prevX:o,prevWidth:l},i&&i.length?DZ({data:i,width:l,x:o,travellerWidth:u,startIndex:f,endIndex:c}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||o!==a.prevX||u!==a.prevTravellerWidth)){a.scale.range([o,o+l-u]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:u,prevUpdateId:s,prevX:o,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,l=0,o=i-1;o-l>1;){var u=Math.floor((l+o)/2);r[u]>a?o=u:l=u}return a>=r[o]?o:l}}])}(E.PureComponent);Kt(pl,"displayName","Brush");Kt(pl,"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 RZ=Tg;function zZ(e,t){var n;return RZ(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var BZ=zZ,LZ=$2,UZ=fa,kZ=BZ,IZ=Xt,HZ=Md;function qZ(e,t,n){var r=IZ(e)?LZ:kZ;return n&&HZ(e,t,n)&&(t=void 0),r(e,UZ(t))}var GZ=qZ;const YZ=Ne(GZ);var qn=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},EO=eT;function XZ(e,t,n){t=="__proto__"&&EO?EO(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var VZ=XZ,KZ=VZ,FZ=Z2,WZ=fa;function QZ(e,t){var n={};return t=WZ(t),FZ(e,function(r,a,i){KZ(n,a,t(r,a,i))}),n}var ZZ=QZ;const JZ=Ne(ZZ);function eJ(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gJ(e,t){var n=e.x,r=e.y,a=mJ(e,dJ),i="".concat(n),l=parseInt(i,10),o="".concat(r),u=parseInt(o,10),s="".concat(t.height||a.height),f=parseInt(s,10),c="".concat(t.width||a.width),d=parseInt(c,10);return ho(ho(ho(ho(ho({},t),a),l?{x:l}:{}),u?{y:u}:{}),{},{height:f,width:d,name:t.name,radius:t.radius})}function jO(e){return C.createElement(tZ,Tm({shapeType:"rectangle",propTransformer:gJ,activeClassName:"recharts-active-bar"},e))}var bJ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=Y(r)||$6(r);return i?t(r,a):(i||Fa(),n)}},xJ=["value","background"],Pj;function yl(e){"@babel/helpers - typeof";return yl=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},yl(e)}function SJ(e,t){if(e==null)return{};var n=OJ(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Tf(){return Tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(B)0&&Math.abs(z)0&&(k=Math.min((ie||0)-(z[Ae-1]||0),k))}),Number.isFinite(k)){var B=k/M,N=b.layout==="vertical"?r.height:r.width;if(b.padding==="gap"&&(A=B*N/2),b.padding==="no-gap"){var R=Va(t.barCategoryGap,B*N),D=B*N/2;A=D-R-(D-R)/N*R}}}a==="xAxis"?_=[r.left+(g.left||0)+(A||0),r.left+r.width-(g.right||0)-(A||0)]:a==="yAxis"?_=u==="horizontal"?[r.top+r.height-(g.bottom||0),r.top+(g.top||0)]:[r.top+(g.top||0)+(A||0),r.top+r.height-(g.bottom||0)-(A||0)]:_=b.range,S&&(_=[_[1],_[0]]);var H=JV(b,i,d),q=H.scale,K=H.realScaleType;q.domain(p).range(_),eK(q);var G=uK(q,Nn(Nn({},b),{},{realScaleType:K}));a==="xAxis"?(P=m==="top"&&!O||m==="bottom"&&O,T=r.left,$=c[w]-P*b.height):a==="yAxis"&&(P=m==="left"&&!O||m==="right"&&O,T=c[w]-P*b.width,$=r.top);var Q=Nn(Nn(Nn({},b),G),{},{realScaleType:K,x:T,y:$,scale:q,width:a==="xAxis"?r.width:b.width,height:a==="yAxis"?r.height:b.height});return Q.bandSize=pf(Q,G),!b.hide&&a==="xAxis"?c[w]+=(P?-1:1)*Q.height:b.hide||(c[w]+=(P?-1:1)*Q.width),Nn(Nn({},h),{},Gd({},x,Q))},{})},Bj=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return{x:Math.min(r,i),y:Math.min(a,l),width:Math.abs(i-r),height:Math.abs(l-a)}},DJ=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return Bj({x:n,y:r},{x:a,y:i})},Lj=function(){function e(t){MJ(this,e),this.scale=t}return CJ(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(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(a){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();Gd(Lj,"EPS",1e-4);var r0=function(t){var n=Object.keys(t).reduce(function(r,a){return Nn(Nn({},r),{},Gd({},a,Lj.create(t[a])))},{});return Nn(Nn({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,o=i.position;return JZ(a,function(u,s){return n[s].apply(u,{bandAware:l,position:o})})},isInRange:function(a){return $j(a,function(i,l){return n[l].isInRange(i)})}})};function RJ(e){return(e%180+180)%180}var zJ=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=RJ(a),l=i*Math.PI/180,o=Math.atan(r/n),u=l>o&&l-1?a[i?t[l]:l]:void 0}}var IJ=kJ,HJ=jj;function qJ(e){var t=HJ(e),n=t%1;return t===t?n?t-n:t:0}var GJ=qJ,YJ=X2,XJ=fa,VJ=GJ,KJ=Math.max;function FJ(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:VJ(n);return a<0&&(a=KJ(r+a,0)),YJ(e,XJ(t),a)}var WJ=FJ,QJ=IJ,ZJ=WJ,JJ=QJ(ZJ),eee=JJ;const tee=Ne(eee);var nee=L5(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("")}),a0=E.createContext(void 0),i0=E.createContext(void 0),Uj=E.createContext(void 0),kj=E.createContext({}),Ij=E.createContext(void 0),Hj=E.createContext(0),qj=E.createContext(0),PO=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,l=t.clipPathId,o=t.children,u=t.width,s=t.height,f=nee(i);return C.createElement(a0.Provider,{value:r},C.createElement(i0.Provider,{value:a},C.createElement(kj.Provider,{value:i},C.createElement(Uj.Provider,{value:f},C.createElement(Ij.Provider,{value:l},C.createElement(Hj.Provider,{value:s},C.createElement(qj.Provider,{value:u},o)))))))},ree=function(){return E.useContext(Ij)},Gj=function(t){var n=E.useContext(a0);n==null&&Fa();var r=n[t];return r==null&&Fa(),r},aee=function(){var t=E.useContext(a0);return Br(t)},iee=function(){var t=E.useContext(i0),n=tee(t,function(r){return $j(r.domain,Number.isFinite)});return n||Br(t)},Yj=function(t){var n=E.useContext(i0);n==null&&Fa();var r=n[t];return r==null&&Fa(),r},lee=function(){var t=E.useContext(Uj);return t},oee=function(){return E.useContext(kj)},l0=function(){return E.useContext(qj)},o0=function(){return E.useContext(Hj)};function ml(e){"@babel/helpers - typeof";return ml=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},ml(e)}function uee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function see(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function Gee(e,t){return Zj(e,t+1)}function Yee(e,t,n,r,a){for(var i=(r||[]).slice(),l=t.start,o=t.end,u=0,s=1,f=l,c=function(){var x=r==null?void 0:r[u];if(x===void 0)return{v:Zj(r,s)};var b=u,m,p=function(){return m===void 0&&(m=n(x,b)),m},y=x.coordinate,g=u===0||$f(e,y,p,f,o);g||(u=0,f=l,s+=1),g&&(f=y+e*(p()/2+a),u+=s)},d;s<=i.length;)if(d=c(),d)return d.v;return[]}function Du(e){"@babel/helpers - typeof";return Du=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},Du(e)}function IO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t0?h.coordinate-m*e:h.coordinate})}else i[d]=h=Tt(Tt({},h),{},{tickCoord:h.coordinate});var p=$f(e,h.tickCoord,b,o,u);p&&(u=h.tickCoord-e*(b()/2+a),i[d]=Tt(Tt({},h),{},{isShow:!0}))},f=l-1;f>=0;f--)s(f);return i}function Wee(e,t,n,r,a,i){var l=(r||[]).slice(),o=l.length,u=t.start,s=t.end;if(i){var f=r[o-1],c=n(f,o-1),d=e*(f.coordinate+e*c/2-s);l[o-1]=f=Tt(Tt({},f),{},{tickCoord:d>0?f.coordinate-d*e:f.coordinate});var h=$f(e,f.tickCoord,function(){return c},u,s);h&&(s=f.tickCoord-e*(c/2+a),l[o-1]=Tt(Tt({},f),{},{isShow:!0}))}for(var x=i?o-1:o,b=function(y){var g=l[y],O,S=function(){return O===void 0&&(O=n(g,y)),O};if(y===0){var w=e*(g.coordinate-e*S()/2-u);l[y]=g=Tt(Tt({},g),{},{tickCoord:w<0?g.coordinate-w*e:g.coordinate})}else l[y]=g=Tt(Tt({},g),{},{tickCoord:g.coordinate});var A=$f(e,g.tickCoord,S,u,s);A&&(u=g.tickCoord+e*(S()/2+a),l[y]=Tt(Tt({},g),{},{isShow:!0}))},m=0;m=2?Cn(a[1].coordinate-a[0].coordinate):1,p=qee(i,m,h);return u==="equidistantPreserveStart"?Yee(m,p,b,a,l):(u==="preserveStart"||u==="preserveStartEnd"?d=Wee(m,p,b,a,l,u==="preserveStartEnd"):d=Fee(m,p,b,a,l),d.filter(function(y){return y.isShow}))}var Qee=["viewBox"],Zee=["viewBox"],Jee=["ticks"];function bl(e){"@babel/helpers - typeof";return bl=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},bl(e)}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ete(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(e,t){for(var n=0;n0?u(this.props):u(h)),l<=0||o<=0||!x||!x.length?null:C.createElement(pt,{className:me("recharts-cartesian-axis",s),ref:function(m){r.layerReference=m}},i&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),jt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var l,o=me(a.className,"recharts-cartesian-axis-tick-value");return C.isValidElement(r)?l=C.cloneElement(r,it(it({},a),{},{className:o})):le(r)?l=r(it(it({},a),{},{className:o})):l=C.createElement(Zc,Mi({},a,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])}(E.Component);f0(Kl,"displayName","CartesianAxis");f0(Kl,"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 ute=["x1","y1","x2","y2","key"],ste=["offset"];function Wa(e){"@babel/helpers - typeof";return Wa=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},Wa(e)}function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hte(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var pte=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,l=t.width,o=t.height,u=t.ry;return C.createElement("rect",{x:a,y:i,ry:u,width:l,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function tN(e,t){var n;if(C.isValidElement(e))n=C.cloneElement(e,t);else if(le(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,l=t.y2,o=t.key,u=YO(t,ute),s=pe(u,!1);s.offset;var f=YO(s,ste);n=C.createElement("line",Na({},f,{x1:r,y1:a,x2:i,y2:l,fill:"none",key:o}))}return n}function yte(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,u){var s=Nt(Nt({},e),{},{x1:t,y1:o,x2:t+n,y2:o,key:"line-".concat(u),index:u});return tN(a,s)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function mte(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,u){var s=Nt(Nt({},e),{},{x1:o,y1:t,x2:o,y2:t+n,key:"line-".concat(u),index:u});return tN(a,s)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function vte(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,l=e.height,o=e.horizontalPoints,u=e.horizontal,s=u===void 0?!0:u;if(!s||!t||!t.length)return null;var f=o.map(function(d){return Math.round(d+a-a)}).sort(function(d,h){return d-h});a!==f[0]&&f.unshift(0);var c=f.map(function(d,h){var x=!f[h+1],b=x?a+l-d:f[h+1]-d;if(b<=0)return null;var m=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:d,x:r,height:b,width:i,stroke:"none",fill:t[m],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function gte(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,l=e.y,o=e.width,u=e.height,s=e.verticalPoints;if(!n||!r||!r.length)return null;var f=s.map(function(d){return Math.round(d+i-i)}).sort(function(d,h){return d-h});i!==f[0]&&f.unshift(0);var c=f.map(function(d,h){var x=!f[h+1],b=x?i+o-d:f[h+1]-d;if(b<=0)return null;var m=h%r.length;return C.createElement("rect",{key:"react-".concat(h),x:d,y:l,width:b,height:u,stroke:"none",fill:r[m],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var bte=function(t,n){var r=t.xAxis,a=t.width,i=t.height,l=t.offset;return cj(c0(Nt(Nt(Nt({},Kl.defaultProps),r),{},{ticks:sr(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.left,l.left+l.width,n)},xte=function(t,n){var r=t.yAxis,a=t.width,i=t.height,l=t.offset;return cj(c0(Nt(Nt(Nt({},Kl.defaultProps),r),{},{ticks:sr(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.top,l.top+l.height,n)},hi={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function nN(e){var t,n,r,a,i,l,o=l0(),u=o0(),s=oee(),f=Nt(Nt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:hi.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:hi.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:hi.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:hi.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:hi.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:hi.verticalFill,x:Y(e.x)?e.x:s.left,y:Y(e.y)?e.y:s.top,width:Y(e.width)?e.width:s.width,height:Y(e.height)?e.height:s.height}),c=f.x,d=f.y,h=f.width,x=f.height,b=f.syncWithTicks,m=f.horizontalValues,p=f.verticalValues,y=aee(),g=iee();if(!Y(h)||h<=0||!Y(x)||x<=0||!Y(c)||c!==+c||!Y(d)||d!==+d)return null;var O=f.verticalCoordinatesGenerator||bte,S=f.horizontalCoordinatesGenerator||xte,w=f.horizontalPoints,A=f.verticalPoints;if((!w||!w.length)&&le(S)){var _=m&&m.length,T=S({yAxis:g?Nt(Nt({},g),{},{ticks:_?m:g.ticks}):void 0,width:o,height:u,offset:s},_?!0:b);pr(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Wa(T),"]")),Array.isArray(T)&&(w=T)}if((!A||!A.length)&&le(O)){var $=p&&p.length,P=O({xAxis:y?Nt(Nt({},y),{},{ticks:$?p:y.ticks}):void 0,width:o,height:u,offset:s},$?!0:b);pr(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Wa(P),"]")),Array.isArray(P)&&(A=P)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(pte,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),C.createElement(yte,Na({},f,{offset:s,horizontalPoints:w,xAxis:y,yAxis:g})),C.createElement(mte,Na({},f,{offset:s,verticalPoints:A,xAxis:y,yAxis:g})),C.createElement(vte,Na({},f,{horizontalPoints:w})),C.createElement(gte,Na({},f,{verticalPoints:A})))}nN.displayName="CartesianGrid";function xl(e){"@babel/helpers - typeof";return xl=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},xl(e)}function Ste(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ote(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function une(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cne(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?l:t&&t.length&&Y(a)&&Y(i)?t.slice(a,i+1):[]};function mN(e){return e==="number"?[0,"auto"]:void 0}var Gm=function(t,n,r,a){var i=t.graphicalItems,l=t.tooltipAxis,o=Qd(n,t);return r<0||!i||!i.length||r>=o.length?null:i.reduce(function(u,s){var f,c=(f=s.props.data)!==null&&f!==void 0?f:n;c&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(c=c.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(l.dataKey&&!l.allowDuplicatedCategory){var h=c===void 0?o:c;d=wy(h,l.dataKey,a)}else d=c&&c[r]||o[r];return d?[].concat(wl(u),[dj(s,d)]):u},[])},QO=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},l=One(i,r),o=t.orderedTooltipTicks,u=t.tooltipAxis,s=t.tooltipTicks,f=VV(l,o,s,u);if(f>=0&&s){var c=s[f]&&s[f].value,d=Gm(t,n,f,c),h=wne(r,o,f,i);return{activeTooltipIndex:f,activeLabel:c,activePayload:d,activeCoordinate:h}}return null},Ane=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=t.stackOffset,h=sj(f,i);return r.reduce(function(x,b){var m,p=b.type.defaultProps!==void 0?L(L({},b.type.defaultProps),b.props):b.props,y=p.type,g=p.dataKey,O=p.allowDataOverflow,S=p.allowDuplicatedCategory,w=p.scale,A=p.ticks,_=p.includeHidden,T=p[l];if(x[T])return x;var $=Qd(t.data,{graphicalItems:a.filter(function(G){var Q,ie=l in G.props?G.props[l]:(Q=G.type.defaultProps)===null||Q===void 0?void 0:Q[l];return ie===T}),dataStartIndex:u,dataEndIndex:s}),P=$.length,M,k,z;Wte(p.domain,O,y)&&(M=cm(p.domain,null,O),h&&(y==="number"||w!=="auto")&&(z=zo($,g,"category")));var B=mN(y);if(!M||M.length===0){var N,R=(N=p.domain)!==null&&N!==void 0?N:B;if(g){if(M=zo($,g,y),y==="category"&&h){var D=D6(M);S&&D?(k=M,M=Af(0,P)):S||(M=DS(R,M,b).reduce(function(G,Q){return G.indexOf(Q)>=0?G:[].concat(wl(G),[Q])},[]))}else if(y==="category")S?M=M.filter(function(G){return G!==""&&!ve(G)}):M=DS(R,M,b).reduce(function(G,Q){return G.indexOf(Q)>=0||Q===""||ve(Q)?G:[].concat(wl(G),[Q])},[]);else if(y==="number"){var H=ZV($,a.filter(function(G){var Q,ie,Ae=l in G.props?G.props[l]:(Q=G.type.defaultProps)===null||Q===void 0?void 0:Q[l],ne="hide"in G.props?G.props.hide:(ie=G.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return Ae===T&&(_||!ne)}),g,i,f);H&&(M=H)}h&&(y==="number"||w!=="auto")&&(z=zo($,g,"category"))}else h?M=Af(0,P):o&&o[T]&&o[T].hasStack&&y==="number"?M=d==="expand"?[0,1]:fj(o[T].stackGroups,u,s):M=uj($,a.filter(function(G){var Q=l in G.props?G.props[l]:G.type.defaultProps[l],ie="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return Q===T&&(_||!ie)}),y,f,!0);if(y==="number")M=Im(c,M,T,i,A),R&&(M=cm(R,M,O));else if(y==="category"&&R){var q=R,K=M.every(function(G){return q.indexOf(G)>=0});K&&(M=q)}}return L(L({},x),{},Z({},T,L(L({},p),{},{axisType:i,domain:M,categoricalDomain:z,duplicateDomain:k,originalDomain:(m=p.domain)!==null&&m!==void 0?m:B,isCategorical:h,layout:f})))},{})},_ne=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.layout,c=t.children,d=Qd(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:s}),h=d.length,x=sj(f,i),b=-1;return r.reduce(function(m,p){var y=p.type.defaultProps!==void 0?L(L({},p.type.defaultProps),p.props):p.props,g=y[l],O=mN("number");if(!m[g]){b++;var S;return x?S=Af(0,h):o&&o[g]&&o[g].hasStack?(S=fj(o[g].stackGroups,u,s),S=Im(c,S,g,i)):(S=cm(O,uj(d,r.filter(function(w){var A,_,T=l in w.props?w.props[l]:(A=w.type.defaultProps)===null||A===void 0?void 0:A[l],$="hide"in w.props?w.props.hide:(_=w.type.defaultProps)===null||_===void 0?void 0:_.hide;return T===g&&!$}),"number",f),a.defaultProps.allowDataOverflow),S=Im(c,S,g,i)),L(L({},m),{},Z({},g,L(L({axisType:i},a.defaultProps),{},{hide:!0,orientation:Sn(xne,"".concat(i,".").concat(b%2),null),domain:S,originalDomain:O,isCategorical:x,layout:f})))}return m},{})},Ene=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,l=n.graphicalItems,o=n.stackGroups,u=n.dataStartIndex,s=n.dataEndIndex,f=t.children,c="".concat(a,"Id"),d=$n(f,i),h={};return d&&d.length?h=Ane(t,{axes:d,graphicalItems:l,axisType:a,axisIdKey:c,stackGroups:o,dataStartIndex:u,dataEndIndex:s}):l&&l.length&&(h=_ne(t,{Axis:i,graphicalItems:l,axisType:a,axisIdKey:c,stackGroups:o,dataStartIndex:u,dataEndIndex:s})),h},Tne=function(t){var n=Br(t),r=sr(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:jg(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:pf(n,r)}},ZO=function(t){var n=t.children,r=t.defaultShowTooltip,a=Wt(n,pl),i=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},jne=function(t){return!t||!t.length?!1:t.some(function(n){var r=hr(n&&n.type);return r&&r.indexOf("Bar")>=0})},JO=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"}},Nne=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,o=t.yAxisMap,u=o===void 0?{}:o,s=r.width,f=r.height,c=r.children,d=r.margin||{},h=Wt(c,pl),x=Wt(c,ki),b=Object.keys(u).reduce(function(S,w){var A=u[w],_=A.orientation;return!A.mirror&&!A.hide?L(L({},S),{},Z({},_,S[_]+A.width)):S},{left:d.left||0,right:d.right||0}),m=Object.keys(l).reduce(function(S,w){var A=l[w],_=A.orientation;return!A.mirror&&!A.hide?L(L({},S),{},Z({},_,Sn(S,"".concat(_))+A.height)):S},{top:d.top||0,bottom:d.bottom||0}),p=L(L({},m),b),y=p.bottom;h&&(p.bottom+=h.props.height||pl.defaultProps.height),x&&n&&(p=WV(p,a,r,n));var g=s-p.left-p.right,O=f-p.top-p.bottom;return L(L({brushBottom:y},p),{},{width:Math.max(g,0),height:Math.max(O,0)})},Mne=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Cne=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,l=t.validateTooltipEventTypes,o=l===void 0?["axis"]:l,u=t.axisComponents,s=t.legendContent,f=t.formatAxisMap,c=t.defaultProps,d=function(p,y){var g=y.graphicalItems,O=y.stackGroups,S=y.offset,w=y.updateId,A=y.dataStartIndex,_=y.dataEndIndex,T=p.barSize,$=p.layout,P=p.barGap,M=p.barCategoryGap,k=p.maxBarSize,z=JO($),B=z.numericAxisName,N=z.cateAxisName,R=jne(g),D=[];return g.forEach(function(H,q){var K=Qd(p.data,{graphicalItems:[H],dataStartIndex:A,dataEndIndex:_}),G=H.type.defaultProps!==void 0?L(L({},H.type.defaultProps),H.props):H.props,Q=G.dataKey,ie=G.maxBarSize,Ae=G["".concat(B,"Id")],ne=G["".concat(N,"Id")],Qe={},at=u.reduce(function(Fn,Vt){var Jd=y["".concat(Vt.axisType,"Map")],d0=G["".concat(Vt.axisType,"Id")];Jd&&Jd[d0]||Vt.axisType==="zAxis"||Fa();var h0=Jd[d0];return L(L({},Fn),{},Z(Z({},Vt.axisType,h0),"".concat(Vt.axisType,"Ticks"),sr(h0)))},Qe),V=at[N],ee=at["".concat(N,"Ticks")],re=O&&O[Ae]&&O[Ae].hasStack&&cK(H,O[Ae].stackGroups),I=hr(H.type).indexOf("Bar")>=0,Re=pf(V,ee),oe=[],xe=R&&KV({barSize:T,stackGroups:O,totalSize:Mne(at,N)});if(I){var W,_e,vt=ve(ie)?k:ie,zt=(W=(_e=pf(V,ee,!0))!==null&&_e!==void 0?_e:vt)!==null&&W!==void 0?W:0;oe=FV({barGap:P,barCategoryGap:M,bandSize:zt!==Re?zt:Re,sizeList:xe[ne],maxBarSize:vt}),zt!==Re&&(oe=oe.map(function(Fn){return L(L({},Fn),{},{position:L(L({},Fn.position),{},{offset:Fn.position.offset-zt/2})})}))}var ya=H&&H.type&&H.type.getComposedData;ya&&D.push({props:L(L({},ya(L(L({},at),{},{displayedData:K,props:p,dataKey:Q,item:H,bandSize:Re,barPosition:oe,offset:S,stackedData:re,layout:$,dataStartIndex:A,dataEndIndex:_}))),{},Z(Z(Z({key:H.key||"item-".concat(q)},B,at[B]),N,at[N]),"animationId",w)),childIndex:X6(H,p.children),item:H})}),D},h=function(p,y){var g=p.props,O=p.dataStartIndex,S=p.dataEndIndex,w=p.updateId;if(!jx({props:g}))return null;var A=g.children,_=g.layout,T=g.stackOffset,$=g.data,P=g.reverseStackOrder,M=JO(_),k=M.numericAxisName,z=M.cateAxisName,B=$n(A,r),N=oK($,B,"".concat(k,"Id"),"".concat(z,"Id"),T,P),R=u.reduce(function(G,Q){var ie="".concat(Q.axisType,"Map");return L(L({},G),{},Z({},ie,Ene(g,L(L({},Q),{},{graphicalItems:B,stackGroups:Q.axisType===k&&N,dataStartIndex:O,dataEndIndex:S}))))},{}),D=Nne(L(L({},R),{},{props:g,graphicalItems:B}),y==null?void 0:y.legendBBox);Object.keys(R).forEach(function(G){R[G]=f(g,R[G],D,G.replace("Map",""),n)});var H=R["".concat(z,"Map")],q=Tne(H),K=d(g,L(L({},R),{},{dataStartIndex:O,dataEndIndex:S,updateId:w,graphicalItems:B,stackGroups:N,offset:D}));return L(L({formattedGraphicalItems:K,graphicalItems:B,offset:D,stackGroups:N},q),R)},x=function(m){function p(y){var g,O,S;return sne(this,p),S=dne(this,p,[y]),Z(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Z(S,"accessibilityManager",new Fte),Z(S,"handleLegendBBoxUpdate",function(w){if(w){var A=S.state,_=A.dataStartIndex,T=A.dataEndIndex,$=A.updateId;S.setState(L({legendBBox:w},h({props:S.props,dataStartIndex:_,dataEndIndex:T,updateId:$},L(L({},S.state),{},{legendBBox:w}))))}}),Z(S,"handleReceiveSyncEvent",function(w,A,_){if(S.props.syncId===w){if(_===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(A)}}),Z(S,"handleBrushChange",function(w){var A=w.startIndex,_=w.endIndex;if(A!==S.state.dataStartIndex||_!==S.state.dataEndIndex){var T=S.state.updateId;S.setState(function(){return L({dataStartIndex:A,dataEndIndex:_},h({props:S.props,dataStartIndex:A,dataEndIndex:_,updateId:T},S.state))}),S.triggerSyncEvent({dataStartIndex:A,dataEndIndex:_})}}),Z(S,"handleMouseEnter",function(w){var A=S.getMouseInfo(w);if(A){var _=L(L({},A),{},{isTooltipActive:!0});S.setState(_),S.triggerSyncEvent(_);var T=S.props.onMouseEnter;le(T)&&T(_,w)}}),Z(S,"triggeredAfterMouseMove",function(w){var A=S.getMouseInfo(w),_=A?L(L({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(_),S.triggerSyncEvent(_);var T=S.props.onMouseMove;le(T)&&T(_,w)}),Z(S,"handleItemMouseEnter",function(w){S.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),Z(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),Z(S,"handleMouseMove",function(w){w.persist(),S.throttleTriggeredAfterMouseMove(w)}),Z(S,"handleMouseLeave",function(w){S.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};S.setState(A),S.triggerSyncEvent(A);var _=S.props.onMouseLeave;le(_)&&_(A,w)}),Z(S,"handleOuterEvent",function(w){var A=Y6(w),_=Sn(S.props,"".concat(A));if(A&&le(_)){var T,$;/.*touch.*/i.test(A)?$=S.getMouseInfo(w.changedTouches[0]):$=S.getMouseInfo(w),_((T=$)!==null&&T!==void 0?T:{},w)}}),Z(S,"handleClick",function(w){var A=S.getMouseInfo(w);if(A){var _=L(L({},A),{},{isTooltipActive:!0});S.setState(_),S.triggerSyncEvent(_);var T=S.props.onClick;le(T)&&T(_,w)}}),Z(S,"handleMouseDown",function(w){var A=S.props.onMouseDown;if(le(A)){var _=S.getMouseInfo(w);A(_,w)}}),Z(S,"handleMouseUp",function(w){var A=S.props.onMouseUp;if(le(A)){var _=S.getMouseInfo(w);A(_,w)}}),Z(S,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),Z(S,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&S.handleMouseDown(w.changedTouches[0])}),Z(S,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&S.handleMouseUp(w.changedTouches[0])}),Z(S,"handleDoubleClick",function(w){var A=S.props.onDoubleClick;if(le(A)){var _=S.getMouseInfo(w);A(_,w)}}),Z(S,"handleContextMenu",function(w){var A=S.props.onContextMenu;if(le(A)){var _=S.getMouseInfo(w);A(_,w)}}),Z(S,"triggerSyncEvent",function(w){S.props.syncId!==void 0&&pp.emit(yp,S.props.syncId,w,S.eventEmitterSymbol)}),Z(S,"applySyncEvent",function(w){var A=S.props,_=A.layout,T=A.syncMethod,$=S.state.updateId,P=w.dataStartIndex,M=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)S.setState(L({dataStartIndex:P,dataEndIndex:M},h({props:S.props,dataStartIndex:P,dataEndIndex:M,updateId:$},S.state)));else if(w.activeTooltipIndex!==void 0){var k=w.chartX,z=w.chartY,B=w.activeTooltipIndex,N=S.state,R=N.offset,D=N.tooltipTicks;if(!R)return;if(typeof T=="function")B=T(D,w);else if(T==="value"){B=-1;for(var H=0;H=0){var re,I;if(k.dataKey&&!k.allowDuplicatedCategory){var Re=typeof k.dataKey=="function"?ee:"payload.".concat(k.dataKey.toString());re=wy(H,Re,B),I=q&&K&&wy(K,Re,B)}else re=H==null?void 0:H[z],I=q&&K&&K[z];if(ne||Ae){var oe=w.props.activeIndex!==void 0?w.props.activeIndex:z;return[E.cloneElement(w,L(L(L({},T.props),at),{},{activeIndex:oe})),null,null]}if(!ve(re))return[V].concat(wl(S.renderActivePoints({item:T,activePoint:re,basePoint:I,childIndex:z,isRange:q})))}else{var xe,W=(xe=S.getItemByXY(S.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:V},_e=W.graphicalItem,vt=_e.item,zt=vt===void 0?w:vt,ya=_e.childIndex,Fn=L(L(L({},T.props),at),{},{activeIndex:ya});return[E.cloneElement(zt,Fn),null,null]}return q?[V,null,null]:[V,null]}),Z(S,"renderCustomized",function(w,A,_){return E.cloneElement(w,L(L({key:"recharts-customized-".concat(_)},S.props),S.state))}),Z(S,"renderMap",{CartesianGrid:{handler:Ls,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Ls},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Ls},YAxis:{handler:Ls},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((g=y.id)!==null&&g!==void 0?g:wd("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=lT(S.triggeredAfterMouseMove,(O=y.throttleDelay)!==null&&O!==void 0?O:1e3/60),S.state={},S}return yne(p,m),fne(p,[{key:"componentDidMount",value:function(){var g,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(g=this.props.margin.left)!==null&&g!==void 0?g:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var g=this.props,O=g.children,S=g.data,w=g.height,A=g.layout,_=Wt(O,zn);if(_){var T=_.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,P=Gm(this.state,S,T,$),M=this.state.tooltipTicks[T].coordinate,k=(this.state.offset.top+w)/2,z=A==="horizontal",B=z?{x:M,y:k}:{y:M,x:k},N=this.state.formattedGraphicalItems.find(function(D){var H=D.item;return H.type.name==="Scatter"});N&&(B=L(L({},B),N.props.points[T].tooltipPosition),P=N.props.points[T].tooltipPayload);var R={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:$,activePayload:P,activeCoordinate:B};this.setState(R),this.renderCursor(_),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(g,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==g.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==g.margin){var S,w;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(g){_y([Wt(g.children,zn)],[Wt(this.props.children,zn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var g=Wt(this.props.children,zn);if(g&&typeof g.props.shared=="boolean"){var O=g.props.shared?"axis":"item";return o.indexOf(O)>=0?O:i}return i}},{key:"getMouseInfo",value:function(g){if(!this.container)return null;var O=this.container,S=O.getBoundingClientRect(),w=bq(S),A={chartX:Math.round(g.pageX-w.left),chartY:Math.round(g.pageY-w.top)},_=S.width/O.offsetWidth||1,T=this.inRange(A.chartX,A.chartY,_);if(!T)return null;var $=this.state,P=$.xAxisMap,M=$.yAxisMap,k=this.getTooltipEventType(),z=QO(this.state,this.props.data,this.props.layout,T);if(k!=="axis"&&P&&M){var B=Br(P).scale,N=Br(M).scale,R=B&&B.invert?B.invert(A.chartX):null,D=N&&N.invert?N.invert(A.chartY):null;return L(L({},A),{},{xValue:R,yValue:D},z)}return z?L(L({},A),z):null}},{key:"inRange",value:function(g,O){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,A=g/S,_=O/S;if(w==="horizontal"||w==="vertical"){var T=this.state.offset,$=A>=T.left&&A<=T.left+T.width&&_>=T.top&&_<=T.top+T.height;return $?{x:A,y:_}:null}var P=this.state,M=P.angleAxisMap,k=P.radiusAxisMap;if(M&&k){var z=Br(M);return BS({x:A,y:_},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var g=this.props.children,O=this.getTooltipEventType(),S=Wt(g,zn),w={};S&&O==="axis"&&(S.props.trigger==="click"?w={onClick:this.handleClick}:w={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 A=Bc(this.props,this.handleOuterEvent);return L(L({},A),w)}},{key:"addListener",value:function(){pp.on(yp,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){pp.removeListener(yp,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(g,O,S){for(var w=this.state.formattedGraphicalItems,A=0,_=w.length;A<_;A++){var T=w[A];if(T.item===g||T.props.key===g.key||O===hr(T.item.type)&&S===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var g=this.clipPathId,O=this.state.offset,S=O.left,w=O.top,A=O.height,_=O.width;return C.createElement("defs",null,C.createElement("clipPath",{id:g},C.createElement("rect",{x:S,y:w,height:A,width:_})))}},{key:"getXScales",value:function(){var g=this.state.xAxisMap;return g?Object.entries(g).reduce(function(O,S){var w=KO(S,2),A=w[0],_=w[1];return L(L({},O),{},Z({},A,_.scale))},{}):null}},{key:"getYScales",value:function(){var g=this.state.yAxisMap;return g?Object.entries(g).reduce(function(O,S){var w=KO(S,2),A=w[0],_=w[1];return L(L({},O),{},Z({},A,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(g){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[g])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(g){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[g])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(g){var O=this.state,S=O.formattedGraphicalItems,w=O.activeItem;if(S&&S.length)for(var A=0,_=S.length;A<_;A++){var T=S[A],$=T.props,P=T.item,M=P.type.defaultProps!==void 0?L(L({},P.type.defaultProps),P.props):P.props,k=hr(P.type);if(k==="Bar"){var z=($.data||[]).find(function(D){return iQ(g,D)});if(z)return{graphicalItem:T,payload:z}}else if(k==="RadialBar"){var B=($.data||[]).find(function(D){return BS(g,D)});if(B)return{graphicalItem:T,payload:B}}else if(Hd(T,w)||qd(T,w)||Mu(T,w)){var N=uZ({graphicalItem:T,activeTooltipItem:w,itemData:M.data}),R=M.activeIndex===void 0?N:M.activeIndex;return{graphicalItem:L(L({},T),{},{childIndex:R}),payload:Mu(T,w)?M.data[N]:T.props.data[N]}}}return null}},{key:"render",value:function(){var g=this;if(!jx(this))return null;var O=this.props,S=O.children,w=O.className,A=O.width,_=O.height,T=O.style,$=O.compact,P=O.title,M=O.desc,k=FO(O,ane),z=pe(k,!1);if($)return C.createElement(PO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement(Ty,Ci({},z,{width:A,height:_,title:P,desc:M}),this.renderClipPath(),Mx(S,this.renderMap)));if(this.props.accessibilityLayer){var B,N;z.tabIndex=(B=this.props.tabIndex)!==null&&B!==void 0?B:0,z.role=(N=this.props.role)!==null&&N!==void 0?N:"application",z.onKeyDown=function(D){g.accessibilityManager.keyboardEvent(D)},z.onFocus=function(){g.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return C.createElement(PO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement("div",Ci({className:me("recharts-wrapper",w),style:L({position:"relative",cursor:"default",width:A,height:_},T)},R,{ref:function(H){g.container=H}}),C.createElement(Ty,Ci({},z,{width:A,height:_,title:P,desc:M,style:Sne}),this.renderClipPath(),Mx(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(E.Component);Z(x,"displayName",n),Z(x,"defaultProps",L({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},c)),Z(x,"getDerivedStateFromProps",function(m,p){var y=m.dataKey,g=m.data,O=m.children,S=m.width,w=m.height,A=m.layout,_=m.stackOffset,T=m.margin,$=p.dataStartIndex,P=p.dataEndIndex;if(p.updateId===void 0){var M=ZO(m);return L(L(L({},M),{},{updateId:0},h(L(L({props:m},M),{},{updateId:0}),p)),{},{prevDataKey:y,prevData:g,prevWidth:S,prevHeight:w,prevLayout:A,prevStackOffset:_,prevMargin:T,prevChildren:O})}if(y!==p.prevDataKey||g!==p.prevData||S!==p.prevWidth||w!==p.prevHeight||A!==p.prevLayout||_!==p.prevStackOffset||!Ui(T,p.prevMargin)){var k=ZO(m),z={chartX:p.chartX,chartY:p.chartY,isTooltipActive:p.isTooltipActive},B=L(L({},QO(p,g,A)),{},{updateId:p.updateId+1}),N=L(L(L({},k),z),B);return L(L(L({},N),h(L({props:m},N),p)),{},{prevDataKey:y,prevData:g,prevWidth:S,prevHeight:w,prevLayout:A,prevStackOffset:_,prevMargin:T,prevChildren:O})}if(!_y(O,p.prevChildren)){var R,D,H,q,K=Wt(O,pl),G=K&&(R=(D=K.props)===null||D===void 0?void 0:D.startIndex)!==null&&R!==void 0?R:$,Q=K&&(H=(q=K.props)===null||q===void 0?void 0:q.endIndex)!==null&&H!==void 0?H:P,ie=G!==$||Q!==P,Ae=!ve(g),ne=Ae&&!ie?p.updateId:p.updateId+1;return L(L({updateId:ne},h(L(L({props:m},p),{},{updateId:ne,dataStartIndex:G,dataEndIndex:Q}),p)),{},{prevChildren:O,dataStartIndex:G,dataEndIndex:Q})}return null}),Z(x,"renderActiveDot",function(m,p,y){var g;return E.isValidElement(m)?g=E.cloneElement(m,p):le(m)?g=m(p):g=C.createElement(Ej,p),C.createElement(pt,{className:"recharts-active-dot",key:y},g)});var b=E.forwardRef(function(p,y){return C.createElement(x,Ci({},p,{ref:y}))});return b.displayName=x.displayName,b},$ne=Cne({chartName:"BarChart",GraphicalChild:li,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Fd},{axisType:"yAxis",AxisComp:Wd}],formatAxisMap:PJ});function Pne(){const[e,t]=E.useState([]),[n,r]=E.useState([]),[a,i]=E.useState({}),[l,o]=E.useState(""),[u,s]=E.useState(!1);E.useEffect(()=>{fe.get("/quality/inspections").then(c=>t(c.data)),fe.get("/quality/defects/pareto").then(c=>r(c.data)),fe.get("/quality/dashboard").then(c=>i(c.data))},[]);const f=async()=>{s(!0);try{const c=await fe.post("/quality/ai-analyze",{productCode:"PROD-001",defectDescription:"표면 스크래치 및 치수 불량 다수 발생"});o(c.data.analysis)}catch{o("AI 분석 일시 중단")}s(!1)};return v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"품질 관리"}),v.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"오늘 검사",value:a.total_inspections,color:"text-white"},{label:"합격",value:a.passed,color:"text-green-400"},{label:"불합격",value:a.failed,color:"text-red-400"},{label:"불량률",value:`${parseFloat(a.defect_rate||0).toFixed(2)}%`,color:"text-yellow-400"}].map(({label:c,value:d,color:h})=>v.jsxs("div",{className:"bg-slate-800 rounded-xl p-4 border border-slate-700 text-center",children:[v.jsx("div",{className:`text-2xl font-bold ${h}`,children:d??"-"}),v.jsx("div",{className:"text-xs text-slate-400 mt-1",children:c})]},c))}),v.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300 mb-4",children:"불량 파레토 차트"}),v.jsx(dq,{width:"100%",height:200,children:v.jsxs($ne,{data:n.slice(0,8),children:[v.jsx(nN,{strokeDasharray:"3 3",stroke:"#334155"}),v.jsx(Fd,{dataKey:"defect_code",tick:{fill:"#94a3b8",fontSize:10}}),v.jsx(Wd,{tick:{fill:"#94a3b8",fontSize:10}}),v.jsx(zn,{contentStyle:{backgroundColor:"#1e293b",border:"1px solid #334155"}}),v.jsx(li,{dataKey:"count",fill:"#ef4444"})]})})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsxs("div",{className:"flex items-center justify-between mb-3",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"AI 불량 원인 분석"}),v.jsxs("button",{onClick:f,disabled:u,className:"flex items-center gap-1 px-3 py-1.5 bg-purple-700 hover:bg-purple-600 text-white rounded text-xs disabled:opacity-50",children:[v.jsx(eu,{size:12})," ",u?"분석 중...":"AI 분석"]})]}),l?v.jsx("div",{className:"bg-slate-700 rounded-lg p-3 text-sm text-slate-200 leading-relaxed",children:l}):v.jsx("div",{className:"text-slate-500 text-sm",children:"AI 분석 버튼을 클릭하면 Ollama가 불량 원인을 분석합니다."})]})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[v.jsx("div",{className:"px-4 py-3 border-b border-slate-700",children:v.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"검사 목록"})}),v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"검사 번호"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"제품"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"검사 유형"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"LOT"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"샘플/불량"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"결과"}),v.jsx("th",{className:"px-4 py-2 text-left text-slate-400",children:"검사일시"})]})}),v.jsx("tbody",{children:e.map(c=>{var d;return v.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[v.jsx("td",{className:"px-4 py-2 font-mono text-blue-400",children:c.inspectionNumber}),v.jsx("td",{className:"px-4 py-2 text-slate-300",children:c.productCode}),v.jsx("td",{className:"px-4 py-2 text-slate-300",children:c.inspectionType}),v.jsx("td",{className:"px-4 py-2 text-slate-400",children:c.lotNumber}),v.jsxs("td",{className:"px-4 py-2 text-slate-300",children:[c.sampleSize," / ",c.defectCount||0]}),v.jsx("td",{className:"px-4 py-2",children:v.jsx("span",{className:c.result==="PASS"?"text-green-400":c.result==="FAIL"?"text-red-400":"text-yellow-400",children:c.result||"-"})}),v.jsx("td",{className:"px-4 py-2 text-slate-400 text-xs",children:((d=c.inspectedAt)==null?void 0:d.replace("T"," ").slice(0,16))||"-"})]},c.id)})})]}),e.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-8",children:"검사 이력이 없습니다."})]})]})}const Dne={RUNNING:"text-green-400",IDLE:"text-slate-400",MAINTENANCE:"text-yellow-400",BREAKDOWN:"text-red-400"};function Rne(){const[e,t]=E.useState([]),[n,r]=E.useState([]),[a,i]=E.useState(""),[l,o]=E.useState(!1);E.useEffect(()=>{fe.get("/equipment").then(s=>t(s.data)),fe.get("/equipment/breakdown-risk").then(s=>r(s.data))},[]);const u=async()=>{o(!0);try{const s=await fe.post("/equipment/ai-predict",{equipmentCode:"EQ-001",oeeTrend:"0.85→0.78→0.71 (3일 하락 추세)"});i(s.data.prediction)}catch{i("예지보전 AI 일시 중단")}o(!1)};return v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"설비 현황"}),n.length>0&&v.jsxs("div",{className:"bg-red-900/30 border border-red-700 rounded-xl p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[v.jsx(Qv,{size:16,className:"text-red-400"}),v.jsxs("span",{className:"text-sm font-medium text-red-300",children:["고장 위험 설비 (",n.length,"대)"]})]}),v.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(s=>v.jsxs("span",{className:"px-2 py-1 bg-red-800 text-red-200 rounded text-xs",children:[s.equipmentCode," (OEE ",Math.round((s.oee||0)*100),"%)"]},s.id))})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsxs("div",{className:"flex items-center justify-between mb-3",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"AI 예지보전"}),v.jsxs("button",{onClick:u,disabled:l,className:"flex items-center gap-1 px-3 py-1.5 bg-purple-700 hover:bg-purple-600 text-white rounded text-xs disabled:opacity-50",children:[v.jsx(eu,{size:12})," ",l?"분석 중...":"AI 예측"]})]}),a?v.jsx("div",{className:"bg-slate-700 rounded-lg p-3 text-sm text-slate-200 leading-relaxed",children:a}):v.jsx("div",{className:"text-slate-500 text-sm",children:"AI 예측 버튼으로 Ollama 기반 설비 예지보전 분석을 시작합니다."})]}),v.jsxs("div",{className:"bg-slate-800 rounded-xl border border-slate-700 overflow-hidden",children:[v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"설비 코드"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"설비명"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"작업장"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"제조사"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"OEE"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"상태"}),v.jsx("th",{className:"px-4 py-3 text-left text-slate-400",children:"다음 점검"})]})}),v.jsx("tbody",{children:e.map(s=>{var f;return v.jsxs("tr",{className:"border-b border-slate-700/50 hover:bg-slate-700/30",children:[v.jsx("td",{className:"px-4 py-3 font-mono text-blue-400",children:s.equipmentCode}),v.jsx("td",{className:"px-4 py-3 text-white",children:s.equipmentName}),v.jsx("td",{className:"px-4 py-3 text-slate-300",children:s.workstationCode}),v.jsx("td",{className:"px-4 py-3 text-slate-400",children:s.manufacturer}),v.jsx("td",{className:"px-4 py-3",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-16 bg-slate-700 rounded-full h-1.5",children:v.jsx("div",{className:`h-1.5 rounded-full ${(s.oee||0)>=.85?"bg-green-500":(s.oee||0)>=.7?"bg-yellow-500":"bg-red-500"}`,style:{width:`${(s.oee||0)*100}%`}})}),v.jsxs("span",{className:"text-xs text-slate-300",children:[Math.round((s.oee||0)*100),"%"]})]})}),v.jsx("td",{className:"px-4 py-3",children:v.jsx("span",{className:`font-medium ${Dne[s.status]||"text-slate-400"}`,children:s.status})}),v.jsx("td",{className:"px-4 py-3 text-slate-400 text-xs",children:((f=s.nextMaintenanceAt)==null?void 0:f.slice(0,10))||"-"})]},s.id)})})]}),e.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-8",children:"등록된 설비가 없습니다."})]})]})}const vN=Ge.create({timeout:15e3});vN.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const zne=e=>vN.post("/api/ai/feedback",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data});function Bne({feature:e,answer:t}){const[n,r]=E.useState(null),[a,i]=E.useState(!1),[l,o]=E.useState(""),[u,s]=E.useState(!1),f=async(c,d)=>{s(!0);try{await zne({feature:e,answer:t,verdict:c,correction:d}),r(c),i(!1)}catch{}s(!1)};return n?v.jsxs("div",{className:"mt-2 text-[11px] text-emerald-400",children:["피드백 감사합니다",n==="down"?" — 학습에 반영됩니다.":"."]}):v.jsxs("div",{className:"mt-2 space-y-2",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:"text-[11px] text-slate-500",children:"이 답변이 도움이 되었나요?"}),v.jsx("button",{disabled:u,onClick:()=>f("up"),className:"p-1 rounded text-slate-400 hover:text-emerald-400 disabled:opacity-40",title:"도움됨",children:v.jsx(q3,{size:13})}),v.jsx("button",{disabled:u,onClick:()=>i(c=>!c),className:"p-1 rounded text-slate-400 hover:text-rose-400 disabled:opacity-40",title:"개선 필요",children:v.jsx(H3,{size:13})})]}),a&&v.jsxs("div",{className:"space-y-1.5",children:[v.jsx("textarea",{value:l,onChange:c=>o(c.target.value),placeholder:"어떻게 개선하면 좋을지 알려주세요(선택)",className:"w-full text-xs bg-slate-900 border border-slate-700 rounded p-2 text-slate-200 outline-none focus:border-blue-500",rows:2}),v.jsx("button",{disabled:u,onClick:()=>f("down",l),className:"px-3 py-1 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs disabled:opacity-40",children:"피드백 보내기"})]})]})}function ew(){const[e,t]=E.useState({}),[n,r]=E.useState({}),[a,i]=E.useState([]),[l,o]=E.useState(!1),u=async(c,d)=>{r(h=>({...h,[c]:!0}));try{const h=await d();t(x=>({...x,[c]:h}))}catch{t(h=>({...h,[c]:"AI 분석 일시 중단. 온프레미스 Ollama 연결을 확인하세요."}))}r(h=>({...h,[c]:!1}))},s=async()=>{const c=await fe.get("/inventory");i(c.data),o(!0)},f=[{title:"생산 수요 예측",feature:"demand_forecast",desc:"과거 생산 데이터 기반 AI 수요/생산 예측 (Claude→Ollama 폴백)",icon:v.jsx(G3,{size:18}),color:"text-blue-400 border-blue-700",action:async()=>(await fe.post("/quality/ai-analyze",{productCode:"ALL",defectDescription:"최근 생산 트렌드 분석 및 다음 주 수요 예측"})).data.analysis},{title:"설비 이상 감지",feature:"equipment_predict",desc:"OEE 하락 패턴 분석 및 예지보전 AI 권고",icon:v.jsx(bE,{size:18}),color:"text-yellow-400 border-yellow-700",action:async()=>(await fe.post("/equipment/ai-predict",{equipmentCode:"ALL",oeeTrend:"전체 설비 OEE 분석 및 이상 감지 요청"})).data.prediction},{title:"재고 최적화",feature:"inventory_optimize",desc:"안전재고 분석 및 발주 최적화 AI 권고",icon:v.jsx(gE,{size:18}),color:"text-green-400 border-green-700",action:async()=>(await fe.post("/inventory/ai-optimize",{lowStockItems:"재고 부족 품목 자동 감지 및 최적 발주량 계산"})).data.optimization},{title:"품질 불량 분석",feature:"quality_defect",desc:"공정별 불량 패턴 AI 분석 및 개선 방안",icon:v.jsx(eu,{size:18}),color:"text-purple-400 border-purple-700",action:async()=>(await fe.post("/quality/ai-analyze",{productCode:"ALL",defectDescription:"전체 공정 불량 패턴 분석 및 개선 방안 도출"})).data.analysis}];return v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-xl font-bold text-white",children:"AI 공장 분석 (Ollama 온프레미스)"}),v.jsx("div",{className:"bg-blue-900/30 border border-blue-700 rounded-xl p-4 text-sm text-blue-300",children:"모든 AI 분석은 온프레미스 Ollama(localhost:11434)를 사용합니다. 외부 AI API는 절대 사용하지 않습니다."}),v.jsx("div",{className:"grid grid-cols-2 gap-6",children:f.map(c=>v.jsxs("div",{className:`bg-slate-800 rounded-xl p-5 border ${c.color.split(" ")[1]}`,children:[v.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[v.jsx("span",{className:c.color.split(" ")[0],children:c.icon}),v.jsx("h2",{className:"text-sm font-medium text-white",children:c.title})]}),v.jsx("p",{className:"text-xs text-slate-400 mb-4",children:c.desc}),v.jsxs("button",{onClick:()=>u(c.title,c.action),disabled:n[c.title],className:"flex items-center gap-1 px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs disabled:opacity-50 mb-3 transition-colors",children:[v.jsx(eu,{size:12})," ",n[c.title]?"분석 중...":"AI 분석 실행"]}),e[c.title]&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"bg-slate-700/50 rounded-lg p-3 text-xs text-slate-200 leading-relaxed max-h-48 overflow-y-auto",children:e[c.title]}),v.jsx(Bne,{feature:c.feature,answer:e[c.title]})]})]},c.title))}),v.jsxs("div",{className:"bg-slate-800 rounded-xl p-5 border border-slate-700",children:[v.jsxs("div",{className:"flex items-center justify-between mb-4",children:[v.jsx("h2",{className:"text-sm font-medium text-slate-300",children:"재고 현황"}),v.jsx("button",{onClick:s,className:"px-3 py-1.5 bg-slate-700 hover:bg-slate-600 text-white rounded text-xs transition-colors",children:"재고 조회"})]}),l&&v.jsxs("table",{className:"w-full text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b border-slate-700",children:[v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"품목코드"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"품목명"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"위치"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"현재고"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"안전재고"}),v.jsx("th",{className:"px-3 py-2 text-left text-slate-400",children:"상태"})]})}),v.jsx("tbody",{children:a.map(c=>v.jsxs("tr",{className:"border-b border-slate-700/50",children:[v.jsx("td",{className:"px-3 py-2 font-mono text-blue-400",children:c.itemCode}),v.jsx("td",{className:"px-3 py-2 text-white",children:c.itemName}),v.jsx("td",{className:"px-3 py-2 text-slate-400",children:c.locationCode}),v.jsx("td",{className:"px-3 py-2 text-slate-300",children:c.quantity}),v.jsx("td",{className:"px-3 py-2 text-slate-400",children:c.safetyStock}),v.jsx("td",{className:"px-3 py-2",children:v.jsx("span",{className:(c.quantity||0)<=(c.safetyStock||0)?"text-red-400":"text-green-400",children:(c.quantity||0)<=(c.safetyStock||0)?"부족":"정상"})})]},c.id))})]}),l&&a.length===0&&v.jsx("div",{className:"text-center text-slate-500 py-4",children:"재고 데이터가 없습니다."})]})]})}const Zd=Ge.create({timeout:13e4});Zd.interceptors.request.use(e=>{const t=localStorage.getItem("fa_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const Lne=()=>Zd.get("/api/admin/ai-config").then(e=>{var t;return(t=e.data)==null?void 0:t.data}),Une=e=>Zd.put("/api/admin/ai-config",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data}),kne=()=>Zd.post("/api/admin/ai-config/test",{}).then(e=>{var t;return(t=e.data)==null?void 0:t.data}),Ine=[{id:"ollama",label:"Ollama (기본)",hint:"온프레미스 · llama3.2:1b"},{id:"qwen3",label:"Qwen3",hint:"온프레미스 · qwen3:1.7b"},{id:"deepseek",label:"DeepSeek",hint:"온프레미스 · deepseek-r1:1.5b"},{id:"glm",label:"GLM",hint:"온프레미스 · glm4:9b",ram:!0},{id:"claude",label:"Claude (외부)",hint:"api.anthropic.com · 키 필요"}],gN=["claude-sonnet-4-6","claude-haiku-4-5","claude-opus-4-8"],Ym="claude-sonnet-4-6",tw=e=>gN.includes(e)?e:Ym;function vp(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (AI 설정은 ADMIN 전용).":t.includes("ERR-AI-400")?t.replace(/^ERR-AI-400:\s*/,""):"AI 설정을 처리하지 못했습니다."}function Hne(){const[e,t]=E.useState("ollama"),[n,r]=E.useState(Ym),[a,i]=E.useState(!1),[l,o]=E.useState(""),[u,s]=E.useState(!0),[f,c]=E.useState(!1),[d,h]=E.useState(!1),[x,b]=E.useState(!1),[m,p]=E.useState(!1),[y,g]=E.useState(""),[O,S]=E.useState(!1),[w,A]=E.useState(null),_=D=>{t(D.provider),r(tw(D.claudeModel??Ym)),i(!!D.claudeKeySet),o(D.ollamaTextModel??""),s(!!D.aiEnabled),c(!!D.ramWarning)},T=()=>{h(!0),Lne().then(D=>{_(D),g("")}).catch(D=>g(vp(D))).finally(()=>h(!1))};E.useEffect(()=>{T()},[]);const $=()=>{p(!1),A(null)},P=async()=>{b(!0),p(!1);try{const D=await Une({provider:e,claudeModel:n});_(D),p(!0),g("")}catch(D){g(vp(D))}finally{b(!1)}},M=async()=>{S(!0),A(null);try{A(await kne())}catch(D){A({ok:!1,degraded:!1,message:vp(D)})}finally{S(!1)}},k=e==="claude",z=k&&!a,B=!k&&!u,N=!k&&(f||e==="glm"),R=w?w.degraded?"text-amber-400":w.ok?"text-emerald-400":"text-rose-400":"";return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsxs("h1",{className:"text-xl font-bold text-white flex items-center gap-2",children:[v.jsx(gy,{size:20,className:"text-blue-400"})," AI 플랫폼 설정"]}),v.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"공장 AI 분석(불량·설비·재고) 텍스트 생성에 사용할 LLM 제공자와 모델을 선택합니다."})]}),v.jsx("button",{onClick:T,disabled:d,className:"px-3 py-1.5 rounded-lg bg-slate-800 border border-slate-700 text-sm text-slate-200 disabled:opacity-40",children:"새로고침"})]}),y&&v.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5",children:y}),(z||B||N)&&v.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 space-y-1",children:[z&&v.jsx("div",{children:"Claude API 키가 설정되지 않아 Ollama(온프레미스)로 폴백 동작합니다. 서버 환경변수 ANTHROPIC_API_KEY 설정 후 사용하세요."}),B&&v.jsx("div",{children:"AI 기능이 비활성 상태입니다. 모든 AI 결과는 규칙 기반(degraded)으로 동작합니다."}),N&&v.jsx("div",{children:"GLM(glm4:9b)은 서버 RAM 여유가 필요합니다. 콜드로드 실패 시 소형 모델(llama3.2:1b)로 자동 폴백합니다."})]}),v.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[v.jsxs("section",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5",children:[v.jsxs("h2",{className:"text-sm font-semibold mb-4 flex items-center gap-2 text-slate-200",children:[v.jsx(gy,{size:16,className:"text-blue-400"})," 제공자 & 모델"]}),v.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:Ine.map(D=>v.jsxs("button",{onClick:()=>{t(D.id),$()},className:`text-left px-3 py-2.5 rounded-lg border text-sm transition-colors ${e===D.id?"bg-blue-600/15 border-blue-500 text-blue-300":"bg-slate-900 border-slate-700 text-slate-300 hover:border-blue-500/50"}`,children:[v.jsxs("div",{className:"font-semibold flex items-center gap-1",children:[D.label,D.ram&&v.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded bg-amber-500/20 text-amber-300 border border-amber-500/40",children:"RAM"})]}),v.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:D.hint})]},D.id))}),!k&&v.jsxs("div",{className:"mb-4",children:[v.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Ollama 텍스트 모델"}),v.jsx("div",{className:"px-3 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm font-mono text-slate-200",children:l||"llama3.2:1b"}),v.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"온프레미스 소형 모델 — 서버 RAM 제약으로 고정. 외부 호출 없음."})]}),k&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"mb-4",children:[v.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Claude 모델"}),v.jsx("select",{value:n,onChange:D=>{r(tw(D.target.value)),$()},className:"w-full px-3 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm text-slate-200 focus:border-blue-500 outline-none",children:gN.map(D=>v.jsx("option",{value:D,children:D},D))})]}),v.jsxs("div",{className:"mb-4",children:[v.jsxs("label",{className:"text-xs text-slate-500 mb-1 flex items-center gap-1",children:[v.jsx(j3,{size:13})," API 키"]}),v.jsx("span",{className:`inline-block px-3 py-1 rounded-lg text-xs font-semibold ${a?"bg-emerald-500/15 text-emerald-300 border border-emerald-500/40":"bg-rose-500/15 text-rose-300 border border-rose-500/40"}`,children:a?"설정됨":"미설정"}),v.jsx("p",{className:"text-[11px] text-slate-500 mt-1.5",children:"키는 서버 환경변수(ANTHROPIC_API_KEY)로만 주입되며 화면·응답·로그에 노출되지 않습니다."})]})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("button",{onClick:P,disabled:x||d,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold disabled:opacity-40 transition-colors",children:[v.jsx(L3,{size:15})," ",x?"저장 중…":"저장"]}),m&&v.jsx("span",{className:"text-emerald-400 text-xs",children:"저장됨"})]})]}),v.jsxs("section",{className:"bg-slate-800 border border-slate-700 rounded-xl p-5",children:[v.jsxs("h2",{className:"text-sm font-semibold mb-2 flex items-center gap-2 text-slate-200",children:[v.jsx(D3,{size:16,className:"text-blue-400"})," 연결 테스트"]}),v.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"저장된 설정 기준으로 선택한 제공자에 짧은 ping 을 보내 연결을 확인합니다(요약 결과만)."}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:M,disabled:O,className:"px-4 py-2 rounded-lg bg-slate-900 border border-slate-700 text-sm text-slate-200 disabled:opacity-40 hover:border-blue-500/50 transition-colors",children:O?"테스트 중…":"테스트 실행"}),w&&v.jsx("span",{className:`text-sm ${R}`,role:"status","aria-live":"polite",children:w.message})]}),v.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"먼저 변경 사항을 저장한 뒤 테스트하세요. Claude 실패 시 Ollama 로 자동 폴백합니다."})]})]})]})}const qne=[{to:"/dashboard",icon:N3,label:"대시보드"},{to:"/floor-map",icon:C3,label:"공장 배치도"},{to:"/epaper",icon:$3,label:"e-Paper 관리"},{to:"/qr",icon:z3,label:"QR WIP 추적"},{to:"/orders",icon:gE,label:"생산 오더"},{to:"/andon",icon:Qv,label:"안돈 현황판"},{to:"/quality",icon:I3,label:"품질 관리"},{to:"/equipment",icon:bE,label:"설비 현황"},{to:"/inventory",icon:T3,label:"재고 관리"},{to:"/ai",icon:eu,label:"AI 공장 분석"},{to:"/ai-settings",icon:gy,label:"AI 플랫폼 설정"}];function Gne(){const e=JSON.parse(localStorage.getItem("fa_user")||"{}");return v.jsxs("aside",{className:"w-60 bg-slate-900 border-r border-slate-700 flex flex-col h-screen fixed",children:[v.jsxs("div",{className:"p-4 border-b border-slate-700",children:[v.jsx("div",{className:"text-blue-400 font-bold text-lg",children:"GUARDiA FA"}),v.jsx("div",{className:"text-slate-400 text-xs mt-1",children:"Factory Automation Platform"})]}),v.jsx("nav",{className:"flex-1 overflow-y-auto py-2",children:qne.map(({to:t,icon:n,label:r})=>v.jsxs(b3,{to:t,className:({isActive:a})=>`flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${a?"bg-blue-600 text-white":"text-slate-300 hover:bg-slate-800 hover:text-white"}`,children:[v.jsx(n,{size:16}),r]},t))}),v.jsxs("div",{className:"p-4 border-t border-slate-700",children:[v.jsxs("div",{className:"text-xs text-slate-400 mb-2",children:[e.username," (",e.role,")"]}),v.jsxs("button",{onClick:()=>{localStorage.clear(),window.location.href="/login"},className:"flex items-center gap-2 text-xs text-slate-400 hover:text-red-400 transition-colors",children:[v.jsx(M3,{size:14})," 로그아웃"]})]})]})}function Yne({children:e}){return localStorage.getItem("fa_token")?v.jsx(v.Fragment,{children:e}):v.jsx(pE,{to:"/login",replace:!0})}function Xne({children:e}){return v.jsxs("div",{className:"flex",children:[v.jsx(Gne,{}),v.jsx("main",{className:"ml-60 flex-1 min-h-screen p-6",children:e})]})}function Vne(){return v.jsx(y3,{children:v.jsxs(Kb,{children:[v.jsx(Ct,{path:"/login",element:v.jsx(YP,{})}),v.jsx(Ct,{path:"/*",element:v.jsx(Yne,{children:v.jsx(Xne,{children:v.jsxs(Kb,{children:[v.jsx(Ct,{path:"/",element:v.jsx(pE,{to:"/dashboard",replace:!0})}),v.jsx(Ct,{path:"/dashboard",element:v.jsx(XP,{})}),v.jsx(Ct,{path:"/floor-map",element:v.jsx(KP,{})}),v.jsx(Ct,{path:"/epaper",element:v.jsx(WP,{})}),v.jsx(Ct,{path:"/qr",element:v.jsx(QP,{})}),v.jsx(Ct,{path:"/orders",element:v.jsx(JP,{})}),v.jsx(Ct,{path:"/andon",element:v.jsx(tD,{})}),v.jsx(Ct,{path:"/quality",element:v.jsx(Pne,{})}),v.jsx(Ct,{path:"/equipment",element:v.jsx(Rne,{})}),v.jsx(Ct,{path:"/inventory",element:v.jsx(ew,{})}),v.jsx(Ct,{path:"/ai",element:v.jsx(ew,{})}),v.jsx(Ct,{path:"/ai-settings",element:v.jsx(Hne,{})})]})})})})]})})}g$.createRoot(document.getElementById("root")).render(v.jsx(C.StrictMode,{children:v.jsx(Vne,{})}));
diff --git a/backend/src/main/resources/static/index.html b/backend/src/main/resources/static/index.html
new file mode 100644
index 0000000..cc22bad
--- /dev/null
+++ b/backend/src/main/resources/static/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+ GUARDiA FA — Factory Automation Platform
+
+
+
+
+
+
+
diff --git a/doc/guardia-fa_아키텍처설계서_v1.0.pptx b/doc/guardia-fa_아키텍처설계서_v1.0.pptx
new file mode 100644
index 0000000..19f3727
Binary files /dev/null and b/doc/guardia-fa_아키텍처설계서_v1.0.pptx differ
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
new file mode 100644
index 0000000..8378fd7
--- /dev/null
+++ b/frontend/package-lock.json
@@ -0,0 +1,2967 @@
+{
+ "name": "guardia-fa-frontend",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "guardia-fa-frontend",
+ "version": "1.0.0",
+ "dependencies": {
+ "axios": "^1.7.0",
+ "lucide-react": "^0.400.0",
+ "react": "^19.0.0",
+ "react-dom": "^19.0.0",
+ "react-router-dom": "^6.26.0",
+ "recharts": "^2.12.0"
+ },
+ "devDependencies": {
+ "@types/react": "^19.0.0",
+ "@types/react-dom": "^19.0.0",
+ "@vitejs/plugin-react": "^4.3.0",
+ "autoprefixer": "^10.4.0",
+ "postcss": "^8.4.0",
+ "tailwindcss": "^3.4.0",
+ "typescript": "^5.4.0",
+ "vite": "^5.3.0"
+ }
+ },
+ "node_modules/@alloc/quick-lru": {
+ "version": "5.2.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.29.7",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.29.7",
+ "@babel/generator": "^7.29.7",
+ "@babel/helper-compilation-targets": "^7.29.7",
+ "@babel/helper-module-transforms": "^7.29.7",
+ "@babel/helpers": "^7.29.7",
+ "@babel/parser": "^7.29.7",
+ "@babel/template": "^7.29.7",
+ "@babel/traverse": "^7.29.7",
+ "@babel/types": "^7.29.7",
+ "@jridgewell/remapping": "^2.3.5",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.7",
+ "@babel/types": "^7.29.7",
+ "@jridgewell/gen-mapping": "^0.3.12",
+ "@jridgewell/trace-mapping": "^0.3.28",
+ "jsesc": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/compat-data": "^7.29.7",
+ "@babel/helper-validator-option": "^7.29.7",
+ "browserslist": "^4.24.0",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-globals": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/traverse": "^7.29.7",
+ "@babel/types": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.29.7",
+ "@babel/helper-validator-identifier": "^7.29.7",
+ "@babel/traverse": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/template": "^7.29.7",
+ "@babel/types": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.29.7"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-self": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-react-jsx-source": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.29.7",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.7",
+ "@babel/parser": "^7.29.7",
+ "@babel/types": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.29.7",
+ "@babel/generator": "^7.29.7",
+ "@babel/helper-globals": "^7.29.7",
+ "@babel/parser": "^7.29.7",
+ "@babel/template": "^7.29.7",
+ "@babel/types": "^7.29.7",
+ "debug": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.29.7",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.29.7",
+ "@babel/helper-validator-identifier": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
+ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
+ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
+ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
+ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
+ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
+ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
+ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
+ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
+ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
+ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
+ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
+ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
+ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
+ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
+ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
+ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
+ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.21.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
+ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.21.5",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.5",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.31",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@remix-run/router": {
+ "version": "1.23.3",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-beta.27",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz",
+ "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz",
+ "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz",
+ "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz",
+ "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz",
+ "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz",
+ "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz",
+ "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz",
+ "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz",
+ "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz",
+ "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz",
+ "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loong64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz",
+ "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz",
+ "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-ppc64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz",
+ "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz",
+ "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz",
+ "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz",
+ "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz",
+ "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz",
+ "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-openbsd-x64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz",
+ "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz",
+ "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz",
+ "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.62.2",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz",
+ "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.62.2",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.62.2",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@types/babel__core": {
+ "version": "7.20.5",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "node_modules/@types/babel__generator": {
+ "version": "7.27.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__template": {
+ "version": "7.4.4",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__traverse": {
+ "version": "7.28.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.28.2"
+ }
+ },
+ "node_modules/@types/d3-array": {
+ "version": "3.2.2",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-color": {
+ "version": "3.1.3",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-ease": {
+ "version": "3.0.2",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-interpolate": {
+ "version": "3.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-color": "*"
+ }
+ },
+ "node_modules/@types/d3-path": {
+ "version": "3.1.1",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-scale": {
+ "version": "4.0.9",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-time": "*"
+ }
+ },
+ "node_modules/@types/d3-shape": {
+ "version": "3.1.8",
+ "license": "MIT",
+ "dependencies": {
+ "@types/d3-path": "*"
+ }
+ },
+ "node_modules/@types/d3-time": {
+ "version": "3.0.4",
+ "license": "MIT"
+ },
+ "node_modules/@types/d3-timer": {
+ "version": "3.0.2",
+ "license": "MIT"
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.9",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/react": {
+ "version": "19.2.17",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "csstype": "^3.2.2"
+ }
+ },
+ "node_modules/@types/react-dom": {
+ "version": "19.2.3",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "^19.2.0"
+ }
+ },
+ "node_modules/@vitejs/plugin-react": {
+ "version": "4.7.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/core": "^7.28.0",
+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",
+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",
+ "@rolldown/pluginutils": "1.0.0-beta.27",
+ "@types/babel__core": "^7.20.5",
+ "react-refresh": "^0.17.0"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "6.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
+ "node_modules/any-promise": {
+ "version": "1.3.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/arg": {
+ "version": "5.0.2",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "license": "MIT"
+ },
+ "node_modules/autoprefixer": {
+ "version": "10.5.2",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "browserslist": "^4.28.4",
+ "caniuse-lite": "^1.0.30001799",
+ "fraction.js": "^5.3.4",
+ "picocolors": "^1.1.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/axios": {
+ "version": "1.18.1",
+ "license": "MIT",
+ "dependencies": {
+ "follow-redirects": "^1.16.0",
+ "form-data": "^4.0.5",
+ "https-proxy-agent": "^5.0.1",
+ "proxy-from-env": "^2.1.0"
+ }
+ },
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.10.41",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.cjs"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.3.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.3",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fill-range": "^7.1.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.28.4",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "baseline-browser-mapping": "^2.10.38",
+ "caniuse-lite": "^1.0.30001799",
+ "electron-to-chromium": "^1.5.376",
+ "node-releases": "^2.0.48",
+ "update-browserslist-db": "^1.2.3"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/camelcase-css": {
+ "version": "2.0.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001800",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "CC-BY-4.0"
+ },
+ "node_modules/chokidar": {
+ "version": "3.6.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chokidar/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "license": "MIT",
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/commander": {
+ "version": "4.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.2.3",
+ "license": "MIT"
+ },
+ "node_modules/d3-array": {
+ "version": "3.2.4",
+ "license": "ISC",
+ "dependencies": {
+ "internmap": "1 - 2"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-color": {
+ "version": "3.1.0",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-ease": {
+ "version": "3.0.1",
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-format": {
+ "version": "3.1.2",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-interpolate": {
+ "version": "3.0.1",
+ "license": "ISC",
+ "dependencies": {
+ "d3-color": "1 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-path": {
+ "version": "3.1.0",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-scale": {
+ "version": "4.0.2",
+ "license": "ISC",
+ "dependencies": {
+ "d3-array": "2.10.0 - 3",
+ "d3-format": "1 - 3",
+ "d3-interpolate": "1.2.0 - 3",
+ "d3-time": "2.1.1 - 3",
+ "d3-time-format": "2 - 4"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-shape": {
+ "version": "3.2.0",
+ "license": "ISC",
+ "dependencies": {
+ "d3-path": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-time": {
+ "version": "3.1.0",
+ "license": "ISC",
+ "dependencies": {
+ "d3-array": "2 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-time-format": {
+ "version": "4.1.0",
+ "license": "ISC",
+ "dependencies": {
+ "d3-time": "1 - 3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/d3-timer": {
+ "version": "3.0.1",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.4.3",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decimal.js-light": {
+ "version": "2.5.1",
+ "license": "MIT"
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/didyoumean": {
+ "version": "1.2.2",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/dlv": {
+ "version": "1.1.3",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/dom-helpers": {
+ "version": "5.2.1",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.8.7",
+ "csstype": "^3.0.2"
+ }
+ },
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.5.385",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.2",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.21.5",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.21.5",
+ "@esbuild/android-arm": "0.21.5",
+ "@esbuild/android-arm64": "0.21.5",
+ "@esbuild/android-x64": "0.21.5",
+ "@esbuild/darwin-arm64": "0.21.5",
+ "@esbuild/darwin-x64": "0.21.5",
+ "@esbuild/freebsd-arm64": "0.21.5",
+ "@esbuild/freebsd-x64": "0.21.5",
+ "@esbuild/linux-arm": "0.21.5",
+ "@esbuild/linux-arm64": "0.21.5",
+ "@esbuild/linux-ia32": "0.21.5",
+ "@esbuild/linux-loong64": "0.21.5",
+ "@esbuild/linux-mips64el": "0.21.5",
+ "@esbuild/linux-ppc64": "0.21.5",
+ "@esbuild/linux-riscv64": "0.21.5",
+ "@esbuild/linux-s390x": "0.21.5",
+ "@esbuild/linux-x64": "0.21.5",
+ "@esbuild/netbsd-x64": "0.21.5",
+ "@esbuild/openbsd-x64": "0.21.5",
+ "@esbuild/sunos-x64": "0.21.5",
+ "@esbuild/win32-arm64": "0.21.5",
+ "@esbuild/win32-ia32": "0.21.5",
+ "@esbuild/win32-x64": "0.21.5"
+ }
+ },
+ "node_modules/escalade": {
+ "version": "3.2.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/eventemitter3": {
+ "version": "4.0.7",
+ "license": "MIT"
+ },
+ "node_modules/fast-equals": {
+ "version": "5.4.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.3",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fastq": {
+ "version": "1.20.1",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.1.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.16.0",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.6",
+ "license": "MIT",
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.4",
+ "mime-types": "^2.1.35"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fraction.js": {
+ "version": "5.3.4",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "5.0.1",
+ "license": "MIT",
+ "dependencies": {
+ "agent-base": "6",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/internmap": {
+ "version": "2.0.3",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.16.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/jiti": {
+ "version": "1.21.7",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "jiti": "bin/jiti.js"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "license": "MIT"
+ },
+ "node_modules/jsesc": {
+ "version": "3.1.0",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/lilconfig": {
+ "version": "3.1.3",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antonk52"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/lodash": {
+ "version": "4.18.1",
+ "license": "MIT"
+ },
+ "node_modules/loose-envify": {
+ "version": "1.4.0",
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "loose-envify": "cli.js"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/lucide-react": {
+ "version": "0.400.0",
+ "license": "ISC",
+ "peerDependencies": {
+ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.8",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "braces": "^3.0.3",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "license": "MIT"
+ },
+ "node_modules/mz": {
+ "version": "2.7.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "thenify-all": "^1.0.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.15",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.50",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-hash": {
+ "version": "3.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.2",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pify": {
+ "version": "2.3.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pirates": {
+ "version": "4.0.7",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.16",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "nanoid": "^3.3.12",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-import": {
+ "version": "15.1.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.0.0"
+ }
+ },
+ "node_modules/postcss-js": {
+ "version": "4.1.0",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "camelcase-css": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12 || ^14 || >= 16"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4.21"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "6.0.1",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "lilconfig": "^3.1.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "jiti": ">=1.21.0",
+ "postcss": ">=8.0.9",
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
+ },
+ "peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ },
+ "postcss": {
+ "optional": true
+ },
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-nested": {
+ "version": "6.2.0",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "postcss-selector-parser": "^6.1.1"
+ },
+ "engines": {
+ "node": ">=12.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.14"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.1.4",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/prop-types": {
+ "version": "15.8.1",
+ "license": "MIT",
+ "dependencies": {
+ "loose-envify": "^1.4.0",
+ "object-assign": "^4.1.1",
+ "react-is": "^16.13.1"
+ }
+ },
+ "node_modules/prop-types/node_modules/react-is": {
+ "version": "16.13.1",
+ "license": "MIT"
+ },
+ "node_modules/proxy-from-env": {
+ "version": "2.1.0",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/react": {
+ "version": "19.2.7",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-dom": {
+ "version": "19.2.7",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "scheduler": "^0.27.0"
+ },
+ "peerDependencies": {
+ "react": "^19.2.7"
+ }
+ },
+ "node_modules/react-is": {
+ "version": "18.3.1",
+ "license": "MIT"
+ },
+ "node_modules/react-refresh": {
+ "version": "0.17.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/react-router": {
+ "version": "6.30.4",
+ "license": "MIT",
+ "dependencies": {
+ "@remix-run/router": "1.23.3"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8"
+ }
+ },
+ "node_modules/react-router-dom": {
+ "version": "6.30.4",
+ "license": "MIT",
+ "dependencies": {
+ "@remix-run/router": "1.23.3",
+ "react-router": "6.30.4"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8",
+ "react-dom": ">=16.8"
+ }
+ },
+ "node_modules/react-smooth": {
+ "version": "4.0.4",
+ "license": "MIT",
+ "dependencies": {
+ "fast-equals": "^5.0.1",
+ "prop-types": "^15.8.1",
+ "react-transition-group": "^4.4.5"
+ },
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/react-transition-group": {
+ "version": "4.4.5",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@babel/runtime": "^7.5.5",
+ "dom-helpers": "^5.0.1",
+ "loose-envify": "^1.4.0",
+ "prop-types": "^15.6.2"
+ },
+ "peerDependencies": {
+ "react": ">=16.6.0",
+ "react-dom": ">=16.6.0"
+ }
+ },
+ "node_modules/read-cache": {
+ "version": "1.0.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pify": "^2.3.0"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/recharts": {
+ "version": "2.15.4",
+ "license": "MIT",
+ "dependencies": {
+ "clsx": "^2.0.0",
+ "eventemitter3": "^4.0.1",
+ "lodash": "^4.17.21",
+ "react-is": "^18.3.1",
+ "react-smooth": "^4.0.4",
+ "recharts-scale": "^0.4.4",
+ "tiny-invariant": "^1.3.1",
+ "victory-vendor": "^36.6.8"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "peerDependencies": {
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
+ "node_modules/recharts-scale": {
+ "version": "0.4.5",
+ "license": "MIT",
+ "dependencies": {
+ "decimal.js-light": "^2.4.1"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.12",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "is-core-module": "^2.16.1",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.1.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.62.2",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.9"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.62.2",
+ "@rollup/rollup-android-arm64": "4.62.2",
+ "@rollup/rollup-darwin-arm64": "4.62.2",
+ "@rollup/rollup-darwin-x64": "4.62.2",
+ "@rollup/rollup-freebsd-arm64": "4.62.2",
+ "@rollup/rollup-freebsd-x64": "4.62.2",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.62.2",
+ "@rollup/rollup-linux-arm-musleabihf": "4.62.2",
+ "@rollup/rollup-linux-arm64-gnu": "4.62.2",
+ "@rollup/rollup-linux-arm64-musl": "4.62.2",
+ "@rollup/rollup-linux-loong64-gnu": "4.62.2",
+ "@rollup/rollup-linux-loong64-musl": "4.62.2",
+ "@rollup/rollup-linux-ppc64-gnu": "4.62.2",
+ "@rollup/rollup-linux-ppc64-musl": "4.62.2",
+ "@rollup/rollup-linux-riscv64-gnu": "4.62.2",
+ "@rollup/rollup-linux-riscv64-musl": "4.62.2",
+ "@rollup/rollup-linux-s390x-gnu": "4.62.2",
+ "@rollup/rollup-linux-x64-gnu": "4.62.2",
+ "@rollup/rollup-linux-x64-musl": "4.62.2",
+ "@rollup/rollup-openbsd-x64": "4.62.2",
+ "@rollup/rollup-openharmony-arm64": "4.62.2",
+ "@rollup/rollup-win32-arm64-msvc": "4.62.2",
+ "@rollup/rollup-win32-ia32-msvc": "4.62.2",
+ "@rollup/rollup-win32-x64-gnu": "4.62.2",
+ "@rollup/rollup-win32-x64-msvc": "4.62.2",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/scheduler": {
+ "version": "0.27.0",
+ "license": "MIT"
+ },
+ "node_modules/semver": {
+ "version": "6.3.1",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.1",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/sucrase": {
+ "version": "3.35.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "commander": "^4.0.0",
+ "lines-and-columns": "^1.1.6",
+ "mz": "^2.7.0",
+ "pirates": "^4.0.1",
+ "tinyglobby": "^0.2.11",
+ "ts-interface-checker": "^0.1.9"
+ },
+ "bin": {
+ "sucrase": "bin/sucrase",
+ "sucrase-node": "bin/sucrase-node"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "3.4.19",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@alloc/quick-lru": "^5.2.0",
+ "arg": "^5.0.2",
+ "chokidar": "^3.6.0",
+ "didyoumean": "^1.2.2",
+ "dlv": "^1.1.3",
+ "fast-glob": "^3.3.2",
+ "glob-parent": "^6.0.2",
+ "is-glob": "^4.0.3",
+ "jiti": "^1.21.7",
+ "lilconfig": "^3.1.3",
+ "micromatch": "^4.0.8",
+ "normalize-path": "^3.0.0",
+ "object-hash": "^3.0.0",
+ "picocolors": "^1.1.1",
+ "postcss": "^8.4.47",
+ "postcss-import": "^15.1.0",
+ "postcss-js": "^4.0.1",
+ "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",
+ "postcss-nested": "^6.2.0",
+ "postcss-selector-parser": "^6.1.2",
+ "resolve": "^1.22.8",
+ "sucrase": "^3.35.0"
+ },
+ "bin": {
+ "tailwind": "lib/cli.js",
+ "tailwindcss": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/thenify": {
+ "version": "3.3.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "node_modules/thenify-all": {
+ "version": "1.6.0",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "thenify": ">= 3.1.0 < 4"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/tiny-invariant": {
+ "version": "1.3.3",
+ "license": "MIT"
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/tinyglobby/node_modules/fdir": {
+ "version": "6.5.0",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tinyglobby/node_modules/picomatch": {
+ "version": "4.0.5",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/ts-interface-checker": {
+ "version": "0.1.13",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
+ "node_modules/typescript": {
+ "version": "5.9.3",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.2.3",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "escalade": "^3.2.0",
+ "picocolors": "^1.1.1"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/victory-vendor": {
+ "version": "36.9.2",
+ "license": "MIT AND ISC",
+ "dependencies": {
+ "@types/d3-array": "^3.0.3",
+ "@types/d3-ease": "^3.0.0",
+ "@types/d3-interpolate": "^3.0.1",
+ "@types/d3-scale": "^4.0.2",
+ "@types/d3-shape": "^3.1.0",
+ "@types/d3-time": "^3.0.0",
+ "@types/d3-timer": "^3.0.0",
+ "d3-array": "^3.1.6",
+ "d3-ease": "^3.0.1",
+ "d3-interpolate": "^3.0.1",
+ "d3-scale": "^4.0.2",
+ "d3-shape": "^3.1.0",
+ "d3-time": "^3.0.0",
+ "d3-timer": "^3.0.1"
+ }
+ },
+ "node_modules/vite": {
+ "version": "5.4.21",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "esbuild": "^0.21.3",
+ "postcss": "^8.4.43",
+ "rollup": "^4.20.0"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^18.0.0 || >=20.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ },
+ "peerDependencies": {
+ "@types/node": "^18.0.0 || >=20.0.0",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "sass-embedded": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "dev": true,
+ "license": "ISC"
+ }
+ }
+}
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index f7d338a..f37571d 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
import { BrowserRouter, Routes, Route, Navigate, NavLink } from 'react-router-dom'
import {
LayoutDashboard, Map, Monitor, QrCode, Package,
- AlertTriangle, ShieldCheck, Wrench, Boxes, Brain, LogOut
+ AlertTriangle, ShieldCheck, Wrench, Boxes, Brain, LogOut, Cpu
} from 'lucide-react'
import Login from './pages/Login'
import Dashboard from './pages/Dashboard'
@@ -14,6 +14,7 @@ import AndonBoard from './pages/AndonBoard'
import QualityControl from './pages/QualityControl'
import EquipmentStatus from './pages/EquipmentStatus'
import AiFactory from './pages/AiFactory'
+import AiPlatformSettings from './pages/AiPlatformSettings'
const NAV_ITEMS = [
{ to: '/dashboard', icon: LayoutDashboard, label: '대시보드' },
@@ -26,6 +27,7 @@ const NAV_ITEMS = [
{ to: '/equipment', icon: Wrench, label: '설비 현황' },
{ to: '/inventory', icon: Boxes, label: '재고 관리' },
{ to: '/ai', icon: Brain, label: 'AI 공장 분석' },
+ { to: '/ai-settings', icon: Cpu, label: 'AI 플랫폼 설정' },
]
function Sidebar() {
@@ -101,6 +103,7 @@ export default function App() {
} />
} />
} />
+ } />
diff --git a/frontend/src/api/adminAiConfig.ts b/frontend/src/api/adminAiConfig.ts
new file mode 100644
index 0000000..44c31f2
--- /dev/null
+++ b/frontend/src/api/adminAiConfig.ts
@@ -0,0 +1,61 @@
+// AI 플랫폼(LLM Provider) 설정(ADMIN) API — /api/admin/ai-config (ADMIN 전용). [GUARDiA-FA]
+// API 키 값은 응답에 절대 포함되지 않음(claudeKeySet 플래그만).
+// PUT 은 provider/claudeModel(+선택 ollamaTextModel) 전송.
+// test 는 저장된 설정 기준 선택 provider 짧은 ping.
+// 레퍼런스: guardia-ocr frontend/src/api/adminAiConfig.ts (FA 는 루트 경로 + fa_token 헤더).
+import axios from 'axios'
+
+// FA 공용 client(baseURL '/api/fa')와 달리 admin 은 루트 경로 → 전용 인스턴스.
+const adminApi = axios.create({ timeout: 130000 })
+adminApi.interceptors.request.use((config) => {
+ const token = localStorage.getItem('fa_token')
+ if (token) config.headers.Authorization = `Bearer ${token}`
+ return config
+})
+
+/** LLM 제공자: ollama/claude/qwen3/deepseek/glm (glm=glm4:9b·RAM 여유 필요). */
+export type AiProvider = 'ollama' | 'claude' | 'qwen3' | 'deepseek' | 'glm'
+
+/** 화이트리스트 Claude 모델 ID. */
+export type ClaudeModel = 'claude-sonnet-4-6' | 'claude-haiku-4-5' | 'claude-opus-4-8'
+
+/** AI 설정 조회 DTO — API 키 값 미반환(claudeKeySet 으로 설정 여부만). */
+export interface AiConfigDto {
+ provider: AiProvider
+ /** Ollama 텍스트 모델(provider 별 해석 결과, 읽기 전용 표시). */
+ ollamaTextModel: string
+ /** 선택된 Claude 모델 ID(미설정 시 서버 기본 claude-sonnet-4-6). */
+ claudeModel: string
+ /** 서버 환경변수 ANTHROPIC_API_KEY 존재 여부(값·길이·마스킹 일절 미포함). */
+ claudeKeySet: boolean
+ /** 전역 AI 사용 여부(off 시 규칙 기반 degraded). */
+ aiEnabled: boolean
+ /** 선택 Ollama 모델이 서버 RAM 여유 초과 가능(glm4:9b 등) — 콜드로드 실패 시 폴백. */
+ ramWarning: boolean
+}
+
+/** 저장 요청 — provider 필수, claudeModel/ollamaTextModel 선택. */
+export interface AiConfigUpdateRequest {
+ provider: AiProvider
+ claudeModel?: ClaudeModel
+ ollamaTextModel?: string
+}
+
+/** 연결 테스트 결과. */
+export interface AiTestResult {
+ ok: boolean
+ degraded: boolean
+ message: string
+}
+
+/** GET /api/admin/ai-config — 현재 AI 설정(API 키 값 제외). */
+export const getAiConfig = () =>
+ adminApi.get('/api/admin/ai-config').then(r => r.data?.data as AiConfigDto)
+
+/** PUT /api/admin/ai-config — provider/claudeModel 저장 → 반영분. */
+export const updateAiConfig = (body: AiConfigUpdateRequest) =>
+ adminApi.put('/api/admin/ai-config', body).then(r => r.data?.data as AiConfigDto)
+
+/** POST /api/admin/ai-config/test — 저장된 설정 기준 선택 provider 짧은 ping. */
+export const testAiConfig = () =>
+ adminApi.post('/api/admin/ai-config/test', {}).then(r => r.data?.data as AiTestResult)
diff --git a/frontend/src/api/aiFeedback.ts b/frontend/src/api/aiFeedback.ts
new file mode 100644
index 0000000..a056e5c
--- /dev/null
+++ b/frontend/src/api/aiFeedback.ts
@@ -0,0 +1,29 @@
+// AI 답변 피드백 API — /api/ai/feedback (인증 사용자). [GUARDiA-FA]
+// 👍/👎 + 교정 → 로컬 DuckDB 학습 저장소 + 중앙 guardia-rag /feedback (둘 다). 저장 전 PII 마스킹은 서버 처리.
+import axios from 'axios'
+
+const aiApi = axios.create({ timeout: 15000 })
+aiApi.interceptors.request.use((config) => {
+ const token = localStorage.getItem('fa_token')
+ if (token) config.headers.Authorization = `Bearer ${token}`
+ return config
+})
+
+export interface AiFeedbackRequest {
+ feature: string
+ question?: string
+ answer?: string
+ verdict: 'up' | 'down'
+ correction?: string
+ answerId?: string
+}
+
+export interface AiFeedbackResult {
+ verdict: string
+ localStored: boolean
+ centralStored: boolean
+}
+
+/** POST /api/ai/feedback — 피드백 전송(로컬+중앙). */
+export const sendAiFeedback = (body: AiFeedbackRequest) =>
+ aiApi.post('/api/ai/feedback', body).then(r => r.data?.data as AiFeedbackResult)
diff --git a/frontend/src/pages/AiFactory.tsx b/frontend/src/pages/AiFactory.tsx
index 16a50ff..5fbf662 100644
--- a/frontend/src/pages/AiFactory.tsx
+++ b/frontend/src/pages/AiFactory.tsx
@@ -1,15 +1,67 @@
import React, { useState } from 'react'
-import { Brain, TrendingUp, Package, Wrench } from 'lucide-react'
+import { Brain, TrendingUp, Package, Wrench, ThumbsUp, ThumbsDown } from 'lucide-react'
import client from '../api/client'
+import { sendAiFeedback } from '../api/aiFeedback'
interface AiPanel {
title: string
+ feature: string
desc: string
icon: React.ReactNode
action: () => Promise
color: string
}
+// AI 결과 하단 피드백 위젯(👍/👎 + 교정) — 로컬 DuckDB + 중앙 rag 전달.
+function FeedbackBar({ feature, answer }: { feature: string; answer: string }) {
+ const [sent, setSent] = useState<'up' | 'down' | null>(null)
+ const [showCorrection, setShowCorrection] = useState(false)
+ const [correction, setCorrection] = useState('')
+ const [busy, setBusy] = useState(false)
+
+ const submit = async (verdict: 'up' | 'down', corr?: string) => {
+ setBusy(true)
+ try {
+ await sendAiFeedback({ feature, answer, verdict, correction: corr })
+ setSent(verdict)
+ setShowCorrection(false)
+ } catch {
+ /* 피드백 실패는 무시(내결함성) */
+ }
+ setBusy(false)
+ }
+
+ if (sent) {
+ return