@the-bearded-bear/claude-craft 8.16.1 → 8.17.0-next.63fa847

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/Dev/i18n/en/Common/rules/12-context-management.md +13 -7
  2. package/Dev/scripts/check-prerequisites.sh +4 -4
  3. package/README.md +31 -11
  4. package/bundles/cursor/.cursorrules +12 -12
  5. package/bundles/windsurf/.windsurfrules +12 -12
  6. package/cli/kanban/client/dist/assets/{BurndownView-DnM2SPWg.js → BurndownView-k0Da2Sz-.js} +2 -2
  7. package/cli/kanban/client/dist/assets/DepsView-Cp0MVMVy.js +1 -0
  8. package/cli/kanban/client/dist/assets/DocsView-Bduxxrv0.js +1 -0
  9. package/cli/kanban/client/dist/assets/SprintsView-C7qdhg6F.js +1 -0
  10. package/cli/kanban/client/dist/assets/cytoscape-dagre-iZhhNxmI.js +2 -0
  11. package/cli/kanban/client/dist/assets/cytoscape.esm-BQ_ULxwV.js +321 -0
  12. package/cli/kanban/client/dist/assets/index-D8HBRPRV.js +4 -0
  13. package/cli/kanban/client/dist/assets/index-DRj2q7mf.css +1 -0
  14. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-400-normal-Bh0R7Dhr.woff +0 -0
  15. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-400-normal-C_uLvvQ5.woff2 +0 -0
  16. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-500-normal-C9ShMxGR.woff2 +0 -0
  17. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-500-normal-CEVyPk4Y.woff +0 -0
  18. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-600-normal-DVvC-yKp.woff +0 -0
  19. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-600-normal-Dj6eZy5f.woff2 +0 -0
  20. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-700-normal-D6iG63UR.woff2 +0 -0
  21. package/cli/kanban/client/dist/assets/jetbrains-mono-cyrillic-ext-700-normal-iEXTdOVf.woff +0 -0
  22. package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-400-normal-ByoDsISC.woff2 +0 -0
  23. package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-500-normal-BvH7FW2L.woff2 +0 -0
  24. package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-600-normal-Dtizs43-.woff2 +0 -0
  25. package/cli/kanban/client/dist/assets/jetbrains-mono-vietnamese-700-normal-k5PzE07T.woff2 +0 -0
  26. package/cli/kanban/client/dist/assets/purify.es-Bu4Grnl0.js +3 -0
  27. package/cli/kanban/client/dist/index.html +12 -3
  28. package/cli/kanban/client/index.html +10 -1
  29. package/cli/kanban/client/src/App.svelte +4 -0
  30. package/cli/kanban/client/src/app.css +3 -1
  31. package/cli/kanban/client/src/components/Avatar.svelte +2 -0
  32. package/cli/kanban/client/src/components/StoryDetail.svelte +137 -0
  33. package/cli/kanban/client/src/lib/deps-graph.js +38 -0
  34. package/cli/kanban/client/src/lib/deps-style.js +62 -0
  35. package/cli/kanban/client/src/lib/detail.svelte.js +63 -0
  36. package/cli/kanban/client/src/lib/sprints.js +3 -1
  37. package/cli/kanban/client/src/views/BacklogView.svelte +5 -4
  38. package/cli/kanban/client/src/views/BurndownView.svelte +4 -1
  39. package/cli/kanban/client/src/views/DepsView.svelte +106 -32
  40. package/cli/kanban/client/src/views/KanbanView.svelte +11 -147
  41. package/cli/kanban/client/src/views/SprintsView.svelte +5 -2
  42. package/cli/kanban/client/src/views.css +22 -0
  43. package/cli/kanban/client/vite.config.js +5 -0
  44. package/cli/kanban/server/services/frontmatter.js +15 -6
  45. package/cli/kanban/server/services/sprint-cache.js +22 -4
  46. package/cli/lib/tech-registry.js +1 -1
  47. package/package.json +3 -4
  48. package/cli/kanban/client/dist/assets/DepsView-D9Zmf9eY.js +0 -322
  49. package/cli/kanban/client/dist/assets/DocsView-Mu-Itf-Z.js +0 -1
  50. package/cli/kanban/client/dist/assets/SprintsView-C9LXMz1l.js +0 -1
  51. package/cli/kanban/client/dist/assets/index-BFxAnJmU.js +0 -4
  52. package/cli/kanban/client/dist/assets/index-CwADvTxq.css +0 -1
  53. package/cli/kanban/client/dist/assets/purify.es-DlxR2Lg_.js +0 -3
@@ -748,12 +748,14 @@ For the 5 `opus` agents (security-auditor, database-architect, migration-special
748
748
 
749
749
  | Frontmatter | Description |
750
750
  |-------------|-------------|
751
- | `context: fork` | Run in isolated context (no pollution) |
751
+ | `context: fork` | Run in isolated context (no pollution). Recommended threshold: **>60 lines**. |
752
752
  | `disable-model-invocation: true` | Prevent automatic invocation by Claude |
753
753
  | `claudeMdExcludes` (setting) | Exclude specific CLAUDE.md files in monorepos |
754
754
 
755
755
  **Auto-compaction and skills:** After compaction, skills auto-reload (5K tokens/skill, 25K total max).
756
756
 
757
+ **Skills with `context: fork` (24 total):** Heavy (>100 lines, 17): `architect`, `debug-methodical`, `atomic-tasks`, `socratic-brainstorm`, `architecture-clean-ddd`, `parallel-worktrees`, `event-driven`, `cqrs`, `async`, `multitenant`, `testing`, `testing-symfony`, `testing-python`, `testing-react`, `testing-flutter`, `testing-reactnative`, `design-md-convention`. Medium (60-100 lines, 7): `edge-computing`, `wasm`, `graphql`, `monorepo`, `observability`, `docker-hadolint`, `api-gateway`.
758
+
757
759
  ---
758
760
 
759
761
  ## Token Optimization — Quick Setup
@@ -762,13 +764,14 @@ For the 5 `opus` agents (security-auditor, database-architect, migration-special
762
764
 
763
765
  **RTK (Rust Token Killer):** CLI proxy that reduces token consumption by 60-90% on dev commands. Install: `rtk init -g`.
764
766
 
765
- **Sub-agent model:** `export CLAUDE_CODE_SUBAGENT_MODEL="sonnet"` — 40-60% cost reduction.
767
+ **Sub-agent model:** `export CLAUDE_CODE_SUBAGENT_MODEL="claude-sonnet-4-6"` — 40-60% cost reduction.
766
768
 
767
769
  **Optimization hooks:**
768
770
 
769
771
  | Hook | File | Impact |
770
772
  |------|------|--------|
771
773
  | **PostToolUse** (Bash) | `~/.claude/hooks/post-tool-filter.sh` | Guides Claude to summarize outputs >10KB |
774
+ | **PostToolUse** (Read) | settings.json built-in | Alerts when a file read exceeds 50KB — prompts extracting only the relevant section |
772
775
  | **PreCompact** | `~/.claude/hooks/pre-compact.sh` | Preserves critical context before compaction |
773
776
  | **SessionStart** (compact) | Template `context-reinject.json` | Re-injects `context-essentials.md` after compaction |
774
777
 
@@ -777,10 +780,13 @@ Templates available in `.claude/templates/hooks/`: `output-filter.json`, `pre-co
777
780
  | Optimization | Savings |
778
781
  |---|---|
779
782
  | RTK + ultra-compact | 60-90% on CLI outputs |
780
- | SUBAGENT_MODEL=sonnet | 40-60% sub-agent cost |
781
- | PostToolUse hook | Reduces context pollution |
783
+ | SUBAGENT_MODEL=claude-sonnet-4-6 | 40-60% sub-agent cost |
784
+ | ENABLE_PROMPT_CACHING_1H | -40% on repetitive sessions (active by default in settings.json) |
785
+ | fallbackModel | Opus reliability — no session interruptions (active by default in settings.json) |
786
+ | PostToolUse hook (Bash+Read) | Reduces context pollution (5K-50K tokens/session on large files) |
782
787
  | PreCompact hook | Prevents context loss |
783
- | **Combined total** | **55-65% overall reduction** |
788
+ | context:fork skills (24 total) | 2K-15K tokens per long session chaining multiple skills |
789
+ | **Combined total** | **60-75% overall reduction** |
784
790
 
785
791
  > Detailed examples and templates: see `@.claude/references/base/context-management.md`
786
792
 
@@ -814,6 +820,6 @@ Beyond RTK and native hooks, the Claude Code ecosystem offers tools that cover a
814
820
 
815
821
  ---
816
822
 
817
- **Last updated:** 2026-04
818
- **Version:** 1.2.0
823
+ **Last updated:** 2026-06
824
+ **Version:** 1.3.0
819
825
  **Author:** The Bearded CTO
@@ -119,12 +119,12 @@ check_yq_version() {
119
119
  check_node_version() {
120
120
  if command -v node &> /dev/null; then
121
121
  local version=$(node --version | sed 's/v//' | cut -d. -f1)
122
- if [[ $version -ge 18 ]]; then
122
+ if [[ $version -ge 22 ]]; then
123
123
  return 0
124
124
  else
125
- ui_check_fail "node - Found v$version, need v18+"
125
+ ui_check_fail "node - Found v$version, need v22+"
126
126
  if $FIX; then
127
- ui_check_info "Fix: Use nvm to install Node.js 20: nvm install 20 && nvm use 20"
127
+ ui_check_info "Fix: Use nvm to install Node.js 22: nvm install 22 && nvm use 22"
128
128
  fi
129
129
  ERRORS=$((ERRORS + 1))
130
130
  return 1
@@ -136,7 +136,7 @@ check_node_version() {
136
136
  echo -e "${BOLD}Required Dependencies:${NC}"
137
137
  echo ""
138
138
 
139
- check "node" "Node.js 18+ for NPX and CLI" \
139
+ check "node" "Node.js 22+ for NPX and CLI" \
140
140
  "brew install node" \
141
141
  "sudo apt install nodejs npm" \
142
142
  "required"
package/README.md CHANGED
@@ -26,9 +26,26 @@ Plus **11 stack-specific reviewers** (@symfony-reviewer, @react-reviewer, @pytho
26
26
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
27
27
  [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FTheBeardedBearSAS%2Fclaude-craft%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/TheBeardedBearSAS/claude-craft/main)
28
28
 
29
- A comprehensive framework for AI-assisted development with [Claude Code](https://claude.ai/code). Install standardized rules, agents, and commands for your projects across multiple technology stacks — **31 specialized agents (+39 infra agents on-demand), 125 commands across 15 namespaces, 48 skills**, all token-optimized via `context: fork` and sub-agent model routing.
29
+ A comprehensive framework for AI-assisted development with [Claude Code](https://claude.ai/code). Install standardized rules, agents, and commands for your projects across multiple technology stacks — **31 specialized agents (+39 infra agents on-demand), 125 commands across 15 namespaces (219 total), 55 skills**, all token-optimized via `context: fork` and sub-agent model routing.
30
30
 
31
- ## What's New in v8.15.0
31
+ ## What's New in v8.17.0
32
+
33
+ **Audit exhaustif multi-agents + mises à jour 2026-06-24 (v8.17.0) :**
34
+
35
+ - **Versions infra** : Docker 29.6.0, OpenTofu 1.12.2, Ansible 2.21.1, Helm 4.2.2, Node.js 24.x Active LTS.
36
+ - **Sécurité** : OWASP Top 10:2025 complet (10/10 catégories dans la règle 11) ; RS256 marqué DEPRECATED ; guidance Argon2id précisée ; hook templates `protect-files.json` / `quality-gate.json` corrigés (anti-pattern `$TOOL_INPUT` → lecture stdin JSON).
37
+ - **Modèles** : `claude-fable-5` documenté ; IDs canoniques complets dans la table d'effort.
38
+ - **CLI** : `/goal`, `/usage`, `/workflows` documentés dans CLI-REFERENCE.md.
39
+ - **Optimisation tokens** : `ENABLE_PROMPT_CACHING_1H` et `fallbackModel` activés dans `settings.json` distribué.
40
+ - **Docs** : compteur commandes corrigé (133 → 125 core / 219 total) ; TROUBLESHOOTING, FAQ, CHEAT-SHEET, COMPETITIVE-ANALYSIS enrichis.
41
+
42
+ **Dépendances et supply chain (v8.16.0 / v8.16.1) :**
43
+
44
+ - **Trivy action** : `aquasecurity/trivy-action` mis à jour (v8.16.0) — scan CVE supply chain.
45
+ - **Download artifact** : `actions/download-artifact` bumped de 4.2.1 à 8.0.1 (v8.16.0).
46
+ - **CodeQL action** : `github/codeql-action` mis à jour (v8.16.0) — analyse SAST.
47
+ - **Playwright** : `@playwright/test` mis à jour de 1.60.0 à 1.61.0 dans `/website` (v8.16.0).
48
+ - **Patch de stabilité** : correctifs de dernière minute (v8.16.1).
32
49
 
33
50
  **Refonte du design de l'interface web Kanban (v8.15.0) :**
34
51
 
@@ -67,7 +84,7 @@ A comprehensive framework for AI-assisted development with [Claude Code](https:/
67
84
  - **MIT-only strict (v8.8.0)** -- Claude Craft est 100 % open-source MIT, aucune licence commerciale ou enterprise. Stratégie open-core abandonnée.
68
85
  - **Parité i18n stricte (v8.8.2)** -- la CI bloque désormais si un fichier traduit est à < 80 % de la taille de l'anglais. Dette i18n résorbée (gap 101 → 0).
69
86
  - **Branding the-bearded-bear.com (v8.10.1)** -- migration complète des domaines vers `the-bearded-bear.com`, normalisation de l'organisation GitHub.
70
- - **125 commandes sur 15 namespaces** -- namespace `/paperclip:*` (8 commandes) ajouté, 48 skills disponibles.
87
+ - **125 commandes sur 15 namespaces** (219 total avec infra/projet) -- namespace `/paperclip:*` (8 commandes) ajouté, 55 skills disponibles.
71
88
  - **Claude Code 2.1.168** -- version recommandée (Opus 4.8, Dynamic Workflows, `effort: ultracode`).
72
89
 
73
90
  > ← Versions antérieures (v8.0 → v8.7) : voir le [CHANGELOG](CHANGELOG.md) et [.claude/COMPATIBILITY.md](.claude/COMPATIBILITY.md).
@@ -127,11 +144,11 @@ Claude Code is powerful on its own. Claude Craft makes it **consistent and team-
127
144
  | **PHP** | 8.5 | `--tech=php` |
128
145
  | **Paperclip** | 2026.609.0 | `--tech=paperclip` |
129
146
 
130
- | **Docker** | 29.5.3 (CVE-2026-33997) | `--tech=docker` |
147
+ | **Docker** | 29.6.0 (CVE-2026-33997) | `--tech=docker` |
131
148
  | **Coolify** | v4.1.2 | `--tech=coolify` |
132
149
  | **Kubernetes** | 1.36.1 | `--tech=kubernetes` |
133
- | **OpenTofu** | 1.12.1 | `--tech=opentofu` |
134
- | **Ansible** | 2.21.0 | `--tech=ansible` |
150
+ | **OpenTofu** | 1.12.2 | `--tech=opentofu` |
151
+ | **Ansible** | 2.21.1 | `--tech=ansible` |
135
152
  | **Hcloud** | 1.61+ | `--tech=hcloud` |
136
153
  | **PgBouncer** | 1.25.2 (CVE-2026-6664/6665/6666/6667 patched) | `--tech=pgbouncer` |
137
154
  | **FrankenPHP** | 1.12.4 (CVE-2026-45062 patched) | `--tech=frankenphp` |
@@ -143,8 +160,8 @@ See [Technologies](docs/TECHNOLOGIES.md) for full details.
143
160
  | Category | Count | Examples |
144
161
  |----------|-------|---------|
145
162
  | **Agents** | 31 default (+ 39 infra on-demand) | `@tdd-coach`, `@api-designer`, `@symfony-reviewer`, `@kubernetes-architect`, `@hcloud-architect` |
146
- | **Commands** | 133 across 15 namespaces | `/workflow:init`, `/team:audit`, `/react:generate-component` |
147
- | **Skills** | 55 | Architecture, testing, security best practices |
163
+ | **Commands** | 125 across 15 namespaces (219 total with infra/project) | `/workflow:init`, `/team:audit`, `/react:generate-component` |
164
+ | **Skills** | 55 | Architecture, testing, security, DDD best practices |
148
165
  | **Templates** | 21 | Code generation patterns, BMAD project templates |
149
166
  | **Checklists** | 10 | Commit, feature, release quality gates |
150
167
 
@@ -185,7 +202,7 @@ These are the commands you'll use most:
185
202
  | `/common:ralph-run "task"` | Run Claude in continuous loop until task is done |
186
203
  | `/qa:recette` | Automated acceptance testing via Chrome |
187
204
 
188
- See [CLI Reference](docs/CLI-REFERENCE.md) for all 125 commands across 15 namespaces.
205
+ See [CLI Reference](docs/CLI-REFERENCE.md) for all 125 commands across 15 core namespaces (219 total including infra and project management).
189
206
 
190
207
  ## Installation
191
208
 
@@ -265,7 +282,7 @@ Context usage is optimized: ~3,500 tokens always loaded vs ~70,000 if everything
265
282
  | [Installation](docs/INSTALLATION.md) | All installation methods |
266
283
  | [Configuration](docs/CONFIGURATION.md) | Project configuration |
267
284
  | [CLI Reference](docs/CLI-REFERENCE.md) | Full CLI documentation |
268
- | [Commands](docs/COMMANDS.md) | All 125 commands |
285
+ | [Commands](docs/COMMANDS.md) | All 133 commands |
269
286
  | [Agents](docs/AGENTS.md) | All 31 default agents (+ 39 infra on-demand) |
270
287
  | [Skills](docs/SKILLS.md) | Best practices reference |
271
288
  | [Technologies](docs/TECHNOLOGIES.md) | Stack-specific guides |
@@ -276,7 +293,10 @@ Context usage is optimized: ~3,500 tokens always loaded vs ~70,000 if everything
276
293
  | [Privacy Policy](PRIVACY.md) | Data protection and GDPR compliance |
277
294
  | [FAQ](docs/FAQ.md) | Common questions |
278
295
  | [Troubleshooting](docs/TROUBLESHOOTING.md) | Problem solving |
279
- | [Migration v7](docs/MIGRATION-v7.md) | Upgrade from previous versions |
296
+ | [Migration v6→v7](docs/MIGRATION-v7.md) | Upgrade from v6 to v7 |
297
+ | [Migration v7→v8](docs/MIGRATION-v7-to-v8.md) | Upgrade from v7 to v8 |
298
+ | [Agent Teams Guide](docs/AGENT-TEAMS-GUIDE.md) | Multi-agent team orchestration |
299
+ | [Cheat Sheet](docs/CHEAT-SHEET.md) | Quick command reference card |
280
300
  | [Skills Publishing](docs/SKILLS-PUBLISHING.md) | Guide for publishing skills |
281
301
  | [Compatibility](.claude/COMPATIBILITY.md) | Claude Code version compatibility |
282
302
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  # Claude-Craft - Multi-Technology Framework
10
10
 
11
- **Version:** 8.16.1 | **Languages:** en, fr, es, de, pt
11
+ **Version:** 8.17.0 | **Languages:** en, fr, es, de, pt
12
12
 
13
13
  A comprehensive AI-assisted development framework for Claude Code with 11 technology stacks, 31 specialized agents (+39 infra agents on-demand), 125 commands across 15 namespaces, and BMAD v6 project management.
14
14
 
@@ -38,9 +38,9 @@ A comprehensive AI-assisted development framework for Claude Code with 11 techno
38
38
  | Symfony / PHP | `@.claude/references/symfony/CLAUDE.md` | `/symfony:*` |
39
39
  | Flutter / Dart | `@.claude/references/flutter/CLAUDE.md` | `/flutter:*` |
40
40
  | React | `@.claude/references/react/` | `/react:*` |
41
- | React Native | `@.claude/references/react-native/` | `/reactnative:*` |
42
- | Angular | `@.claude/references/angular/` | `/angular:*` |
43
- | Vue.js | `@.claude/references/vuejs/` | `/vuejs:*` |
41
+ | React Native | `@.claude/references/reactnative/CLAUDE.md` | `/reactnative:*` |
42
+ | Angular | `@.claude/references/angular/CLAUDE.md` | `/angular:*` |
43
+ | Vue.js | `@.claude/references/vuejs/CLAUDE.md` | `/vuejs:*` |
44
44
  | Laravel | `@.claude/references/laravel/` | `/laravel:*` |
45
45
  | Python | `@.claude/references/python/` | `/python:*` |
46
46
  | PHP | `@.claude/references/php/` | `/php:*` |
@@ -55,7 +55,7 @@ See `@.claude/INDEX.md` for condensed checklists and patterns.
55
55
 
56
56
  ## Available Commands (15 namespaces, 125 commands)
57
57
 
58
- Core: `/common:*`, `/workflow:*`, `/team:*`, `/qa:*`, `/uiux:*` | Tech: `/symfony:*`, `/react:*`, `/flutter:*`, `/python:*`, `/angular:*`, `/vuejs:*`, `/laravel:*`, `/reactnative:*`, `/csharp:*`, `/php:*`, `/paperclip:*` | Infra (via `@devops-engineer`): Docker 29.5.3 (CVE-2026-33997), Coolify v4.1.2, K8s 1.36.1, OpenTofu 1.12.1, Ansible 2.21.0, FrankenPHP 1.12.4 (CVE-2026-45062 patched), PgBouncer 1.25.2 (CVE-2026-6664/6665/6666/6667 patched) | Project: `/sprint:*`, `/gate:*`, `/project:*`
58
+ Core: `/common:*`, `/workflow:*`, `/team:*`, `/qa:*`, `/uiux:*` | Tech: `/symfony:*`, `/react:*`, `/flutter:*`, `/python:*`, `/angular:*`, `/vuejs:*`, `/laravel:*`, `/reactnative:*`, `/csharp:*`, `/php:*`, `/paperclip:*` | Infra (via `@devops-engineer`): Docker 29.6.0, Coolify v4.1.2, K8s 1.36.1, OpenTofu 1.12.2, Ansible 2.21.1, FrankenPHP 1.12.4, PgBouncer 1.25.2 | Project: `/sprint:*`, `/gate:*`, `/project:*`
59
59
 
60
60
  Full reference: [Commands](../docs/COMMANDS.md) | [CLI Reference](../docs/CLI-REFERENCE.md)
61
61
 
@@ -190,7 +190,7 @@ See `.claude/rules/12-context-management.md` for detailed guidance.
190
190
  | **`/memory`** | Persistent session learnings across conversations (v2.1.59+) |
191
191
  | **Pointers over copies** | Use `@path` references instead of copying code into CLAUDE.md |
192
192
  | **Token optimization** | Use `/common:setup-rtk` for 55-65% token savings |
193
- | **Sub-agent model** | Set `CLAUDE_CODE_SUBAGENT_MODEL=sonnet` for cost savings |
193
+ | **Sub-agent model** | Set `CLAUDE_CODE_SUBAGENT_MODEL=claude-sonnet-4-6` for cost savings |
194
194
 
195
195
  See `.claude/templates/hooks/` for ready-to-use hook templates.
196
196
 
@@ -312,21 +312,21 @@ SRP | OCP | LSP | ISP | DIP — See full rules in .claude/rules/04-solid-princip
312
312
  TDD: RED → GREEN → REFACTOR | Coverage >= 80% | Mutation testing
313
313
 
314
314
  ### Security
315
- ## OWASP Top 10:2025 — Essentiels
315
+ ## OWASP Top 10:2025 — Toutes les categories (10/10)
316
316
 
317
317
  | # | Menace | Defense |
318
318
  |---|--------|---------|
319
319
  | 1 | Broken Access Control (inclut **SSRF** consolide) | Verifier permissions a CHAQUE requete, deny by default |
320
- | 2 | Cryptographic Failures | TLS 1.3, **Argon2id** (128 MiB RAM, t=3-5, p=1), secrets dans vault |
320
+ | 2 | Cryptographic Failures | TLS 1.3, **Argon2id** (128 MiB RAM, t>=3, p=1), secrets dans vault |
321
321
  | 3 | Injection | Requetes parametrees, validation/sanitization |
322
322
  | 4 | Insecure Design | Threat modeling, defense in depth, rate limiting |
323
323
  | 5 | Security Misconfiguration | Hardening, erreurs generiques en prod |
324
- | 6 | **Software Supply Chain Failures** (nouveau 2025) | SLSA 1.0, SBOM (SPDX 3 / CycloneDX), Sigstore keyless signing, reproducible builds |
324
+ | 6 | **Software Supply Chain Failures** (nouveau 2025) | SLSA 1.0, SBOM (CycloneDX 1.6+ / SPDX 3), Sigstore keyless signing, reproducible builds |
325
325
  | 7 | **Mishandling of Exceptional Conditions** (nouveau 2025) | Logger les erreurs, ne jamais exposer la stack trace en prod |
326
+ | 8 | **Authentication Failures** | MFA obligatoire, brute-force protection, sessions invalidees a la deconnexion |
327
+ | 9 | **Security Logging and Monitoring Failures** | Centraliser les logs, alertes sur anomalies, retention >= 1 an |
328
+ | 10 | **Vulnerable and Outdated Components** | Dependabot/Renovate, `npm audit --audit-level=moderate`, Trivy, Grype |
326
329
 
327
- Sources : [OWASP Top 10:2025](https://owasp.org/Top10/2025/), [Supply Chain 2026](https://kawaldeepsingh.medium.com/practical-software-supply-chain-security-2026-sboms-signing-slsa-reproducible-builds-a-0416cfac32dc).
328
-
329
- ## Regles non-negociables
330
330
 
331
331
  ### Git Workflow
332
332
  Conventional Commits | GitHub Flow | Feature branches < 3 days
@@ -8,7 +8,7 @@
8
8
 
9
9
  # Claude-Craft - Multi-Technology Framework
10
10
 
11
- **Version:** 8.16.1 | **Languages:** en, fr, es, de, pt
11
+ **Version:** 8.17.0 | **Languages:** en, fr, es, de, pt
12
12
 
13
13
  A comprehensive AI-assisted development framework for Claude Code with 11 technology stacks, 31 specialized agents (+39 infra agents on-demand), 125 commands across 15 namespaces, and BMAD v6 project management.
14
14
 
@@ -38,9 +38,9 @@ A comprehensive AI-assisted development framework for Claude Code with 11 techno
38
38
  | Symfony / PHP | `@.claude/references/symfony/CLAUDE.md` | `/symfony:*` |
39
39
  | Flutter / Dart | `@.claude/references/flutter/CLAUDE.md` | `/flutter:*` |
40
40
  | React | `@.claude/references/react/` | `/react:*` |
41
- | React Native | `@.claude/references/react-native/` | `/reactnative:*` |
42
- | Angular | `@.claude/references/angular/` | `/angular:*` |
43
- | Vue.js | `@.claude/references/vuejs/` | `/vuejs:*` |
41
+ | React Native | `@.claude/references/reactnative/CLAUDE.md` | `/reactnative:*` |
42
+ | Angular | `@.claude/references/angular/CLAUDE.md` | `/angular:*` |
43
+ | Vue.js | `@.claude/references/vuejs/CLAUDE.md` | `/vuejs:*` |
44
44
  | Laravel | `@.claude/references/laravel/` | `/laravel:*` |
45
45
  | Python | `@.claude/references/python/` | `/python:*` |
46
46
  | PHP | `@.claude/references/php/` | `/php:*` |
@@ -55,7 +55,7 @@ See `@.claude/INDEX.md` for condensed checklists and patterns.
55
55
 
56
56
  ## Available Commands (15 namespaces, 125 commands)
57
57
 
58
- Core: `/common:*`, `/workflow:*`, `/team:*`, `/qa:*`, `/uiux:*` | Tech: `/symfony:*`, `/react:*`, `/flutter:*`, `/python:*`, `/angular:*`, `/vuejs:*`, `/laravel:*`, `/reactnative:*`, `/csharp:*`, `/php:*`, `/paperclip:*` | Infra (via `@devops-engineer`): Docker 29.5.3 (CVE-2026-33997), Coolify v4.1.2, K8s 1.36.1, OpenTofu 1.12.1, Ansible 2.21.0, FrankenPHP 1.12.4 (CVE-2026-45062 patched), PgBouncer 1.25.2 (CVE-2026-6664/6665/6666/6667 patched) | Project: `/sprint:*`, `/gate:*`, `/project:*`
58
+ Core: `/common:*`, `/workflow:*`, `/team:*`, `/qa:*`, `/uiux:*` | Tech: `/symfony:*`, `/react:*`, `/flutter:*`, `/python:*`, `/angular:*`, `/vuejs:*`, `/laravel:*`, `/reactnative:*`, `/csharp:*`, `/php:*`, `/paperclip:*` | Infra (via `@devops-engineer`): Docker 29.6.0, Coolify v4.1.2, K8s 1.36.1, OpenTofu 1.12.2, Ansible 2.21.1, FrankenPHP 1.12.4, PgBouncer 1.25.2 | Project: `/sprint:*`, `/gate:*`, `/project:*`
59
59
 
60
60
  Full reference: [Commands](../docs/COMMANDS.md) | [CLI Reference](../docs/CLI-REFERENCE.md)
61
61
 
@@ -190,7 +190,7 @@ See `.claude/rules/12-context-management.md` for detailed guidance.
190
190
  | **`/memory`** | Persistent session learnings across conversations (v2.1.59+) |
191
191
  | **Pointers over copies** | Use `@path` references instead of copying code into CLAUDE.md |
192
192
  | **Token optimization** | Use `/common:setup-rtk` for 55-65% token savings |
193
- | **Sub-agent model** | Set `CLAUDE_CODE_SUBAGENT_MODEL=sonnet` for cost savings |
193
+ | **Sub-agent model** | Set `CLAUDE_CODE_SUBAGENT_MODEL=claude-sonnet-4-6` for cost savings |
194
194
 
195
195
  See `.claude/templates/hooks/` for ready-to-use hook templates.
196
196
 
@@ -312,21 +312,21 @@ SRP | OCP | LSP | ISP | DIP — See full rules in .claude/rules/04-solid-princip
312
312
  TDD: RED → GREEN → REFACTOR | Coverage >= 80% | Mutation testing
313
313
 
314
314
  ### Security
315
- ## OWASP Top 10:2025 — Essentiels
315
+ ## OWASP Top 10:2025 — Toutes les categories (10/10)
316
316
 
317
317
  | # | Menace | Defense |
318
318
  |---|--------|---------|
319
319
  | 1 | Broken Access Control (inclut **SSRF** consolide) | Verifier permissions a CHAQUE requete, deny by default |
320
- | 2 | Cryptographic Failures | TLS 1.3, **Argon2id** (128 MiB RAM, t=3-5, p=1), secrets dans vault |
320
+ | 2 | Cryptographic Failures | TLS 1.3, **Argon2id** (128 MiB RAM, t>=3, p=1), secrets dans vault |
321
321
  | 3 | Injection | Requetes parametrees, validation/sanitization |
322
322
  | 4 | Insecure Design | Threat modeling, defense in depth, rate limiting |
323
323
  | 5 | Security Misconfiguration | Hardening, erreurs generiques en prod |
324
- | 6 | **Software Supply Chain Failures** (nouveau 2025) | SLSA 1.0, SBOM (SPDX 3 / CycloneDX), Sigstore keyless signing, reproducible builds |
324
+ | 6 | **Software Supply Chain Failures** (nouveau 2025) | SLSA 1.0, SBOM (CycloneDX 1.6+ / SPDX 3), Sigstore keyless signing, reproducible builds |
325
325
  | 7 | **Mishandling of Exceptional Conditions** (nouveau 2025) | Logger les erreurs, ne jamais exposer la stack trace en prod |
326
+ | 8 | **Authentication Failures** | MFA obligatoire, brute-force protection, sessions invalidees a la deconnexion |
327
+ | 9 | **Security Logging and Monitoring Failures** | Centraliser les logs, alertes sur anomalies, retention >= 1 an |
328
+ | 10 | **Vulnerable and Outdated Components** | Dependabot/Renovate, `npm audit --audit-level=moderate`, Trivy, Grype |
326
329
 
327
- Sources : [OWASP Top 10:2025](https://owasp.org/Top10/2025/), [Supply Chain 2026](https://kawaldeepsingh.medium.com/practical-software-supply-chain-security-2026-sboms-signing-slsa-reproducible-builds-a-0416cfac32dc).
328
-
329
- ## Regles non-negociables
330
330
 
331
331
  ### Git Workflow
332
332
  Conventional Commits | GitHub Flow | Feature branches < 3 days
@@ -1,4 +1,4 @@
1
- import{A as e,C as t,D as n,N as r,O as i,S as a,T as o,_ as s,b as c,c as l,d as u,f as d,h as f,j as p,k as m,m as h,o as g,p as _,r as v,s as y,x as b}from"./index-BFxAnJmU.js";function x(e=[],t=[]){let n=new Map(e.map(e=>[e.date,e.points])),r=new Map(t.map(e=>[e.date,e.points]));return[...new Set([...n.keys(),...r.keys()])].sort((e,t)=>e.localeCompare(t)).map(e=>({date:e,ideal:n.has(e)?n.get(e):null,actual:r.has(e)?r.get(e):null}))}var S=!0,C=`uplot`,w=`u-hz`,T=`u-vt`,E=`u-title`,D=`u-wrap`,O=`u-under`,ee=`u-over`,te=`u-axis`,ne=`u-off`,re=`u-select`,ie=`u-cursor-x`,ae=`u-cursor-y`,oe=`u-cursor-pt`,se=`u-legend`,ce=`u-live`,le=`u-inline`,ue=`u-series`,de=`u-marker`,fe=`u-label`,pe=`u-value`,k=`width`,me=`height`,he=`top`,ge=`bottom`,_e=`left`,ve=`right`,ye=`#000`,be=`#0000`,xe=`mousemove`,Se=`mousedown`,Ce=`mouseup`,we=`mouseenter`,Te=`mouseleave`,Ee=`dblclick`,De=`resize`,Oe=`scroll`,ke=`change`,Ae=`dppxchange`,je=`--`,A=typeof window<`u`,Me=A?document:null,Ne=A?window:null,Pe=A?navigator:null,j,Fe;function Ie(){let e=devicePixelRatio;j!=e&&(j=e,Fe&&Ye(ke,Fe,Ie),Fe=matchMedia(`(min-resolution: ${j-.001}dppx) and (max-resolution: ${j+.001}dppx)`),Je(ke,Fe,Ie),Ne.dispatchEvent(new CustomEvent(Ae)))}function Le(e,t){if(t!=null){let n=e.classList;!n.contains(t)&&n.add(t)}}function Re(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function M(e,t,n){e.style[t]=n+`px`}function ze(e,t,n,r){let i=Me.createElement(e);return t!=null&&Le(i,t),n?.insertBefore(i,r),i}function Be(e,t){return ze(`div`,e,t)}var N=new WeakMap;function Ve(e,t,n,r,i){let a=`translate(`+t+`px,`+n+`px)`;a!=N.get(e)&&(e.style.transform=a,N.set(e,a),t<0||n<0||t>r||n>i?Le(e,ne):Re(e,ne))}var He=new WeakMap;function Ue(e,t,n){let r=t+n;r!=He.get(e)&&(He.set(e,r),e.style.background=t,e.style.borderColor=n)}var We=new WeakMap;function Ge(e,t,n,r){let i=t+``+n;i!=We.get(e)&&(We.set(e,i),e.style.height=n+`px`,e.style.width=t+`px`,e.style.marginLeft=r?-t/2+`px`:0,e.style.marginTop=r?-n/2+`px`:0)}var Ke={passive:!0},qe={...Ke,capture:!0};function Je(e,t,n,r){t.addEventListener(e,n,r?qe:Ke)}function Ye(e,t,n,r){t.removeEventListener(e,n,Ke)}A&&Ie();function Xe(e,t,n,r){let i;n||=0,r||=t.length-1;let a=r<=2147483647;for(;r-n>1;)i=a?n+r>>1:pt((n+r)/2),t[i]<e?n=i:r=i;return e-t[n]<=t[r]-e?n:r}function Ze(e){return(t,n,r)=>{let i=-1,a=-1;for(let a=n;a<=r;a++)if(e(t[a])){i=a;break}for(let i=r;i>=n;i--)if(e(t[i])){a=i;break}return[i,a]}}var Qe=e=>e!=null,P=e=>e!=null&&e>0,F=Ze(Qe),$e=Ze(P);function et(e,t,n,r=0,i=!1){let a=i?$e:F,o=i?P:Qe;[t,n]=a(e,t,n);let s=e[t],c=e[t];if(t>-1)if(r==1)s=e[t],c=e[n];else if(r==-1)s=e[n],c=e[t];else for(let r=t;r<=n;r++){let t=e[r];o(t)&&(t<s?s=t:t>c&&(c=t))}return[s??B,c??-B]}function tt(e,t,n,r){let i=vt(e),a=vt(t);e==t&&(i==-1?(e*=n,t/=n):(e/=n,t*=n));let o=n==10?yt:bt,s=i==1?pt:mt,c=a==1?mt:pt,l=s(o(R(e))),u=c(o(R(t))),d=_t(n,l),f=_t(n,u);return n==10&&(l<0&&(d=H(d,-l)),u<0&&(f=H(f,-u))),r||n==2?(e=d*i,t=f*a):(e=It(e,d),t=Ft(t,f)),[e,t]}function nt(e,t,n,r){let i=tt(e,t,n,r);return e==0&&(i[0]=0),t==0&&(i[1]=0),i}var rt=.1,it={mode:3,pad:rt},at={pad:0,soft:null,mode:0},ot={min:at,max:at};function st(e,t,n,r){return qt(n)?lt(e,t,n):(at.pad=n,at.soft=r?0:null,at.mode=r?3:0,lt(e,t,ot))}function I(e,t){return e??t}function ct(e,t,n){for(t=I(t,0),n=I(n,e.length-1);t<=n;){if(e[t]!=null)return!0;t++}return!1}function lt(e,t,n){let r=n.min,i=n.max,a=I(r.pad,0),o=I(i.pad,0),s=I(r.hard,-B),c=I(i.hard,B),l=I(r.soft,B),u=I(i.soft,-B),d=I(r.mode,0),f=I(i.mode,0),p=t-e,m=yt(p),h=gt(R(e),R(t)),g=R(yt(h)-m);(p<1e-24||g>10)&&(p=0,(e==0||t==0)&&(p=1e-24,d==2&&l!=B&&(a=0),f==2&&u!=-B&&(o=0)));let _=p||h||1e3,v=_t(10,pt(yt(_))),y=H(It(e-_*(p==0?e==0?.1:1:a),v/10),24),b=e>=l&&(d==1||d==3&&y<=l||d==2&&y>=l)?l:B,x=gt(s,y<b&&e>=b?b:ht(b,y)),S=H(Ft(t+_*(p==0?t==0?.1:1:o),v/10),24),C=t<=u&&(f==1||f==3&&S>=u||f==2&&S<=u)?u:-B,w=ht(c,S>C&&t<=C?C:gt(C,S));return x==w&&x==0&&(w=100),[x,w]}var ut=new Intl.NumberFormat(A?Pe.language:`en-US`),dt=e=>ut.format(e),L=Math,ft=L.PI,R=L.abs,pt=L.floor,z=L.round,mt=L.ceil,ht=L.min,gt=L.max,_t=L.pow,vt=L.sign,yt=L.log10,bt=L.log2,xt=(e,t=1)=>L.sinh(e)*t,St=(e,t=1)=>L.asinh(e/t),B=1/0;function Ct(e){return(yt((e^e>>31)-(e>>31))|0)+1}function wt(e,t,n){return ht(gt(e,t),n)}function Tt(e){return typeof e==`function`}function V(e){return Tt(e)?e:()=>e}var Et=()=>{},Dt=e=>e,Ot=(e,t)=>t,kt=e=>null,At=e=>!0,jt=(e,t)=>e==t,Mt=/\.\d*?(?=9{6,}|0{6,})/gm,Nt=e=>{if(Wt(e)||Lt.has(e))return e;let t=`${e}`,n=t.match(Mt);if(n==null)return e;let r=n[0].length-1;if(t.indexOf(`e-`)!=-1){let[e,n]=t.split(`e`);return+`${Nt(e)}e${n}`}return H(e,r)};function Pt(e,t){return Nt(H(Nt(e/t))*t)}function Ft(e,t){return Nt(mt(Nt(e/t))*t)}function It(e,t){return Nt(pt(Nt(e/t))*t)}function H(e,t=0){if(Wt(e))return e;let n=10**t;return z(e*n*(1+2**-52))/n}var Lt=new Map;function Rt(e){return((``+e).split(`.`)[1]||``).length}function zt(e,t,n,r){let i=[],a=r.map(Rt);for(let o=t;o<n;o++){let t=R(o),n=H(_t(e,o),t);for(let s=0;s<r.length;s++){let c=e==10?+`${r[s]}e${o}`:r[s]*n,l=(o>=0?0:t)+(o>=a[s]?0:a[s]),u=e==10?c:H(c,l);i.push(u),Lt.set(u,l)}}return i}var Bt={},Vt=[],Ht=[null,null],Ut=Array.isArray,Wt=Number.isInteger,Gt=e=>e===void 0;function Kt(e){return typeof e==`string`}function qt(e){let t=!1;if(e!=null){let n=e.constructor;t=n==null||n==Object}return t}function Jt(e){return typeof e==`object`&&!!e}var Yt=Object.getPrototypeOf(Uint8Array),U=`__proto__`;function Xt(e,t=qt){let n;if(Ut(e)){let r=e.find(e=>e!=null);if(Ut(r)||t(r)){n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Xt(e[r],t)}else n=e.slice()}else if(e instanceof Yt)n=e.slice();else if(t(e)){n={};for(let r in e)r!=U&&(n[r]=Xt(e[r],t))}else n=e;return n}function W(e){let t=arguments;for(let n=1;n<t.length;n++){let r=t[n];for(let t in r)t!=U&&(qt(e[t])?W(e[t],Xt(r[t])):e[t]=Xt(r[t]))}return e}var G=0,Zt=1,Qt=2;function $t(e,t,n){for(let r=0,i,a=-1;r<t.length;r++){let o=t[r];if(o>a){for(i=o-1;i>=0&&e[i]==null;)e[i--]=null;for(i=o+1;i<n&&e[i]==null;)e[a=i++]=null}}}function en(e,t){if(rn(e)){let t=e[0].slice();for(let n=1;n<e.length;n++)t.push(...e[n].slice(1));return an(t[0])||(t=nn(t)),t}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t][0],i=r.length;for(let e=0;e<i;e++)n.add(r[e])}let r=[Array.from(n).sort((e,t)=>e-t)],i=r[0].length,a=new Map;for(let e=0;e<i;e++)a.set(r[0][e],e);for(let n=0;n<e.length;n++){let o=e[n],s=o[0];for(let e=1;e<o.length;e++){let c=o[e],l=Array(i).fill(void 0),u=t?t[n][e]:Zt,d=[];for(let e=0;e<c.length;e++){let t=c[e],n=a.get(s[e]);t===null?u!=G&&(l[n]=t,u==Qt&&d.push(n)):l[n]=t}$t(l,d,i),r.push(l)}}return r}var tn=typeof queueMicrotask>`u`?e=>Promise.resolve().then(e):queueMicrotask;function nn(e){let t=e[0],n=t.length,r=Array(n);for(let e=0;e<r.length;e++)r[e]=e;r.sort((e,n)=>t[e]-t[n]);let i=[];for(let t=0;t<e.length;t++){let a=e[t],o=Array(n);for(let e=0;e<n;e++)o[e]=a[r[e]];i.push(o)}return i}function rn(e){let t=e[0][0],n=t.length;for(let r=1;r<e.length;r++){let i=e[r][0];if(i.length!=n)return!1;if(i!=t){for(let e=0;e<n;e++)if(i[e]!=t[e])return!1}}return!0}function an(e,t=100){let n=e.length;if(n<=1)return!0;let r=0,i=n-1;for(;r<=i&&e[r]==null;)r++;for(;i>=r&&e[i]==null;)i--;if(i<=r)return!0;let a=gt(1,pt((i-r+1)/t));for(let t=e[r],n=r+a;n<=i;n+=a){let r=e[n];if(r!=null){if(r<=t)return!1;t=r}}return!0}var on=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],sn=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function cn(e){return e.slice(0,3)}var ln=sn.map(cn),un={MMMM:on,MMM:on.map(cn),WWWW:sn,WWW:ln};function dn(e){return(e<10?`0`:``)+e}function fn(e){return(e<10?`00`:e<100?`0`:``)+e}var pn={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+``).slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>dn(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>dn(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>dn(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return t==0?12:t>12?t-12:t},AA:e=>e.getHours()>=12?`PM`:`AM`,aa:e=>e.getHours()>=12?`pm`:`am`,a:e=>e.getHours()>=12?`p`:`a`,mm:e=>dn(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>dn(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>fn(e.getMilliseconds())};function mn(e,t){t||=un;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,i;for(;i=r.exec(e);)n.push(i[0][0]==`{`?pn[i[1]]:i[0]);return e=>{let r=``;for(let i=0;i<n.length;i++)r+=typeof n[i]==`string`?n[i]:n[i](e,t);return r}}var hn=new Intl.DateTimeFormat().resolvedOptions().timeZone;function gn(e,t){let n;return t==`UTC`||t==`Etc/UTC`?n=new Date(+e+e.getTimezoneOffset()*6e4):t==hn?n=e:(n=new Date(e.toLocaleString(`en-US`,{timeZone:t})),n.setMilliseconds(e.getMilliseconds())),n}var _n=e=>e%1==0,vn=[1,2,2.5,5],yn=zt(10,-32,0,vn),bn=zt(10,0,32,vn),xn=bn.filter(_n),Sn=yn.concat(bn),Cn=`{YYYY}`,wn=`
1
+ import{A as e,C as t,E as n,M as r,O as i,P as a,S as o,c as s,f as c,g as l,h as u,i as d,j as f,k as p,l as m,m as h,p as g,s as _,v,w as y,x as b}from"./index-D8HBRPRV.js";function x(e=[],t=[]){let n=new Map(e.map(e=>[e.date,e.points])),r=new Map(t.map(e=>[e.date,e.points]));return[...new Set([...n.keys(),...r.keys()])].sort((e,t)=>e.localeCompare(t)).map(e=>({date:e,ideal:n.has(e)?n.get(e):null,actual:r.has(e)?r.get(e):null}))}var S=!0,C=`uplot`,w=`u-hz`,T=`u-vt`,E=`u-title`,D=`u-wrap`,O=`u-under`,ee=`u-over`,te=`u-axis`,ne=`u-off`,re=`u-select`,ie=`u-cursor-x`,ae=`u-cursor-y`,oe=`u-cursor-pt`,se=`u-legend`,ce=`u-live`,le=`u-inline`,ue=`u-series`,de=`u-marker`,fe=`u-label`,pe=`u-value`,k=`width`,me=`height`,he=`top`,ge=`bottom`,_e=`left`,ve=`right`,ye=`#000`,be=`#0000`,xe=`mousemove`,Se=`mousedown`,Ce=`mouseup`,we=`mouseenter`,Te=`mouseleave`,Ee=`dblclick`,De=`resize`,Oe=`scroll`,ke=`change`,Ae=`dppxchange`,je=`--`,A=typeof window<`u`,Me=A?document:null,Ne=A?window:null,Pe=A?navigator:null,j,Fe;function Ie(){let e=devicePixelRatio;j!=e&&(j=e,Fe&&Ye(ke,Fe,Ie),Fe=matchMedia(`(min-resolution: ${j-.001}dppx) and (max-resolution: ${j+.001}dppx)`),Je(ke,Fe,Ie),Ne.dispatchEvent(new CustomEvent(Ae)))}function Le(e,t){if(t!=null){let n=e.classList;!n.contains(t)&&n.add(t)}}function Re(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function M(e,t,n){e.style[t]=n+`px`}function ze(e,t,n,r){let i=Me.createElement(e);return t!=null&&Le(i,t),n?.insertBefore(i,r),i}function Be(e,t){return ze(`div`,e,t)}var N=new WeakMap;function Ve(e,t,n,r,i){let a=`translate(`+t+`px,`+n+`px)`;a!=N.get(e)&&(e.style.transform=a,N.set(e,a),t<0||n<0||t>r||n>i?Le(e,ne):Re(e,ne))}var He=new WeakMap;function Ue(e,t,n){let r=t+n;r!=He.get(e)&&(He.set(e,r),e.style.background=t,e.style.borderColor=n)}var We=new WeakMap;function Ge(e,t,n,r){let i=t+``+n;i!=We.get(e)&&(We.set(e,i),e.style.height=n+`px`,e.style.width=t+`px`,e.style.marginLeft=r?-t/2+`px`:0,e.style.marginTop=r?-n/2+`px`:0)}var Ke={passive:!0},qe={...Ke,capture:!0};function Je(e,t,n,r){t.addEventListener(e,n,r?qe:Ke)}function Ye(e,t,n,r){t.removeEventListener(e,n,Ke)}A&&Ie();function Xe(e,t,n,r){let i;n||=0,r||=t.length-1;let a=r<=2147483647;for(;r-n>1;)i=a?n+r>>1:pt((n+r)/2),t[i]<e?n=i:r=i;return e-t[n]<=t[r]-e?n:r}function Ze(e){return(t,n,r)=>{let i=-1,a=-1;for(let a=n;a<=r;a++)if(e(t[a])){i=a;break}for(let i=r;i>=n;i--)if(e(t[i])){a=i;break}return[i,a]}}var Qe=e=>e!=null,P=e=>e!=null&&e>0,F=Ze(Qe),$e=Ze(P);function et(e,t,n,r=0,i=!1){let a=i?$e:F,o=i?P:Qe;[t,n]=a(e,t,n);let s=e[t],c=e[t];if(t>-1)if(r==1)s=e[t],c=e[n];else if(r==-1)s=e[n],c=e[t];else for(let r=t;r<=n;r++){let t=e[r];o(t)&&(t<s?s=t:t>c&&(c=t))}return[s??B,c??-B]}function tt(e,t,n,r){let i=vt(e),a=vt(t);e==t&&(i==-1?(e*=n,t/=n):(e/=n,t*=n));let o=n==10?yt:bt,s=i==1?pt:mt,c=a==1?mt:pt,l=s(o(R(e))),u=c(o(R(t))),d=_t(n,l),f=_t(n,u);return n==10&&(l<0&&(d=H(d,-l)),u<0&&(f=H(f,-u))),r||n==2?(e=d*i,t=f*a):(e=It(e,d),t=Ft(t,f)),[e,t]}function nt(e,t,n,r){let i=tt(e,t,n,r);return e==0&&(i[0]=0),t==0&&(i[1]=0),i}var rt=.1,it={mode:3,pad:rt},at={pad:0,soft:null,mode:0},ot={min:at,max:at};function st(e,t,n,r){return qt(n)?lt(e,t,n):(at.pad=n,at.soft=r?0:null,at.mode=r?3:0,lt(e,t,ot))}function I(e,t){return e??t}function ct(e,t,n){for(t=I(t,0),n=I(n,e.length-1);t<=n;){if(e[t]!=null)return!0;t++}return!1}function lt(e,t,n){let r=n.min,i=n.max,a=I(r.pad,0),o=I(i.pad,0),s=I(r.hard,-B),c=I(i.hard,B),l=I(r.soft,B),u=I(i.soft,-B),d=I(r.mode,0),f=I(i.mode,0),p=t-e,m=yt(p),h=gt(R(e),R(t)),g=R(yt(h)-m);(p<1e-24||g>10)&&(p=0,(e==0||t==0)&&(p=1e-24,d==2&&l!=B&&(a=0),f==2&&u!=-B&&(o=0)));let _=p||h||1e3,v=_t(10,pt(yt(_))),y=H(It(e-_*(p==0?e==0?.1:1:a),v/10),24),b=e>=l&&(d==1||d==3&&y<=l||d==2&&y>=l)?l:B,x=gt(s,y<b&&e>=b?b:ht(b,y)),S=H(Ft(t+_*(p==0?t==0?.1:1:o),v/10),24),C=t<=u&&(f==1||f==3&&S>=u||f==2&&S<=u)?u:-B,w=ht(c,S>C&&t<=C?C:gt(C,S));return x==w&&x==0&&(w=100),[x,w]}var ut=new Intl.NumberFormat(A?Pe.language:`en-US`),dt=e=>ut.format(e),L=Math,ft=L.PI,R=L.abs,pt=L.floor,z=L.round,mt=L.ceil,ht=L.min,gt=L.max,_t=L.pow,vt=L.sign,yt=L.log10,bt=L.log2,xt=(e,t=1)=>L.sinh(e)*t,St=(e,t=1)=>L.asinh(e/t),B=1/0;function Ct(e){return(yt((e^e>>31)-(e>>31))|0)+1}function wt(e,t,n){return ht(gt(e,t),n)}function Tt(e){return typeof e==`function`}function V(e){return Tt(e)?e:()=>e}var Et=()=>{},Dt=e=>e,Ot=(e,t)=>t,kt=e=>null,At=e=>!0,jt=(e,t)=>e==t,Mt=/\.\d*?(?=9{6,}|0{6,})/gm,Nt=e=>{if(Wt(e)||Lt.has(e))return e;let t=`${e}`,n=t.match(Mt);if(n==null)return e;let r=n[0].length-1;if(t.indexOf(`e-`)!=-1){let[e,n]=t.split(`e`);return+`${Nt(e)}e${n}`}return H(e,r)};function Pt(e,t){return Nt(H(Nt(e/t))*t)}function Ft(e,t){return Nt(mt(Nt(e/t))*t)}function It(e,t){return Nt(pt(Nt(e/t))*t)}function H(e,t=0){if(Wt(e))return e;let n=10**t;return z(e*n*(1+2**-52))/n}var Lt=new Map;function Rt(e){return((``+e).split(`.`)[1]||``).length}function zt(e,t,n,r){let i=[],a=r.map(Rt);for(let o=t;o<n;o++){let t=R(o),n=H(_t(e,o),t);for(let s=0;s<r.length;s++){let c=e==10?+`${r[s]}e${o}`:r[s]*n,l=(o>=0?0:t)+(o>=a[s]?0:a[s]),u=e==10?c:H(c,l);i.push(u),Lt.set(u,l)}}return i}var Bt={},Vt=[],Ht=[null,null],Ut=Array.isArray,Wt=Number.isInteger,Gt=e=>e===void 0;function Kt(e){return typeof e==`string`}function qt(e){let t=!1;if(e!=null){let n=e.constructor;t=n==null||n==Object}return t}function Jt(e){return typeof e==`object`&&!!e}var Yt=Object.getPrototypeOf(Uint8Array),U=`__proto__`;function Xt(e,t=qt){let n;if(Ut(e)){let r=e.find(e=>e!=null);if(Ut(r)||t(r)){n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Xt(e[r],t)}else n=e.slice()}else if(e instanceof Yt)n=e.slice();else if(t(e)){n={};for(let r in e)r!=U&&(n[r]=Xt(e[r],t))}else n=e;return n}function W(e){let t=arguments;for(let n=1;n<t.length;n++){let r=t[n];for(let t in r)t!=U&&(qt(e[t])?W(e[t],Xt(r[t])):e[t]=Xt(r[t]))}return e}var G=0,Zt=1,Qt=2;function $t(e,t,n){for(let r=0,i,a=-1;r<t.length;r++){let o=t[r];if(o>a){for(i=o-1;i>=0&&e[i]==null;)e[i--]=null;for(i=o+1;i<n&&e[i]==null;)e[a=i++]=null}}}function en(e,t){if(rn(e)){let t=e[0].slice();for(let n=1;n<e.length;n++)t.push(...e[n].slice(1));return an(t[0])||(t=nn(t)),t}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t][0],i=r.length;for(let e=0;e<i;e++)n.add(r[e])}let r=[Array.from(n).sort((e,t)=>e-t)],i=r[0].length,a=new Map;for(let e=0;e<i;e++)a.set(r[0][e],e);for(let n=0;n<e.length;n++){let o=e[n],s=o[0];for(let e=1;e<o.length;e++){let c=o[e],l=Array(i).fill(void 0),u=t?t[n][e]:Zt,d=[];for(let e=0;e<c.length;e++){let t=c[e],n=a.get(s[e]);t===null?u!=G&&(l[n]=t,u==Qt&&d.push(n)):l[n]=t}$t(l,d,i),r.push(l)}}return r}var tn=typeof queueMicrotask>`u`?e=>Promise.resolve().then(e):queueMicrotask;function nn(e){let t=e[0],n=t.length,r=Array(n);for(let e=0;e<r.length;e++)r[e]=e;r.sort((e,n)=>t[e]-t[n]);let i=[];for(let t=0;t<e.length;t++){let a=e[t],o=Array(n);for(let e=0;e<n;e++)o[e]=a[r[e]];i.push(o)}return i}function rn(e){let t=e[0][0],n=t.length;for(let r=1;r<e.length;r++){let i=e[r][0];if(i.length!=n)return!1;if(i!=t){for(let e=0;e<n;e++)if(i[e]!=t[e])return!1}}return!0}function an(e,t=100){let n=e.length;if(n<=1)return!0;let r=0,i=n-1;for(;r<=i&&e[r]==null;)r++;for(;i>=r&&e[i]==null;)i--;if(i<=r)return!0;let a=gt(1,pt((i-r+1)/t));for(let t=e[r],n=r+a;n<=i;n+=a){let r=e[n];if(r!=null){if(r<=t)return!1;t=r}}return!0}var on=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],sn=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function cn(e){return e.slice(0,3)}var ln=sn.map(cn),un={MMMM:on,MMM:on.map(cn),WWWW:sn,WWW:ln};function dn(e){return(e<10?`0`:``)+e}function fn(e){return(e<10?`00`:e<100?`0`:``)+e}var pn={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+``).slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>dn(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>dn(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>dn(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return t==0?12:t>12?t-12:t},AA:e=>e.getHours()>=12?`PM`:`AM`,aa:e=>e.getHours()>=12?`pm`:`am`,a:e=>e.getHours()>=12?`p`:`a`,mm:e=>dn(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>dn(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>fn(e.getMilliseconds())};function mn(e,t){t||=un;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,i;for(;i=r.exec(e);)n.push(i[0][0]==`{`?pn[i[1]]:i[0]);return e=>{let r=``;for(let i=0;i<n.length;i++)r+=typeof n[i]==`string`?n[i]:n[i](e,t);return r}}var hn=new Intl.DateTimeFormat().resolvedOptions().timeZone;function gn(e,t){let n;return t==`UTC`||t==`Etc/UTC`?n=new Date(+e+e.getTimezoneOffset()*6e4):t==hn?n=e:(n=new Date(e.toLocaleString(`en-US`,{timeZone:t})),n.setMilliseconds(e.getMilliseconds())),n}var _n=e=>e%1==0,vn=[1,2,2.5,5],yn=zt(10,-32,0,vn),bn=zt(10,0,32,vn),xn=bn.filter(_n),Sn=yn.concat(bn),Cn=`{YYYY}`,wn=`
2
2
  {YYYY}`,Tn=`{M}/{D}`,En=`
3
3
  {M}/{D}`,Dn=`
4
4
  {M}/{D}/{YY}`,On=`{h}:{mm}{aa}`,kn=`
@@ -7,4 +7,4 @@ import{A as e,C as t,D as n,N as r,O as i,S as a,T as o,_ as s,b as c,c as l,d a
7
7
  {M}/{D} {h}:{mm}{aa}`,K,kn,K,1],[e,`:{ss}.{fff}`,`
8
8
  {M}/{D}/{YY} {h}:{mm}{aa}`,K,`
9
9
  {M}/{D} {h}:{mm}{aa}`,K,kn,K,1]];function l(t){return(s,c,l,u,d,f)=>{let p=[],m=d>=o,h=d>=a&&d<o,g=t(l),_=H(g*e,3),v=Vn(g.getFullYear(),m?0:g.getMonth(),h||m?1:g.getDate()),y=H(v*e,3);if(h||m){let n=h?d/a:0,r=m?d/o:0,i=_==y?_:H(Vn(v.getFullYear()+r,v.getMonth()+n,1)*e,3),s=new Date(z(i/e)),c=s.getFullYear(),l=s.getMonth();for(let a=0;i<=u;a++){let o=Vn(c+r*a,l+n*a,1),s=o-t(H(o*e,3));i=H((+o+s)*e,3),i<=u&&p.push(i)}}else{let a=d>=i?i:d,o=y+(pt(l)-pt(_))+Ft(_-y,a);p.push(o);let m=t(o),h=m.getHours()+m.getMinutes()/n+m.getSeconds()/r,g=d/r,v=f/s.axes[c]._space;for(;o=H(o+d,e==1?0:3),!(o>u);)if(g>1){let e=pt(H(h+g,6))%24,n=t(o).getHours()-e;n>1&&(n=-1),o-=n*r,h=(h+g)%24;let i=p[p.length-1];H((o-i)/d,3)*v>=.7&&p.push(o)}else p.push(o)}return p}}return[s,c,l]}var[Mn,Nn,Pn]=jn(1),[Fn,In,Ln]=jn(.001);zt(2,-53,53,[1]);function Rn(e,t){return e.map(e=>e.map((n,r)=>r==0||r==8||n==null?n:t(r==1||e[8]==0?n:e[1]+n)))}function zn(e,t){return(n,r,i,a,o)=>{let s=t.find(e=>o>=e[0])||t[t.length-1],c,l,u,d,f,p;return r.map(t=>{let n=e(t),r=n.getFullYear(),i=n.getMonth(),a=n.getDate(),o=n.getHours(),m=n.getMinutes(),h=n.getSeconds(),g=r!=c&&s[2]||i!=l&&s[3]||a!=u&&s[4]||o!=d&&s[5]||m!=f&&s[6]||h!=p&&s[7]||s[1];return c=r,l=i,u=a,d=o,f=m,p=h,g(n)})}}function Bn(e,t){let n=mn(t);return(t,r,i,a,o)=>r.map(t=>n(e(t)))}function Vn(e,t,n){return new Date(e,t,n)}function Hn(e,t){return t(e)}var Un=`{YYYY}-{MM}-{DD} {h}:{mm}{aa}`;function Wn(e,t){return(n,r,i,a)=>a==null?je:t(e(r))}function Gn(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null}function Kn(e,t){return e.series[t].fill(e,t)}var qn={show:!0,live:!0,isolate:!1,mount:Et,markers:{show:!0,width:2,stroke:Gn,fill:Kn,dash:`solid`},idx:null,idxs:null,values:[]};function Jn(e,t){let n=e.cursor.points,r=Be(),i=n.size(e,t);M(r,k,i),M(r,me,i);let a=i/-2;M(r,`marginLeft`,a),M(r,`marginTop`,a);let o=n.width(e,t,i);return o&&M(r,`borderWidth`,o),r}function Yn(e,t){let n=e.series[t].points;return n._fill||n._stroke}function Xn(e,t){let n=e.series[t].points;return n._stroke||n._fill}function Zn(e,t){return e.series[t].points.size}var Qn=[0,0];function $n(e,t,n){return Qn[0]=t,Qn[1]=n,Qn}function q(e,t,n,r=!0){return e=>{e.button==0&&(!r||e.target==t)&&n(e)}}function J(e,t,n,r=!0){return e=>{(!r||e.target==t)&&n(e)}}var er={show:!0,x:!0,y:!0,lock:!1,move:$n,points:{one:!1,show:Jn,size:Zn,width:0,stroke:Xn,fill:Yn},bind:{mousedown:q,mouseup:q,click:q,dblclick:q,mousemove:J,mouseleave:J,mouseenter:J},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,i)=>r-i,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},tr={show:!0,stroke:`rgba(0,0,0,0.07)`,width:2},nr=W({},tr,{filter:Ot}),rr=W({},nr,{size:10}),ir=W({},tr,{show:!1}),ar=`12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,or=`bold 12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,sr=1.5,cr={show:!0,scale:`x`,stroke:ye,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:or,side:2,grid:nr,ticks:rr,border:ir,font:ar,lineGap:sr,rotate:0},lr=`Value`,ur=`Time`,dr={show:!0,scale:`x`,auto:!1,sorted:1,min:B,max:-1/0,idxs:[]};function fr(e,t,n,r,i){return t.map(e=>e==null?``:dt(e))}function pr(e,t,n,r,i,a,o){let s=[],c=Lt.get(i)||0;n=o?n:H(Ft(n,i),c);for(let e=n;e<=r;e=H(e+i,c))s.push(Object.is(e,-0)?0:e);return s}function mr(e,t,n,r,i,a,o){let s=[],c=e.scales[e.axes[t].scale].log;i=_t(c,pt((c==10?yt:bt)(n))),c==10&&(i=Sn[Xe(i,Sn)]);let l=n,u=i*c;c==10&&(u=Sn[Xe(u,Sn)]);do s.push(l),l+=i,c==10&&!Lt.has(l)&&(l=H(l,Lt.get(i))),l>=u&&(i=l,u=i*c,c==10&&(u=Sn[Xe(u,Sn)]));while(l<=r);return s}function hr(e,t,n,r,i,a,o){let s=e.scales[e.axes[t].scale].asinh,c=r>s?mr(e,t,gt(s,n),r,i):[s],l=r>=0&&n<=0?[0]:[];return(n<-s?mr(e,t,gt(s,-r),-n,i):[s]).reverse().map(e=>-e).concat(l,c)}var gr=/./,_r=/[12357]/,vr=/[125]/,yr=/1/,br=(e,t,n,r)=>e.map((e,i)=>t==4&&e==0||i%r==0&&n.test(e.toExponential()[+(e<0)])?e:null);function xr(e,t,n,r,i){let a=e.axes[n],o=a.scale,s=e.scales[o],c=e.valToPos,l=a._space,u=c(10,o),d=c(9,o)-u>=l?gr:c(7,o)-u>=l?_r:c(5,o)-u>=l?vr:yr;if(d==yr){let e=R(c(1,o)-u);if(e<l)return br(t.slice().reverse(),s.distr,d,mt(l/e)).reverse()}return br(t,s.distr,d,1)}function Sr(e,t,n,r,i){let a=e.axes[n],o=a.scale,s=a._space,c=e.valToPos,l=R(c(1,o)-c(2,o));return l<s?br(t.slice().reverse(),3,gr,mt(s/l)).reverse():t}function Cr(e,t,n,r){return r==null?je:t==null?``:dt(t)}var wr={show:!0,scale:`y`,stroke:ye,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:or,side:3,grid:nr,ticks:rr,border:ir,font:ar,lineGap:sr,rotate:0};function Tr(e,t){return H((3+(e||1)*2)*t,3)}function Er(e,t){let{scale:n,idxs:r}=e.series[0],i=e._data[0],a=e.valToPos(i[r[0]],n,!0),o=R(e.valToPos(i[r[1]],n,!0)-a)/(e.series[t].points.space*j);return r[1]-r[0]<=o}var Dr={scale:null,auto:!0,sorted:0,min:B,max:-1/0},Or=(e,t,n,r,i)=>i,kr={show:!0,auto:!0,sorted:0,gaps:Or,alpha:1,facets:[W({},Dr,{scale:`x`}),W({},Dr,{scale:`y`})]},Ar={scale:`y`,auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Or,alpha:1,points:{show:Er,filter:null},values:null,min:B,max:-1/0,idxs:[],path:null,clip:null};function jr(e,t,n,r,i){return n/10}var Mr={time:S,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Nr=W({},Mr,{time:!1,ori:1}),Pr={};function Fr(e,t){let n=Pr[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter(t=>t!=e)},pub(e,t,r,i,a,o,s){for(let c=0;c<n.plots.length;c++)n.plots[c]!=t&&n.plots[c].pub(e,t,r,i,a,o,s)}},e!=null&&(Pr[e]=n)),n}var Ir=1,Lr=2;function Rr(e,t,n){let r=e.mode,i=e.series[t],a=r==2?e._data[t]:e._data,o=e.scales,s=e.bbox,c=a[0],l=r==2?a[1]:a[t],u=r==2?o[i.facets[0].scale]:o[e.series[0].scale],d=r==2?o[i.facets[1].scale]:o[i.scale],f=s.left,p=s.top,m=s.width,h=s.height,g=e.valToPosH,_=e.valToPosV;return u.ori==0?n(i,c,l,u,d,g,_,f,p,m,h,qr,Yr,Zr,$r,ti):n(i,c,l,u,d,_,g,p,f,h,m,Jr,Xr,Qr,ei,ni)}function zr(e,t){let n=0,r=0,i=I(e.bands,Vt);for(let e=0;e<i.length;e++){let a=i[e];a.series[0]==t?n=a.dir:a.series[1]==t&&(a.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function Br(e,t,n,r,i){let a=e.mode,o=e.series[t],s=a==2?o.facets[1].scale:o.scale,c=e.scales[s];return i==-1?c.min:i==1?c.max:c.distr==3?c.dir==1?c.min:c.max:0}function Vr(e,t,n,r,i,a){return Rr(e,t,(e,t,o,s,c,l,u,d,f,p,m)=>{let h=e.pxRound,g=s.dir*(s.ori==0?1:-1),_=s.ori==0?Yr:Xr,v,y;g==1?(v=n,y=r):(v=r,y=n);let b=h(l(t[v],s,p,d)),x=h(u(o[v],c,m,f)),S=h(l(t[y],s,p,d)),C=h(u(a==1?c.max:c.min,c,m,f)),w=new Path2D(i);return _(w,S,C),_(w,b,C),_(w,b,x),w})}function Hr(e,t,n,r,i,a){let o=null;if(e.length>0){o=new Path2D;let s=t==0?Zr:Qr,c=n;for(let t=0;t<e.length;t++){let n=e[t];if(n[1]>n[0]){let e=n[0]-c;e>0&&s(o,c,r,e,r+a),c=n[1]}}let l=n+i-c;l>0&&s(o,c,r-10/2,l,r+a+10)}return o}function Ur(e,t,n){let r=e[e.length-1];r&&r[0]==t?r[1]=n:e.push([t,n])}function Wr(e,t,n,r,i,a,o){let s=[],c=e.length;for(let l=i==1?n:r;l>=n&&l<=r;l+=i)if(t[l]===null){let u=l,d=l;if(i==1)for(;++l<=r&&t[l]===null;)d=l;else for(;--l>=n&&t[l]===null;)d=l;let f=a(e[u]),p=d==u?f:a(e[d]),m=u-i;f=o<=0&&m>=0&&m<c?a(e[m]):f;let h=d+i;p=o>=0&&h>=0&&h<c?a(e[h]):p,p>=f&&s.push([f,p])}return s}function Gr(e){return e==0?Dt:e==1?z:t=>Pt(t,e)}function Kr(e){let t=e==0?qr:Jr,n=e==0?(e,t,n,r,i,a)=>{e.arcTo(t,n,r,i,a)}:(e,t,n,r,i,a)=>{e.arcTo(n,t,i,r,a)},r=e==0?(e,t,n,r,i)=>{e.rect(t,n,r,i)}:(e,t,n,r,i)=>{e.rect(n,t,i,r)};return(e,i,a,o,s,c=0,l=0)=>{c==0&&l==0?r(e,i,a,o,s):(c=ht(c,o/2,s/2),l=ht(l,o/2,s/2),t(e,i+c,a),n(e,i+o,a,i+o,a+s,c),n(e,i+o,a+s,i,a+s,l),n(e,i,a+s,i,a,l),n(e,i,a,i+o,a,c),e.closePath())}}var qr=(e,t,n)=>{e.moveTo(t,n)},Jr=(e,t,n)=>{e.moveTo(n,t)},Yr=(e,t,n)=>{e.lineTo(t,n)},Xr=(e,t,n)=>{e.lineTo(n,t)},Zr=Kr(0),Qr=Kr(1),$r=(e,t,n,r,i,a)=>{e.arc(t,n,r,i,a)},ei=(e,t,n,r,i,a)=>{e.arc(n,t,r,i,a)},ti=(e,t,n,r,i,a,o)=>{e.bezierCurveTo(t,n,r,i,a,o)},ni=(e,t,n,r,i,a,o)=>{e.bezierCurveTo(n,t,i,r,o,a)};function ri(e){return(e,t,n,r,i)=>Rr(e,t,(t,a,o,s,c,l,u,d,f,p,m)=>{let{pxRound:h,points:g}=t,_,v;s.ori==0?(_=qr,v=$r):(_=Jr,v=ei);let y=H(g.width*j,3),b=(g.size-g.width)/2*j,x=H(b*2,3),S=new Path2D,C=new Path2D,{left:w,top:T,width:E,height:D}=e.bbox;Zr(C,w-x,T-x,E+x*2,D+x*2);let O=e=>{if(o[e]!=null){let t=h(l(a[e],s,p,d)),n=h(u(o[e],c,m,f));_(S,t+b,n),v(S,t,n,b,0,ft*2)}};if(i)i.forEach(O);else for(let e=n;e<=r;e++)O(e);return{stroke:y>0?S:null,fill:S,clip:C,flags:3}})}function ii(e){return(t,n,r,i,a,o)=>{r!=i&&(a!=r&&o!=r&&e(t,n,r),a!=i&&o!=i&&e(t,n,i),e(t,n,o))}}var ai=ii(Yr),oi=ii(Xr);function si(e){let t=I(e?.alignGaps,0);return(e,n,r,i)=>Rr(e,n,(a,o,s,c,l,u,d,f,p,m,h)=>{[r,i]=F(s,r,i);let g=a.pxRound,_=e=>g(u(e,c,m,f)),v=e=>g(d(e,l,h,p)),y,b;c.ori==0?(y=Yr,b=ai):(y=Xr,b=oi);let x=c.dir*(c.ori==0?1:-1),S={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ir},C=S.stroke,w=!1;if(i-r>=m*4){let t=t=>e.posToVal(t,c.key,!0),n=null,a=null,l,u,d=_(o[x==1?r:i]),f=_(o[r]),p=_(o[i]),m=t(x==1?f+1:p-1);for(let e=x==1?r:i;e>=r&&e<=i;e+=x){let r=o[e],i=(x==1?r<m:r>m)?d:_(r),c=s[e];i==d?c==null?c===null&&(w=!0):(u=c,n==null?(y(C,i,v(u)),l=n=a=u):u<n?n=u:u>a&&(a=u)):(n!=null&&b(C,d,v(n),v(a),v(l),v(u)),c==null?(n=a=null,c===null&&(w=!0)):(u=c,y(C,i,v(u)),n=a=l=u),d=i,m=t(d+x))}n!=null&&n!=a&&d!=null&&b(C,d,v(n),v(a),v(l),v(u))}else for(let e=x==1?r:i;e>=r&&e<=i;e+=x){let t=s[e];t===null?w=!0:t!=null&&y(C,_(o[e]),v(t))}let[T,E]=zr(e,n);if(a.fill!=null||T!=0){let t=S.fill=new Path2D(C),s=v(a.fillTo(e,n,a.min,a.max,T)),c=_(o[r]),l=_(o[i]);x==-1&&([l,c]=[c,l]),y(t,l,s),y(t,c,s)}if(!a.spanGaps){let l=[];w&&l.push(...Wr(o,s,r,i,x,_,t)),S.gaps=l=a.gaps(e,n,r,i,l),S.clip=Hr(l,c.ori,f,p,m,h)}return E!=0&&(S.band=E==2?[Vr(e,n,r,i,C,-1),Vr(e,n,r,i,C,1)]:Vr(e,n,r,i,C,E)),S})}function ci(e){let t=I(e.align,1),n=I(e.ascDesc,!1),r=I(e.alignGaps,0),i=I(e.extend,!1);return(e,a,o,s)=>Rr(e,a,(c,l,u,d,f,p,m,h,g,_,v)=>{[o,s]=F(u,o,s);let y=c.pxRound,{left:b,width:x}=e.bbox,S=e=>y(p(e,d,_,h)),C=e=>y(m(e,f,v,g)),w=d.ori==0?Yr:Xr,T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ir},E=T.stroke,D=d.dir*(d.ori==0?1:-1),O=C(u[D==1?o:s]),ee=S(l[D==1?o:s]),te=ee,ne=ee;i&&t==-1&&(ne=b,w(E,ne,O)),w(E,ee,O);for(let e=D==1?o:s;e>=o&&e<=s;e+=D){let n=u[e];if(n==null)continue;let r=S(l[e]),i=C(n);t==1?w(E,r,O):w(E,te,i),w(E,r,i),O=i,te=r}let re=te;i&&t==1&&(re=b+x,w(E,re,O));let[ie,ae]=zr(e,a);if(c.fill!=null||ie!=0){let t=T.fill=new Path2D(E),n=C(c.fillTo(e,a,c.min,c.max,ie));w(t,re,n),w(t,ne,n)}if(!c.spanGaps){let i=[];i.push(...Wr(l,u,o,s,D,S,r));let f=c.width*j/2,p=n||t==1?f:-f,m=n||t==-1?-f:f;i.forEach(e=>{e[0]+=p,e[1]+=m}),T.gaps=i=c.gaps(e,a,o,s,i),T.clip=Hr(i,d.ori,h,g,_,v)}return ae!=0&&(T.band=ae==2?[Vr(e,a,o,s,E,-1),Vr(e,a,o,s,E,1)]:Vr(e,a,o,s,E,ae)),T})}function li(e,t,n,r,i,a,o=B){if(e.length>1){let s=null;for(let c=0,l=1/0;c<e.length;c++)if(t[c]!==void 0){if(s!=null){let t=R(e[c]-e[s]);t<l&&(l=t,o=R(n(e[c],r,i,a)-n(e[s],r,i,a)))}s=c}}return o}function ui(e){e||=Bt;let t=I(e.size,[.6,B,1]),n=e.align||0,r=e.gap||0,i=e.radius;i=i==null?[0,0]:typeof i==`number`?[i,0]:i;let a=V(i),o=1-t[0],s=I(t[1],B),c=I(t[2],1),l=I(e.disp,Bt),u=I(e.each,e=>{}),{fill:d,stroke:f}=l;return(e,t,i,p)=>Rr(e,t,(m,h,g,_,v,y,b,x,S,C,w)=>{let T=m.pxRound,E=n,D=r*j,O=s*j,ee=c*j,te,ne;_.ori==0?[te,ne]=a(e,t):[ne,te]=a(e,t);let re=_.dir*(_.ori==0?1:-1),ie=_.ori==0?Zr:Qr,ae=_.ori==0?u:(e,t,n,r,i,a,o)=>{u(e,t,n,i,r,o,a)},oe=I(e.bands,Vt).find(e=>e.series[0]==t),se=oe==null?0:oe.dir,ce=m.fillTo(e,t,m.min,m.max,se),le=T(b(ce,v,w,S)),ue,de,fe,pe=C,k=T(m.width*j),me=!1,he=null,ge=null,_e=null,ve=null;d!=null&&(k==0||f!=null)&&(me=!0,he=d.values(e,t,i,p),ge=new Map,new Set(he).forEach(e=>{e!=null&&ge.set(e,new Path2D)}),k>0&&(_e=f.values(e,t,i,p),ve=new Map,new Set(_e).forEach(e=>{e!=null&&ve.set(e,new Path2D)})));let{x0:ye,size:be}=l;if(ye!=null&&be!=null){E=1,h=ye.values(e,t,i,p),ye.unit==2&&(h=h.map(t=>e.posToVal(x+t*C,_.key,!0)));let n=be.values(e,t,i,p);de=be.unit==2?n[0]*C:y(n[0],_,C,x)-y(0,_,C,x),pe=li(h,g,y,_,C,x,pe),fe=pe-de+D}else pe=li(h,g,y,_,C,x,pe),fe=pe*o+D,de=pe-fe;fe<1&&(fe=0),k>=de/2&&(k=0),fe<5&&(T=Dt);let xe=fe>0,Se=pe-fe-(xe?k:0);de=T(wt(Se,ee,O)),ue=(E==0?de/2:E==re?0:de)-E*re*((E==0?D/2:0)+(xe?k/2:0));let Ce={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},we=me?null:new Path2D,Te=null;if(oe!=null)Te=e.data[oe.series[1]];else{let{y0:n,y1:r}=l;n!=null&&r!=null&&(g=r.values(e,t,i,p),Te=n.values(e,t,i,p))}let Ee=te*de,De=ne*de;for(let n=re==1?i:p;n>=i&&n<=p;n+=re){let r=g[n];if(r==null)continue;if(Te!=null){let e=Te[n]??0;if(r-e==0)continue;le=b(e,v,w,S)}let i=y(_.distr!=2||l!=null?h[n]:n,_,C,x),a=b(I(r,ce),v,w,S),o=T(i-ue),s=T(gt(a,le)),c=T(ht(a,le)),u=s-c;if(r!=null){let i=r<0?De:Ee,a=r<0?Ee:De;me?(k>0&&_e[n]!=null&&ie(ve.get(_e[n]),o,c+pt(k/2),de,gt(0,u-k),i,a),he[n]!=null&&ie(ge.get(he[n]),o,c+pt(k/2),de,gt(0,u-k),i,a)):ie(we,o,c+pt(k/2),de,gt(0,u-k),i,a),ae(e,t,n,o-k/2,c,de+k,u)}}return k>0?Ce.stroke=me?ve:we:me||(Ce._fill=m.width==0?m._fill:m._stroke??m._fill,Ce.width=0),Ce.fill=me?ge:we,Ce})}function di(e,t){let n=I(t?.alignGaps,0);return(t,r,i,a)=>Rr(t,r,(o,s,c,l,u,d,f,p,m,h,g)=>{[i,a]=F(c,i,a);let _=o.pxRound,v=e=>_(d(e,l,h,p)),y=e=>_(f(e,u,g,m)),b,x,S;l.ori==0?(b=qr,S=Yr,x=ti):(b=Jr,S=Xr,x=ni);let C=l.dir*(l.ori==0?1:-1),w=v(s[C==1?i:a]),T=w,E=[],D=[];for(let e=C==1?i:a;e>=i&&e<=a;e+=C)if(c[e]!=null){let t=s[e],n=v(t);E.push(T=n),D.push(y(c[e]))}let O={stroke:e(E,D,b,S,x,_),fill:null,clip:null,band:null,gaps:null,flags:Ir},ee=O.stroke,[te,ne]=zr(t,r);if(o.fill!=null||te!=0){let e=O.fill=new Path2D(ee),n=y(o.fillTo(t,r,o.min,o.max,te));S(e,T,n),S(e,w,n)}if(!o.spanGaps){let e=[];e.push(...Wr(s,c,i,a,C,v,n)),O.gaps=e=o.gaps(t,r,i,a,e),O.clip=Hr(e,l.ori,p,m,h,g)}return ne!=0&&(O.band=ne==2?[Vr(t,r,i,a,ee,-1),Vr(t,r,i,a,ee,1)]:Vr(t,r,i,a,ee,ne)),O})}function fi(e){return di(pi,e)}function pi(e,t,n,r,i,a){let o=e.length;if(o<2)return null;let s=new Path2D;if(n(s,e[0],t[0]),o==2)r(s,e[1],t[1]);else{let n=Array(o),r=Array(o-1),a=Array(o-1),c=Array(o-1);for(let n=0;n<o-1;n++)a[n]=t[n+1]-t[n],c[n]=e[n+1]-e[n],r[n]=a[n]/c[n];n[0]=r[0];for(let e=1;e<o-1;e++)r[e]===0||r[e-1]===0||r[e-1]>0!=r[e]>0?n[e]=0:(n[e]=3*(c[e-1]+c[e])/((2*c[e]+c[e-1])/r[e-1]+(c[e]+2*c[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[o-1]=r[o-2];for(let r=0;r<o-1;r++)i(s,e[r]+c[r]/3,t[r]+n[r]*c[r]/3,e[r+1]-c[r]/3,t[r+1]-n[r+1]*c[r]/3,e[r+1],t[r+1])}return s}var mi=new Set;function hi(){for(let e of mi)e.syncRect(!0)}A&&(Je(De,Ne,hi),Je(Oe,Ne,hi,!0),Je(Ae,Ne,()=>{Y.pxRatio=j}));var gi=si(),_i=ri();function vi(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((e,r)=>bi(e,r,t,n))}function yi(e,t){return e.map((e,n)=>n==0?{}:W({},t,e))}function bi(e,t,n,r){return W({},t==0?n:r,e)}function xi(e,t,n){return t==null?Ht:[t,n]}var Si=xi;function Ci(e,t,n){return t==null?Ht:st(t,n,rt,!0)}function wi(e,t,n,r){return t==null?Ht:tt(t,n,e.scales[r].log,!1)}var Ti=wi;function Ei(e,t,n,r){return t==null?Ht:nt(t,n,e.scales[r].log,!1)}var Di=Ei;function Oi(e,t,n,r,i){let a=gt(Ct(e),Ct(t)),o=t-e,s=Xe(i/r*o,n);do{let e=n[s],t=r*e/o;if(t>=i&&a+(e<5?Lt.get(e):0)<=17)return[e,t]}while(++s<n.length);return[0,0]}function ki(e){let t,n;return e=e.replace(/(\d+)px/,(e,r)=>(t=z((n=+r)*j))+`px`),[e,t,n]}function Ai(e){e.show&&[e.font,e.labelFont].forEach(e=>{let t=H(e[2]*j,1);e[0]=e[0].replace(/[0-9.]+px/,t+`px`),e[1]=t})}function Y(e,t,n){let r={mode:I(e.mode,1)},i=r.mode;function a(e,t,n,r){let i=t.valToPct(e);return r+n*(t.dir==-1?1-i:i)}function o(e,t,n,r){let i=t.valToPct(e);return r+n*(t.dir==-1?i:1-i)}function s(e,t,n,r){return t.ori==0?a(e,t,n,r):o(e,t,n,r)}r.valToPosH=a,r.valToPosV=o;let c=!1;r.status=0;let l=r.root=Be(C);if(e.id!=null&&(l.id=e.id),Le(l,e.class),e.title){let t=Be(E,l);t.textContent=e.title}let u=ze(`canvas`),d=r.ctx=u.getContext(`2d`),f=Be(D,l);Je(`click`,f,e=>{e.target===m&&(X!=Ni||Z!=Pi)&&Ri.click(r,e)},!0);let p=r.under=Be(O,f);f.appendChild(u);let m=r.over=Be(ee,f);e=Xt(e);let h=+I(e.pxAlign,1),g=Gr(h);(e.plugins||[]).forEach(t=>{t.opts&&(e=t.opts(r,e)||e)});let _=e.ms||.001,v=r.series=i==1?vi(e.series||[],dr,Ar,!1):yi(e.series||[null],kr),y=r.axes=vi(e.axes||[],cr,wr,!0),b=r.scales={},x=r.bands=e.bands||[];x.forEach(e=>{e.fill=V(e.fill||null),e.dir=I(e.dir,-1)});let S=i==2?v[1].facets[0].scale:v[0].scale,ye={axes:ni,series:Wr},De=(e.drawOrder||[`axes`,`series`]).map(e=>ye[e]);function Oe(e){let t=e.distr==3?t=>yt(t>0?t:e.clamp(r,t,e.min,e.max,e.key)):e.distr==4?t=>St(t,e.asinh):e.distr==100?t=>e.fwd(t):e=>e;return n=>{let r=t(n),{_min:i,_max:a}=e,o=a-i;return(r-i)/o}}function ke(t){let n=b[t];if(n==null){let r=(e.scales||Bt)[t]||Bt;if(r.from!=null){ke(r.from);let e=W({},b[r.from],r,{key:t});e.valToPct=Oe(e),b[t]=e}else{n=b[t]=W({},t==S?Mr:Nr,r),n.key=t;let e=n.time,a=n.range,o=Ut(a);if((t!=S||i==2&&!e)&&(o&&(a[0]==null||a[1]==null)&&(a={min:a[0]==null?it:{mode:1,hard:a[0],soft:a[0]},max:a[1]==null?it:{mode:1,hard:a[1],soft:a[1]}},o=!1),!o&&qt(a))){let e=a;a=(t,n,r)=>n==null?Ht:st(n,r,e)}n.range=V(a||(e?Si:t==S?n.distr==3?Ti:n.distr==4?Di:xi:n.distr==3?wi:n.distr==4?Ei:Ci)),n.auto=V(o?!1:n.auto),n.clamp=V(n.clamp||jr),n._min=n._max=null,n.valToPct=Oe(n)}}}ke(`x`),ke(`y`),i==1&&v.forEach(e=>{ke(e.scale)}),y.forEach(e=>{ke(e.scale)});for(let t in e.scales)ke(t);let A=b[S],Pe=A.distr,Fe,Ie;A.ori==0?(Le(l,w),Fe=a,Ie=o):(Le(l,T),Fe=o,Ie=a);let N={};for(let e in b){let t=b[e];(t.min!=null||t.max!=null)&&(N[e]={min:t.min,max:t.max},t.min=t.max=null)}let He=e.tzDate||(e=>new Date(z(e/_))),We=e.fmtDate||mn,Ke=_==1?Pn(He):Ln(He),qe=zn(He,Rn(_==1?Nn:In,We)),Ze=Wn(He,Hn(Un,We)),Qe=[],P=r.legend=W({},qn,e.legend),F=r.cursor=W({},er,{drag:{y:i==2}},e.cursor),$e=P.show,at=F.show,ot=P.markers;P.idxs=Qe,ot.width=V(ot.width),ot.dash=V(ot.dash),ot.stroke=V(ot.stroke),ot.fill=V(ot.fill);let lt,ut,dt,L=[],pt=[],vt,bt=!1,Ct={};if(P.live){let e=v[1]?v[1].values:null;bt=e!=null,vt=bt?e(r,1,0):{_:0};for(let e in vt)Ct[e]=je}if($e)if(lt=ze(`table`,se,l),dt=ze(`tbody`,null,lt),P.mount(r,lt),bt){ut=ze(`thead`,null,lt,dt);let e=ze(`tr`,null,ut);for(var Et in ze(`th`,null,e),vt)ze(`th`,fe,e).textContent=Et}else Le(lt,le),P.live&&Le(lt,ce);let Dt={show:!0},Mt={show:!1};function Nt(e,t){if(t==0&&(bt||!P.live||i==2))return Ht;let n=[],a=ze(`tr`,ue,dt,dt.childNodes[t]);Le(a,e.class),e.show||Le(a,ne);let o=ze(`th`,null,a);if(ot.show){let e=Be(de,o);if(t>0){let n=ot.width(r,t);n&&(e.style.border=n+`px `+ot.dash(r,t)+` `+ot.stroke(r,t)),e.style.background=ot.fill(r,t)}}let s=Be(fe,o);for(var c in e.label instanceof HTMLElement?s.appendChild(e.label):s.textContent=e.label,t>0&&(ot.show||(s.style.color=e.width>0?ot.stroke(r,t):ot.fill(r,t)),It(`click`,o,t=>{if(F._lock)return;wn(t);let n=v.indexOf(e);if((t.ctrlKey||t.metaKey)!=P.isolate){let e=v.some((e,t)=>t>0&&t!=n&&e.show);v.forEach((t,r)=>{r>0&&Gi(r,e?r==n?Dt:Mt:Dt,!0,$.setSeries)})}else Gi(n,{show:!e.show},!0,$.setSeries)},!1),Dn&&It(we,o,t=>{F._lock||(wn(t),Gi(v.indexOf(e),$i,!0,$.setSeries))},!1)),vt){let e=ze(`td`,pe,a);e.textContent=`--`,n.push(e)}return[a,n]}let Ft=new Map;function It(e,t,n,i=!0){let a=Ft.get(t)||{},o=F.bind[e](r,t,n,i);o&&(Je(e,t,a[e]=o),Ft.set(t,a))}function zt(e,t,n){let r=Ft.get(t)||{};for(let n in r)(e==null||n==e)&&(Ye(n,t,r[n]),delete r[n]);e??Ft.delete(t)}let Wt=0,Yt=0,U=0,G=0,Zt=0,Qt=0,$t=Zt,en=Qt,nn=U,rn=G,an=0,on=0,sn=0,cn=0;r.bbox={};let ln=!1,un=!1,dn=!1,fn=!1,pn=!1,hn=!1;function gn(e,t,n){(n||e!=r.width||t!=r.height)&&_n(e,t),ri(!1),dn=!0,un=!0,ci()}function _n(e,t){r.width=Wt=U=e,r.height=Yt=G=t,Zt=Qt=0,bn(),Cn();let n=r.bbox;an=n.left=Pt(Zt*j,.5),on=n.top=Pt(Qt*j,.5),sn=n.width=Pt(U*j,.5),cn=n.height=Pt(G*j,.5)}function vn(){let e=!1,t=0;for(;!e;){t++;let n=ei(t),i=ti(t);e=t==3||n&&i,e||(_n(r.width,r.height),un=!0)}}function yn({width:e,height:t}){gn(e,t)}r.setSize=yn;function bn(){let e=!1,t=!1,n=!1,r=!1;y.forEach((i,a)=>{if(i.show&&i._show){let{side:a,_size:o}=i,s=a%2,c=o+(i.label==null?0:i.labelSize);c>0&&(s?(U-=c,a==3?(Zt+=c,r=!0):n=!0):(G-=c,a==0?(Qt+=c,e=!0):t=!0))}}),Jn[0]=e,Jn[1]=n,Jn[2]=t,Jn[3]=r,U-=Qn[1]+Qn[3],Zt+=Qn[3],G-=Qn[2]+Qn[0],Qt+=Qn[0]}function Cn(){let e=Zt+U,t=Qt+G,n=Zt,r=Qt;function i(i,a){switch(i){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}y.forEach((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=i(t,e._size),e.label!=null&&(e._lpos=i(t,e.labelSize))}})}if(F.dataIdx==null){let e=F.hover,n=e.skip=new Set(e.skip??[]);n.add(void 0);let r=e.prox=V(e.prox),i=e.bias??=0;F.dataIdx=(e,a,o,s)=>{if(a==0)return o;let c=o,l=r(e,a,o,s)??B,u=l>=0&&l<B,d=A.ori==0?U:G,f=F.left,p=t[0],m=t[a];if(n.has(m[o])){c=null;let e=null,t=null,r;if(i==0||i==-1)for(r=o;e==null&&r-- >0;)n.has(m[r])||(e=r);if(i==0||i==1)for(r=o;t==null&&r++<m.length;)n.has(m[r])||(t=r);if(e!=null||t!=null)if(u){let n=e==null?-1/0:Fe(p[e],A,d,0),r=t==null?1/0:Fe(p[t],A,d,0),i=f-n,a=r-f;i<=a?i<=l&&(c=e):a<=l&&(c=t)}else c=t==null?e:e==null?t:o-e<=t-o?e:t}else u&&R(f-Fe(p[o],A,d,0))>l&&(c=null);return c}}let wn=e=>{F.event=e};F.idxs=Qe,F._lock=!1;let Tn=F.points;Tn.show=V(Tn.show),Tn.size=V(Tn.size),Tn.stroke=V(Tn.stroke),Tn.width=V(Tn.width),Tn.fill=V(Tn.fill);let En=r.focus=W({},e.focus||{alpha:.3},F.focus),Dn=En.prox>=0,On=Dn&&Tn.one,kn=[],An=[],K=[];function jn(e,t){let n=Tn.show(r,t);if(n instanceof HTMLElement)return Le(n,oe),Le(n,e.class),Ve(n,-10,-10,U,G),m.insertBefore(n,kn[t]),n}function Vn(e,t){if(i==1||t>0){let t=i==1&&b[e.scale].time,n=e.value;e.value=t?Kt(n)?Wn(He,Hn(n,We)):n||Ze:n||Cr,e.label=e.label||(t?ur:lr)}if(On||t>0){e.width=e.width==null?1:e.width,e.paths=e.paths||gi||kt,e.fillTo=V(e.fillTo||Br),e.pxAlign=+I(e.pxAlign,h),e.pxRound=Gr(e.pxAlign),e.stroke=V(e.stroke||null),e.fill=V(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=Tr(gt(1,e.width),1),n=e.points=W({},{size:t,width:gt(1,t*.2),stroke:e.stroke,space:t*2,paths:_i,_stroke:null,_fill:null},e.points);n.show=V(n.show),n.filter=V(n.filter),n.fill=V(n.fill),n.stroke=V(n.stroke),n.paths=V(n.paths),n.pxAlign=e.pxAlign}if($e){let n=Nt(e,t);L.splice(t,0,n[0]),pt.splice(t,0,n[1]),P.values.push(null)}if(at){Qe.splice(t,0,null);let n=null;On?t==0&&(n=jn(e,t)):t>0&&(n=jn(e,t)),kn.splice(t,0,n),An.splice(t,0,0),K.splice(t,0,0)}Oa(`addSeries`,t)}function Gn(e,t){t??=v.length,e=i==1?bi(e,t,dr,Ar):bi(e,t,{},kr),v.splice(t,0,e),Vn(v[t],t)}r.addSeries=Gn;function Kn(e){if(v.splice(e,1),$e){P.values.splice(e,1),pt.splice(e,1);let t=L.splice(e,1)[0];zt(null,t.firstChild),t.remove()}at&&(Qe.splice(e,1),kn.splice(e,1)[0].remove(),An.splice(e,1),K.splice(e,1)),Oa(`delSeries`,e)}r.delSeries=Kn;let Jn=[!1,!1,!1,!1];function Yn(e,t){if(e._show=e.show,e.show){let n=e.side%2,i=b[e.scale];i??=(e.scale=n?v[1].scale:S,b[e.scale]);let a=i.time;e.size=V(e.size),e.space=V(e.space),e.rotate=V(e.rotate),Ut(e.incrs)&&e.incrs.forEach(e=>{!Lt.has(e)&&Lt.set(e,Rt(e))}),e.incrs=V(e.incrs||(i.distr==2?xn:a?_==1?Mn:Fn:Sn)),e.splits=V(e.splits||(a&&i.distr==1?Ke:i.distr==3?mr:i.distr==4?hr:pr)),e.stroke=V(e.stroke),e.grid.stroke=V(e.grid.stroke),e.ticks.stroke=V(e.ticks.stroke),e.border.stroke=V(e.border.stroke);let o=e.values;e.values=Ut(o)&&!Ut(o[0])?V(o):a?Ut(o)?zn(He,Rn(o,We)):Kt(o)?Bn(He,o):o||qe:o||fr,e.filter=V(e.filter||(i.distr>=3&&i.log==10?xr:i.distr==3&&i.log==2?Sr:Ot)),e.font=ki(e.font),e.labelFont=ki(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Jn[t]=!0,e._el=Be(te,f))}}function Xn(e,t,n,r){let[i,a,o,s]=n,c=t%2,l=0;return c==0&&(s||a)&&(l=t==0&&!i||t==2&&!o?z(cr.size/3):0),c==1&&(i||o)&&(l=t==1&&!a||t==3&&!s?z(wr.size/2):0),l}let Zn=r.padding=(e.padding||[Xn,Xn,Xn,Xn]).map(e=>V(I(e,Xn))),Qn=r._padding=Zn.map((e,t)=>e(r,t,Jn,0)),$n,q=null,J=null,tr=i==1?v[0].idxs:null,nr=null,rr=!1;function ir(e,n){if(t=e??[],r.data=r._data=t,i==2){$n=0;for(let e=1;e<v.length;e++)$n+=t[e][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),nr=t[0],$n=nr.length;let e=t;if(Pe==2){e=t.slice();let n=e[0]=Array($n);for(let e=0;e<$n;e++)n[e]=e}r._data=t=e}if(ri(!0),Oa(`setData`),Pe==2&&(dn=!0),n!==!1){let e=A;e.auto(r,rr)?ar():Wi(S,e.min,e.max),fn||=F.left>=0,hn=!0,ci()}}r.setData=ir;function ar(){rr=!0;let e,n;i==1&&($n>0?(q=tr[0]=0,J=tr[1]=$n-1,e=t[0][q],n=t[0][J],Pe==2?(e=q,n=J):e==n&&(Pe==3?[e,n]=tt(e,e,A.log,!1):Pe==4?[e,n]=nt(e,e,A.log,!1):A.time?n=e+z(86400/_):[e,n]=st(e,n,rt,!0))):(q=tr[0]=e=null,J=tr[1]=n=null)),Wi(S,e,n)}let or,sr,gr,_r,vr,yr,br,Er,Dr,Or;function Pr(e,t,n,r,i,a){e??=be,n??=Vt,r??=`butt`,i??=be,a??=`round`,e!=or&&(d.strokeStyle=or=e),i!=sr&&(d.fillStyle=sr=i),t!=gr&&(d.lineWidth=gr=t),a!=vr&&(d.lineJoin=vr=a),r!=yr&&(d.lineCap=yr=r),n!=_r&&d.setLineDash(_r=n)}function Rr(e,t,n,r){t!=sr&&(d.fillStyle=sr=t),e!=br&&(d.font=br=e),n!=Er&&(d.textAlign=Er=n),r!=Dr&&(d.textBaseline=Dr=r)}function zr(e,t,n,i,a=0){if(i.length>0&&e.auto(r,rr)&&(t==null||t.min==null)){let t=I(q,0),r=I(J,i.length-1),o=n.min==null?et(i,t,r,a,e.distr==3):[n.min,n.max];e.min=ht(e.min,n.min=o[0]),e.max=gt(e.max,n.max=o[1])}}let Vr={min:null,max:null};function Hr(){for(let e in b){let t=b[e];N[e]==null&&(t.min==null||N[S]!=null&&t.auto(r,rr))&&(N[e]=Vr)}for(let e in b){let t=b[e];N[e]==null&&t.from!=null&&N[t.from]!=null&&(N[e]=Vr)}N[S]!=null&&ri(!0);let e={};for(let t in N){let n=N[t];if(n!=null){let a=e[t]=Xt(b[t],Jt);if(n.min!=null)W(a,n);else if(t!=S||i==2)if($n==0&&a.from==null){let e=a.range(r,null,null,t);a.min=e[0],a.max=e[1]}else a.min=B,a.max=-1/0}}if($n>0){v.forEach((n,a)=>{if(i==1){let i=n.scale,o=N[i];if(o==null)return;let s=e[i];if(a==0){let e=s.range(r,s.min,s.max,i);s.min=e[0],s.max=e[1],q=Xe(s.min,t[0]),J=Xe(s.max,t[0]),J-q>1&&(t[0][q]<s.min&&q++,t[0][J]>s.max&&J--),n.min=nr[q],n.max=nr[J]}else n.show&&n.auto&&zr(s,o,n,t[a],n.sorted);n.idxs[0]=q,n.idxs[1]=J}else if(a>0&&n.show&&n.auto){let[r,i]=n.facets,o=r.scale,s=i.scale,[c,l]=t[a],u=e[o],d=e[s];u!=null&&zr(u,N[o],r,c,r.sorted),d!=null&&zr(d,N[s],i,l,i.sorted),n.min=i.min,n.max=i.max}});for(let t in e){let n=e[t],i=N[t];if(n.from==null&&(i==null||i.min==null)){let e=n.range(r,n.min==B?null:n.min,n.max==-1/0?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(n.from!=null){let i=e[n.from];if(i.min==null)n.min=n.max=null;else{let e=n.range(r,i.min,i.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],i=b[t];if(i.min!=r.min||i.max!=r.max){i.min=r.min,i.max=r.max;let e=i.distr;i._min=e==3?yt(i.min):e==4?St(i.min,i.asinh):e==100?i.fwd(i.min):i.min,i._max=e==3?yt(i.max):e==4?St(i.max,i.asinh):e==100?i.fwd(i.max):i.max,n[t]=a=!0}}if(a){v.forEach((e,t)=>{i==2?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)});for(let e in n)dn=!0,Oa(`setScale`,e);at&&F.left>=0&&(fn=hn=!0)}for(let e in N)N[e]=null}function Ur(e){let t=wt(q-1,0,$n-1),n=wt(J+1,0,$n-1);for(;e[t]==null&&t>0;)t--;for(;e[n]==null&&n<$n-1;)n++;return[t,n]}function Wr(){if($n>0){let e=v.some(e=>e._focus)&&Or!=En.alpha;e&&(d.globalAlpha=Or=En.alpha),v.forEach((e,n)=>{if(n>0&&e.show&&(Kr(n,!1),Kr(n,!0),e._paths==null)){let a=Or;Or!=e.alpha&&(d.globalAlpha=Or=e.alpha);let o=i==2?[0,t[n][0].length-1]:Ur(t[n]);e._paths=e.paths(r,n,o[0],o[1]),Or!=a&&(d.globalAlpha=Or=a)}}),v.forEach((e,t)=>{if(t>0&&e.show){let n=Or;Or!=e.alpha&&(d.globalAlpha=Or=e.alpha),e._paths!=null&&qr(t,!1);{let n=e._paths==null?null:e._paths.gaps,i=e.points.show(r,t,q,J,n),a=e.points.filter(r,t,i,n);(i||a)&&(e.points._paths=e.points.paths(r,t,q,J,a),qr(t,!0))}Or!=n&&(d.globalAlpha=Or=n),Oa(`drawSeries`,t)}}),e&&(d.globalAlpha=Or=1)}}function Kr(e,t){let n=t?v[e].points:v[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function qr(e,t){let n=t?v[e].points:v[e],{stroke:r,fill:i,clip:a,flags:o,_stroke:s=n._stroke,_fill:c=n._fill,_width:l=n.width}=n._paths;l=H(l*j,3);let u=null,f=l%2/2;t&&c==null&&(c=l>0?`#fff`:s);let p=n.pxAlign==1&&f>0;if(p&&d.translate(f,f),!t){let e=an-l/2,t=on-l/2,n=sn+l,r=cn+l;u=new Path2D,u.rect(e,t,n,r)}t?Yr(s,l,n.dash,n.cap,c,r,i,o,a):Jr(e,s,l,n.dash,n.cap,c,r,i,o,u,a),p&&d.translate(-f,-f)}function Jr(e,n,i,a,o,s,c,l,u,d,f){let p=!1;u!=0&&x.forEach((m,h)=>{if(m.series[0]==e){let e=v[m.series[1]],g=t[m.series[1]],_=(e._paths||Bt).band;Ut(_)&&(_=m.dir==1?_[0]:_[1]);let y,b=null;e.show&&_&&ct(g,q,J)?(b=m.fill(r,h)||s,y=e._paths.clip):_=null,Yr(n,i,a,o,b,c,l,u,d,f,y,_),p=!0}}),p||Yr(n,i,a,o,s,c,l,u,d,f)}function Yr(e,t,n,r,i,a,o,s,c,l,u,f){Pr(e,t,n,r,i),(c||l||f)&&(d.save(),c&&d.clip(c),l&&d.clip(l)),f?(s&3)==3?(d.clip(f),u&&d.clip(u),Zr(i,o),Xr(e,a,t)):s&Lr?(Zr(i,o),d.clip(f),Xr(e,a,t)):s&Ir&&(d.save(),d.clip(f),u&&d.clip(u),Zr(i,o),d.restore(),Xr(e,a,t)):(Zr(i,o),Xr(e,a,t)),(c||l||f)&&d.restore()}function Xr(e,t,n){n>0&&(t instanceof Map?t.forEach((e,t)=>{d.strokeStyle=or=t,d.stroke(e)}):t!=null&&e&&d.stroke(t))}function Zr(e,t){t instanceof Map?t.forEach((e,t)=>{d.fillStyle=sr=t,d.fill(e)}):t!=null&&e&&d.fill(t)}function Qr(e,t,n,i){let a=y[e],o;if(i<=0)o=[0,0];else{let s=a._space=a.space(r,e,t,n,i);o=Oi(t,n,a._incrs=a.incrs(r,e,t,n,i,s),i,s)}return a._found=o}function $r(e,t,n,r,i,a,o,s,c,l){let u=o%2/2;h==1&&d.translate(u,u),Pr(s,o,c,l,s),d.beginPath();let f,p,m,g,_=i+(r==0||r==3?-a:a);n==0?(p=i,g=_):(f=i,m=_);for(let r=0;r<e.length;r++)t[r]!=null&&(n==0?f=m=e[r]:p=g=e[r],d.moveTo(f,p),d.lineTo(m,g));d.stroke(),h==1&&d.translate(-u,-u)}function ei(e){let t=!0;return y.forEach((n,i)=>{if(!n.show)return;let a=b[n.scale];if(a.min==null){n._show&&(t=!1,n._show=!1,ri(!1));return}else n._show||(t=!1,n._show=!0,ri(!1));let o=n.side,s=o%2,{min:c,max:l}=a,[u,d]=Qr(i,c,l,s==0?U:G);if(d==0)return;let f=a.distr==2,p=n._splits=n.splits(r,i,c,l,u,d,f),m=a.distr==2?p.map(e=>nr[e]):p,h=a.distr==2?nr[p[1]]-nr[p[0]]:u,g=n._values=n.values(r,n.filter(r,m,i,d,h),i,d,h);n._rotate=o==2?n.rotate(r,g,i,d):0;let _=n._size;n._size=mt(n.size(r,g,i,e)),_!=null&&n._size!=_&&(t=!1)}),t}function ti(e){let t=!0;return Zn.forEach((n,i)=>{let a=n(r,i,Jn,e);a!=Qn[i]&&(t=!1),Qn[i]=a}),t}function ni(){for(let e=0;e<y.length;e++){let t=y[e];if(!t.show||!t._show)continue;let n=t.side,i=n%2,a,o,c=t.stroke(r,e),l=n==0||n==3?-1:1,[u,f]=t._found;if(t.label!=null){let s=t.labelGap*l,p=z((t._lpos+s)*j);Rr(t.labelFont[0],c,`center`,n==2?he:ge),d.save(),i==1?(a=o=0,d.translate(p,z(on+cn/2)),d.rotate((n==3?-ft:ft)/2)):(a=z(an+sn/2),o=p);let m=Tt(t.label)?t.label(r,e,u,f):t.label;d.fillText(m,a,o),d.restore()}if(f==0)continue;let p=b[t.scale],m=i==0?sn:cn,h=i==0?an:on,_=t._splits,v=p.distr==2?_.map(e=>nr[e]):_,x=p.distr==2?nr[_[1]]-nr[_[0]]:u,S=t.ticks,C=t.border,w=S.show?S.size:0,T=z(w*j),E=z((t.alignTo==2?t._size-w-t.gap:t.gap)*j),D=t._rotate*-ft/180,O=g(t._pos*j),ee=O+(T+E)*l;o=i==0?ee:0,a=i==1?ee:0;let te=t.font[0];Rr(te,c,t.align==1?_e:t.align==2?ve:D>0?_e:D<0?ve:i==0?`center`:n==3?ve:_e,D||i==1?`middle`:n==2?he:ge);let ne=t.font[1]*t.lineGap,re=_.map(e=>g(s(e,p,m,h))),ie=t._values;for(let e=0;e<ie.length;e++){let t=ie[e];if(t!=null){i==0?a=re[e]:o=re[e],t=``+t;let n=t.indexOf(`
10
- `)==-1?[t]:t.split(/\n/gm);for(let e=0;e<n.length;e++){let t=n[e];D?(d.save(),d.translate(a,o+e*ne),d.rotate(D),d.fillText(t,0,0),d.restore()):d.fillText(t,a,o+e*ne)}}}S.show&&$r(re,S.filter(r,v,e,f,x),i,n,O,T,H(S.width*j,3),S.stroke(r,e),S.dash,S.cap);let ae=t.grid;ae.show&&$r(re,ae.filter(r,v,e,f,x),i,i==0?2:1,i==0?on:an,i==0?cn:sn,H(ae.width*j,3),ae.stroke(r,e),ae.dash,ae.cap),C.show&&$r([O],[1],+(i==0),i==0?1:2,i==1?on:an,i==1?cn:sn,H(C.width*j,3),C.stroke(r,e),C.dash,C.cap)}Oa(`drawAxes`)}function ri(e){v.forEach((t,n)=>{n>0&&(t._paths=null,e&&(i==1?(t.min=null,t.max=null):t.facets.forEach(e=>{e.min=null,e.max=null})))})}let ii=!1,ai=!1,oi=[];function si(){ai=!1;for(let e=0;e<oi.length;e++)Oa(...oi[e]);oi.length=0}function ci(){ii||=(tn(ui),!0)}function li(e,t=!1){ii=!0,ai=t,e(r),ui(),t&&oi.length>0&&queueMicrotask(si)}r.batch=li;function ui(){if(ln&&=(Hr(),!1),dn&&=(vn(),!1),un){if(M(p,_e,Zt),M(p,he,Qt),M(p,k,U),M(p,me,G),M(m,_e,Zt),M(m,he,Qt),M(m,k,U),M(m,me,G),M(f,k,Wt),M(f,me,Yt),u.width=z(Wt*j),u.height=z(Yt*j),y.forEach(({_el:e,_show:t,_size:n,_pos:r,side:i})=>{if(e!=null)if(t){let t=i===3||i===0?n:0,a=i%2==1;M(e,a?`left`:`top`,r-t),M(e,a?`width`:`height`,n),M(e,a?`top`:`left`,a?Qt:Zt),M(e,a?`height`:`width`,a?G:U),Re(e,ne)}else Le(e,ne)}),or=sr=gr=vr=yr=br=Er=Dr=_r=null,Or=1,fa(!0),Zt!=$t||Qt!=en||U!=nn||G!=rn){ri(!1);let e=U/nn,t=G/rn;if(at&&!fn&&F.left>=0){F.left*=e,F.top*=t,hi&&Ve(hi,z(F.left),0,U,G),Y&&Ve(Y,0,z(F.top),U,G);for(let n=0;n<kn.length;n++){let r=kn[n];r!=null&&(An[n]*=e,K[n]*=t,Ve(r,mt(An[n]),mt(K[n]),U,G))}}if(Q.show&&!pn&&Q.left>=0&&Q.width>0){Q.left*=e,Q.width*=e,Q.top*=t,Q.height*=t;for(let e in ha)M(Vi,e,Q[e])}$t=Zt,en=Qt,nn=U,rn=G}Oa(`setSize`),un=!1}Wt>0&&Yt>0&&(d.clearRect(0,0,u.width,u.height),Oa(`drawClear`),De.forEach(e=>e()),Oa(`draw`)),Q.show&&pn&&(Hi(Q),pn=!1),at&&fn&&(ua(null,!0,!1),fn=!1),P.show&&P.live&&hn&&(ca(),hn=!1),c||(c=!0,r.status=1,Oa(`ready`)),rr=!1,ii=!1}r.redraw=(e,t)=>{dn=t||!1,e===!1?ci():Wi(S,A.min,A.max)};function di(e,n){let i=b[e];if(i.from==null){if($n==0){let t=i.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if($n>1&&n.min!=null&&n.max!=null&&n.max-n.min<1e-16)return;e==S&&i.distr==2&&$n>0&&(n.min=Xe(n.min,t[0]),n.max=Xe(n.max,t[0]),n.min==n.max&&n.max++),N[e]=n,ln=!0,ci()}}r.setScale=di;let fi,pi,hi,Y,ji,Mi,Ni,Pi,Fi,Ii,X,Z,Li=!1,Ri=F.drag,zi=Ri.x,Bi=Ri.y;at&&(F.x&&(fi=Be(ie,m)),F.y&&(pi=Be(ae,m)),A.ori==0?(hi=fi,Y=pi):(hi=pi,Y=fi),X=F.left,Z=F.top);let Q=r.select=W({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Vi=Q.show?Be(re,Q.over?m:p):null;function Hi(e,t){if(Q.show){for(let t in e)Q[t]=e[t],t in ha&&M(Vi,t,e[t]);t!==!1&&Oa(`setSelect`)}}r.setSelect=Hi;function Ui(e){if(v[e].show)$e&&Re(L[e],ne);else if($e&&Le(L[e],ne),at){let t=On?kn[0]:kn[e];t!=null&&Ve(t,-10,-10,U,G)}}function Wi(e,t,n){di(e,{min:t,max:n})}function Gi(e,t,n,a){t.focus!=null&&ea(e),t.show!=null&&v.forEach((n,r)=>{r>0&&(e==r||e==null)&&(n.show=t.show,Ui(r),i==2?(Wi(n.facets[0].scale,null,null),Wi(n.facets[1].scale,null,null)):Wi(n.scale,null,null),ci())}),n!==!1&&Oa(`setSeries`,e,t),a&&Ma(`setSeries`,r,e,t)}r.setSeries=Gi;function Ki(e,t){W(x[e],t)}function qi(e,t){e.fill=V(e.fill||null),e.dir=I(e.dir,-1),t??=x.length,x.splice(t,0,e)}function Ji(e){e==null?x.length=0:x.splice(e,1)}r.addBand=qi,r.setBand=Ki,r.delBand=Ji;function Yi(e,t){v[e].alpha=t,at&&kn[e]!=null&&(kn[e].style.opacity=t),$e&&L[e]&&(L[e].style.opacity=t)}let Xi,Zi,Qi,$i={focus:!0};function ea(e){if(e!=Qi){let t=e==null,n=En.alpha!=1;v.forEach((r,a)=>{if(i==1||a>0){let i=t||a==0||a==e;r._focus=t?null:i,n&&Yi(a,i?1:En.alpha)}}),Qi=e,n&&ci()}}$e&&Dn&&It(Te,lt,e=>{F._lock||(wn(e),Qi!=null&&Gi(null,$i,!0,$.setSeries))});function ta(e,t,n){let r=b[t];n&&(e=e/j-(r.ori==1?Qt:Zt));let i=U;r.ori==1&&(i=G,e=i-e),r.dir==-1&&(e=i-e);let a=r._min,o=r._max,s=e/i,c=a+(o-a)*s,l=r.distr;return l==3?_t(10,c):l==4?xt(c,r.asinh):l==100?r.bwd(c):c}function na(e,n){return Xe(ta(e,S,n),t[0],q,J)}r.valToIdx=e=>Xe(e,t[0]),r.posToIdx=na,r.posToVal=ta,r.valToPos=(e,t,n)=>b[t].ori==0?a(e,b[t],n?sn:U,n?an:0):o(e,b[t],n?cn:G,n?on:0),r.setCursor=(e,t,n)=>{X=e.left,Z=e.top,ua(null,t,n)};function ra(e,t){M(Vi,_e,Q.left=e),M(Vi,k,Q.width=t)}function ia(e,t){M(Vi,he,Q.top=e),M(Vi,me,Q.height=t)}let aa=A.ori==0?ra:ia,oa=A.ori==1?ra:ia;function sa(){if($e&&P.live)for(let e=+(i==2);e<v.length;e++){if(e==0&&bt)continue;let t=P.values[e],n=0;for(let r in t)pt[e][n++].firstChild.nodeValue=t[r]}}function ca(e,t){if(e!=null&&(e.idxs?e.idxs.forEach((e,t)=>{Qe[t]=e}):Gt(e.idx)||Qe.fill(e.idx),P.idx=Qe[0]),$e&&P.live){for(let e=0;e<v.length;e++)(e>0||i==1&&!bt)&&la(e,Qe[e]);sa()}hn=!1,t!==!1&&Oa(`setLegend`)}r.setLegend=ca;function la(e,n){let i=v[e],a=e==0&&Pe==2?nr:t[e],o;bt?o=i.values(r,e,n)??Ct:(o=i.value(r,n==null?null:a[n],e,n),o=o==null?Ct:{_:o}),P.values[e]=o}function ua(e,n,a){Fi=X,Ii=Z,[X,Z]=F.move(r,X,Z),F.left=X,F.top=Z,at&&(hi&&Ve(hi,z(X),0,U,G),Y&&Ve(Y,0,z(Z),U,G));let o,s=q>J;Xi=B,Zi=null;let c=A.ori==0?U:G,l=A.ori==1?U:G;if(X<0||$n==0||s){o=F.idx=null;for(let e=0;e<v.length;e++){let t=kn[e];t!=null&&Ve(t,-10,-10,U,G)}Dn&&Gi(null,$i,!0,e==null&&$.setSeries),P.live&&(Qe.fill(o),hn=!0)}else{let e,n,a;i==1&&(e=A.ori==0?X:Z,n=ta(e,S),o=F.idx=Xe(n,t[0],q,J),a=Fe(t[0][o],A,c,0));let s=-10,u=-10,d=0,f=0,p=!0,m=``,h=``;for(let e=+(i==2);e<v.length;e++){let g=v[e],_=Qe[e],y=_==null?null:i==1?t[e][_]:t[e][1][_],x=F.dataIdx(r,e,o,n),S=x==null?null:i==1?t[e][x]:t[e][1][x];if(hn=hn||S!=y||x!=_,Qe[e]=x,e>0&&g.show){let n=x==null?-10:x==o?a:Fe(i==1?t[0][x]:t[e][0][x],A,c,0),_=S==null?-10:Ie(S,i==1?b[g.scale]:b[g.facets[1].scale],l,0);if(Dn&&S!=null){let t=A.ori==1?X:Z,n=R(En.dist(r,e,x,_,t));if(n<Xi){let r=En.bias;if(r!=0){let i=ta(t,g.scale),a=S>=0?1:-1,o=i>=0?1:-1;o==a&&(o==1?r==1?S>=i:S<=i:r==1?S<=i:S>=i)&&(Xi=n,Zi=e)}else Xi=n,Zi=e}}if(hn||On){let t,i;A.ori==0?(t=n,i=_):(t=_,i=n);let a,o,c,l,g,v,y=!0,b=Tn.bbox;if(b!=null){y=!1;let t=b(r,e);c=t.left,l=t.top,a=t.width,o=t.height}else c=t,l=i,a=o=Tn.size(r,e);if(v=Tn.fill(r,e),g=Tn.stroke(r,e),On)e==Zi&&Xi<=En.prox&&(s=c,u=l,d=a,f=o,p=y,m=v,h=g);else{let t=kn[e];t!=null&&(An[e]=c,K[e]=l,Ge(t,a,o,y),Ue(t,v,g),Ve(t,mt(c),mt(l),U,G))}}}}if(On){let e=En.prox;if(hn||(Qi==null?Xi<=e:Xi>e||Zi!=Qi)){let e=kn[0];e!=null&&(An[0]=s,K[0]=u,Ge(e,d,f,p),Ue(e,m,h),Ve(e,mt(s),mt(u),U,G))}}}if(Q.show&&Li)if(e!=null){let[t,n]=$.scales,[r,i]=$.match,[a,o]=e.cursor.sync.scales,s=e.cursor.drag;if(zi=s._x,Bi=s._y,zi||Bi){let{left:s,top:u,width:d,height:f}=e.select,p=e.scales[a].ori,m=e.posToVal,h,g,_,v,y,x=t!=null&&r(t,a),S=n!=null&&i(n,o);x&&zi?(p==0?(h=s,g=d):(h=u,g=f),_=b[t],v=Fe(m(h,a),_,c,0),y=Fe(m(h+g,a),_,c,0),aa(ht(v,y),R(y-v))):aa(0,c),S&&Bi?(p==1?(h=s,g=d):(h=u,g=f),_=b[n],v=Ie(m(h,o),_,l,0),y=Ie(m(h+g,o),_,l,0),oa(ht(v,y),R(y-v))):oa(0,l)}else ga()}else{let e=R(Fi-ji),t=R(Ii-Mi);if(A.ori==1){let n=e;e=t,t=n}zi=Ri.x&&e>=Ri.dist,Bi=Ri.y&&t>=Ri.dist;let n=Ri.uni;n==null?Ri.x&&Ri.y&&(zi||Bi)&&(zi=Bi=!0):zi&&Bi&&(zi=e>=n,Bi=t>=n,!zi&&!Bi&&(t>e?Bi=!0:zi=!0));let r,i;zi&&(A.ori==0?(r=Ni,i=X):(r=Pi,i=Z),aa(ht(r,i),R(i-r)),Bi||oa(0,l)),Bi&&(A.ori==1?(r=Ni,i=X):(r=Pi,i=Z),oa(ht(r,i),R(i-r)),zi||aa(0,c)),!zi&&!Bi&&(aa(0,0),oa(0,0))}if(Ri._x=zi,Ri._y=Bi,e==null){if(a){if(Aa!=null){let[e,t]=$.scales;$.values[0]=e==null?null:ta(A.ori==0?X:Z,e),$.values[1]=t==null?null:ta(A.ori==1?X:Z,t)}Ma(xe,r,X,Z,U,G,o)}if(Dn){let e=a&&$.setSeries,t=En.prox;Qi==null?Xi<=t&&Gi(Zi,$i,!0,e):Xi>t?Gi(null,$i,!0,e):Zi!=Qi&&Gi(Zi,$i,!0,e)}}hn&&(P.idx=o,ca()),n!==!1&&Oa(`setCursor`)}let da=null;Object.defineProperty(r,"rect",{get(){return da??fa(!1),da}});function fa(e=!1){e?da=null:(da=m.getBoundingClientRect(),Oa(`syncRect`,da))}function pa(e,t,n,r,i,a,o){F._lock||Li&&e!=null&&e.movementX==0&&e.movementY==0||(ma(e,t,n,r,i,a,o,!1,e!=null),e==null?ua(t,!0,!1):ua(null,!0,!0))}function ma(e,t,n,i,a,o,c,l,u){if(da??fa(!1),wn(e),e!=null)n=e.clientX-da.left,i=e.clientY-da.top;else{if(n<0||i<0){X=-10,Z=-10;return}let[e,r]=$.scales,c=t.cursor.sync,[l,u]=c.values,[d,f]=c.scales,[p,m]=$.match,h=t.axes[0].side%2==1,g=A.ori==0?U:G,_=A.ori==1?U:G,v=h?o:a,y=h?a:o,x=h?i:n,S=h?n:i;if(n=d==null?x/v*g:p(e,d)?s(l,b[e],g,0):-10,i=f==null?S/y*_:m(r,f)?s(u,b[r],_,0):-10,A.ori==1){let e=n;n=i,i=e}}u&&(t==null||t.cursor.event.type==xe)&&((n<=1||n>=U-1)&&(n=Pt(n,U)),(i<=1||i>=G-1)&&(i=Pt(i,G))),l?(ji=n,Mi=i,[Ni,Pi]=F.move(r,n,i)):(X=n,Z=i)}let ha={width:0,height:0,left:0,top:0};function ga(){Hi(ha,!1)}let _a,va,ya,ba;function xa(e,t,n,i,a,o,s){Li=!0,zi=Bi=Ri._x=Ri._y=!1,ma(e,t,n,i,a,o,s,!0,!1),e!=null&&(It(Ce,Me,Sa,!1),Ma(Se,r,Ni,Pi,U,G,null));let{left:c,top:l,width:u,height:d}=Q;_a=c,va=l,ya=u,ba=d}function Sa(e,t,n,i,a,o,s){Li=Ri._x=Ri._y=!1,ma(e,t,n,i,a,o,s,!1,!0);let{left:c,top:l,width:u,height:d}=Q,f=u>0||d>0,p=_a!=c||va!=l||ya!=u||ba!=d;if(f&&p&&Hi(Q),Ri.setScale&&f&&p){let e=c,t=u,n=l,r=d;if(A.ori==1&&(e=l,t=d,n=c,r=u),zi&&Wi(S,ta(e,S),ta(e+t,S)),Bi)for(let e in b){let t=b[e];e!=S&&t.from==null&&t.min!=B&&Wi(e,ta(n+r,e),ta(n,e))}ga()}else F.lock&&(F._lock=!F._lock,ua(t,!0,e!=null));e!=null&&(zt(Ce,Me),Ma(Ce,r,X,Z,U,G,null))}function Ca(e,t,n,r,i,a,o){if(F._lock)return;wn(e);let s=Li;if(Li){let e=!0,t=!0,n,r;A.ori==0?(n=zi,r=Bi):(n=Bi,r=zi),n&&r&&(e=X<=10||X>=U-10,t=Z<=10||Z>=G-10),n&&e&&(X=X<Ni?0:U),r&&t&&(Z=Z<Pi?0:G),ua(null,!0,!0),Li=!1}X=-10,Z=-10,Qe.fill(null),ua(null,!0,!0),s&&(Li=s)}function wa(e,t,n,i,a,o,s){F._lock||(wn(e),ar(),ga(),e!=null&&Ma(Ee,r,X,Z,U,G,null))}function Ta(){y.forEach(Ai),gn(r.width,r.height,!0)}Je(Ae,Ne,Ta);let Ea={};Ea.mousedown=xa,Ea.mousemove=pa,Ea.mouseup=Sa,Ea.dblclick=wa,Ea.setSeries=(e,t,n,i)=>{let a=$.match[2];n=a(r,t,n),n!=-1&&Gi(n,i,!0,!1)},at&&(It(Se,m,xa),It(xe,m,pa),It(we,m,e=>{wn(e),fa(!1)}),It(Te,m,Ca),It(Ee,m,wa),mi.add(r),r.syncRect=fa);let Da=r.hooks=e.hooks||{};function Oa(e,t,n){ai?oi.push([e,t,n]):e in Da&&Da[e].forEach(e=>{e.call(null,r,t,n)})}(e.plugins||[]).forEach(e=>{for(let t in e.hooks)Da[t]=(Da[t]||[]).concat(e.hooks[t])});let ka=(e,t,n)=>n,$=W({key:null,setSeries:!1,filters:{pub:At,sub:At},scales:[S,v[1]?v[1].scale:null],match:[jt,jt,ka],values:[null,null]},F.sync);$.match.length==2&&$.match.push(ka),F.sync=$;let Aa=$.key,ja=Fr(Aa);function Ma(e,t,n,r,i,a,o){$.filters.pub(e,t,n,r,i,a,o)&&ja.pub(e,t,n,r,i,a,o)}ja.sub(r);function Na(e,t,n,r,i,a,o){$.filters.sub(e,t,n,r,i,a,o)&&Ea[e](null,t,n,r,i,a,o)}r.pub=Na;function Pa(){ja.unsub(r),mi.delete(r),Ft.clear(),Ye(Ae,Ne,Ta),l.remove(),lt?.remove(),Oa(`destroy`)}r.destroy=Pa;function Fa(){Oa(`init`,e,t),ir(t||e.data,!1),N[S]?di(S,N[S]):ar(),pn=Q.show&&(Q.width>0||Q.height>0),fn=hn=!0,gn(e.width,e.height)}return v.forEach(Vn),y.forEach(Yn),n?n instanceof HTMLElement?(n.appendChild(l),Fa()):n(r,Fa):Fa(),r}Y.assign=W,Y.fmtNum=dt,Y.rangeNum=st,Y.rangeLog=tt,Y.rangeAsinh=nt,Y.orient=Rr,Y.pxRatio=j,Y.join=en,Y.fmtDate=mn,Y.tzDate=gn,Y.sync=Fr;{Y.addGap=Ur,Y.clipGaps=Hr;let e=Y.paths={points:ri};e.linear=si,e.stepped=ci,e.bars=ui,e.spline=fi}var ji=s(`<div class="empty">No burndown data (sprint not started or no start/end date)</div>`),Mi=s(`<tr><td> </td><td> </td><td> </td></tr>`),Ni=s(`<div class="burn-card"><header class="burn-header"><h2> </h2> <div class="meta"><span class="on-track-badge"> </span> <span> </span></div></header> <div class="burn-legend"><span class="k"><i style="background: var(--fg-faint)"></i> Idéal</span> <span class="k"><i style="background: var(--accent)"></i> Réel</span></div> <div class="chart-wrapper svelte-n2xgw7" role="img" aria-describedby="burndown-data-table"></div> <table class="sr-only" id="burndown-data-table" aria-label="Données du burndown"><caption>Burndown — idéal vs réel</caption><thead><tr><th scope="col">Date</th><th scope="col">Points idéal</th><th scope="col">Points réel</th></tr></thead><tbody></tbody></table></div>`),Pi=s(`<div class="view-pad"><div class="burn-wrap"><!></div></div>`);function Fi(s,S){p(S,!0);let C=m(()=>x(v.burndown?.ideal??[],v.burndown?.actual??[])),w=i(null),T=null,E=m(()=>v.burndown?.ideal?.length>0),D=m(()=>v.burndown?.on_track===`on-track`?`var(--success)`:v.burndown?.on_track===`at-risk`?`var(--warning)`:v.burndown?.on_track===`behind`?`var(--danger)`:`var(--fg-dim)`);a(()=>{if(!c(w)||!c(E)){T&&=(T.destroy(),null);return}let e=getComputedStyle(c(w)),t=(t,n)=>e.getPropertyValue(t).trim()||n,n=t(`--fg-faint`,`#888`),r=t(`--accent`,`#bdf03d`),i=t(`--border-faint`,`#333`),a=v.burndown.ideal.map(e=>({ts:Math.floor(Date.parse(e.date)/1e3),pts:e.points})),o=v.burndown.actual.map(e=>({ts:Math.floor(Date.parse(e.date)/1e3),pts:e.points})),s=new Set([...a.map(e=>e.ts),...o.map(e=>e.ts)]),l=Array.from(s).sort((e,t)=>e-t),u=[l,l.map(e=>a.find(t=>t.ts===e)?.pts??null),l.map(e=>o.find(t=>t.ts===e)?.pts??null)],d={width:c(w).clientWidth||800,height:320,scales:{x:{time:!0}},axes:[{stroke:n,grid:{stroke:i},ticks:{stroke:i},values:(e,t)=>t.map(e=>{let t=new Date(e*1e3);return`${String(t.getDate()).padStart(2,`0`)}/${String(t.getMonth()+1).padStart(2,`0`)}`})},{stroke:n,grid:{stroke:i},ticks:{stroke:i}}],series:[{label:`Date`},{label:`Ideal`,stroke:n,width:1.5,dash:[5,5],points:{show:!1}},{label:`Actual`,stroke:r,width:3,points:{show:!0,size:6,fill:r,stroke:r}}],legend:{show:!0}};T&&T.destroy(),T=new Y(d,u,c(w));let f=new ResizeObserver(()=>{T&&c(w)&&T.setSize({width:c(w).clientWidth,height:320})});return f.observe(c(w)),()=>{f.disconnect(),T&&=(T.destroy(),null)}});var O=Pi(),ee=t(O),te=t(ee),ne=e=>{f(e,ji())},re=e=>{var i=Ni(),a=t(i),s=t(a),p=t(s,!0);r(s);var m=o(s,2),_=t(m),x=t(_,!0);r(_);var S=o(_,2),T=t(S);r(S),r(m),r(a);var E=o(a,4);g(E,e=>n(w,e),()=>c(w));var O=o(E,2),ee=o(t(O),2);u(ee,21,()=>c(C),d,(e,n)=>{var i=Mi(),a=t(i),s=t(a,!0);r(a);var l=o(a),u=t(l,!0);r(l);var d=o(l),p=t(d,!0);r(d),r(i),b(()=>{h(s,c(n).date),h(u,c(n).ideal??`—`),h(p,c(n).actual??`—`)}),f(e,i)}),r(ee),r(O),r(i),b(()=>{h(p,v.sprint?.name||`Current Sprint`),l(_,`background: color-mix(in oklch, ${c(D)??``} 16%, transparent); color: ${c(D)??``}`),h(x,v.burndown.on_track||`unknown`),h(T,`${v.burndown.total_points??``}p total`),y(E,`aria-label`,`Graphique de burndown du sprint ${(v.sprint?.name||`courant`)??``} : idéal vs réel`)}),f(e,i)};_(te,e=>{!v.burndown||!c(E)?e(ne):e(re,-1)}),r(ee),r(O),f(s,O),e()}export{Fi as default};
10
+ `)==-1?[t]:t.split(/\n/gm);for(let e=0;e<n.length;e++){let t=n[e];D?(d.save(),d.translate(a,o+e*ne),d.rotate(D),d.fillText(t,0,0),d.restore()):d.fillText(t,a,o+e*ne)}}}S.show&&$r(re,S.filter(r,v,e,f,x),i,n,O,T,H(S.width*j,3),S.stroke(r,e),S.dash,S.cap);let ae=t.grid;ae.show&&$r(re,ae.filter(r,v,e,f,x),i,i==0?2:1,i==0?on:an,i==0?cn:sn,H(ae.width*j,3),ae.stroke(r,e),ae.dash,ae.cap),C.show&&$r([O],[1],+(i==0),i==0?1:2,i==1?on:an,i==1?cn:sn,H(C.width*j,3),C.stroke(r,e),C.dash,C.cap)}Oa(`drawAxes`)}function ri(e){v.forEach((t,n)=>{n>0&&(t._paths=null,e&&(i==1?(t.min=null,t.max=null):t.facets.forEach(e=>{e.min=null,e.max=null})))})}let ii=!1,ai=!1,oi=[];function si(){ai=!1;for(let e=0;e<oi.length;e++)Oa(...oi[e]);oi.length=0}function ci(){ii||=(tn(ui),!0)}function li(e,t=!1){ii=!0,ai=t,e(r),ui(),t&&oi.length>0&&queueMicrotask(si)}r.batch=li;function ui(){if(ln&&=(Hr(),!1),dn&&=(vn(),!1),un){if(M(p,_e,Zt),M(p,he,Qt),M(p,k,U),M(p,me,G),M(m,_e,Zt),M(m,he,Qt),M(m,k,U),M(m,me,G),M(f,k,Wt),M(f,me,Yt),u.width=z(Wt*j),u.height=z(Yt*j),y.forEach(({_el:e,_show:t,_size:n,_pos:r,side:i})=>{if(e!=null)if(t){let t=i===3||i===0?n:0,a=i%2==1;M(e,a?`left`:`top`,r-t),M(e,a?`width`:`height`,n),M(e,a?`top`:`left`,a?Qt:Zt),M(e,a?`height`:`width`,a?G:U),Re(e,ne)}else Le(e,ne)}),or=sr=gr=vr=yr=br=Er=Dr=_r=null,Or=1,fa(!0),Zt!=$t||Qt!=en||U!=nn||G!=rn){ri(!1);let e=U/nn,t=G/rn;if(at&&!fn&&F.left>=0){F.left*=e,F.top*=t,hi&&Ve(hi,z(F.left),0,U,G),Y&&Ve(Y,0,z(F.top),U,G);for(let n=0;n<kn.length;n++){let r=kn[n];r!=null&&(An[n]*=e,K[n]*=t,Ve(r,mt(An[n]),mt(K[n]),U,G))}}if(Q.show&&!pn&&Q.left>=0&&Q.width>0){Q.left*=e,Q.width*=e,Q.top*=t,Q.height*=t;for(let e in ha)M(Vi,e,Q[e])}$t=Zt,en=Qt,nn=U,rn=G}Oa(`setSize`),un=!1}Wt>0&&Yt>0&&(d.clearRect(0,0,u.width,u.height),Oa(`drawClear`),De.forEach(e=>e()),Oa(`draw`)),Q.show&&pn&&(Hi(Q),pn=!1),at&&fn&&(ua(null,!0,!1),fn=!1),P.show&&P.live&&hn&&(ca(),hn=!1),c||(c=!0,r.status=1,Oa(`ready`)),rr=!1,ii=!1}r.redraw=(e,t)=>{dn=t||!1,e===!1?ci():Wi(S,A.min,A.max)};function di(e,n){let i=b[e];if(i.from==null){if($n==0){let t=i.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if($n>1&&n.min!=null&&n.max!=null&&n.max-n.min<1e-16)return;e==S&&i.distr==2&&$n>0&&(n.min=Xe(n.min,t[0]),n.max=Xe(n.max,t[0]),n.min==n.max&&n.max++),N[e]=n,ln=!0,ci()}}r.setScale=di;let fi,pi,hi,Y,ji,Mi,Ni,Pi,Fi,Ii,X,Z,Li=!1,Ri=F.drag,zi=Ri.x,Bi=Ri.y;at&&(F.x&&(fi=Be(ie,m)),F.y&&(pi=Be(ae,m)),A.ori==0?(hi=fi,Y=pi):(hi=pi,Y=fi),X=F.left,Z=F.top);let Q=r.select=W({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Vi=Q.show?Be(re,Q.over?m:p):null;function Hi(e,t){if(Q.show){for(let t in e)Q[t]=e[t],t in ha&&M(Vi,t,e[t]);t!==!1&&Oa(`setSelect`)}}r.setSelect=Hi;function Ui(e){if(v[e].show)$e&&Re(L[e],ne);else if($e&&Le(L[e],ne),at){let t=On?kn[0]:kn[e];t!=null&&Ve(t,-10,-10,U,G)}}function Wi(e,t,n){di(e,{min:t,max:n})}function Gi(e,t,n,a){t.focus!=null&&ea(e),t.show!=null&&v.forEach((n,r)=>{r>0&&(e==r||e==null)&&(n.show=t.show,Ui(r),i==2?(Wi(n.facets[0].scale,null,null),Wi(n.facets[1].scale,null,null)):Wi(n.scale,null,null),ci())}),n!==!1&&Oa(`setSeries`,e,t),a&&Ma(`setSeries`,r,e,t)}r.setSeries=Gi;function Ki(e,t){W(x[e],t)}function qi(e,t){e.fill=V(e.fill||null),e.dir=I(e.dir,-1),t??=x.length,x.splice(t,0,e)}function Ji(e){e==null?x.length=0:x.splice(e,1)}r.addBand=qi,r.setBand=Ki,r.delBand=Ji;function Yi(e,t){v[e].alpha=t,at&&kn[e]!=null&&(kn[e].style.opacity=t),$e&&L[e]&&(L[e].style.opacity=t)}let Xi,Zi,Qi,$i={focus:!0};function ea(e){if(e!=Qi){let t=e==null,n=En.alpha!=1;v.forEach((r,a)=>{if(i==1||a>0){let i=t||a==0||a==e;r._focus=t?null:i,n&&Yi(a,i?1:En.alpha)}}),Qi=e,n&&ci()}}$e&&Dn&&It(Te,lt,e=>{F._lock||(wn(e),Qi!=null&&Gi(null,$i,!0,$.setSeries))});function ta(e,t,n){let r=b[t];n&&(e=e/j-(r.ori==1?Qt:Zt));let i=U;r.ori==1&&(i=G,e=i-e),r.dir==-1&&(e=i-e);let a=r._min,o=r._max,s=e/i,c=a+(o-a)*s,l=r.distr;return l==3?_t(10,c):l==4?xt(c,r.asinh):l==100?r.bwd(c):c}function na(e,n){return Xe(ta(e,S,n),t[0],q,J)}r.valToIdx=e=>Xe(e,t[0]),r.posToIdx=na,r.posToVal=ta,r.valToPos=(e,t,n)=>b[t].ori==0?a(e,b[t],n?sn:U,n?an:0):o(e,b[t],n?cn:G,n?on:0),r.setCursor=(e,t,n)=>{X=e.left,Z=e.top,ua(null,t,n)};function ra(e,t){M(Vi,_e,Q.left=e),M(Vi,k,Q.width=t)}function ia(e,t){M(Vi,he,Q.top=e),M(Vi,me,Q.height=t)}let aa=A.ori==0?ra:ia,oa=A.ori==1?ra:ia;function sa(){if($e&&P.live)for(let e=+(i==2);e<v.length;e++){if(e==0&&bt)continue;let t=P.values[e],n=0;for(let r in t)pt[e][n++].firstChild.nodeValue=t[r]}}function ca(e,t){if(e!=null&&(e.idxs?e.idxs.forEach((e,t)=>{Qe[t]=e}):Gt(e.idx)||Qe.fill(e.idx),P.idx=Qe[0]),$e&&P.live){for(let e=0;e<v.length;e++)(e>0||i==1&&!bt)&&la(e,Qe[e]);sa()}hn=!1,t!==!1&&Oa(`setLegend`)}r.setLegend=ca;function la(e,n){let i=v[e],a=e==0&&Pe==2?nr:t[e],o;bt?o=i.values(r,e,n)??Ct:(o=i.value(r,n==null?null:a[n],e,n),o=o==null?Ct:{_:o}),P.values[e]=o}function ua(e,n,a){Fi=X,Ii=Z,[X,Z]=F.move(r,X,Z),F.left=X,F.top=Z,at&&(hi&&Ve(hi,z(X),0,U,G),Y&&Ve(Y,0,z(Z),U,G));let o,s=q>J;Xi=B,Zi=null;let c=A.ori==0?U:G,l=A.ori==1?U:G;if(X<0||$n==0||s){o=F.idx=null;for(let e=0;e<v.length;e++){let t=kn[e];t!=null&&Ve(t,-10,-10,U,G)}Dn&&Gi(null,$i,!0,e==null&&$.setSeries),P.live&&(Qe.fill(o),hn=!0)}else{let e,n,a;i==1&&(e=A.ori==0?X:Z,n=ta(e,S),o=F.idx=Xe(n,t[0],q,J),a=Fe(t[0][o],A,c,0));let s=-10,u=-10,d=0,f=0,p=!0,m=``,h=``;for(let e=+(i==2);e<v.length;e++){let g=v[e],_=Qe[e],y=_==null?null:i==1?t[e][_]:t[e][1][_],x=F.dataIdx(r,e,o,n),S=x==null?null:i==1?t[e][x]:t[e][1][x];if(hn=hn||S!=y||x!=_,Qe[e]=x,e>0&&g.show){let n=x==null?-10:x==o?a:Fe(i==1?t[0][x]:t[e][0][x],A,c,0),_=S==null?-10:Ie(S,i==1?b[g.scale]:b[g.facets[1].scale],l,0);if(Dn&&S!=null){let t=A.ori==1?X:Z,n=R(En.dist(r,e,x,_,t));if(n<Xi){let r=En.bias;if(r!=0){let i=ta(t,g.scale),a=S>=0?1:-1,o=i>=0?1:-1;o==a&&(o==1?r==1?S>=i:S<=i:r==1?S<=i:S>=i)&&(Xi=n,Zi=e)}else Xi=n,Zi=e}}if(hn||On){let t,i;A.ori==0?(t=n,i=_):(t=_,i=n);let a,o,c,l,g,v,y=!0,b=Tn.bbox;if(b!=null){y=!1;let t=b(r,e);c=t.left,l=t.top,a=t.width,o=t.height}else c=t,l=i,a=o=Tn.size(r,e);if(v=Tn.fill(r,e),g=Tn.stroke(r,e),On)e==Zi&&Xi<=En.prox&&(s=c,u=l,d=a,f=o,p=y,m=v,h=g);else{let t=kn[e];t!=null&&(An[e]=c,K[e]=l,Ge(t,a,o,y),Ue(t,v,g),Ve(t,mt(c),mt(l),U,G))}}}}if(On){let e=En.prox;if(hn||(Qi==null?Xi<=e:Xi>e||Zi!=Qi)){let e=kn[0];e!=null&&(An[0]=s,K[0]=u,Ge(e,d,f,p),Ue(e,m,h),Ve(e,mt(s),mt(u),U,G))}}}if(Q.show&&Li)if(e!=null){let[t,n]=$.scales,[r,i]=$.match,[a,o]=e.cursor.sync.scales,s=e.cursor.drag;if(zi=s._x,Bi=s._y,zi||Bi){let{left:s,top:u,width:d,height:f}=e.select,p=e.scales[a].ori,m=e.posToVal,h,g,_,v,y,x=t!=null&&r(t,a),S=n!=null&&i(n,o);x&&zi?(p==0?(h=s,g=d):(h=u,g=f),_=b[t],v=Fe(m(h,a),_,c,0),y=Fe(m(h+g,a),_,c,0),aa(ht(v,y),R(y-v))):aa(0,c),S&&Bi?(p==1?(h=s,g=d):(h=u,g=f),_=b[n],v=Ie(m(h,o),_,l,0),y=Ie(m(h+g,o),_,l,0),oa(ht(v,y),R(y-v))):oa(0,l)}else ga()}else{let e=R(Fi-ji),t=R(Ii-Mi);if(A.ori==1){let n=e;e=t,t=n}zi=Ri.x&&e>=Ri.dist,Bi=Ri.y&&t>=Ri.dist;let n=Ri.uni;n==null?Ri.x&&Ri.y&&(zi||Bi)&&(zi=Bi=!0):zi&&Bi&&(zi=e>=n,Bi=t>=n,!zi&&!Bi&&(t>e?Bi=!0:zi=!0));let r,i;zi&&(A.ori==0?(r=Ni,i=X):(r=Pi,i=Z),aa(ht(r,i),R(i-r)),Bi||oa(0,l)),Bi&&(A.ori==1?(r=Ni,i=X):(r=Pi,i=Z),oa(ht(r,i),R(i-r)),zi||aa(0,c)),!zi&&!Bi&&(aa(0,0),oa(0,0))}if(Ri._x=zi,Ri._y=Bi,e==null){if(a){if(Aa!=null){let[e,t]=$.scales;$.values[0]=e==null?null:ta(A.ori==0?X:Z,e),$.values[1]=t==null?null:ta(A.ori==1?X:Z,t)}Ma(xe,r,X,Z,U,G,o)}if(Dn){let e=a&&$.setSeries,t=En.prox;Qi==null?Xi<=t&&Gi(Zi,$i,!0,e):Xi>t?Gi(null,$i,!0,e):Zi!=Qi&&Gi(Zi,$i,!0,e)}}hn&&(P.idx=o,ca()),n!==!1&&Oa(`setCursor`)}let da=null;Object.defineProperty(r,"rect",{get(){return da??fa(!1),da}});function fa(e=!1){e?da=null:(da=m.getBoundingClientRect(),Oa(`syncRect`,da))}function pa(e,t,n,r,i,a,o){F._lock||Li&&e!=null&&e.movementX==0&&e.movementY==0||(ma(e,t,n,r,i,a,o,!1,e!=null),e==null?ua(t,!0,!1):ua(null,!0,!0))}function ma(e,t,n,i,a,o,c,l,u){if(da??fa(!1),wn(e),e!=null)n=e.clientX-da.left,i=e.clientY-da.top;else{if(n<0||i<0){X=-10,Z=-10;return}let[e,r]=$.scales,c=t.cursor.sync,[l,u]=c.values,[d,f]=c.scales,[p,m]=$.match,h=t.axes[0].side%2==1,g=A.ori==0?U:G,_=A.ori==1?U:G,v=h?o:a,y=h?a:o,x=h?i:n,S=h?n:i;if(n=d==null?x/v*g:p(e,d)?s(l,b[e],g,0):-10,i=f==null?S/y*_:m(r,f)?s(u,b[r],_,0):-10,A.ori==1){let e=n;n=i,i=e}}u&&(t==null||t.cursor.event.type==xe)&&((n<=1||n>=U-1)&&(n=Pt(n,U)),(i<=1||i>=G-1)&&(i=Pt(i,G))),l?(ji=n,Mi=i,[Ni,Pi]=F.move(r,n,i)):(X=n,Z=i)}let ha={width:0,height:0,left:0,top:0};function ga(){Hi(ha,!1)}let _a,va,ya,ba;function xa(e,t,n,i,a,o,s){Li=!0,zi=Bi=Ri._x=Ri._y=!1,ma(e,t,n,i,a,o,s,!0,!1),e!=null&&(It(Ce,Me,Sa,!1),Ma(Se,r,Ni,Pi,U,G,null));let{left:c,top:l,width:u,height:d}=Q;_a=c,va=l,ya=u,ba=d}function Sa(e,t,n,i,a,o,s){Li=Ri._x=Ri._y=!1,ma(e,t,n,i,a,o,s,!1,!0);let{left:c,top:l,width:u,height:d}=Q,f=u>0||d>0,p=_a!=c||va!=l||ya!=u||ba!=d;if(f&&p&&Hi(Q),Ri.setScale&&f&&p){let e=c,t=u,n=l,r=d;if(A.ori==1&&(e=l,t=d,n=c,r=u),zi&&Wi(S,ta(e,S),ta(e+t,S)),Bi)for(let e in b){let t=b[e];e!=S&&t.from==null&&t.min!=B&&Wi(e,ta(n+r,e),ta(n,e))}ga()}else F.lock&&(F._lock=!F._lock,ua(t,!0,e!=null));e!=null&&(zt(Ce,Me),Ma(Ce,r,X,Z,U,G,null))}function Ca(e,t,n,r,i,a,o){if(F._lock)return;wn(e);let s=Li;if(Li){let e=!0,t=!0,n,r;A.ori==0?(n=zi,r=Bi):(n=Bi,r=zi),n&&r&&(e=X<=10||X>=U-10,t=Z<=10||Z>=G-10),n&&e&&(X=X<Ni?0:U),r&&t&&(Z=Z<Pi?0:G),ua(null,!0,!0),Li=!1}X=-10,Z=-10,Qe.fill(null),ua(null,!0,!0),s&&(Li=s)}function wa(e,t,n,i,a,o,s){F._lock||(wn(e),ar(),ga(),e!=null&&Ma(Ee,r,X,Z,U,G,null))}function Ta(){y.forEach(Ai),gn(r.width,r.height,!0)}Je(Ae,Ne,Ta);let Ea={};Ea.mousedown=xa,Ea.mousemove=pa,Ea.mouseup=Sa,Ea.dblclick=wa,Ea.setSeries=(e,t,n,i)=>{let a=$.match[2];n=a(r,t,n),n!=-1&&Gi(n,i,!0,!1)},at&&(It(Se,m,xa),It(xe,m,pa),It(we,m,e=>{wn(e),fa(!1)}),It(Te,m,Ca),It(Ee,m,wa),mi.add(r),r.syncRect=fa);let Da=r.hooks=e.hooks||{};function Oa(e,t,n){ai?oi.push([e,t,n]):e in Da&&Da[e].forEach(e=>{e.call(null,r,t,n)})}(e.plugins||[]).forEach(e=>{for(let t in e.hooks)Da[t]=(Da[t]||[]).concat(e.hooks[t])});let ka=(e,t,n)=>n,$=W({key:null,setSeries:!1,filters:{pub:At,sub:At},scales:[S,v[1]?v[1].scale:null],match:[jt,jt,ka],values:[null,null]},F.sync);$.match.length==2&&$.match.push(ka),F.sync=$;let Aa=$.key,ja=Fr(Aa);function Ma(e,t,n,r,i,a,o){$.filters.pub(e,t,n,r,i,a,o)&&ja.pub(e,t,n,r,i,a,o)}ja.sub(r);function Na(e,t,n,r,i,a,o){$.filters.sub(e,t,n,r,i,a,o)&&Ea[e](null,t,n,r,i,a,o)}r.pub=Na;function Pa(){ja.unsub(r),mi.delete(r),Ft.clear(),Ye(Ae,Ne,Ta),l.remove(),lt?.remove(),Oa(`destroy`)}r.destroy=Pa;function Fa(){Oa(`init`,e,t),ir(t||e.data,!1),N[S]?di(S,N[S]):ar(),pn=Q.show&&(Q.width>0||Q.height>0),fn=hn=!0,gn(e.width,e.height)}return v.forEach(Vn),y.forEach(Yn),n?n instanceof HTMLElement?(n.appendChild(l),Fa()):n(r,Fa):Fa(),r}Y.assign=W,Y.fmtNum=dt,Y.rangeNum=st,Y.rangeLog=tt,Y.rangeAsinh=nt,Y.orient=Rr,Y.pxRatio=j,Y.join=en,Y.fmtDate=mn,Y.tzDate=gn,Y.sync=Fr;{Y.addGap=Ur,Y.clipGaps=Hr;let e=Y.paths={points:ri};e.linear=si,e.stepped=ci,e.bars=ui,e.spline=fi}var ji=v(`<div class="empty">No burndown data (sprint not started or no start/end date)</div>`),Mi=v(`<tr><td> </td><td> </td><td> </td></tr>`),Ni=v(`<div class="burn-card"><header class="burn-header"><h2> </h2> <div class="meta"><span class="on-track-badge"> </span> <span> </span></div></header> <div class="burn-legend"><span class="k"><i style="background: var(--fg-faint)"></i> Idéal</span> <span class="k"><i style="background: var(--accent)"></i> Réel</span></div> <div class="chart-wrapper svelte-n2xgw7" role="img" aria-describedby="burndown-data-table"></div> <table class="sr-only" id="burndown-data-table" aria-label="Données du burndown"><caption>Burndown — idéal vs réel</caption><thead><tr><th scope="col">Date</th><th scope="col">Points idéal</th><th scope="col">Points réel</th></tr></thead><tbody></tbody></table></div>`),Pi=v(`<div class="view-pad"><div class="burn-wrap"><!></div></div>`);function Fi(v,S){r(S,!0);let C=e(()=>x(d.burndown?.ideal??[],d.burndown?.actual??[])),w=p(null),T=null,E=e(()=>d.burndown?.ideal?.length>0),D=e(()=>d.burndown?.on_track===`on-track`?`var(--success)`:d.burndown?.on_track===`at-risk`?`var(--warning)`:d.burndown?.on_track===`behind`?`var(--danger)`:`var(--fg-dim)`);t(()=>{if(!b(w)||!b(E)){T&&=(T.destroy(),null);return}let e=getComputedStyle(b(w)),t=(t,n)=>e.getPropertyValue(t).trim()||n,n=t(`--fg-faint`,`#888`),r=t(`--accent`,`#bdf03d`),i=t(`--border-faint`,`#333`),a=d.burndown.ideal.map(e=>({ts:Math.floor(Date.parse(e.date)/1e3),pts:e.points})),o=d.burndown.actual.map(e=>({ts:Math.floor(Date.parse(e.date)/1e3),pts:e.points})),s=new Set([...a.map(e=>e.ts),...o.map(e=>e.ts)]),c=Array.from(s).sort((e,t)=>e-t),l=[c,c.map(e=>a.find(t=>t.ts===e)?.pts??null),c.map(e=>o.find(t=>t.ts===e)?.pts??null)],u={width:b(w).clientWidth||800,height:320,scales:{x:{time:!0}},axes:[{stroke:n,grid:{stroke:i},ticks:{stroke:i},values:(e,t)=>t.map(e=>{let t=new Date(e*1e3);return`${String(t.getDate()).padStart(2,`0`)}/${String(t.getMonth()+1).padStart(2,`0`)}`})},{stroke:n,grid:{stroke:i},ticks:{stroke:i}}],series:[{label:`Date`},{label:`Ideal`,stroke:n,width:1.5,dash:[5,5],points:{show:!1}},{label:`Actual`,stroke:r,width:3,spanGaps:!0,points:{show:!0,size:6,fill:r,stroke:r}}],legend:{show:!0}};T&&T.destroy(),T=new Y(u,l,b(w));let f=new ResizeObserver(()=>{T&&b(w)&&T.setSize({width:b(w).clientWidth,height:320})});return f.observe(b(w)),()=>{f.disconnect(),T&&=(T.destroy(),null)}});var O=Pi(),ee=y(O),te=y(ee),ne=e=>{l(e,ji())},re=e=>{var t=Ni(),r=y(t),f=y(r),p=y(f,!0);a(f);var h=n(f,2),v=y(h),x=y(v,!0);a(v);var S=n(v,2),T=y(S);a(S),a(h),a(r);var E=n(r,4);_(E,e=>i(w,e),()=>b(w));var O=n(E,2),ee=n(y(O),2);c(ee,21,()=>b(C),g,(e,t)=>{var r=Mi(),i=y(r),s=y(i,!0);a(i);var c=n(i),d=y(c,!0);a(c);var f=n(c),p=y(f,!0);a(f),a(r),o(()=>{u(s,b(t).date),u(d,b(t).ideal??`—`),u(p,b(t).actual??`—`)}),l(e,r)}),a(ee),a(O),a(t),o(()=>{u(p,d.sprint?.name||`Current Sprint`),m(v,`background: color-mix(in oklch, ${b(D)??``} 16%, transparent); color: ${b(D)??``}`),u(x,d.burndown.on_track||`unknown`),u(T,`${d.burndown.total_points??``}p total`),s(E,`aria-label`,`Graphique de burndown du sprint ${(d.sprint?.name||`courant`)??``} : idéal vs réel`)}),l(e,t)};h(te,e=>{!d.burndown||!b(E)?e(ne):e(re,-1)}),a(ee),a(O),l(v,O),f()}export{Fi as default};
@@ -0,0 +1 @@
1
+ import{A as e,C as t,D as n,E as r,M as i,N as a,O as o,P as s,S as c,T as l,b as u,c as d,f,g as p,h as m,j as h,k as g,l as ee,m as _,p as v,r as y,s as b,t as x,u as S,v as C,w,x as T,y as E}from"./index-D8HBRPRV.js";function D(e=[],t=[],n=[]){let r=new Set(e.map(e=>e.id)),i=t.filter(e=>r.has(e.from)&&r.has(e.to)),a=new Set;for(let e of i)a.add(e.from),a.add(e.to);let o=new Set(n.flat()),s=e.filter(e=>a.has(e.id));return{elements:[...s.map(e=>({data:{id:e.id,label:e.id},classes:o.has(e.id)?`in-cycle`:``})),...i.map(e=>({data:{source:e.from,target:e.to}}))],keptNodes:s,hiddenCount:e.length-s.length,cycleSet:o}}var O=/\b(?:lab|lch|oklab|oklch|color)\(/i;function k(e){return typeof e==`string`&&O.test(e)}function A(e,t){if(!k(e)||!t||typeof t.getImageData!=`function`)return e;t.fillStyle=e,t.fillRect(0,0,1,1);let[n,r,i,a]=t.getImageData(0,0,1,1).data;return a===255?`rgb(${n}, ${r}, ${i})`:`rgba(${n}, ${r}, ${i}, ${+(a/255).toFixed(3)})`}var j=6.7,M=20,N=24;function P(e,{charW:t=j,padX:n=M,min:r=N}={}){return Math.max(r,Math.round(String(e??``).length*t+n))}var F=!1,I=null;function L(){return I||=(async()=>{let[{default:e},{default:t}]=await Promise.all([x(()=>import(`./cytoscape.esm-BQ_ULxwV.js`),[]),x(()=>import(`./cytoscape-dagre-iZhhNxmI.js`),[])]);return F||=(e.use(t),!0),e})(),I}var R=C(`<div class="empty">Loading dependencies…</div>`),z=C(`<div class="empty" style="color: var(--danger)"> </div>`),B=C(`<div class="empty">No dependencies found</div>`),V=C(`<span class="stat muted" title="Stories sans dépendance — masquées pour garder le graphe lisible"> </span>`),H=C(`<div class="empty">Aucune dépendance entre stories — rien à afficher dans le graphe.</div>`),U=C(`<dt>Epic</dt> <dd class="mono svelte-skjirc"> </dd>`,1),W=C(`<dt>⚠</dt> <dd style="color: var(--danger)" class="svelte-skjirc">Fait partie d'un cycle de dépendances</dd>`,1),G=C(`<aside class="node-details svelte-skjirc"><header class="details-header"><strong class="mono"> </strong> <button class="close-btn svelte-skjirc" aria-label="Fermer">×</button></header> <dl class="svelte-skjirc"><dt>Titre</dt> <dd class="svelte-skjirc"> </dd> <dt>Statut</dt> <dd class="svelte-skjirc"><span class="chip"><i class="swatch"></i> </span></dd> <!> <!></dl></aside>`),K=C(`<div class="deps-content"><div class="deps-canvas" role="img"></div> <!></div>`),q=C(`<li> </li>`),J=C(`<div class="deps-wrap svelte-skjirc"><header class="deps-header"><span class="stat"> </span> <span class="stat"> </span> <span> </span> <!></header> <!> <div class="sr-only"><h2>Dependency edges (text fallback)</h2> <ul></ul></div></div>`),Y=C(`<div class="deps-pad svelte-skjirc"><!></div>`);function X(x,C){i(C,!0);let E=g(null),O=null,k=!1,j=g(n([])),M=g(n([])),N=g(n([])),F=g(null),I=g(!0),X=g(null),Z=e(()=>({nodes:T(j).length,edges:T(M).length,cycles:T(N).length})),Q=e(()=>D(T(j),T(M),T(N)).hiddenCount),te=e=>`var(${y[e]?.cssVar||`--fg-faint`})`;async function ne(){o(I,!0),o(X,null);try{let e=await fetch(`/api/dependencies`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();o(j,t.nodes||[],!0),o(M,t.edges||[],!0),o(N,t.cycles||[],!0)}catch(e){o(X,e.message,!0)}finally{o(I,!1)}}function re(e){return T(N).some(t=>t.includes(e))}t(()=>{ne()});function ie(e){let t=()=>typeof requestIdleCallback==`function`?requestIdleCallback(e,{timeout:1e3}):setTimeout(e,1);document.readyState===`complete`?t():window.addEventListener(`load`,t,{once:!0})}t(()=>{if(!T(E)||T(j).length===0||!T(M)||k)return;k=!0;let e=!1,t=T(E),n=document.createElement(`canvas`).getContext(`2d`),r=e=>A(e,n),i=getComputedStyle(document.documentElement),a=(e,t)=>r(i.getPropertyValue(e).trim()||t),s=e=>a(y[e]?.cssVar||`--fg-faint`,`#888`),c=a(`--bg-inset`,`#111`),l=a(`--border-faint`,`#333`),u=a(`--border-strong`,`#555`),d=a(`--danger`,`#e5484d`),f=a(`--mono`,`monospace`),{elements:p}=D(T(j),T(M),T(N));if(p.length===0){k=!1;return}let m=null;return ie(()=>{e||L().then(n=>{e||(m=n({container:t,elements:p,style:[{selector:`node`,style:{label:`data(label)`,shape:`round-rectangle`,"background-color":e=>{let t=T(j).find(t=>t.id===e.id());return t?s(t.status):`#888`},color:c,"text-valign":`center`,"text-halign":`center`,"font-size":`11px`,"font-weight":`600`,"font-family":f,width:e=>P(e.data(`label`)),height:28,"text-max-width":`200px`,"border-width":1,"border-color":l}},{selector:`node.in-cycle`,style:{"border-width":3,"border-color":d}},{selector:`edge`,style:{width:1.6,"line-color":u,"target-arrow-color":u,"target-arrow-shape":`triangle`,"curve-style":`bezier`}}],layout:{name:`dagre`,rankDir:`LR`,spacingFactor:1.3,nodeDimensionsIncludeLabels:!0,fit:!0,padding:30}}),m.ready(()=>m.fit(void 0,40)),m.on(`tap`,`node`,e=>{let t=T(j).find(t=>t.id===e.target.id());t&&o(F,t,!0)}),O=m)})}),()=>{e=!0,k=!1;let t=O||m;t&&t.destroy(),O=null}});var $=Y(),ae=w($),oe=e=>{p(e,R())},se=e=>{var t=z(),n=w(t);s(t),c(()=>m(n,`Error: ${T(X)??``}`)),p(e,t)},ce=e=>{p(e,B())},le=t=>{var n=J(),i=w(n),h=w(i),g=w(h);s(h);var x=r(h,2),C=w(x);s(x);var D=r(x,2);let O;var k=w(D);s(D);var A=r(D,2),j=e=>{var t=V(),n=w(t);s(t),c(()=>m(n,`${T(Q)??``} isolée${T(Q)>1?`s`:``} masquée${T(Q)>1?`s`:``}`)),p(e,t)};_(A,e=>{T(Q)>0&&e(j)}),s(i);var N=r(i,2),P=e=>{p(e,H())},I=t=>{var n=K(),i=w(n);b(i,e=>o(E,e),()=>T(E));var f=r(i,2),h=t=>{var n=G(),i=w(n),d=w(i),f=w(d,!0);s(d);var h=r(d,2);s(i);var g=r(i,2),v=r(w(g),2),b=w(v,!0);s(v);var x=r(v,4),S=w(x),C=w(S),E=r(C,1,!0);s(S),s(x);var D=r(x,2),O=e=>{var t=U(),n=r(l(t),2),i=w(n,!0);s(n),c(()=>m(i,T(F).epic_id)),p(e,t)};_(D,e=>{T(F).epic_id&&e(O)});var k=r(D,2),A=e=>{var t=W();a(2),p(e,t)},j=e(()=>re(T(F).id));_(k,e=>{T(j)&&e(A)}),s(g),s(n),c(e=>{m(f,T(F).id),m(b,T(F).title||`—`),ee(C,`background: ${e??``}`),m(E,y[T(F).status]?.label||T(F).status)},[()=>te(T(F).status)]),u(`click`,h,()=>o(F,null)),p(t,n)};_(f,e=>{T(F)&&e(h)}),s(n),c(()=>d(i,`aria-label`,`Dependency graph with ${T(Z).nodes??``} nodes, ${T(Z).edges??``} edges, and ${T(Z).cycles??``} cycles`)),p(t,n)};_(N,e=>{T(Z).edges===0?e(P):e(I,-1)});var L=r(N,2),R=r(w(L),2);f(R,21,()=>T(M),v,(e,t)=>{var n=q(),r=w(n);s(n),c(()=>m(r,`${T(t).to??``} depends on ${T(t).from??``}`)),p(e,n)}),s(R),s(L),s(n),c(()=>{m(g,`Nodes: ${T(Z).nodes??``}`),m(C,`Edges: ${T(Z).edges??``}`),O=S(D,1,`stat`,null,O,{danger:T(Z).cycles>0}),m(k,`Cycles: ${T(Z).cycles??``}`)}),p(t,n)};_(ae,e=>{T(I)?e(oe):T(X)?e(se,1):T(j).length===0?e(ce,2):e(le,-1)}),s($),p(x,$),h()}E([`click`]);export{X as default};
@@ -0,0 +1 @@
1
+ import{A as e,C as t,D as n,E as r,M as i,O as a,P as o,S as s,T as c,b as l,c as u,d,f,g as p,h as m,j as h,k as g,m as _,n as v,p as y,s as b,u as x,v as S,w as C,x as w,y as T}from"./index-D8HBRPRV.js";import{marked as ee}from"./marked.esm-D0K5jX26.js";import te from"./purify.es-Bu4Grnl0.js";var ne=S(`<div class="empty" style="padding:20px 8px">Chargement…</div>`),E=S(`<div class="empty" style="padding:20px 8px; color: var(--danger)"> </div>`),D=S(`<button><!> </button>`),O=S(`<button> </button>`),k=S(`<div class="group-children"></div>`),A=S(`<div class="tree-group"><button class="tree-item group-header"><span class="group-icon svelte-1jkogc1"> </span> </button> <!></div>`),j=S(`<!> <!>`,1),M=S(`<div class="empty">Sélectionnez un document</div>`),N=S(`<div class="empty">Chargement du document…</div>`),P=S(`<div class="doc-paper"></div>`),re=S(`<div class="doc-toolbar svelte-1jkogc1"><span class="doc-path mono svelte-1jkogc1"> </span> <button class="btn btn-ghost" aria-label="Copier le contenu"><!> </button></div> <!>`,1),ie=S(`<div class="docs-pad svelte-1jkogc1"><div class="docs-layout svelte-1jkogc1"><aside class="docs-tree" aria-label="Navigation des documents"><!></aside> <div class="doc-view" role="region" aria-label="Contenu du document"><!></div></div></div>`);function F(S,T){i(T,!0);let F=g(n([])),I=g(null),L=g(``),R=g(!0),z=g(!1),B=g(null),V=g(null),H=e(()=>{let e=[],t={};for(let n of w(F)){let r=n.rel.split(`/`);if(r.length===1)e.push(n);else{let e=r[0];t[e]||(t[e]={name:e,children:[]}),t[e].children.push(n)}}return{root:e,groups:Object.values(t)}});async function U(){a(R,!0),a(B,null);try{let e=await fetch(`/api/docs`);if(!e.ok)throw Error(`HTTP ${e.status}`);a(F,(await e.json()).docs||[],!0)}catch(e){a(B,e.message,!0)}finally{a(R,!1)}}async function W(e){a(I,e,!0),a(z,!0);try{let t=await fetch(`/api/docs/${encodeURIComponent(e.rel)}`);if(!t.ok)throw Error(`HTTP ${t.status}`);a(L,await t.text(),!0)}catch(e){a(L,`Error loading document: ${e.message}`)}finally{a(z,!1)}}let G=e(()=>{if(!w(L))return``;try{return te.sanitize(ee.parse(w(L)))}catch{return`<p>Error rendering markdown</p>`}}),K=g(!1);function q(){w(L)&&navigator.clipboard&&navigator.clipboard.writeText(w(L)).then(()=>{a(K,!0),setTimeout(()=>a(K,!1),1500)})}t(()=>{U()}),t(()=>{if(!w(V)||!w(G))return;let e=w(V).querySelectorAll(`a`);for(let t of e){let e=t.textContent?.trim()||``;/^US-\d+$/.test(e)&&(t.href=`#/kanban`,t.dataset.storyId=e,t.addEventListener(`click`,e=>{e.preventDefault(),window.location.hash=`#/kanban`}))}});let J=g(n(new Set));function ae(e){w(J).has(e)?w(J).delete(e):w(J).add(e),a(J,new Set(w(J)),!0)}var Y=ie(),X=C(Y),Z=C(X),oe=C(Z),se=e=>{p(e,ne())},ce=e=>{var t=E(),n=C(t);o(t),s(()=>m(n,`Erreur : ${w(B)??``}`)),p(e,t)},le=t=>{var n=j(),i=c(n);f(i,17,()=>w(H).root,y,(e,t)=>{var n=D();let i;var a=C(n);v(a,{name:`file`,cls:`ico`,size:15});var c=r(a,1,!0);o(n),s(()=>{i=x(n,1,`tree-item`,null,i,{active:w(I)?.rel===w(t).rel}),m(c,w(t).rel)}),l(`click`,n,()=>W(w(t))),p(e,n)}),f(r(i,2),17,()=>w(H).groups,y,(t,n)=>{var i=A(),a=C(i),c=C(a),d=C(c,!0);o(c);var h=r(c);o(a);var g=r(a,2),v=e=>{var t=k();f(t,21,()=>w(n).children,y,(e,t)=>{var n=O();let r;var i=C(n,!0);o(n),s(e=>{r=x(n,1,`tree-item nested`,null,r,{active:w(I)?.rel===w(t).rel}),m(i,e)},[()=>w(t).rel.split(`/`).slice(1).join(`/`)]),l(`click`,n,()=>W(w(t))),p(e,n)}),o(t),p(e,t)},b=e(()=>w(J).has(w(n).name));_(g,e=>{w(b)&&e(v)}),o(i),s((e,t)=>{u(a,`aria-expanded`,e),m(d,t),m(h,`${w(n).name??``}/`)},[()=>w(J).has(w(n).name),()=>w(J).has(w(n).name)?`▼`:`▶`]),l(`click`,a,()=>ae(w(n).name)),p(t,i)}),p(t,n)};_(oe,e=>{w(R)?e(se):w(B)?e(ce,1):e(le,-1)}),o(Z);var Q=r(Z,2),$=C(Q),ue=e=>{p(e,M())},de=e=>{var t=re(),n=c(t),i=C(n),u=C(i,!0);o(i);var f=r(i,2),h=C(f);v(h,{name:`copy`,size:15});var g=r(h,1,!0);o(f),o(n);var y=r(n,2),x=e=>{p(e,N())},S=e=>{var t=P();d(t,()=>w(G),!0),o(t),b(t,e=>a(V,e),()=>w(V)),p(e,t)};_(y,e=>{w(z)?e(x):e(S,-1)}),s(()=>{m(u,w(I).rel),m(g,w(K)?`Copié !`:`Copier`)}),l(`click`,f,q),p(e,t)};_($,e=>{w(I)?e(de,-1):e(ue)}),o(Q),o(X),o(Y),p(S,Y),h()}T([`click`]);export{F as default};
@@ -0,0 +1 @@
1
+ import{A as e,C as t,D as n,E as r,M as i,N as a,O as o,P as s,S as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,g,h as _,j as v,k as y,l as ee,m as b,o as x,p as S,r as C,u as w,v as T,w as E,x as D,y as O}from"./index-D8HBRPRV.js";import{marked as k}from"./marked.esm-D0K5jX26.js";import A from"./purify.es-Bu4Grnl0.js";function j(e){return[...e].sort((e,t)=>t.id.localeCompare(e.id,void 0,{numeric:!0,sensitivity:`base`}))}var M=T(`<div class="empty">Chargement…</div>`),N=T(`<div class="empty"> </div>`),P=T(`<div class="empty">Aucun sprint</div>`),F=T(`<span class="tag-mini svelte-1yxo9kf">goal</span>`),te=T(`<span class="tag-mini svelte-1yxo9kf">review</span>`),ne=T(`<span class="tag-mini svelte-1yxo9kf">retro</span>`),re=T(`<div class="si-tags svelte-1yxo9kf"><!> <!> <!></div>`),I=T(`<button class="sprint-item"><div class="si-top"><span class="si-name"> </span> <span> </span></div> <div class="si-stat"><span> </span> <span> </span></div> <div class="proj-bar" style="margin-top:9px"><span></span></div> <!></button>`),L=T(`<div class="empty">Sélectionnez un sprint</div>`),ie=T(`<span class="tag-mini svelte-1yxo9kf"> </span>`),R=T(`<span> </span>`),ae=T(`<div class="sd-panel"><h3>Goal</h3> <div class="md-body"></div></div>`),oe=T(`<p style="color: var(--fg-faint); font-size:13px">Aucune story dans ce sprint.</p>`),se=T(`<button class="toggle svelte-1yxo9kf"> </button>`),ce=T(`<span class="toggle-spacer svelte-1yxo9kf"></span>`),le=T(`<span class="s-assignee mono svelte-1yxo9kf"> </span>`),ue=T(`<tr><td class="t-name mono"> </td><td> </td><td> </td><td class="t-hrs"> </td><td class="t-hrs"> </td><td> </td></tr>`),de=T(`<table class="tasks sprint-tasks svelte-1yxo9kf"><thead><tr><th>Task</th><th>Type</th><th>Statut</th><th style="text-align:right">Est</th><th style="text-align:right">Réel</th><th>Assigné</th></tr></thead><tbody></tbody></table>`),fe=T(`<div class="sd-story-wrap"><div class="sd-story svelte-1yxo9kf"><!> <span class="s-id mono"> </span> <span class="s-t"> </span> <!> <span class="s-status"><i></i> </span> <span class="points mono svelte-1yxo9kf"> </span></div> <!></div>`),pe=T(`<div class="sd-panel"><h3>Review <span class="pill" style="background: var(--success-soft); color: var(--success)">review</span></h3> <div class="md-body review-md"></div></div>`),me=T(`<div class="sd-panel"><h3>Retro <span class="pill" style="background: var(--accent-soft); color: var(--accent)">team</span></h3> <div class="md-body review-md"></div></div>`),he=T(`<div class="sd-head"><div style="flex:1"><div style="display:flex; align-items:center; gap:11px"><h2> </h2> <span style="font-size:11px"> </span></div> <div class="sd-sub svelte-1yxo9kf"><span class="mono"> </span> <!> <!> <!></div></div></div> <div class="sd-metrics"><div class="metric"><div class="mk">Points</div><div class="mv"> <small>pts</small></div></div> <div class="metric"><div class="mk">Complétés</div><div class="mv"> <small>pts</small></div><div class="msub"> </div></div> <div class="metric"><div class="mk">Stories</div><div class="mv"> </div></div></div> <!> <div class="sd-panel"><h3>Stories &amp; Tasks <span class="pill" style="background: var(--accent-soft); color: var(--accent)"> </span></h3> <!></div> <!> <!>`,1),z=T(`<div class="view-pad"><div class="sprints-layout"><aside class="sprint-list" aria-label="Liste des sprints"><!></aside> <section class="sprint-detail" aria-label="Détail du sprint"><!></section></div></div>`);function B(T,O){i(O,!0);let B=y(n([])),V=y(!0),H=y(null),U=y(null),W=y(!1),G=y(null),K=e(()=>x.parts[1]??null);function ge(e){return e.total_points>0&&e.done_points>=e.total_points?`done`:e.done_points>0?`active`:`planned`}let q=e=>e.total_points?Math.round(e.done_points/e.total_points*100):0;async function _e(){o(V,!0),o(H,null);try{let e=await fetch(`/api/sprints`);if(!e.ok)throw Error(`HTTP ${e.status}`);o(B,j((await e.json()).sprints||[]),!0)}catch(e){o(H,e.message,!0)}finally{o(V,!1)}}async function ve(e){if(!e){o(U,null);return}o(W,!0),o(G,null);try{let t=await fetch(`/api/sprints/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`HTTP ${t.status}`);o(U,await t.json(),!0)}catch(e){o(G,e.message,!0),o(U,null)}finally{o(W,!1)}}function ye(e){if(!e)return``;try{return A.sanitize(k.parse(e))}catch{return`<p>Error rendering markdown</p>`}}let be=e(()=>{let e={};for(let t of D(U)?.tasks??[])(e[t.us_id]??=[]).push(t);return e}),J=e(()=>{let e=D(U)?.stories??[],t=e.reduce((e,t)=>e+(t.story_points||0),0),n=e.filter(e=>e.status===`done`).reduce((e,t)=>e+(t.story_points||0),0);return{total:t,done:n,count:e.length,pct:t?Math.round(n/t*100):0}}),Y=y(n(new Set));function xe(e){D(Y).has(e)?D(Y).delete(e):D(Y).add(e),o(Y,new Set(D(Y)),!0)}t(()=>{_e()}),t(()=>{ve(D(K))});var X=z(),Se=E(X),Z=E(Se),Q=E(Z),Ce=e=>{g(e,M())},we=e=>{var t=N(),n=E(t);s(t),c(()=>_(n,`Erreur : ${D(H)??``}`)),g(e,t)},Te=e=>{g(e,P())},Ee=t=>{var n=u();h(l(n),17,()=>D(B),S,(t,n)=>{let i=e(()=>ge(D(n)));var a=I(),o=E(a),l=E(o),u=E(l,!0);s(l);var m=r(l,2),h=E(m,!0);s(m),s(o);var v=r(o,2),y=E(v),x=E(y);s(y);var S=r(y,2),C=E(S);s(S),s(v);var T=r(v,2),O=E(T);s(T);var k=r(T,2),A=e=>{var t=re(),i=E(t),a=e=>{g(e,F())};b(i,e=>{D(n).has_goal&&e(a)});var o=r(i,2),c=e=>{g(e,te())};b(o,e=>{D(n).has_review&&e(c)});var l=r(o,2),u=e=>{g(e,ne())};b(l,e=>{D(n).has_retro&&e(u)}),s(t),g(e,t)};b(k,e=>{(D(n).has_goal||D(n).has_review||D(n).has_retro)&&e(A)}),s(a),c(e=>{p(a,`aria-current`,D(K)===D(n).id),_(u,D(n).id),w(m,1,`si-state ${D(i)??``}`,`svelte-1yxo9kf`),_(h,D(i)),_(x,`${D(n).story_count??``} US`),_(C,`${D(n).done_points??``}/${D(n).total_points??``} pts`),ee(O,`width: ${e??``}%`)},[()=>q(D(n))]),f(`click`,a,()=>d(`/sprints/${D(n).id}`)),g(t,a)}),g(t,n)};b(Q,e=>{D(V)?e(Ce):D(H)?e(we,1):D(B).length===0?e(Te,2):e(Ee,-1)}),s(Z);var De=r(Z,2),$=E(De),Oe=e=>{g(e,L())},ke=e=>{g(e,M())},Ae=e=>{var t=N(),n=E(t);s(t),c(()=>_(n,`Erreur : ${D(G)??``}`)),g(e,t)},je=t=>{let n=e(()=>ge({total_points:D(J).total,done_points:D(J).done}));var i=he(),o=l(i),d=E(o),v=E(d),y=E(v),x=E(y,!0);s(y);var T=r(y,2),O=E(T,!0);s(T),s(v);var k=r(v,2),A=E(k),j=E(A,!0);s(A);var M=r(A,2),N=e=>{var t=ie(),n=E(t,!0);s(t),c(()=>_(n,D(U).sprint.epic)),g(e,t)};b(M,e=>{D(U).sprint.epic&&e(N)});var P=r(M,2),F=e=>{var t=R(),n=E(t);s(t),c(()=>_(n,`${D(U).sprint.start_date??``} → ${(D(U).sprint.end_date||`…`)??``}`)),g(e,t)},te=e=>{var t=R(),n=E(t);s(t),c(()=>_(n,`clôturé le ${D(U).sprint.end_date??``}`)),g(e,t)};b(P,e=>{D(U).sprint.start_date?e(F):D(U).sprint.end_date&&e(te,1)});var ne=r(P,2),re=e=>{var t=R(),n=E(t);s(t),c(()=>_(n,`${D(U).sprint.points_delivered??``} pts livrés`)),g(e,t)};b(ne,e=>{D(U).sprint.points_delivered!=null&&e(re)}),s(k),s(d),s(o);var I=r(o,2),L=E(I),z=r(E(L)),B=E(z,!0);a(),s(z),s(L);var V=r(L,2),H=r(E(V)),W=E(H,!0);a(),s(H);var G=r(H),K=E(G);s(G),s(V);var q=r(V,2),_e=r(E(q)),ve=E(_e,!0);s(_e),s(q),s(I);var X=r(I,2),Se=e=>{var t=ae(),n=r(E(t),2);m(n,()=>ye(D(U).goal),!0),s(n),s(t),g(e,t)};b(X,e=>{D(U).goal&&e(Se)});var Z=r(X,2),Q=E(Z),Ce=r(E(Q)),we=E(Ce,!0);s(Ce),s(Q);var Te=r(Q,2),Ee=e=>{g(e,oe())},De=t=>{var n=u();h(l(n),17,()=>D(U).stories,S,(t,n)=>{let i=e(()=>D(be)[D(n).id]??[]);var a=fe(),o=E(a),l=E(o),u=e=>{var t=se(),r=E(t,!0);s(t),c((e,i)=>{p(t,`aria-expanded`,e),p(t,`aria-label`,`Afficher les tâches de ${D(n).id??``}`),_(r,i)},[()=>D(Y).has(D(n).id),()=>D(Y).has(D(n).id)?`▼`:`▶`]),f(`click`,t,()=>xe(D(n).id)),g(e,t)},d=e=>{g(e,ce())};b(l,e=>{D(i).length?e(u):e(d,-1)});var m=r(l,2),v=E(m,!0);s(m);var y=r(m,2),x=E(y,!0);s(y);var w=r(y,2),T=e=>{var t=le(),r=E(t,!0);s(t),c(()=>_(r,D(n).assigned_to)),g(e,t)};b(w,e=>{D(n).assigned_to&&e(T)});var O=r(w,2),k=E(O),A=r(k,1,!0);s(O);var j=r(O,2),M=E(j,!0);s(j),s(o);var N=r(o,2),P=e=>{var t=de(),n=r(E(t));h(n,21,()=>D(i),S,(e,t)=>{var n=ue(),i=E(n),a=E(i,!0);s(i);var o=r(i),l=E(o,!0);s(o);var u=r(o),d=E(u,!0);s(u);var f=r(u),p=E(f,!0);s(f);var m=r(f),h=E(m,!0);s(m);var v=r(m),y=E(v,!0);s(v),s(n),c(()=>{_(a,D(t).id),_(l,D(t).type),_(d,D(t).status),_(p,D(t).estimation_hours??`—`),_(h,D(t).actual_hours??`—`),_(y,D(t).assigned_to||`—`)}),g(e,n)}),s(n),s(t),g(e,t)},F=e(()=>D(Y).has(D(n).id)&&D(i).length);b(N,e=>{D(F)&&e(P)}),s(a),c(()=>{_(v,D(n).id),_(x,D(n).title),ee(k,`width:8px;height:8px;border-radius:50%;background: var(${(C[D(n).status]?.cssVar||`--fg-faint`)??``});display:inline-block`),_(A,C[D(n).status]?.label||D(n).status),_(M,D(n).story_points??`—`)}),g(t,a)}),g(t,n)};b(Te,e=>{D(U).stories.length===0?e(Ee):e(De,-1)}),s(Z);var $=r(Z,2),Oe=e=>{var t=pe(),n=r(E(t),2);m(n,()=>ye(D(U).review),!0),s(n),s(t),g(e,t)};b($,e=>{D(U).review&&e(Oe)});var ke=r($,2),Ae=e=>{var t=me(),n=r(E(t),2);m(n,()=>ye(D(U).retro),!0),s(n),s(t),g(e,t)};b(ke,e=>{D(U).retro&&e(Ae)}),c(()=>{_(x,D(U).sprint.name||D(U).sprint.id),w(T,1,`si-state ${D(n)??``}`,`svelte-1yxo9kf`),_(O,D(n)),_(j,D(U).sprint.id),_(B,D(J).total),_(W,D(J).done),_(K,`${D(J).pct??``}% du total`),_(ve,D(J).count),_(we,D(U).stories.length)}),g(t,i)};b($,e=>{D(K)?D(W)?e(ke,1):D(G)?e(Ae,2):D(U)&&e(je,3):e(Oe)}),s(De),s(Se),s(X),g(T,X),v()}O([`click`]);export{B as default};