pi-mega-compact 0.20.48 → 0.20.50

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 (90) hide show
  1. package/dist/config/vector-cortex-enc0g.js +37 -0
  2. package/dist/config/vector-cortex-enc1a.js +39 -0
  3. package/dist/config/vector-cortex.js +2 -0
  4. package/dist/config.js +1 -1
  5. package/dist/extensions/dashboard-server/qualification-record.js +71 -0
  6. package/dist/extensions/dashboard-server/routes-rag-settings-vector-cortex.js +2 -0
  7. package/dist/extensions/dashboard-server/routes-setup-cortex-actions.js +49 -3
  8. package/dist/extensions/dashboard-server/routes-setup-cortex.js +65 -16
  9. package/dist/extensions/dashboard-server/routes-setup-enc1a.js +157 -0
  10. package/dist/extensions/dashboard-server/routes-setup.js +21 -0
  11. package/dist/extensions/dashboard-server/setup-cortex-actions.js +21 -4
  12. package/dist/extensions/dashboard-server/setup-cortex-blockers.js +3 -69
  13. package/dist/src/config/vector-cortex-enc0g.js +37 -0
  14. package/dist/src/config/vector-cortex-enc1a.js +39 -0
  15. package/dist/src/config/vector-cortex.js +2 -0
  16. package/dist/src/config.js +1 -1
  17. package/dist/src/vector-cortex/setup-cortex-blockers-compute.js +160 -0
  18. package/dist/vector-cortex/setup-cortex-blockers-compute.js +160 -0
  19. package/extensions/dashboard-client/dist/assets/{AreaChart-COnj8FHi.js → AreaChart-CeVnaV-0.js} +2 -2
  20. package/extensions/dashboard-client/dist/assets/{AreaChart-COnj8FHi.js.map → AreaChart-CeVnaV-0.js.map} +1 -1
  21. package/extensions/dashboard-client/dist/assets/{BarChart-BYqt8c5-.js → BarChart-DoNd35sw.js} +2 -2
  22. package/extensions/dashboard-client/dist/assets/{BarChart-BYqt8c5-.js.map → BarChart-DoNd35sw.js.map} +1 -1
  23. package/extensions/dashboard-client/dist/assets/{CacheTab-PLRjMrZV.js → CacheTab-BROshdFf.js} +2 -2
  24. package/extensions/dashboard-client/dist/assets/{CacheTab-PLRjMrZV.js.map → CacheTab-BROshdFf.js.map} +1 -1
  25. package/extensions/dashboard-client/dist/assets/{EventsTab-DXKSft6w.js → EventsTab-DAD6NeBR.js} +2 -2
  26. package/extensions/dashboard-client/dist/assets/{EventsTab-DXKSft6w.js.map → EventsTab-DAD6NeBR.js.map} +1 -1
  27. package/extensions/dashboard-client/dist/assets/{HealthTab-BgVIsrde.js → HealthTab-BBVMM54F.js} +2 -2
  28. package/extensions/dashboard-client/dist/assets/{HealthTab-BgVIsrde.js.map → HealthTab-BBVMM54F.js.map} +1 -1
  29. package/extensions/dashboard-client/dist/assets/{MaintenanceTab-DNgFC8KZ.js → MaintenanceTab-f9VhlFco.js} +2 -2
  30. package/extensions/dashboard-client/dist/assets/{MaintenanceTab-DNgFC8KZ.js.map → MaintenanceTab-f9VhlFco.js.map} +1 -1
  31. package/extensions/dashboard-client/dist/assets/{MemoryMapTab-B6yY47sz.js → MemoryMapTab-BaxfyzN2.js} +2 -2
  32. package/extensions/dashboard-client/dist/assets/{MemoryMapTab-B6yY47sz.js.map → MemoryMapTab-BaxfyzN2.js.map} +1 -1
  33. package/extensions/dashboard-client/dist/assets/{MetricsTab-BrhJ6rkx.js → MetricsTab-DkUvoeS_.js} +2 -2
  34. package/extensions/dashboard-client/dist/assets/{MetricsTab-BrhJ6rkx.js.map → MetricsTab-DkUvoeS_.js.map} +1 -1
  35. package/extensions/dashboard-client/dist/assets/{OverviewTab-RFHU9L4x.js → OverviewTab-BCpK1vgt.js} +2 -2
  36. package/extensions/dashboard-client/dist/assets/{OverviewTab-RFHU9L4x.js.map → OverviewTab-BCpK1vgt.js.map} +1 -1
  37. package/extensions/dashboard-client/dist/assets/{ReposTab-UFIWKkJM.js → ReposTab-cJ5neYIG.js} +2 -2
  38. package/extensions/dashboard-client/dist/assets/{ReposTab-UFIWKkJM.js.map → ReposTab-cJ5neYIG.js.map} +1 -1
  39. package/extensions/dashboard-client/dist/assets/{SessionsTab-BHFYsmK8.js → SessionsTab-8DyQv1Ry.js} +2 -2
  40. package/extensions/dashboard-client/dist/assets/{SessionsTab-BHFYsmK8.js.map → SessionsTab-8DyQv1Ry.js.map} +1 -1
  41. package/extensions/dashboard-client/dist/assets/SetupTab-BQGPf9CI.js +3 -0
  42. package/extensions/dashboard-client/dist/assets/SetupTab-BQGPf9CI.js.map +1 -0
  43. package/extensions/dashboard-client/dist/assets/{TimeSavedCard-aPG5Knqn.js → TimeSavedCard-8N7Vvlch.js} +2 -2
  44. package/extensions/dashboard-client/dist/assets/{TimeSavedCard-aPG5Knqn.js.map → TimeSavedCard-8N7Vvlch.js.map} +1 -1
  45. package/extensions/dashboard-client/dist/assets/{TurnsTab-fGm9n-Tk.js → TurnsTab-CCijkQoH.js} +2 -2
  46. package/extensions/dashboard-client/dist/assets/{TurnsTab-fGm9n-Tk.js.map → TurnsTab-CCijkQoH.js.map} +1 -1
  47. package/extensions/dashboard-client/dist/assets/{VcStatusBadge-BtmSNH8X.js → VcStatusBadge-D9a7By8x.js} +2 -2
  48. package/extensions/dashboard-client/dist/assets/{VcStatusBadge-BtmSNH8X.js.map → VcStatusBadge-D9a7By8x.js.map} +1 -1
  49. package/extensions/dashboard-client/dist/assets/{VectorCortexTab-meALMMOZ.js → VectorCortexTab-pviD6CCy.js} +2 -2
  50. package/extensions/dashboard-client/dist/assets/{VectorCortexTab-meALMMOZ.js.map → VectorCortexTab-pviD6CCy.js.map} +1 -1
  51. package/extensions/dashboard-client/dist/assets/{WikiTab-0TK6q6g1.js → WikiTab-DLyicguz.js} +2 -2
  52. package/extensions/dashboard-client/dist/assets/{WikiTab-0TK6q6g1.js.map → WikiTab-DLyicguz.js.map} +1 -1
  53. package/extensions/dashboard-client/dist/assets/{button-CKEnMZ98.js → button-D8nKit8Y.js} +2 -2
  54. package/extensions/dashboard-client/dist/assets/{button-CKEnMZ98.js.map → button-D8nKit8Y.js.map} +1 -1
  55. package/extensions/dashboard-client/dist/assets/{card-BVVhm3sL.js → card-Xf5wHHBL.js} +2 -2
  56. package/extensions/dashboard-client/dist/assets/{card-BVVhm3sL.js.map → card-Xf5wHHBL.js.map} +1 -1
  57. package/extensions/dashboard-client/dist/assets/{client-extra-BvGxKZpm.js → client-extra-CvxDLpQr.js} +2 -2
  58. package/extensions/dashboard-client/dist/assets/{client-extra-BvGxKZpm.js.map → client-extra-CvxDLpQr.js.map} +1 -1
  59. package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-B1PeCct1.js → generateCategoricalChart-DhQquRa8.js} +2 -2
  60. package/extensions/dashboard-client/dist/assets/{generateCategoricalChart-B1PeCct1.js.map → generateCategoricalChart-DhQquRa8.js.map} +1 -1
  61. package/extensions/dashboard-client/dist/assets/{index-DuThOA-d.js → index-BUP3MK5S.js} +3 -3
  62. package/extensions/dashboard-client/dist/assets/{index-DuThOA-d.js.map → index-BUP3MK5S.js.map} +1 -1
  63. package/extensions/dashboard-client/dist/assets/{switch-7qLS7ajc.js → switch-B13rb8Z2.js} +2 -2
  64. package/extensions/dashboard-client/dist/assets/{switch-7qLS7ajc.js.map → switch-B13rb8Z2.js.map} +1 -1
  65. package/extensions/dashboard-client/dist/assets/{toggle-D7mgOVxz.js → toggle-4h6DUEB5.js} +2 -2
  66. package/extensions/dashboard-client/dist/assets/{toggle-D7mgOVxz.js.map → toggle-4h6DUEB5.js.map} +1 -1
  67. package/extensions/dashboard-client/dist/assets/{useSSE-ChpyZVeX.js → useSSE-Djom4z1K.js} +2 -2
  68. package/extensions/dashboard-client/dist/assets/{useSSE-ChpyZVeX.js.map → useSSE-Djom4z1K.js.map} +1 -1
  69. package/extensions/dashboard-client/dist/index.html +1 -1
  70. package/extensions/dashboard-client/src/tabs/SetupTab/CustomEndpointSection.tsx +57 -2
  71. package/extensions/dashboard-client/src/tabs/SetupTab/EmbedderSetup.tsx +9 -39
  72. package/extensions/dashboard-client/src/tabs/SetupTab/EmbedderSetupHelpers.tsx +50 -0
  73. package/extensions/dashboard-server/api-contracts/setup-cortex.ts +6 -2
  74. package/extensions/dashboard-server/api-contracts/setup.ts +12 -0
  75. package/extensions/dashboard-server/qualification-record.ts +70 -0
  76. package/extensions/dashboard-server/routes-rag-settings-vector-cortex.ts +12 -0
  77. package/extensions/dashboard-server/routes-setup-cortex-actions.ts +50 -3
  78. package/extensions/dashboard-server/routes-setup-cortex.ts +92 -16
  79. package/extensions/dashboard-server/routes-setup-enc1a.ts +184 -0
  80. package/extensions/dashboard-server/routes-setup.ts +21 -0
  81. package/extensions/dashboard-server/setup-cortex-actions.ts +23 -4
  82. package/extensions/dashboard-server/setup-cortex-blockers.ts +3 -97
  83. package/package.json +1 -1
  84. package/src/config/vector-cortex-enc0g.ts +39 -0
  85. package/src/config/vector-cortex-enc1a.ts +41 -0
  86. package/src/config/vector-cortex.ts +2 -0
  87. package/src/config.ts +2 -0
  88. package/src/vector-cortex/setup-cortex-blockers-compute.ts +216 -0
  89. package/extensions/dashboard-client/dist/assets/SetupTab-C3dnKa8y.js +0 -3
  90. package/extensions/dashboard-client/dist/assets/SetupTab-C3dnKa8y.js.map +0 -1
@@ -21,6 +21,8 @@ import { mkdirSync, readFileSync, writeFileSync, existsSync, readdirSync, } from
21
21
  import { join, dirname, basename } from "node:path";
22
22
  import { fileURLToPath } from "node:url";
23
23
  import { readEncoderManifest, verifyEncoderAsset, detectPlatform, } from "../../src/vector-cortex/encoder/asset.js";
24
+ import { ENC_0G_ENABLED, ENC_0F_ENABLED } from "../../src/config.js";
25
+ import { readQualificationRecord, encoderStateDir, } from "./qualification-record.js";
24
26
  /** Cap applied to every log tail served by the action-log route. */
25
27
  export const ACTION_LOG_TAIL_BYTES = 8192;
26
28
  /** Locate the commit's vc2-model-prep directory by walking up to the repo root. */
@@ -153,23 +155,38 @@ function runVerifyAsset(stateDir) {
153
155
  spawned: false,
154
156
  };
155
157
  }
158
+ /**
159
+ * The ENC-0g honesty suffix for the verify-asset summary line: when both gates
160
+ * are ON, surface the QualificationV1 record verdict so the action log is honest
161
+ * alongside the (possibly demoted) status card. Returns "" byte-identical when
162
+ * ENC_0G is off. Bounded + redacted (verdict + reasons only).
163
+ */
164
+ function qualificationRecordSuffix() {
165
+ if (!ENC_0G_ENABLED() || !ENC_0F_ENABLED())
166
+ return "";
167
+ const record = readQualificationRecord(encoderStateDir());
168
+ if (record === null)
169
+ return " record_verdict=unavailable";
170
+ return ` record_verdict=${record.verdict} record_reasons=${record.reasons.join(",")}`;
171
+ }
156
172
  /** Compute the redacted verify-asset summary lines (digests + codes only). */
157
173
  function buildVerifySummary() {
174
+ const suffix = qualificationRecordSuffix();
158
175
  const dir = encoderAssetDir();
159
176
  if (dir === null) {
160
- return "mode=C verdict=unavailable reason=asset_missing\n";
177
+ return `mode=C verdict=unavailable reason=asset_missing${suffix}\n`;
161
178
  }
162
179
  const manifest = readEncoderManifest(dir);
163
180
  if (manifest === null) {
164
- return "mode=B verdict=demoted reason=ENC_MANIFEST_INVALID\n";
181
+ return `mode=B verdict=demoted reason=ENC_MANIFEST_INVALID${suffix}\n`;
165
182
  }
166
183
  const platform = detectPlatform();
167
184
  const verify = verifyEncoderAsset(dir, manifest, platform);
168
185
  if (verify.ok) {
169
186
  const prefix = verify.onnxDigest.slice(0, 12);
170
- return `mode=A verdict=qualified onnx_digest_prefix=${prefix} embedded_bytes=${verify.embeddedBytes}\n`;
187
+ return `mode=A verdict=qualified onnx_digest_prefix=${prefix} embedded_bytes=${verify.embeddedBytes}${suffix}\n`;
171
188
  }
172
- return `mode=B verdict=demoted reason=${verify.code}\n`;
189
+ return `mode=B verdict=demoted reason=${verify.code}${suffix}\n`;
173
190
  }
174
191
  /** Walk up to the committed encoder-v1 asset dir (mirrors routes-setup-cortex.ts). */
175
192
  function encoderAssetDir() {
@@ -1,71 +1,5 @@
1
1
  /**
2
- * dashboard-server/setup-cortex-blockers.ts — canonical blocker manifest for the
3
- * dashboard Setup Cortex status read path (VC9A).
4
- *
5
- * The hard-gate items enumerated in docs/vector-cortex/vc2-model-prep.md §6
6
- * (per the 2026-08-05 research update: the opset-14→17 re-export blocker is
7
- * REMOVED because onnx-community exports are now opset 21). This module is the
8
- * SINGLE canonical source of those blockers — the route file
9
- * (routes-setup-cortex.ts) carries NO string literals for them; it reads this
10
- * static manifest so the UI rows and the spec stay in one place.
11
- *
12
- * Reader-only, static: zero network, no writes (PREVENT-PI-004), no `any`
13
- * (PREVENT-011).
2
+ * dashboard-server/setup-cortex-blockers.ts — thin shell re-exporting the
3
+ * canonical Setup Cortex blocker compute from src (single source of truth).
14
4
  */
15
- /**
16
- * The four blockers VC9A reports. Enumerates the vc2-model-prep §6 items that
17
- * remain per the 2026-08-05 research. The opset re-export blocker (formerly
18
- * §6 #2) is NOT listed: onnx-community exports are opset 21, so it is removed.
19
- */
20
- export const SETUP_CORTEX_BLOCKERS = [
21
- {
22
- id: "HG-1",
23
- title: "Five projection heads do not exist",
24
- severity: "blocker",
25
- status: "open",
26
- resolution: "Supervision transfer onto a frozen bge-small-en-v1.5 trunk (contradiction distilled from cross-encoder/nli-deberta-v3-small; dependency NLI-assisted; cache-stability deterministic; payload-routing small MLP) — VC2B training + export.",
27
- },
28
- {
29
- id: "HG-3",
30
- title: "onnxruntime-node install exceeds the 80 MiB asset budget",
31
- severity: "blocker",
32
- status: "open",
33
- resolution: "onnxruntime-node bundles ~258 MiB across all platforms. Candidate: transformers.js v4.2.0 (9.5 MiB shell, pure-Node via onnxruntime-web WASM) measured against budget + p95 gate before committing.",
34
- },
35
- {
36
- id: "HG-4",
37
- title: "No darwin-x64 binary in onnxruntime-node",
38
- severity: "high",
39
- status: "open",
40
- resolution: "Intel-Mac mode-A users demote to the WASM path (if HG-3 resolves that way) or mode B. " +
41
- "darwin-x64: no native binary upstream (arm64-only); mode-B WASM per HG-4.",
42
- },
43
- {
44
- id: "HG-5",
45
- title: "RSS margin at 512 tokens is ~0.5%",
46
- severity: "medium",
47
- status: "open",
48
- resolution: "149.2 MiB vs 150 MiB cap with run-to-run variance 119-149 MiB; considers capping mode A at 384 tokens or using the marginal-footprint accounting runtime.ts already implements.",
49
- },
50
- ];
51
- /** Look up one blocker by id; undefined when unknown (defensive). */
52
- export function setupCortexBlocker(id) {
53
- return SETUP_CORTEX_BLOCKERS.find((b) => b.id === id);
54
- }
55
- /**
56
- * The open hard-gate ids that BLOCK a given action. fetch-model and bench are
57
- * gated by HG-1 (five-head training open) and HG-3 (install budget open) per the
58
- * VC9 workstream plan; verify-asset is a pure re-read of committed assets and is
59
- * NOT gated. When a gated action is requested, the route returns
60
- * action_blocked_by_open_item with these ids and does NOT spawn. The ids are
61
- * always drawn from SETUP_CORTEX_BLOCKERS (each exists — verified by test).
62
- */
63
- export function setupCortexActionBlockers(action) {
64
- switch (action) {
65
- case "fetch-model":
66
- case "bench":
67
- return ["HG-1", "HG-3"];
68
- case "verify-asset":
69
- return [];
70
- }
71
- }
5
+ export * from "../../src/vector-cortex/setup-cortex-blockers-compute.js";
@@ -0,0 +1,37 @@
1
+ /**
2
+ * config/vector-cortex-enc0g.ts — ENC-0g Setup Cortex status route honest state.
3
+ *
4
+ * Extracted from vector-cortex.ts so that file stays under the 300-line soft
5
+ * limit (soft-as-hard gate), exactly as vector-cortex-enc0a.ts .. enc0f.ts and
6
+ * the VC8C/VC9A-D/ML5A-E/DEDUP_ATTR siblings were. vector-cortex.ts re-exports
7
+ * the flag below and root src/config.ts re-exports it, so no consumer import
8
+ * path changes.
9
+ *
10
+ * ENC-0g makes the Setup Cortex status route honest: the status route reads the
11
+ * latest ENC-0f `QualificationV1` record (when ENC_0F is ON and a record
12
+ * exists) and lets its verdict override the structural verifyEncoderAsset
13
+ * result for the `qualification` field; the blocker list becomes a pure
14
+ * computed function over (platform, qualification record, manifest head-count)
15
+ * with corrected HG statuses/wording; and VC9B action gating is re-derived from
16
+ * the live computed blockers instead of the stale static manifest.
17
+ *
18
+ * `MEGACOMPACT_ENC_0G=0` disables: the status route derives its `qualification`
19
+ * verdict from `verifyEncoderAsset(...).ok` alone, the blocker list is the
20
+ * static `SETUP_CORTEX_BLOCKERS` array exactly as ENC-0f-era, and action gating
21
+ * reads the static table as today — byte-identical to the predecessor. The flag
22
+ * MUST also be a dashboard SETTINGS toggle (visible in config UI, never in
23
+ * EXCLUDED_SETTINGS).
24
+ *
25
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
26
+ */
27
+ import { sprintFlag } from "./vector-cortex-flag.js";
28
+ /**
29
+ * ENC-0g — Setup Cortex status route honest state (verdict override + live
30
+ * blockers + re-derived gating). Default ON. `MEGACOMPACT_ENC_0G=0` disables
31
+ * and is byte-identical to the predecessor (ENC-0f): verdict from
32
+ * `verifyEncoderAsset` alone, static `SETUP_CORTEX_BLOCKERS`, static
33
+ * `setupCortexActionBlockers`. This flag MUST also be a dashboard SETTINGS
34
+ * toggle (visible in config UI, never in EXCLUDED_SETTINGS), mirroring
35
+ * ENC_0A/ENC_0B/ENC_0C/ENC_0D/ENC_0E/ENC_0F.
36
+ */
37
+ export const ENC_0G_ENABLED = () => sprintFlag("MEGACOMPACT_ENC_0G");
@@ -0,0 +1,39 @@
1
+ /**
2
+ * config/vector-cortex-enc1a.ts — ENC-1a external embedder API key + endpoint
3
+ * Settings fields.
4
+ *
5
+ * Extracted from vector-cortex.ts so that file stays under the 300-line soft
6
+ * limit (soft-as-hard gate), exactly as the ENC-0a..ENC-0g siblings were.
7
+ * vector-cortex.ts re-exports the flag below and root src/config.ts re-exports
8
+ * it, so no consumer import path changes.
9
+ *
10
+ * ENC-1a adds a Settings-visible field pair for the external embedder endpoint
11
+ * URL + optional Bearer API key. The runtime already reads
12
+ * `MEGACOMPACT_EMBEDDING_URL` and `MEGACOMPACT_EMBEDDING_KEY` from the process
13
+ * env (src/httpEmbedder.ts:embeddingConfigFromEnv) and the Setup tab's
14
+ * CustomEndpointSection already accepts a custom URL — but there is no
15
+ * dashboard-visible API-key field and no server route persists the pair to the
16
+ * per-repo `.mega-compact.env` so the session survives a restart. ENC-1a adds
17
+ * two additive contract fields on GET /api/setup-status (`embeddingEndpointUrl`
18
+ * echoed + `embeddingApiKeySet` boolean only — the raw key is NEVER returned),
19
+ * an additive writer branch on POST /api/setup-configure accepting
20
+ * `embeddingEndpointUrl` / `embeddingApiKey`, and two additive Setup text rows.
21
+ *
22
+ * `MEGACOMPACT_ENC_1A=0` disables: the Settings panel renders no ENC-1a text
23
+ * fields (only the existing boolDirect toggles remain), the GET body omits the
24
+ * two new fields, and the POST handler does not recognize the new keys —
25
+ * byte-identical to the ENC-0g predecessor. The flag MUST also be a dashboard
26
+ * SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS).
27
+ *
28
+ * Pi-agnostic, dependency-free (PREVENT-PI-004 / PREVENT-011).
29
+ */
30
+ import { sprintFlag } from "./vector-cortex-flag.js";
31
+ /**
32
+ * ENC-1a — external embedder API key + endpoint Settings fields. Default ON.
33
+ * `MEGACOMPACT_ENC_1A=0` disables and is byte-identical to the predecessor
34
+ * (ENC-0g): no new GET fields, no writer branch, no new Setup text rows (only
35
+ * the existing boolDirect toggles remain). This flag MUST also be a dashboard
36
+ * SETTINGS toggle (visible in config UI, never in EXCLUDED_SETTINGS), mirroring
37
+ * ENC_0A..ENC_0G.
38
+ */
39
+ export const ENC_1A_ENABLED = () => sprintFlag("MEGACOMPACT_ENC_1A");
@@ -31,5 +31,7 @@ export { ENC_0C_ENABLED } from "./vector-cortex-enc0c.js";
31
31
  export { ENC_0D_ENABLED } from "./vector-cortex-enc0d.js";
32
32
  export { ENC_0E_ENABLED } from "./vector-cortex-enc0e.js";
33
33
  export { ENC_0F_ENABLED } from "./vector-cortex-enc0f.js";
34
+ export { ENC_0G_ENABLED } from "./vector-cortex-enc0g.js";
35
+ export { ENC_1A_ENABLED } from "./vector-cortex-enc1a.js";
34
36
  // Breaker constants (TRIAD_RESILIENCE.md §breaker) extracted to vector-cortex-breakers.ts.
35
37
  export { BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./vector-cortex-breakers.js";
@@ -114,4 +114,4 @@ export const NEW_UI = () => ragEnabled("MEGACOMPACT_NEW_UI");
114
114
  // default ON, `=0`/`_DISABLED` off. Re-exported from src/config/vector-cortex.ts
115
115
  // so root consumers share one source of truth.
116
116
  // ---------------------------------------------------------------------------
117
- export { VC0A_ENABLED, VC0B_ENABLED, VC1A_ENABLED, VC0C_ENABLED, VC1B_ENABLED, VC1C_ENABLED, VC2A_ENABLED, VC2B_ENABLED, VC2C_ENABLED, VC3A_ENABLED, VC3B_ENABLED, VC3C_ENABLED, VC4A_ENABLED, VC4B_ENABLED, VC4C_ENABLED, VC5A_ENABLED, VC5B_ENABLED, VC5C_ENABLED, VC6A_ENABLED, VC6B_ENABLED, VC6C_ENABLED, VC7A_ENABLED, VC7B_ENABLED, VC7C_ENABLED, VC8A_ENABLED, VC8B_ENABLED, VC8C_ENABLED, VC9A_ENABLED, VC9B_ENABLED, VC9C_ENABLED, VC9D_ENABLED, PCC_ENABLED, ML5A_ENABLED, ML5B_ENABLED, ML5C_ENABLED, ML5D_ENABLED, ML5E_ENABLED, DEDUP_ATTR_ENABLED, ENC_0A_ENABLED, ENC_0B_ENABLED, ENC_0C_ENABLED, ENC_0D_ENABLED, ENC_0E_ENABLED, ENC_0F_ENABLED, BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./config/vector-cortex.js";
117
+ export { VC0A_ENABLED, VC0B_ENABLED, VC1A_ENABLED, VC0C_ENABLED, VC1B_ENABLED, VC1C_ENABLED, VC2A_ENABLED, VC2B_ENABLED, VC2C_ENABLED, VC3A_ENABLED, VC3B_ENABLED, VC3C_ENABLED, VC4A_ENABLED, VC4B_ENABLED, VC4C_ENABLED, VC5A_ENABLED, VC5B_ENABLED, VC5C_ENABLED, VC6A_ENABLED, VC6B_ENABLED, VC6C_ENABLED, VC7A_ENABLED, VC7B_ENABLED, VC7C_ENABLED, VC8A_ENABLED, VC8B_ENABLED, VC8C_ENABLED, VC9A_ENABLED, VC9B_ENABLED, VC9C_ENABLED, VC9D_ENABLED, PCC_ENABLED, ML5A_ENABLED, ML5B_ENABLED, ML5C_ENABLED, ML5D_ENABLED, ML5E_ENABLED, DEDUP_ATTR_ENABLED, ENC_0A_ENABLED, ENC_0B_ENABLED, ENC_0C_ENABLED, ENC_0D_ENABLED, ENC_0E_ENABLED, ENC_0F_ENABLED, ENC_0G_ENABLED, ENC_1A_ENABLED, BREAKER_WINDOW_MS, BREAKER_MIN_ATTEMPTS, BREAKER_PERF_FAILURES, BREAKER_PERF_FAILURE_RATE, BREAKER_CORRECTNESS_FAILURES, BREAKER_COOLDOWN_MS, BREAKER_PROBE_COUNT, BREAKER_RETRY_BASE_MS, BREAKER_RETRY_CAP_MS, BREAKER_RETRY_JITTER, BREAKER_HYSTERESIS_FAILURE_RATE, BREAKER_HYSTERESIS_BUDGET_P95_MS, BREAKER_MIN_HEALTHY_RESIDENCE_MS, } from "./config/vector-cortex.js";
@@ -0,0 +1,160 @@
1
+ /**
2
+ * src/vector-cortex/setup-cortex-blockers-compute.ts — canonical blocker
3
+ * manifest + pure computed blocker derivation for the Setup Cortex status
4
+ * read path (VC9A/ENC-0g).
5
+ *
6
+ * The hard-gate items enumerated in docs/vector-cortex/vc2-model-prep.md §6
7
+ * (per the 2026-08-05 research update: the opset-14→17 re-export blocker is
8
+ * REMOVED because onnx-community exports are now opset 21). This module is the
9
+ * SINGLE canonical source of those blockers — the route file
10
+ * (routes-setup-cortex.ts) carries NO string literals for them; it reads this
11
+ * manifest so the UI rows and the spec stay in one place.
12
+ *
13
+ * ENC-0g: `SETUP_CORTEX_BLOCKERS` remains the canonical BASE data (authored
14
+ * all-open, byte-identical to ENC-0f-era for flag-off). `computeSetupCortexBlockers`
15
+ * is a PURE function over (platform, ENC-0f QualificationV1 record, asset-manifest
16
+ * head-count) that returns the live blocker list: HG-1 closes on a five-head
17
+ * manifest (ENC-0c), HG-5 reflects the measured qualification verdict, HG-4
18
+ * notes the ENC-0e visibility close while the binary gap persists, HG-3 stays
19
+ * open (genuinely unresolved). `setupCortexActionBlockers` re-derives VC9B
20
+ * action gating from the live computed blockers (intersects each action's
21
+ * static candidate gate ids with the currently-open blocker ids).
22
+ *
23
+ * Reader-only, pure computation: zero network, no writes (PREVENT-PI-004), no
24
+ * `any` (PREVENT-011). Thresholds come from src/vector-cortex/encoder/types.js
25
+ * (ENCODER_HEAD_ORDER / ENCODER_LATENCY_P95_MS / ENCODER_RSS_BUDGET_BYTES) —
26
+ * never magic numbers in the computed path.
27
+ */
28
+ import { ENCODER_HEAD_ORDER, ENCODER_LATENCY_P95_MS, ENCODER_RSS_BUDGET_BYTES, } from "./encoder/types.js";
29
+ const MIB = 1024 * 1024;
30
+ /**
31
+ * Marker threshold-failure emitted by the status route when NO QualificationV1
32
+ * record exists on the device (or it is missing / unreadable / corrupt) — the
33
+ * route falls back to the verify-only verdict and includes this marker, never a
34
+ * fabricated pass and never a bare silent fallback. SINGLE source: the status
35
+ * route references this const, never a re-literal (no-scattered-literal scan).
36
+ */
37
+ export const QUALIFICATION_RECORD_UNAVAILABLE = "qualification_record_unavailable";
38
+ /**
39
+ * The four blockers VC9A reports. Enumerates the vc2-model-prep §6 items that
40
+ * remain per the 2026-08-05 research. The opset re-export blocker (formerly
41
+ * §6 #2) is NOT listed: onnx-community exports are opset 21, so it is removed.
42
+ * This is the canonical BASE (all `status:"open"`); `computeSetupCortexBlockers`
43
+ * derives the live list from it. Flag-off consumes this array verbatim.
44
+ */
45
+ export const SETUP_CORTEX_BLOCKERS = [
46
+ {
47
+ id: "HG-1",
48
+ title: "Five projection heads do not exist",
49
+ severity: "blocker",
50
+ status: "open",
51
+ resolution: "Supervision transfer onto a frozen bge-small-en-v1.5 trunk (contradiction distilled from cross-encoder/nli-deberta-v3-small; dependency NLI-assisted; cache-stability deterministic; payload-routing small MLP) — VC2B training + export.",
52
+ },
53
+ {
54
+ id: "HG-3",
55
+ title: "onnxruntime-node install exceeds the 80 MiB asset budget",
56
+ severity: "blocker",
57
+ status: "open",
58
+ resolution: "onnxruntime-node bundles ~258 MiB across all platforms. Candidate: transformers.js v4.2.0 (9.5 MiB shell, pure-Node via onnxruntime-web WASM) measured against budget + p95 gate before committing.",
59
+ },
60
+ {
61
+ id: "HG-4",
62
+ title: "No darwin-x64 binary in onnxruntime-node",
63
+ severity: "high",
64
+ status: "open",
65
+ resolution: "Intel-Mac mode-A users demote to the WASM path (if HG-3 resolves that way) or mode B. " +
66
+ "darwin-x64: no native binary upstream (arm64-only); mode-B WASM per HG-4.",
67
+ },
68
+ {
69
+ id: "HG-5",
70
+ title: "RSS margin at 512 tokens is ~0.5%",
71
+ severity: "medium",
72
+ status: "open",
73
+ resolution: "149.2 MiB vs 150 MiB cap with run-to-run variance 119-149 MiB; considers capping mode A at 384 tokens or using the marginal-footprint accounting runtime.ts already implements.",
74
+ },
75
+ ];
76
+ /** Look up one blocker by id; undefined when unknown (defensive). */
77
+ export function setupCortexBlocker(id) {
78
+ return SETUP_CORTEX_BLOCKERS.find((b) => b.id === id);
79
+ }
80
+ /**
81
+ * The live blockers computed from (platform, ENC-0f QualificationV1 record,
82
+ * asset-manifest head-count). Pure + deterministic — no IO, no clock, no flag
83
+ * dependence. Rules:
84
+ * - HG-1 → `"closed"` when the asset manifest declares all five projection
85
+ * heads (`headCount === ENCODER_HEAD_ORDER.length`); otherwise stays open.
86
+ * - HG-3 → unchanged (genuinely open — onnxruntime-node budget unresolved).
87
+ * - HG-4 → stays `"open"` (the upstream binary gap is unchanged); resolution
88
+ * notes that ENC-0e ships the darwin demotion visibility surface.
89
+ * - HG-5 → derived from the qualification record: an empty record is
90
+ * `"superseded"` (no measurement on this device); a `failed` verdict closes
91
+ * it with the measured p95/RSS wording; a `qualified` verdict closes it with
92
+ * "measured" wording. Severity stays `"medium"` from the base row.
93
+ * `platform` is carried for contract symmetry with Worker B's route input; the
94
+ * HG rules here do not branch on it (HG-4's darwin note applies regardless).
95
+ */
96
+ export function computeSetupCortexBlockers(input) {
97
+ const { qualification, headCount } = input;
98
+ return SETUP_CORTEX_BLOCKERS.map((base) => {
99
+ switch (base.id) {
100
+ case "HG-1":
101
+ return headCount === ENCODER_HEAD_ORDER.length
102
+ ? { ...base, status: "closed" }
103
+ : base;
104
+ case "HG-4":
105
+ return {
106
+ ...base,
107
+ resolution: `${base.resolution} ENC-0e shipped the darwin demotion visibility surface.`,
108
+ };
109
+ case "HG-5":
110
+ if (qualification === null) {
111
+ return {
112
+ ...base,
113
+ status: "superseded",
114
+ resolution: "No QualificationV1 record on this device — run the gate (scripts/encoder/gate-qualify.mjs) to measure.",
115
+ };
116
+ }
117
+ if (qualification.verdict === "failed") {
118
+ return {
119
+ ...base,
120
+ title: "Real-asset qualification: failed (latency + marginal-RSS over budget)",
121
+ status: "closed",
122
+ resolution: `p95 ${qualification.p95Ms} ms vs ${ENCODER_LATENCY_P95_MS} ms gate, marginal RSS ${qualification.rssMib} MiB vs ${ENCODER_RSS_BUDGET_BYTES / MIB} MiB cap — mode A requires the native onnxruntime-node selection`,
123
+ };
124
+ }
125
+ return {
126
+ ...base,
127
+ title: "Real-asset qualification: measured",
128
+ status: "closed",
129
+ };
130
+ default:
131
+ return base;
132
+ }
133
+ });
134
+ }
135
+ /**
136
+ * The static PER-ACTION CANDIDATE gate ids — this is POLICY, NOT the derived
137
+ * gating. fetch-model and bench ARE candidates for HG-1 (five-head training)
138
+ * and HG-3 (install budget); verify-asset is a pure re-read of committed assets
139
+ * and is NEVER gated (empty candidate list). The derived gating (below)
140
+ * intersects these candidates with the currently-OPEN blockers from the live
141
+ * computed list, so a candidate only blocks when its blocker is actually open.
142
+ */
143
+ const ACTION_GATE_CANDIDATES = {
144
+ "fetch-model": ["HG-1", "HG-3"],
145
+ bench: ["HG-1", "HG-3"],
146
+ "verify-asset": [],
147
+ };
148
+ /**
149
+ * Re-derived VC9B action gating from the LIVE computed blockers. An action is
150
+ * gated by exactly the candidate ids that are `status:"open"` AND
151
+ * `severity:"blocker"` in the supplied blockers. `blockers` defaults to the
152
+ * base `SETUP_CORTEX_BLOCKERS` (authored all-open) for backward compatibility
153
+ * with single-arg callers — with HG-1 closed by a computed list, fetch-model
154
+ * and bench surface `["HG-3"]`; verify-asset always `[]`.
155
+ */
156
+ export function setupCortexActionBlockers(action, blockers) {
157
+ const live = blockers ?? SETUP_CORTEX_BLOCKERS;
158
+ const openBlockerIds = new Set(live.filter((b) => b.status === "open" && b.severity === "blocker").map((b) => b.id));
159
+ return ACTION_GATE_CANDIDATES[action].filter((id) => openBlockerIds.has(id));
160
+ }
@@ -0,0 +1,160 @@
1
+ /**
2
+ * src/vector-cortex/setup-cortex-blockers-compute.ts — canonical blocker
3
+ * manifest + pure computed blocker derivation for the Setup Cortex status
4
+ * read path (VC9A/ENC-0g).
5
+ *
6
+ * The hard-gate items enumerated in docs/vector-cortex/vc2-model-prep.md §6
7
+ * (per the 2026-08-05 research update: the opset-14→17 re-export blocker is
8
+ * REMOVED because onnx-community exports are now opset 21). This module is the
9
+ * SINGLE canonical source of those blockers — the route file
10
+ * (routes-setup-cortex.ts) carries NO string literals for them; it reads this
11
+ * manifest so the UI rows and the spec stay in one place.
12
+ *
13
+ * ENC-0g: `SETUP_CORTEX_BLOCKERS` remains the canonical BASE data (authored
14
+ * all-open, byte-identical to ENC-0f-era for flag-off). `computeSetupCortexBlockers`
15
+ * is a PURE function over (platform, ENC-0f QualificationV1 record, asset-manifest
16
+ * head-count) that returns the live blocker list: HG-1 closes on a five-head
17
+ * manifest (ENC-0c), HG-5 reflects the measured qualification verdict, HG-4
18
+ * notes the ENC-0e visibility close while the binary gap persists, HG-3 stays
19
+ * open (genuinely unresolved). `setupCortexActionBlockers` re-derives VC9B
20
+ * action gating from the live computed blockers (intersects each action's
21
+ * static candidate gate ids with the currently-open blocker ids).
22
+ *
23
+ * Reader-only, pure computation: zero network, no writes (PREVENT-PI-004), no
24
+ * `any` (PREVENT-011). Thresholds come from src/vector-cortex/encoder/types.js
25
+ * (ENCODER_HEAD_ORDER / ENCODER_LATENCY_P95_MS / ENCODER_RSS_BUDGET_BYTES) —
26
+ * never magic numbers in the computed path.
27
+ */
28
+ import { ENCODER_HEAD_ORDER, ENCODER_LATENCY_P95_MS, ENCODER_RSS_BUDGET_BYTES, } from "./encoder/types.js";
29
+ const MIB = 1024 * 1024;
30
+ /**
31
+ * Marker threshold-failure emitted by the status route when NO QualificationV1
32
+ * record exists on the device (or it is missing / unreadable / corrupt) — the
33
+ * route falls back to the verify-only verdict and includes this marker, never a
34
+ * fabricated pass and never a bare silent fallback. SINGLE source: the status
35
+ * route references this const, never a re-literal (no-scattered-literal scan).
36
+ */
37
+ export const QUALIFICATION_RECORD_UNAVAILABLE = "qualification_record_unavailable";
38
+ /**
39
+ * The four blockers VC9A reports. Enumerates the vc2-model-prep §6 items that
40
+ * remain per the 2026-08-05 research. The opset re-export blocker (formerly
41
+ * §6 #2) is NOT listed: onnx-community exports are opset 21, so it is removed.
42
+ * This is the canonical BASE (all `status:"open"`); `computeSetupCortexBlockers`
43
+ * derives the live list from it. Flag-off consumes this array verbatim.
44
+ */
45
+ export const SETUP_CORTEX_BLOCKERS = [
46
+ {
47
+ id: "HG-1",
48
+ title: "Five projection heads do not exist",
49
+ severity: "blocker",
50
+ status: "open",
51
+ resolution: "Supervision transfer onto a frozen bge-small-en-v1.5 trunk (contradiction distilled from cross-encoder/nli-deberta-v3-small; dependency NLI-assisted; cache-stability deterministic; payload-routing small MLP) — VC2B training + export.",
52
+ },
53
+ {
54
+ id: "HG-3",
55
+ title: "onnxruntime-node install exceeds the 80 MiB asset budget",
56
+ severity: "blocker",
57
+ status: "open",
58
+ resolution: "onnxruntime-node bundles ~258 MiB across all platforms. Candidate: transformers.js v4.2.0 (9.5 MiB shell, pure-Node via onnxruntime-web WASM) measured against budget + p95 gate before committing.",
59
+ },
60
+ {
61
+ id: "HG-4",
62
+ title: "No darwin-x64 binary in onnxruntime-node",
63
+ severity: "high",
64
+ status: "open",
65
+ resolution: "Intel-Mac mode-A users demote to the WASM path (if HG-3 resolves that way) or mode B. " +
66
+ "darwin-x64: no native binary upstream (arm64-only); mode-B WASM per HG-4.",
67
+ },
68
+ {
69
+ id: "HG-5",
70
+ title: "RSS margin at 512 tokens is ~0.5%",
71
+ severity: "medium",
72
+ status: "open",
73
+ resolution: "149.2 MiB vs 150 MiB cap with run-to-run variance 119-149 MiB; considers capping mode A at 384 tokens or using the marginal-footprint accounting runtime.ts already implements.",
74
+ },
75
+ ];
76
+ /** Look up one blocker by id; undefined when unknown (defensive). */
77
+ export function setupCortexBlocker(id) {
78
+ return SETUP_CORTEX_BLOCKERS.find((b) => b.id === id);
79
+ }
80
+ /**
81
+ * The live blockers computed from (platform, ENC-0f QualificationV1 record,
82
+ * asset-manifest head-count). Pure + deterministic — no IO, no clock, no flag
83
+ * dependence. Rules:
84
+ * - HG-1 → `"closed"` when the asset manifest declares all five projection
85
+ * heads (`headCount === ENCODER_HEAD_ORDER.length`); otherwise stays open.
86
+ * - HG-3 → unchanged (genuinely open — onnxruntime-node budget unresolved).
87
+ * - HG-4 → stays `"open"` (the upstream binary gap is unchanged); resolution
88
+ * notes that ENC-0e ships the darwin demotion visibility surface.
89
+ * - HG-5 → derived from the qualification record: an empty record is
90
+ * `"superseded"` (no measurement on this device); a `failed` verdict closes
91
+ * it with the measured p95/RSS wording; a `qualified` verdict closes it with
92
+ * "measured" wording. Severity stays `"medium"` from the base row.
93
+ * `platform` is carried for contract symmetry with Worker B's route input; the
94
+ * HG rules here do not branch on it (HG-4's darwin note applies regardless).
95
+ */
96
+ export function computeSetupCortexBlockers(input) {
97
+ const { qualification, headCount } = input;
98
+ return SETUP_CORTEX_BLOCKERS.map((base) => {
99
+ switch (base.id) {
100
+ case "HG-1":
101
+ return headCount === ENCODER_HEAD_ORDER.length
102
+ ? { ...base, status: "closed" }
103
+ : base;
104
+ case "HG-4":
105
+ return {
106
+ ...base,
107
+ resolution: `${base.resolution} ENC-0e shipped the darwin demotion visibility surface.`,
108
+ };
109
+ case "HG-5":
110
+ if (qualification === null) {
111
+ return {
112
+ ...base,
113
+ status: "superseded",
114
+ resolution: "No QualificationV1 record on this device — run the gate (scripts/encoder/gate-qualify.mjs) to measure.",
115
+ };
116
+ }
117
+ if (qualification.verdict === "failed") {
118
+ return {
119
+ ...base,
120
+ title: "Real-asset qualification: failed (latency + marginal-RSS over budget)",
121
+ status: "closed",
122
+ resolution: `p95 ${qualification.p95Ms} ms vs ${ENCODER_LATENCY_P95_MS} ms gate, marginal RSS ${qualification.rssMib} MiB vs ${ENCODER_RSS_BUDGET_BYTES / MIB} MiB cap — mode A requires the native onnxruntime-node selection`,
123
+ };
124
+ }
125
+ return {
126
+ ...base,
127
+ title: "Real-asset qualification: measured",
128
+ status: "closed",
129
+ };
130
+ default:
131
+ return base;
132
+ }
133
+ });
134
+ }
135
+ /**
136
+ * The static PER-ACTION CANDIDATE gate ids — this is POLICY, NOT the derived
137
+ * gating. fetch-model and bench ARE candidates for HG-1 (five-head training)
138
+ * and HG-3 (install budget); verify-asset is a pure re-read of committed assets
139
+ * and is NEVER gated (empty candidate list). The derived gating (below)
140
+ * intersects these candidates with the currently-OPEN blockers from the live
141
+ * computed list, so a candidate only blocks when its blocker is actually open.
142
+ */
143
+ const ACTION_GATE_CANDIDATES = {
144
+ "fetch-model": ["HG-1", "HG-3"],
145
+ bench: ["HG-1", "HG-3"],
146
+ "verify-asset": [],
147
+ };
148
+ /**
149
+ * Re-derived VC9B action gating from the LIVE computed blockers. An action is
150
+ * gated by exactly the candidate ids that are `status:"open"` AND
151
+ * `severity:"blocker"` in the supplied blockers. `blockers` defaults to the
152
+ * base `SETUP_CORTEX_BLOCKERS` (authored all-open) for backward compatibility
153
+ * with single-arg callers — with HG-1 closed by a computed list, fetch-model
154
+ * and bench surface `["HG-3"]`; verify-asset always `[]`.
155
+ */
156
+ export function setupCortexActionBlockers(action, blockers) {
157
+ const live = blockers ?? SETUP_CORTEX_BLOCKERS;
158
+ const openBlockerIds = new Set(live.filter((b) => b.status === "open" && b.severity === "blocker").map((b) => b.id));
159
+ return ACTION_GATE_CANDIDATES[action].filter((id) => openBlockerIds.has(id));
160
+ }
@@ -1,2 +1,2 @@
1
- import{b as R,c as W,m as T,i as C,d as F,A as ie,e as B,h as q,j as oe,k as G,l as se,n as le,u as ue,o as K,G as ce,p as J,q as Q,D as fe,g as pe,X as he,Y as de,f as me}from"./generateCategoricalChart-B1PeCct1.js";import{R as p,A as ee,r as ve}from"./index-DuThOA-d.js";var ye=["layout","type","stroke","connectNulls","isRange","ref"],be=["key"],te;function M(e){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(e)}function ae(e,t){if(e==null)return{};var r=Ae(e,t),a,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Ae(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},D.apply(this,arguments)}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(a){E(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ne(a.key),a)}}function xe(e,t,r){return t&&Z(e.prototype,t),r&&Z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pe(e,t,r){return t=$(t),Oe(e,re()?Reflect.construct(t,r||[],$(e).constructor):t.apply(e,r))}function Oe(e,t){if(t&&(M(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function Ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(re=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$(e)}function we(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},X(e,t)}function E(e,t,r){return t=ne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e){var t=_e(e,"string");return M(t)=="symbol"?t:t+""}function _e(e,t){if(M(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(M(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var L=function(e){function t(){var r;ge(this,t);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return r=Pe(this,t,[].concat(n)),E(r,"state",{isAnimationFinished:!0}),E(r,"id",ue("recharts-area-")),E(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),K(o)&&o()}),E(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),K(o)&&o()}),r}return we(t,e),xe(t,[{key:"renderDots",value:function(a,n,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,l=u.dot,f=u.points,c=u.dataKey,h=R(this.props,!1),A=R(l,!0),g=f.map(function(v,O){var y=S(S(S({key:"dot-".concat(O),r:3},h),A),{},{index:O,cx:v.x,cy:v.y,dataKey:c,value:v.value,payload:v.payload,points:f});return t.renderDotItem(l,y)}),x={clipPath:a?"url(#clipPath-".concat(n?"":"dots-").concat(i,")"):null};return p.createElement(W,D({className:"recharts-area-dots"},x),g)}},{key:"renderHorizontalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].x,l=o[o.length-1].x,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.y||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.y||0})),c)),C(c)?p.createElement("rect",{x:u<l?u:u-f,y:0,width:f,height:Math.floor(c+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].y,l=o[o.length-1].y,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.x||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.x||0})),c)),C(c)?p.createElement("rect",{x:0,y:u<l?u:u-f,width:c+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(a){var n=this.props.layout;return n==="vertical"?this.renderVerticalRect(a):this.renderHorizontalRect(a)}},{key:"renderAreaStatically",value:function(a,n,i,o){var s=this.props,u=s.layout,l=s.type,f=s.stroke,c=s.connectNulls,h=s.isRange;s.ref;var A=ae(s,ye);return p.createElement(W,{clipPath:i?"url(#clipPath-".concat(o,")"):null},p.createElement(F,D({},R(A,!0),{points:a,connectNulls:c,type:l,baseLine:n,layout:u,stroke:"none",className:"recharts-area-area"})),f!=="none"&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:a})),f!=="none"&&h&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(a,n){var i=this,o=this.props,s=o.points,u=o.baseLine,l=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,h=o.animationEasing,A=o.animationId,g=this.state,x=g.prevPoints,v=g.prevBaseLine;return p.createElement(ie,{begin:f,duration:c,isActive:l,easing:h,from:{t:0},to:{t:1},key:"area-".concat(A),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var y=O.t;if(x){var _=x.length/s.length,d=s.map(function(P,N){var k=Math.floor(N*_);if(x[k]){var j=x[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P}),m;if(C(u)&&typeof u=="number"){var b=B(v,u);m=b(y)}else if(q(u)||oe(u)){var w=B(v,0);m=w(y)}else m=u.map(function(P,N){var k=Math.floor(N*_);if(v[k]){var j=v[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P});return i.renderAreaStatically(d,m,a,n)}return p.createElement(W,null,p.createElement("defs",null,p.createElement("clipPath",{id:"animationClipPath-".concat(n)},i.renderClipRect(y))),p.createElement(W,{clipPath:"url(#animationClipPath-".concat(n,")")},i.renderAreaStatically(s,u,a,n)))})}},{key:"renderArea",value:function(a,n){var i=this.props,o=i.points,s=i.baseLine,u=i.isAnimationActive,l=this.state,f=l.prevPoints,c=l.prevBaseLine,h=l.totalLength;return u&&o&&o.length&&(!f&&h>0||!G(f,o)||!G(c,s))?this.renderAreaWithAnimation(a,n):this.renderAreaStatically(o,s,a,n)}},{key:"render",value:function(){var a,n=this.props,i=n.hide,o=n.dot,s=n.points,u=n.className,l=n.top,f=n.left,c=n.xAxis,h=n.yAxis,A=n.width,g=n.height,x=n.isAnimationActive,v=n.id;if(i||!s||!s.length)return null;var O=this.state.isAnimationFinished,y=s.length===1,_=ee("recharts-area",u),d=c&&c.allowDataOverflow,m=h&&h.allowDataOverflow,b=d||m,w=q(v)?this.id:v,P=(a=R(o,!1))!==null&&a!==void 0?a:{r:3,strokeWidth:2},N=P.r,k=N===void 0?3:N,j=P.strokeWidth,I=j===void 0?2:j,V=se(o)?o:{},Y=V.clipDot,H=Y===void 0?!0:Y,z=k*2+I;return p.createElement(W,{className:_},d||m?p.createElement("defs",null,p.createElement("clipPath",{id:"clipPath-".concat(w)},p.createElement("rect",{x:d?f:f-A/2,y:m?l:l-g/2,width:d?A:A*2,height:m?g:g*2})),!H&&p.createElement("clipPath",{id:"clipPath-dots-".concat(w)},p.createElement("rect",{x:f-z/2,y:l-z/2,width:A+z,height:g+z}))):null,y?null:this.renderArea(b,w),(o||y)&&this.renderDots(b,H,w),(!x||O)&&le.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(a,n){return a.animationId!==n.prevAnimationId?{prevAnimationId:a.animationId,curPoints:a.points,curBaseLine:a.baseLine,prevPoints:n.curPoints,prevBaseLine:n.curBaseLine}:a.points!==n.curPoints||a.baseLine!==n.curBaseLine?{curPoints:a.points,curBaseLine:a.baseLine}:null}}])}(ve.PureComponent);te=L;E(L,"displayName","Area");E(L,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ce.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});E(L,"getBaseValue",function(e,t,r,a){var n=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(C(s)&&typeof s=="number")return s;var u=n==="horizontal"?a:r,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),c=Math.min(l[0],l[1]);return s==="dataMin"?c:s==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});E(L,"getComposedData",function(e){var t=e.props,r=e.item,a=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,f=e.dataStartIndex,c=e.displayedData,h=e.offset,A=t.layout,g=l&&l.length,x=te.getBaseValue(t,r,a,n),v=A==="horizontal",O=!1,y=c.map(function(d,m){var b;g?b=l[f+m]:(b=J(d,u),Array.isArray(b)?O=!0:b=[x,b]);var w=b[1]==null||g&&J(d,u)==null;return v?{x:Q({axis:a,ticks:i,bandSize:s,entry:d,index:m}),y:w?null:n.scale(b[1]),value:b,payload:d}:{x:w?null:a.scale(b[1]),y:Q({axis:n,ticks:o,bandSize:s,entry:d,index:m}),value:b,payload:d}}),_;return g||O?_=y.map(function(d){var m=Array.isArray(d.value)?d.value[0]:null;return v?{x:d.x,y:m!=null&&d.y!=null?n.scale(m):null}:{x:m!=null?a.scale(m):null,y:d.y}}):_=v?n.scale(x):a.scale(x),S({points:y,baseLine:_,layout:A,isRange:O},h)});E(L,"renderDotItem",function(e,t){var r;if(p.isValidElement(e))r=p.cloneElement(e,t);else if(K(e))r=e(t);else{var a=ee("recharts-area-dot",typeof e!="boolean"?e.className:""),n=t.key,i=ae(t,be);r=p.createElement(fe,D({},i,{key:n,className:a}))}return r});var ke=pe({chartName:"AreaChart",GraphicalChild:L,axisComponents:[{axisType:"xAxis",AxisComp:he},{axisType:"yAxis",AxisComp:de}],formatAxisMap:me});export{ke as A,L as a};
2
- //# sourceMappingURL=AreaChart-COnj8FHi.js.map
1
+ import{b as R,c as W,m as T,i as C,d as F,A as ie,e as B,h as q,j as oe,k as G,l as se,n as le,u as ue,o as K,G as ce,p as J,q as Q,D as fe,g as pe,X as he,Y as de,f as me}from"./generateCategoricalChart-DhQquRa8.js";import{R as p,A as ee,r as ve}from"./index-BUP3MK5S.js";var ye=["layout","type","stroke","connectNulls","isRange","ref"],be=["key"],te;function M(e){"@babel/helpers - typeof";return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(e)}function ae(e,t){if(e==null)return{};var r=Ae(e,t),a,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)a=i[n],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function Ae(e,t){if(e==null)return{};var r={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;r[a]=e[a]}return r}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},D.apply(this,arguments)}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,a)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(a){E(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ne(a.key),a)}}function xe(e,t,r){return t&&Z(e.prototype,t),r&&Z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pe(e,t,r){return t=$(t),Oe(e,re()?Reflect.construct(t,r||[],$(e).constructor):t.apply(e,r))}function Oe(e,t){if(t&&(M(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function Ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(re=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$(e)}function we(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},X(e,t)}function E(e,t,r){return t=ne(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e){var t=_e(e,"string");return M(t)=="symbol"?t:t+""}function _e(e,t){if(M(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t);if(M(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var L=function(e){function t(){var r;ge(this,t);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return r=Pe(this,t,[].concat(n)),E(r,"state",{isAnimationFinished:!0}),E(r,"id",ue("recharts-area-")),E(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),K(o)&&o()}),E(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),K(o)&&o()}),r}return we(t,e),xe(t,[{key:"renderDots",value:function(a,n,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var u=this.props,l=u.dot,f=u.points,c=u.dataKey,h=R(this.props,!1),A=R(l,!0),g=f.map(function(v,O){var y=S(S(S({key:"dot-".concat(O),r:3},h),A),{},{index:O,cx:v.x,cy:v.y,dataKey:c,value:v.value,payload:v.payload,points:f});return t.renderDotItem(l,y)}),x={clipPath:a?"url(#clipPath-".concat(n?"":"dots-").concat(i,")"):null};return p.createElement(W,D({className:"recharts-area-dots"},x),g)}},{key:"renderHorizontalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].x,l=o[o.length-1].x,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.y||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.y||0})),c)),C(c)?p.createElement("rect",{x:u<l?u:u-f,y:0,width:f,height:Math.floor(c+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(a){var n=this.props,i=n.baseLine,o=n.points,s=n.strokeWidth,u=o[0].y,l=o[o.length-1].y,f=a*Math.abs(u-l),c=T(o.map(function(h){return h.x||0}));return C(i)&&typeof i=="number"?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(T(i.map(function(h){return h.x||0})),c)),C(c)?p.createElement("rect",{x:0,y:u<l?u:u-f,width:c+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(a){var n=this.props.layout;return n==="vertical"?this.renderVerticalRect(a):this.renderHorizontalRect(a)}},{key:"renderAreaStatically",value:function(a,n,i,o){var s=this.props,u=s.layout,l=s.type,f=s.stroke,c=s.connectNulls,h=s.isRange;s.ref;var A=ae(s,ye);return p.createElement(W,{clipPath:i?"url(#clipPath-".concat(o,")"):null},p.createElement(F,D({},R(A,!0),{points:a,connectNulls:c,type:l,baseLine:n,layout:u,stroke:"none",className:"recharts-area-area"})),f!=="none"&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:a})),f!=="none"&&h&&p.createElement(F,D({},R(this.props,!1),{className:"recharts-area-curve",layout:u,type:l,connectNulls:c,fill:"none",points:n})))}},{key:"renderAreaWithAnimation",value:function(a,n){var i=this,o=this.props,s=o.points,u=o.baseLine,l=o.isAnimationActive,f=o.animationBegin,c=o.animationDuration,h=o.animationEasing,A=o.animationId,g=this.state,x=g.prevPoints,v=g.prevBaseLine;return p.createElement(ie,{begin:f,duration:c,isActive:l,easing:h,from:{t:0},to:{t:1},key:"area-".concat(A),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var y=O.t;if(x){var _=x.length/s.length,d=s.map(function(P,N){var k=Math.floor(N*_);if(x[k]){var j=x[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P}),m;if(C(u)&&typeof u=="number"){var b=B(v,u);m=b(y)}else if(q(u)||oe(u)){var w=B(v,0);m=w(y)}else m=u.map(function(P,N){var k=Math.floor(N*_);if(v[k]){var j=v[k],I=B(j.x,P.x),V=B(j.y,P.y);return S(S({},P),{},{x:I(y),y:V(y)})}return P});return i.renderAreaStatically(d,m,a,n)}return p.createElement(W,null,p.createElement("defs",null,p.createElement("clipPath",{id:"animationClipPath-".concat(n)},i.renderClipRect(y))),p.createElement(W,{clipPath:"url(#animationClipPath-".concat(n,")")},i.renderAreaStatically(s,u,a,n)))})}},{key:"renderArea",value:function(a,n){var i=this.props,o=i.points,s=i.baseLine,u=i.isAnimationActive,l=this.state,f=l.prevPoints,c=l.prevBaseLine,h=l.totalLength;return u&&o&&o.length&&(!f&&h>0||!G(f,o)||!G(c,s))?this.renderAreaWithAnimation(a,n):this.renderAreaStatically(o,s,a,n)}},{key:"render",value:function(){var a,n=this.props,i=n.hide,o=n.dot,s=n.points,u=n.className,l=n.top,f=n.left,c=n.xAxis,h=n.yAxis,A=n.width,g=n.height,x=n.isAnimationActive,v=n.id;if(i||!s||!s.length)return null;var O=this.state.isAnimationFinished,y=s.length===1,_=ee("recharts-area",u),d=c&&c.allowDataOverflow,m=h&&h.allowDataOverflow,b=d||m,w=q(v)?this.id:v,P=(a=R(o,!1))!==null&&a!==void 0?a:{r:3,strokeWidth:2},N=P.r,k=N===void 0?3:N,j=P.strokeWidth,I=j===void 0?2:j,V=se(o)?o:{},Y=V.clipDot,H=Y===void 0?!0:Y,z=k*2+I;return p.createElement(W,{className:_},d||m?p.createElement("defs",null,p.createElement("clipPath",{id:"clipPath-".concat(w)},p.createElement("rect",{x:d?f:f-A/2,y:m?l:l-g/2,width:d?A:A*2,height:m?g:g*2})),!H&&p.createElement("clipPath",{id:"clipPath-dots-".concat(w)},p.createElement("rect",{x:f-z/2,y:l-z/2,width:A+z,height:g+z}))):null,y?null:this.renderArea(b,w),(o||y)&&this.renderDots(b,H,w),(!x||O)&&le.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(a,n){return a.animationId!==n.prevAnimationId?{prevAnimationId:a.animationId,curPoints:a.points,curBaseLine:a.baseLine,prevPoints:n.curPoints,prevBaseLine:n.curBaseLine}:a.points!==n.curPoints||a.baseLine!==n.curBaseLine?{curPoints:a.points,curBaseLine:a.baseLine}:null}}])}(ve.PureComponent);te=L;E(L,"displayName","Area");E(L,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ce.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});E(L,"getBaseValue",function(e,t,r,a){var n=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(C(s)&&typeof s=="number")return s;var u=n==="horizontal"?a:r,l=u.scale.domain();if(u.type==="number"){var f=Math.max(l[0],l[1]),c=Math.min(l[0],l[1]);return s==="dataMin"?c:s==="dataMax"||f<0?f:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});E(L,"getComposedData",function(e){var t=e.props,r=e.item,a=e.xAxis,n=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,f=e.dataStartIndex,c=e.displayedData,h=e.offset,A=t.layout,g=l&&l.length,x=te.getBaseValue(t,r,a,n),v=A==="horizontal",O=!1,y=c.map(function(d,m){var b;g?b=l[f+m]:(b=J(d,u),Array.isArray(b)?O=!0:b=[x,b]);var w=b[1]==null||g&&J(d,u)==null;return v?{x:Q({axis:a,ticks:i,bandSize:s,entry:d,index:m}),y:w?null:n.scale(b[1]),value:b,payload:d}:{x:w?null:a.scale(b[1]),y:Q({axis:n,ticks:o,bandSize:s,entry:d,index:m}),value:b,payload:d}}),_;return g||O?_=y.map(function(d){var m=Array.isArray(d.value)?d.value[0]:null;return v?{x:d.x,y:m!=null&&d.y!=null?n.scale(m):null}:{x:m!=null?a.scale(m):null,y:d.y}}):_=v?n.scale(x):a.scale(x),S({points:y,baseLine:_,layout:A,isRange:O},h)});E(L,"renderDotItem",function(e,t){var r;if(p.isValidElement(e))r=p.cloneElement(e,t);else if(K(e))r=e(t);else{var a=ee("recharts-area-dot",typeof e!="boolean"?e.className:""),n=t.key,i=ae(t,be);r=p.createElement(fe,D({},i,{key:n,className:a}))}return r});var ke=pe({chartName:"AreaChart",GraphicalChild:L,axisComponents:[{axisType:"xAxis",AxisComp:he},{axisType:"yAxis",AxisComp:de}],formatAxisMap:me});export{ke as A,L as a};
2
+ //# sourceMappingURL=AreaChart-CeVnaV-0.js.map