agentwrangler 0.1.1-next.37edadd → 0.1.1-next.8be2eb0
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.
- package/dist/detector/detectors/d10_catalog_footprint.js +2 -2
- package/dist/detector/detectors/d1_ctx_always_loaded.js +9 -9
- package/dist/detector/detectors/d2_session_long_full_context.js +2 -2
- package/dist/detector/detectors/d4_model_mismatch.js +3 -3
- package/dist/detector/detectors/d6_tool_result_bloat.js +1 -1
- package/dist/detector/detectors/d7_loop_retry_waste.js +1 -1
- package/dist/detector/detectors/d8_cache_write_churn.js +2 -2
- package/dist/detector/detectors/d9_idle_background_session.js +1 -1
- package/dist/ui/assets/{BarChart-DtiRvMcr.js → BarChart-VQGcJCLY.js} +1 -1
- package/dist/ui/assets/BriefsPage-CmhxCHLf.js +2 -0
- package/dist/ui/assets/{CacheWriteSpikesChart-xdkHBE3F.js → CacheWriteSpikesChart-C641X3kK.js} +1 -1
- package/dist/ui/assets/{CartesianChart-D-h-lxMH.js → CartesianChart-BTva-_b9.js} +1 -1
- package/dist/ui/assets/Chip-Gem94sHD.js +1 -0
- package/dist/ui/assets/{ComposedChart-CGRu3OgM.js → ComposedChart-CS5SgLoo.js} +1 -1
- package/dist/ui/assets/{EmptyState-DaredZkz.js → EmptyState-Dhyw1Dvj.js} +1 -1
- package/dist/ui/assets/{FlavorDecomposition-CsjmGpn4.js → FlavorDecomposition-Dle5qGWA.js} +1 -1
- package/dist/ui/assets/FrictionCell-BN-7hRQU.js +2 -0
- package/dist/ui/assets/GlossaryPage-DkZXoJTT.js +1 -0
- package/dist/ui/assets/HotSessionsPage-C_hD8WUr.js +1 -0
- package/dist/ui/assets/{InfoTip-Dz9gTGzB.js → InfoTip-DCQtERnJ.js} +1 -1
- package/dist/ui/assets/{Legend-CGv-AdS2.js → Legend-SbbUv9Nm.js} +1 -1
- package/dist/ui/assets/{Line-qG79fweY.js → Line-Dvv4aBXw.js} +1 -1
- package/dist/ui/assets/OverviewPage-Blab_aYw.js +2 -0
- package/dist/ui/assets/RecommendationsPage-DmguRb6u.js +2 -0
- package/dist/ui/assets/{Scatter-d3NgmWkl.js → Scatter-xyJ9miNg.js} +1 -1
- package/dist/ui/assets/SessionDetailPage-kcGm5Cph.js +1 -0
- package/dist/ui/assets/SettingsPage-DWfbUCe8.js +25 -0
- package/dist/ui/assets/{Skeleton-DCy0HCWx.js → Skeleton-D5lrQpCm.js} +1 -1
- package/dist/ui/assets/SpendPercentileChip-C3hfiYOG.js +1 -0
- package/dist/ui/assets/{TrendChart-CFOgoXpm.js → TrendChart-B8RRiXUW.js} +1 -1
- package/dist/ui/assets/WorkspaceDetailPage-DDb6M8cK.js +1 -0
- package/dist/ui/assets/WorkspacesPage-BI0AvjU4.js +1 -0
- package/dist/ui/assets/{chart-theme-BasJ5Y6D.js → chart-theme-F_Y5-T0C.js} +1 -1
- package/dist/ui/assets/{graphicalItemSelectors-BhZtRF4Y.js → graphicalItemSelectors-XzBS96LG.js} +1 -1
- package/dist/ui/assets/{index-OEoc-2Hk.js → index-DWsa7LPr.js} +2 -2
- package/dist/ui/assets/{index-SrfNUeBZ.css → index-D_IJsvkJ.css} +1 -1
- package/dist/ui/assets/{prompt-templates-DhR4Qoy9.js → prompt-templates-CVzMex9L.js} +4 -4
- package/dist/ui/assets/rec-sessions-ggz9MYgP.js +1 -0
- package/dist/ui/assets/{useExperimentalActions-BM8HZUIt.js → useExperimentalActions-4CyCEvGU.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/BriefsPage-gyUvqeyp.js +0 -2
- package/dist/ui/assets/Chip-DvutOe8Q.js +0 -1
- package/dist/ui/assets/FrictionCell-gcIZEEuw.js +0 -2
- package/dist/ui/assets/GlossaryPage-BJxfK0Vx.js +0 -1
- package/dist/ui/assets/HotSessionsPage-D_Nt56Yu.js +0 -1
- package/dist/ui/assets/OverviewPage-DDKroAQp.js +0 -2
- package/dist/ui/assets/RecommendationsPage-CtFOg2cL.js +0 -2
- package/dist/ui/assets/SessionDetailPage-Bz1Vlje1.js +0 -1
- package/dist/ui/assets/SettingsPage-Zu6-DkzI.js +0 -25
- package/dist/ui/assets/SpendPercentileChip-CagdbVgR.js +0 -1
- package/dist/ui/assets/WorkspaceDetailPage-9NEviBmO.js +0 -1
- package/dist/ui/assets/WorkspacesPage-3asY3zj1.js +0 -1
|
@@ -95,7 +95,7 @@ export const d10Detector = {
|
|
|
95
95
|
const latestProbedAt = rows.reduce((latest, row) => (latest === null || row.probed_at > latest ? row.probed_at : latest), null);
|
|
96
96
|
const refs = rows.map((row) => row.file_ref);
|
|
97
97
|
const evidence = {
|
|
98
|
-
title: `Review
|
|
98
|
+
title: `Review tool catalog: ${Math.round(catalogTokens / 1000)}K estimated tokens`,
|
|
99
99
|
component: "MCP_SCHEMAS",
|
|
100
100
|
file_ref: refs.length === 1 ? refs[0] : null,
|
|
101
101
|
file_refs: refs,
|
|
@@ -120,7 +120,7 @@ export const d10Detector = {
|
|
|
120
120
|
scopeKey: "D10|global|MCP_SCHEMAS",
|
|
121
121
|
category: "TOOLING",
|
|
122
122
|
scope_workspace_id: null,
|
|
123
|
-
lever: "
|
|
123
|
+
lever: "The tool catalog exceeds its size target; actual loaded context is not measured",
|
|
124
124
|
target_metric: "catalog_context_tokens",
|
|
125
125
|
// R11 is required before catalog size can become a freed-headroom claim.
|
|
126
126
|
modeled_savings_u_per_wk: null,
|
|
@@ -29,16 +29,16 @@ function stepsFor(component, fileRef) {
|
|
|
29
29
|
case "CLAUDE_MD":
|
|
30
30
|
return [
|
|
31
31
|
`Open ${fileRef}`,
|
|
32
|
-
"Move
|
|
33
|
-
"Keep current
|
|
34
|
-
"
|
|
32
|
+
"Move changelogs, history, and background explanations to a linked document",
|
|
33
|
+
"Keep only current rules and links here",
|
|
34
|
+
"Check the size again after the next local scan",
|
|
35
35
|
];
|
|
36
36
|
case "MEMORY":
|
|
37
37
|
return [
|
|
38
38
|
`Review memory files under ${fileRef}`,
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
39
|
+
"Remove old or duplicate memories",
|
|
40
|
+
"Combine overlapping facts into concise entries",
|
|
41
|
+
"Check the size again after the next local scan",
|
|
42
42
|
];
|
|
43
43
|
case "MCP_SCHEMAS":
|
|
44
44
|
return [
|
|
@@ -62,13 +62,13 @@ function titleFor(component, tokens, target) {
|
|
|
62
62
|
function leverFor(component) {
|
|
63
63
|
switch (component) {
|
|
64
64
|
case "CLAUDE_MD":
|
|
65
|
-
return "Move
|
|
65
|
+
return "Move changelogs and history out of CLAUDE.md; keep current rules and links.";
|
|
66
66
|
case "MEMORY":
|
|
67
|
-
return "
|
|
67
|
+
return "Remove old or duplicate memories and combine overlapping facts.";
|
|
68
68
|
case "MCP_SCHEMAS":
|
|
69
69
|
return "Identify rarely-used skills/plugins; extract to on-demand or disable.";
|
|
70
70
|
default:
|
|
71
|
-
return "
|
|
71
|
+
return "Shorten this content that is loaded into every conversation.";
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
export const d1Detector = {
|
|
@@ -81,12 +81,12 @@ export const d2Detector = {
|
|
|
81
81
|
scopeKey: `D2|global|${formula.model}`,
|
|
82
82
|
category: "CONTEXT",
|
|
83
83
|
scope_workspace_id: null,
|
|
84
|
-
lever: "/clear between unrelated tasks
|
|
84
|
+
lever: "Use /clear between unrelated tasks, split long work into separate sessions, and avoid automatic compaction while you are working.",
|
|
85
85
|
target_metric: "avg_context_per_turn",
|
|
86
86
|
modeled_savings_u_per_wk: savingsU,
|
|
87
87
|
modeled_formula: formula,
|
|
88
88
|
evidence: {
|
|
89
|
-
title: `
|
|
89
|
+
title: `Split ${n} long session${n === 1 ? "" : "s"} this week`,
|
|
90
90
|
qualifying_session_count: qualifying.length,
|
|
91
91
|
qualifying_turn_count: qualifyingTurnCount,
|
|
92
92
|
session_ids: sessionIds,
|
|
@@ -192,7 +192,7 @@ export const d4Detector = {
|
|
|
192
192
|
? {
|
|
193
193
|
withheld: true,
|
|
194
194
|
withheld_reason: `Sonnet weekly cap is the binding constraint (Sonnet util ${bindingSonnet.utilization} >= all-models ${perModelSnapshot.seven_day_util}) — routing Opus->Sonnet would worsen it`,
|
|
195
|
-
title: `
|
|
195
|
+
title: `Model change is not recommended: ${mismatchPct}% of Opus turns have large context and little output`,
|
|
196
196
|
}
|
|
197
197
|
: perModelSnapshot && sonnetEntries && sonnetEntries.length > 0
|
|
198
198
|
? { cap_attribution: "all_models_or_opus_binds" }
|
|
@@ -202,7 +202,7 @@ export const d4Detector = {
|
|
|
202
202
|
category: "MODEL",
|
|
203
203
|
scope_workspace_id: workspace_id,
|
|
204
204
|
// Advisory gate (W0.3): which cap binds is NOT inferable from JSONL. Conditional lever.
|
|
205
|
-
lever: "If your
|
|
205
|
+
lever: "Check /usage first. If your overall, Opus, or 5-hour limit is filling, these large-context Opus turns with little output may be suitable for Sonnet. Do not switch if your Sonnet weekly limit is the one filling.",
|
|
206
206
|
target_metric: "model_mix_opus_fraction",
|
|
207
207
|
// Advisory gate: suppress the crisp $/wk headline until live /usage cap-attribution exists.
|
|
208
208
|
modeled_savings_u_per_wk: null,
|
|
@@ -210,7 +210,7 @@ export const d4Detector = {
|
|
|
210
210
|
// Destructure out result_usd_per_wk so the advisory formula carries no crisp $/wk figure.
|
|
211
211
|
modeled_formula: (({ result_usd_per_wk: _, ...rest }) => ({ ...rest, kind: "ADVISORY" }))(formula),
|
|
212
212
|
evidence: {
|
|
213
|
-
title: `
|
|
213
|
+
title: `Review model choice: ${mismatchPct}% of Opus turns have large context and little output`,
|
|
214
214
|
workspace_id,
|
|
215
215
|
total_opus_turns_per_week: totalOpus,
|
|
216
216
|
mismatch_turns_per_week: mismatchCount,
|
|
@@ -262,7 +262,7 @@ export const d6Detector = {
|
|
|
262
262
|
modeled_savings_u_per_wk: modeledSavingsU,
|
|
263
263
|
modeled_formula: formula,
|
|
264
264
|
evidence: {
|
|
265
|
-
title: `
|
|
265
|
+
title: `Reduce large tool results: ${Math.round(bloatShare * 100)}% of this session's context`,
|
|
266
266
|
session_id: row.session_id,
|
|
267
267
|
workspace_id: row.workspace_id,
|
|
268
268
|
tool_result_bytes: row.tool_result_bytes,
|
|
@@ -299,7 +299,7 @@ export const d7Detector = {
|
|
|
299
299
|
expression: "cap-weighted exposure of turns owning repeat-excess events; not an avoidable-token or USD savings estimate",
|
|
300
300
|
},
|
|
301
301
|
evidence: {
|
|
302
|
-
title: `
|
|
302
|
+
title: `Stop repeated attempts: ${flaggedTurns.size} affected turn${flaggedTurns.size === 1 ? "" : "s"} in this session`,
|
|
303
303
|
session_id: sessionId,
|
|
304
304
|
workspace_id: session.workspaceId,
|
|
305
305
|
loop_flagged_event_count: flaggedEventIds.size,
|
|
@@ -125,7 +125,7 @@ export const d8Detector = {
|
|
|
125
125
|
// TTL-regime facet: is this session dominated by 5m-tier creation?
|
|
126
126
|
const fiveMinCreation = events.reduce((s, e) => s + e.cache_write_5m, 0);
|
|
127
127
|
const regime5m = totalCreation > 0 && fiveMinCreation / totalCreation >= D8_REGIME_5M_SHARE;
|
|
128
|
-
const baseLever = "
|
|
128
|
+
const baseLever = "Before a long break, use /clear or resume from a summary. Make instruction-file changes between sessions so they do not rebuild the cache while you work.";
|
|
129
129
|
const lever = regime5m
|
|
130
130
|
? `${baseLever} This session's creation is mostly 5m-tier — enable the 1h cache regime (ENABLE_PROMPT_CACHING_1H) where long pauses are unavoidable.`
|
|
131
131
|
: baseLever;
|
|
@@ -138,7 +138,7 @@ export const d8Detector = {
|
|
|
138
138
|
modeled_savings_u_per_wk: savingsU,
|
|
139
139
|
modeled_formula: formula,
|
|
140
140
|
evidence: {
|
|
141
|
-
title: `
|
|
141
|
+
title: `Avoid repeated cache rebuilds: ${events.length} after a long pause`,
|
|
142
142
|
session_id: sessionId,
|
|
143
143
|
workspace_id,
|
|
144
144
|
churn_event_count: events.length,
|
|
@@ -62,7 +62,7 @@ export const d9Detector = {
|
|
|
62
62
|
modeled_savings_u_per_wk: null,
|
|
63
63
|
modeled_formula: d9Formula(sidechainCap, D9_UNPRODUCTIVE_FRACTION),
|
|
64
64
|
evidence: {
|
|
65
|
-
title: `Review background
|
|
65
|
+
title: `Review background-agent work: ${Math.round(share * 100)}% of estimated limit use`,
|
|
66
66
|
workspace_id: row.workspace_id,
|
|
67
67
|
sidechain_cap_weighted_tokens: sidechainCap,
|
|
68
68
|
total_cap_weighted_tokens: totalCap,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-DWsa7LPr.js";import{aX as Le,a2 as V,aY as q,n as J,g as Te,aZ as Re,o as se,a1 as Fe,c as j,a_ as Ne,a$ as $e,s as F,a as We,d as T,e as R,f as ge,h as be,b0 as Ae,b1 as _e,b2 as Ge,k as ue,b3 as Ue,b4 as ce,x as Ve,L as _,p as Ze,r as Xe,D as ee,aN as Ye,t as Ie,v as He,S as qe,w as Je,Z as ae,y as O,z as Pe,A as Qe,B as ea,G as aa,E as ta,aO as ra,H as G,a9 as na,aP as ia,N as ke,J as oa,M as la,b5 as sa,b6 as ua,b7 as de,ay as Be,aR as Ee,aS as Se,aT as Oe,aA as ca,aa as we,U as da,W as va,_ as fa,$ as ma,l as pa,b8 as ha,a3 as ya,b9 as ve,a4 as xa,a5 as ga}from"./CartesianChart-BTva-_b9.js";import{s as K,a as z}from"./graphicalItemSelectors-XzBS96LG.js";function ba(e,a){return ka(e)||Pa(e,a)||Ia(e,a)||Aa()}function Aa(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ia(e,a){if(e){if(typeof e=="string")return fe(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fe(e,a):void 0}}function fe(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function Pa(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],c=!0,l=!1;try{if(i=(t=t.call(e)).next,a!==0)for(;!(c=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);c=!0);}catch(d){l=!0,n=d}finally{try{if(!c&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}function ka(e){if(Array.isArray(e))return e}var me=(e,a,t)=>{var r=t??e;if(!V(r))return q(r,a,0)},Ba=(e,a,t)=>{var r={},n=e.filter(Le),i=e.filter(l=>l.stackId==null),o=n.reduce((l,d)=>{var v=l[d.stackId];return v==null&&(v=[]),v.push(d),l[d.stackId]=v,l},r),s=Object.entries(o).map(l=>{var d,v=ba(l,2),f=v[0],y=v[1],m=y.map(h=>h.dataKey),x=me(a,t,(d=y[0])===null||d===void 0?void 0:d.barSize);return{stackId:f,dataKeys:m,barSize:x}}),c=i.map(l=>{var d=[l.dataKey].filter(f=>f!=null),v=me(a,t,l.barSize);return{stackId:void 0,dataKeys:d,barSize:v}});return[...s,...c]};function pe(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function W(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?pe(Object(t),!0).forEach(function(r){Ea(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function Ea(e,a,t){return(a=Sa(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function Sa(e){var a=Oa(e,"string");return typeof a=="symbol"?a:a+""}function Oa(e,a){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function wa(e,a,t,r,n){var i,o=r.length;if(!(o<1)){var s=q(e,t,0,!0),c,l=[];if(J((i=r[0])===null||i===void 0?void 0:i.barSize)){var d=!1,v=t/o,f=r.reduce((g,I)=>g+(I.barSize||0),0);f+=(o-1)*s,f>=t&&(f-=(o-1)*s,s=0),f>=t&&v>0&&(d=!0,v*=.9,f=o*v);var y=Math.round((t-f)/2),m={offset:y-s,size:0};c=r.reduce((g,I)=>{var p,k={stackId:I.stackId,dataKeys:I.dataKeys,position:{offset:m.offset+m.size+s,size:d?v:(p=I.barSize)!==null&&p!==void 0?p:0}},B=[...g,k];return m=k.position,B},l)}else{var x=q(a,t,0,!0);t-2*x-(o-1)*s<=0&&(s=0);var h=(t-2*x-(o-1)*s)/o;h>1&&(h=Math.round(h));var b=J(n)?Math.min(h,n):h;c=r.reduce((g,I,p)=>[...g,{stackId:I.stackId,dataKeys:I.dataKeys,position:{offset:x+o*(h-b)/2+(b+s)*p,size:b}}],l)}return c}}var Ca=(e,a,t,r,n,i,o)=>{var s=V(o)?a:o,c=wa(t,r,n!==i?n:i,e,s);return n!==i&&c!=null&&(c=c.map(l=>W(W({},l),{},{position:W(W({},l.position),{},{offset:l.position.offset-n/2})}))),c},Da=(e,a)=>{var t=Te(a);if(!(!e||t==null||a==null)){var r=a.stackId;if(r!=null){var n=e[r];if(n){var i=n.stackedData;if(i)return i.find(o=>o.key===t)}}}},ja=(e,a)=>{if(!(e==null||a==null)){var t=e.find(r=>r.stackId===a.stackId&&a.dataKey!=null&&r.dataKeys.includes(a.dataKey));if(t!=null)return t.position}};function Ma(e,a){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&J(e.zIndex)?e.zIndex:a}var Ka="Invariant failed";function za(e,a){throw new Error(Ka)}var La=["option"];function Ta(e,a){if(e==null)return{};var t,r,n=Ra(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function Ra(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}var te=Re;function re(e){var a=e.option,t=Ta(e,La);return u.createElement(Fe,{option:a,DefaultShape:te,shapeProps:t,activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"})}var Fa=function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,n)=>{if(se(a))return a;var i=se(r)||V(r);return i?a(r,n):(i||za(),t)}},Na=(e,a,t)=>t,$a=(e,a)=>a,$=j([be,$a],(e,a)=>e.filter(t=>t.type==="bar").find(t=>t.id===a)),Wa=j([$],e=>e==null?void 0:e.maxBarSize),_a=(e,a,t,r)=>r,Ga=j([F,be,K,z,Na],(e,a,t,r,n)=>a.filter(i=>e==="horizontal"?i.xAxisId===t:i.yAxisId===r).filter(i=>i.isPanorama===n).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),Ua=(e,a,t)=>{var r=F(e),n=K(e,a),i=z(e,a);if(!(n==null||i==null))return r==="horizontal"?ue(e,"yAxis",i,t):ue(e,"xAxis",n,t)},Va=(e,a)=>{var t=F(e),r=K(e,a),n=z(e,a);if(!(r==null||n==null))return t==="horizontal"?ce(e,"xAxis",r):ce(e,"yAxis",n)},Za=j([Ga,Ue,Va],Ba),Xa=(e,a,t)=>{var r,n,i=$(e,a);if(i==null)return 0;var o=K(e,a),s=z(e,a);if(o==null||s==null)return 0;var c=F(e),l=Ae(e),d=i.maxBarSize,v=V(d)?l:d,f,y;return c==="horizontal"?(f=T(e,"xAxis",o,t),y=R(e,"xAxis",o,t)):(f=T(e,"yAxis",s,t),y=R(e,"yAxis",s,t)),(r=(n=ge(f,y,!0))!==null&&n!==void 0?n:v)!==null&&r!==void 0?r:0},Ce=(e,a,t)=>{var r=F(e),n=K(e,a),i=z(e,a);if(!(n==null||i==null)){var o,s;return r==="horizontal"?(o=T(e,"xAxis",n,t),s=R(e,"xAxis",n,t)):(o=T(e,"yAxis",i,t),s=R(e,"yAxis",i,t)),ge(o,s)}},Ya=j([Za,Ae,_e,Ge,Xa,Ce,Wa],Ca),Ha=(e,a,t)=>{var r=K(e,a);if(r!=null)return T(e,"xAxis",r,t)},qa=(e,a,t)=>{var r=z(e,a);if(r!=null)return T(e,"yAxis",r,t)},Ja=(e,a,t)=>{var r=K(e,a);if(r!=null)return R(e,"xAxis",r,t)},Qa=(e,a,t)=>{var r=z(e,a);if(r!=null)return R(e,"yAxis",r,t)},et=j([Ya,$],ja),at=j([Ua,$],Da),tt=j([Ne,$e,Ha,qa,Ja,Qa,et,F,We,Ce,at,$,_a],(e,a,t,r,n,i,o,s,c,l,d,v,f)=>{var y=c.chartData,m=c.dataStartIndex,x=c.dataEndIndex;if(!(v==null||o==null||a==null||s!=="horizontal"&&s!=="vertical"||t==null||r==null||n==null||i==null||l==null)){var h=v.data,b;if(h!=null&&h.length>0?b=h:b=y==null?void 0:y.slice(m,x+1),b!=null)return zt({layout:s,barSettings:v,pos:o,parentViewBox:a,bandSize:l,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,stackedData:d,displayedData:b,offset:e,cells:f,dataStartIndex:m})}}),rt=["index"];function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Q.apply(null,arguments)}function nt(e,a){if(e==null)return{};var t,r,n=it(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function it(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}var De=u.createContext(void 0),ot=e=>{var a=u.useContext(De);if(a!=null)return a.stackId;if(e!=null)return Ve(e)},lt=(e,a)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(a),st=e=>{var a=u.useContext(De);if(a!=null){var t=a.stackId;return"url(#".concat(lt(t,e),")")}},je=e=>{var a=e.index,t=nt(e,rt),r=st(a);return u.createElement(_,Q({className:"recharts-bar-stack-layer",clipPath:r},t))},ut=["onMouseEnter","onMouseLeave","onClick"],ct=["value","background","tooltipPosition"],dt=["id"],vt=["onMouseEnter","onClick","onMouseLeave"];function he(e,a){return ht(e)||pt(e,a)||mt(e,a)||ft()}function ft(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mt(e,a){if(e){if(typeof e=="string")return ye(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ye(e,a):void 0}}function ye(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function pt(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],c=!0,l=!1;try{if(i=(t=t.call(e)).next,a!==0)for(;!(c=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);c=!0);}catch(d){l=!0,n=d}finally{try{if(!c&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}function ht(e){if(Array.isArray(e))return e}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},D.apply(null,arguments)}function xe(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function A(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?xe(Object(t),!0).forEach(function(r){yt(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function yt(e,a,t){return(a=xt(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function xt(e){var a=gt(e,"string");return typeof a=="symbol"?a:a+""}function gt(e,a){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function U(e,a){if(e==null)return{};var t,r,n=bt(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function bt(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}var At=e=>{var a=e.dataKey,t=e.name,r=e.fill,n=e.legendType,i=e.hide;return[{inactive:i,dataKey:a,type:n,color:r,value:Pe(t,a),payload:e}]},It=u.memo(e=>{var a=e.dataKey,t=e.stroke,r=e.strokeWidth,n=e.fill,i=e.name,o=e.hide,s=e.unit,c=e.formatter,l=e.tooltipType,d=e.id,v={dataDefinedOnItem:void 0,getPosition:ea,settings:{stroke:t,strokeWidth:r,fill:n,dataKey:a,nameKey:void 0,name:Pe(i,a),hide:o,type:l,color:n,unit:s,formatter:c,graphicalItemId:d}};return u.createElement(Qe,{tooltipEntrySettings:v})});function Pt(e){var a=G(Be),t=e.data,r=e.dataKey,n=e.background,i=e.allOtherBarProps,o=i.onMouseEnter,s=i.onMouseLeave,c=i.onClick,l=U(i,ut),d=Ee(o,r,i.id),v=Se(s),f=Oe(c,r,i.id);if(!n||t==null)return null;var y=ca(n);return u.createElement(ae,{zIndex:Ma(n,ee.barBackground)},t.map((m,x)=>{m.value;var h=m.background;m.tooltipPosition;var b=U(m,ct);if(!h)return null;var g=d(m,m.originalDataIndex),I=v(m,m.originalDataIndex),p=f(m,m.originalDataIndex),k=A(A(A(A(A({option:n,isActive:String(m.originalDataIndex)===a},b),{},{fill:"#eee"},h),y),we(l,m,x)),{},{onMouseEnter:g,onMouseLeave:I,onClick:p,dataKey:r,index:x,className:"recharts-bar-background-rectangle"});return u.createElement(re,D({key:"background-bar-".concat(x)},k))}))}function kt(e){var a=e.showLabels,t=e.children,r=e.rects,n=r==null?void 0:r.map(i=>{var o={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return A(A({},o),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:o,fill:i.fill})});return u.createElement(ma,{value:a?n:void 0},t)}function Bt(e){var a=e.shape,t=e.activeBar,r=e.baseProps,n=e.entry,i=e.index,o=e.dataKey,s=G(Be),c=G(ha),l=t&&String(n.originalDataIndex)===s&&(c==null||o===c),d=s!=null&&(String(n.originalDataIndex)!==s||c!=null&&o!==c),v=u.useState(!1),f=he(v,2),y=f[0],m=f[1],x=u.useState(!1),h=he(x,2),b=h[0],g=h[1];u.useEffect(()=>{var P;return l?(m(!0),P=requestAnimationFrame(()=>{g(!0)})):(g(!1),d&&m(!1)),()=>{cancelAnimationFrame(P)}},[l,d]);var I=u.useCallback(()=>{l||m(!1)},[l]),p=l&&b,k=l||y,B;l?t===!0?B=a:B=t:B=a;var w=u.createElement(re,D({},r,{name:String(r.name)},n,{isActive:p,option:B,index:i,dataKey:o,animationElapsedTime:e.animationElapsedTime,isAnimating:e.isAnimating,isEntrance:e.isEntrance,onTransitionEnd:I}));return k?u.createElement(ae,{zIndex:ee.activeBar},u.createElement(je,{index:n.originalDataIndex},w)):w}function Et(e){var a=e.shape,t=e.baseProps,r=e.entry,n=e.index,i=e.dataKey;return u.createElement(re,D({},t,{name:String(t.name)},r,{isActive:!1,option:a,index:n,dataKey:i,animationElapsedTime:e.animationElapsedTime,isAnimating:e.isAnimating,isEntrance:e.isEntrance}))}function St(e){var a,t=e.data,r=e.props,n=e.animationElapsedTime,i=e.isAnimating,o=e.isEntrance,s=(a=pa(r))!==null&&a!==void 0?a:{},c=s.id,l=U(s,dt),d=r.shape,v=r.dataKey,f=r.activeBar,y=r.onMouseEnter,m=r.onClick,x=r.onMouseLeave,h=U(r,vt),b=Ee(y,v,c),g=Se(x),I=Oe(m,v,c);return t?u.createElement(u.Fragment,null,t.map((p,k)=>u.createElement(je,D({index:p.originalDataIndex,key:"rectangle-".concat(p==null?void 0:p.x,"-").concat(p==null?void 0:p.y,"-").concat(p==null?void 0:p.value,"-").concat(k),className:"recharts-bar-rectangle"},we(h,p,k),{onMouseEnter:b(p,p.originalDataIndex),onMouseLeave:g(p,p.originalDataIndex),onClick:I(p,p.originalDataIndex)}),f?u.createElement(Bt,{shape:d,activeBar:f,baseProps:l,entry:p,index:k,dataKey:v,animationElapsedTime:n,isAnimating:i,isEntrance:o}):u.createElement(Et,{shape:d,baseProps:l,entry:p,index:k,dataKey:v,animationElapsedTime:n,isAnimating:i,isEntrance:o})))):null}var Ot=(e,a,t)=>e==null?[]:a===1?e.flatMap(r=>r.status==="removed"?[]:[r.next]):e.flatMap(r=>{if(r.status==="removed")return t==="horizontal"?[A(A({},r.prev),{},{height:O(r.prev.height,0,a),y:O(r.prev.y,r.prev.y+r.prev.height,a)})]:[A(A({},r.prev),{},{width:O(r.prev.width,0,a)})];if(r.status==="matched")return[A(A({},r.next),{},{x:O(r.prev.x,r.next.x,a),y:O(r.prev.y,r.next.y,a),width:O(r.prev.width,r.next.width,a),height:O(r.prev.height,r.next.height,a)})];var n=r.next;return t==="horizontal"?[A(A({},n),{},{height:O(0,n.height,a),y:O(n.stackedBarStart,n.y,a)})]:[A(A({},n),{},{width:O(0,n.width,a),x:O(n.stackedBarStart,n.x,a)})]});function wt(e){var a=e.props,t=e.previousRectanglesRef,r=a.data,n=a.isAnimationActive,i=a.animationBegin,o=a.animationDuration,s=a.animationEasing,c=a.animationInterpolateFn,l=a.layout,d=da(a.onAnimationStart,a.onAnimationEnd),v=d.isAnimating,f=d.handleAnimationStart,y=d.handleAnimationEnd;return u.createElement(kt,{showLabels:!v,rects:r},u.createElement(va,{animationInput:r,animationIdPrefix:"recharts-bar-",items:r,previousItemsRef:t,isAnimationActive:n,animationBegin:i,animationDuration:o,animationEasing:s,onAnimationStart:f,onAnimationEnd:y,animationInterpolateFn:c,animationMatchBy:a.animationMatchBy,layout:l},(m,x,h)=>u.createElement(_,null,u.createElement(St,{props:a,data:m,animationElapsedTime:x,isAnimating:v||x<1,isEntrance:h}))),u.createElement(fa,{label:a.label}),a.children)}function Ct(e){var a=u.useRef(null);return u.createElement(wt,{previousRectanglesRef:a,props:e})}var Me=0,Dt=(e,a)=>{var t=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:t,errorVal:ke(e,a)}};class jt extends u.PureComponent{render(){var a=this.props,t=a.hide,r=a.data,n=a.dataKey,i=a.className,o=a.xAxisId,s=a.yAxisId,c=a.needClip,l=a.background,d=a.id;if(t||r==null)return null;var v=oa("recharts-bar",i),f=d;return u.createElement(_,{className:v,id:d},c&&u.createElement("defs",null,u.createElement(la,{clipPathId:f,xAxisId:o,yAxisId:s})),u.createElement(_,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(f,")"):void 0},u.createElement(Pt,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),u.createElement(Ct,this.props)))}}var Mt={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",animationInterpolateFn:Ot,animationMatchBy:Ye,background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Me,shape:te,xAxisId:0,yAxisId:0,zIndex:ee.bar};function Kt(e){var a=e.xAxisId,t=e.yAxisId,r=e.hide,n=e.legendType,i=e.minPointSize,o=e.activeBar,s=e.animationBegin,c=e.animationDuration,l=e.animationEasing,d=e.isAnimationActive,v=aa(a,t),f=v.needClip,y=ta(),m=Ie(),x=ra(e.children,ia),h=G(I=>tt(I,e.id,m,x));if(y!=="vertical"&&y!=="horizontal")return null;var b,g=h==null?void 0:h[0];return g==null||g.height==null||g.width==null?b=0:b=y==="vertical"?g.height/2:g.width/2,u.createElement(na,{xAxisId:a,yAxisId:t,data:h,dataPointFormatter:Dt,errorBarOffset:b},u.createElement(jt,D({},e,{layout:y,needClip:f,data:h,xAxisId:a,yAxisId:t,hide:r,legendType:n,minPointSize:i,activeBar:o,animationBegin:s,animationDuration:c,animationEasing:l,isAnimationActive:d})))}function zt(e){var a=e.layout,t=e.barSettings,r=t.dataKey,n=t.minPointSize,i=t.hasCustomShape,o=e.pos,s=e.bandSize,c=e.xAxis,l=e.yAxis,d=e.xAxisTicks,v=e.yAxisTicks,f=e.stackedData,y=e.displayedData,m=e.offset,x=e.cells,h=e.parentViewBox,b=e.dataStartIndex,g=a==="horizontal"?l:c,I=f?g.scale.domain():null,p=sa({numericAxis:g}),k=g.scale.map(p);return y.map((B,w)=>{var P,L,M,E,S,Z;if(f){var ne=f[w+b];if(ne==null)return null;P=ua(ne,I)}else P=ke(B,r),Array.isArray(P)||(P=[p,P]);var C=Fa(n,Me)(P[1],w);if(a==="horizontal"){var X,Y=l.scale.map(P[0]),N=l.scale.map(P[1]);if(Y==null||N==null)return null;L=de({axis:c,ticks:d,bandSize:s,offset:o.offset,entry:B,index:w}),M=(X=N??Y)!==null&&X!==void 0?X:void 0,E=o.size;var ie=Y-N;if(S=ya(ie)?0:ie,Z={x:L,y:m.top,width:E,height:m.height},Math.abs(C)>0&&Math.abs(S)<Math.abs(C)){var oe=ve(S||C)*(Math.abs(C)-Math.abs(S));M-=oe,S+=oe}}else{var H=c.scale.map(P[0]),le=c.scale.map(P[1]);if(H==null||le==null)return null;if(L=H,M=de({axis:l,ticks:v,bandSize:s,offset:o.offset,entry:B,index:w}),E=le-H,S=o.size,Z={x:m.left,y:M,width:m.width,height:S},Math.abs(C)>0&&Math.abs(E)<Math.abs(C)){var Ke=ve(E||C)*(Math.abs(C)-Math.abs(E));E+=Ke}}if(L==null||M==null||E==null||S==null||!i&&(E===0||S===0))return null;var ze=A(A({},B),{},{stackedBarStart:k,x:L,y:M,width:E,height:S,value:f?P:P[1],payload:B,background:Z,tooltipPosition:{x:L+E/2,y:M+S/2},parentViewBox:h,originalDataIndex:w},x&&x[w]&&x[w].props);return ze}).filter(Boolean)}function Lt(e){var a=Xe(e,Mt),t=ot(a.stackId),r=Ie();return u.createElement(He,{id:a.id,type:"bar"},n=>u.createElement(u.Fragment,null,u.createElement(qe,{legendPayload:At(a)}),u.createElement(It,{dataKey:a.dataKey,stroke:a.stroke,strokeWidth:a.strokeWidth,fill:a.fill,name:a.name,hide:a.hide,unit:a.unit,formatter:a.formatter,tooltipType:a.tooltipType,id:n}),u.createElement(Je,{type:"bar",id:n,data:void 0,xAxisId:a.xAxisId,yAxisId:a.yAxisId,zAxisId:0,dataKey:a.dataKey,stackId:t,hide:a.hide,barSize:a.barSize,minPointSize:a.minPointSize,maxBarSize:a.maxBarSize,isPanorama:r,hasCustomShape:a.shape!=null&&a.shape!==te}),u.createElement(ae,{zIndex:a.zIndex},u.createElement(Kt,D({},a,{id:n})))))}var Tt=u.memo(Lt,Ze);Tt.displayName="Bar";var Rt=["axis","item"],Wt=u.forwardRef((e,a)=>u.createElement(xa,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Rt,tooltipPayloadSearcher:ga,categoricalChartProps:e,ref:a}));export{Wt as B,Tt as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as p,f as D,a as B,b as y,c as R,d as I,j as s}from"./index-DWsa7LPr.js";import{w as F}from"./workspace-label-CysPJNc0.js";import{I as k}from"./InfoTip-DCQtERnJ.js";import{b as Y}from"./prompt-templates-CVzMex9L.js";import{s as V}from"./rec-sessions-ggz9MYgP.js";import{f as G}from"./FrictionCell-BN-7hRQU.js";import"./Chip-Gem94sHD.js";const K=1e6,X=5,z=3;function c(e){return Number.isFinite(e)?e:0}function m(e){return c(e)/K}function W(e){let r=0,t=0;for(const u of e.buckets)r+=c(u.cache_creation_tokens),t+=c(u.cache_read_tokens);const i=r+t;return i===0?0:r/i}function E(e,r){return e.filter(t=>r===null||t.workspace_id===r)}const M={LOW:0,ELEVATED:1,HIGH:2};function J(e){if(e.length===0)return null;let r="LOW";for(const t of e){const i=G({api_error_count:t.api_error_count,tool_error_count:t.tool_error_count,test_fail_count:t.test_fail_count,compaction_count:t.compaction_count,interrupt_count:t.interrupt_count,user_turn_count:t.user_turn_count,turn_count:t.turns});M[i]>M[r]&&(r=i)}return r}function g(e,r){return{current:e,prior:r,delta:r===null?null:e-r}}function Q(e,r){return c(r.cost_equiv_u)-c(e.cost_equiv_u)||e.session_id.localeCompare(r.session_id)}function Z(e,r){const t=+(e.flavor!=="TURNKEY")-+(r.flavor!=="TURNKEY"),i=e.modeled_savings_usd_per_wk??Number.NEGATIVE_INFINITY,u=r.modeled_savings_usd_per_wk??Number.NEGATIVE_INFINITY;return t||u-i||e.detector_id.localeCompare(r.detector_id)||e.id.localeCompare(r.id)}function ee(e){const r=e.hotSessions.filter(n=>e.scopeWorkspaceId===null||n.workspace_id===e.scopeWorkspaceId).slice().sort(Q).slice(0,X).map(n=>({session_id:n.session_id,usd:m(n.cost_equiv_u),turns:c(n.turns),avg_context_tokens:c(n.avg_context_tokens),model:n.model}));let t=0,i=0,u=0;for(const n of e.cacheTrend.buckets)t+=c(n.cache_creation_tokens),i+=c(n.cache_read_tokens),u+=c(n.turns);const x=t+i,j=e.recs.map(n=>{const f=Y(n);return f===null?null:{id:n.rec_id,detector_id:n.detector_id,lever:n.lever,title:n.title??n.lever,workspace_id:n.scope_workspace_id,session_ids:V(n),file_ref:n.file_ref,tokens_per_turn:typeof n.evidence.delta_context_tokens=="number"&&Number.isFinite(n.evidence.delta_context_tokens)&&n.evidence.delta_context_tokens>0?n.evidence.delta_context_tokens:null,flavor:f.flavor,modeled_savings_usd_per_wk:n.modeled_savings_u_per_wk===null||n.detector_id==="D4"?null:m(n.modeled_savings_u_per_wk),prompt:f.text}}).filter(n=>n!==null).sort(Z),_=E(e.hotSessions,e.scopeWorkspaceId),l=e.prior!==void 0&&c(e.prior.overview.turns_total)>0?e.prior:null;return{scope:{label:e.scopeLabel,workspace_id:e.scopeWorkspaceId},verdict:{cost_usd:m(e.overview.cost_equiv_u),hot_session_count:_.length,peak_friction:J(_)},deltas:{spend_usd:g(m(e.overview.cost_equiv_u),l===null?null:m(l.overview.cost_equiv_u)),cache_write_share:g(W(e.cacheTrend),l===null?null:W(l.cacheTrend)),hot_session_count:g(_.length,l===null?null:E(l.hotSessions,e.scopeWorkspaceId).length)},actions:j.slice(0,z),overview:{cost_usd:m(e.overview.cost_equiv_u),turns:c(e.overview.turns),turns_total:c(e.overview.turns_total)},attribution:{hot_sessions:r,context_per_turn:e.overview.context_per_turn.map(n=>({model:n.model,turns:c(n.n),avg_context_per_turn:c(n.avg_context_per_turn),avg_output_per_turn:c(n.avg_output_per_turn),usd_per_turn:n.usd_per_turn===null?null:c(n.usd_per_turn)})),model_mix:e.overview.model_mix.map(n=>({model:n.model,turns:c(n.turns)})),cache_mix:{bucket_count:e.cacheTrend.buckets.length,spike_bucket_count:e.cacheTrend.spike_buckets.length,cache_write_tokens:t,cache_read_tokens:i,cache_read_share:x===0?0:i/x,turns:u}}}}function a(e){return c(e).toLocaleString(void 0,{maximumFractionDigits:6})}function w(e){const r=e.prior===null?"—":a(e.prior),t=e.delta===null?"—":a(e.delta);return`${a(e.current)} (prior ${r}, delta ${t})`}function se(e){const r=[`# Brief: ${e.scope.label}`,"","## Verdict",`- Cost equivalent USD: ${a(e.verdict.cost_usd)}`,`- Hot sessions: ${a(e.verdict.hot_session_count)}`,`- Peak friction: ${e.verdict.peak_friction??"none"}`,"","## Change vs prior 7 days",`- Spend equivalent USD: ${w(e.deltas.spend_usd)}`,`- Cache-write share: ${w(e.deltas.cache_write_share)}`,`- Hot sessions: ${w(e.deltas.hot_session_count)}`,"","## Do these three things",`- Actions: ${a(e.actions.length)}`];return e.actions.forEach((t,i)=>{r.push(`### ${i+1}. ${t.detector_id}: ${t.id}`),r.push(`- Lever: ${t.lever}`),r.push(`- Mode: ${t.flavor}`),r.push(`- Modeled savings USD/week: ${t.modeled_savings_usd_per_wk===null?"unavailable":a(t.modeled_savings_usd_per_wk)}`),r.push("- Prompt artifact:"),r.push(t.prompt)}),r.push("","<details>","","## Attribution",`- Hot sessions: ${a(e.attribution.hot_sessions.length)}`,...e.attribution.hot_sessions.map(t=>`- Session ${t.session_id}: USD ${a(t.usd)}, turns ${a(t.turns)}, context ${a(t.avg_context_tokens)}, model ${t.model}`),`- Context models: ${a(e.attribution.context_per_turn.length)}`,...e.attribution.context_per_turn.map(t=>{const i=t.usd_per_turn===null?"unpriced 0":`USD/turn ${a(t.usd_per_turn)}`;return`- Model ${t.model}: turns ${a(t.turns)}, context/turn ${a(t.avg_context_per_turn)}, output/turn ${a(t.avg_output_per_turn)}, ${i}`}),`- Model mix entries: ${a(e.attribution.model_mix.length)}`,...e.attribution.model_mix.map(t=>`- Model mix ${t.model}: turns ${a(t.turns)}`),`- Cache mix: ${a(e.attribution.cache_mix.bucket_count)} buckets, ${a(e.attribution.cache_mix.spike_bucket_count)} spikes, ${a(e.attribution.cache_mix.cache_write_tokens)} write tokens, ${a(e.attribution.cache_mix.cache_read_tokens)} read tokens, ${a(e.attribution.cache_mix.cache_read_share)} read share, ${a(e.attribution.cache_mix.turns)} turns`,"","</details>"),r.join(`
|
|
2
|
+
`)}const A=7,L=1440*60*1e3;function te(e=new Date){const r=e.getTime(),t=r-A*L,i=t-A*L;return{current:{from:new Date(t).toISOString(),to:new Date(r).toISOString()},prior:{from:new Date(i).toISOString(),to:new Date(t).toISOString()},label:`${new Date(t).toLocaleDateString()} – ${new Date(r).toLocaleDateString()}`}}function d(e){return e.toLocaleString(void 0,{maximumFractionDigits:2})}function v(e){return`$${d(e)}`}function O(e){return`${(e*100).toLocaleString(void 0,{maximumFractionDigits:1})}%`}function U(e,r){if(r===null)return"Global";const t=e.find(i=>i.workspace_id===r);return t===void 0?r:F(t)}function ne({delta:e,format:r}){if(e.delta===null)return s.jsx("span",{className:"brief-tile-delta brief-tile-delta-none",title:"No prior-week data to compare",children:"— vs prior week"});const t=e.delta>0?"up":e.delta<0?"down":"flat",i=t==="up"?"▲":t==="down"?"▼":"▬",u=e.delta>0?"+":"";return s.jsxs("span",{className:"brief-tile-delta brief-tile-delta-flat",children:[i," ",u,r(e.delta)," vs prior week"]})}function N({label:e,value:r,delta:t,format:i}){return s.jsxs("div",{className:"brief-tile",children:[s.jsx("div",{className:"brief-tile-label",children:e}),s.jsx("div",{className:"brief-tile-value",children:r}),s.jsx(ne,{delta:t,format:i})]})}function re({brief:e}){const{cache_mix:r,hot_sessions:t}=e.attribution;return s.jsxs("details",{className:"briefs-details",children:[s.jsx("summary",{children:"Usage breakdown and sessions"}),s.jsx("div",{className:"table-wrap",children:s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Measure"}),s.jsx("th",{scope:"col",children:"Value"})]})}),s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsx("td",{children:"Cost equivalent"}),s.jsx("td",{children:v(e.overview.cost_usd)})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Turns with confirmed usage"}),s.jsx("td",{children:d(e.overview.turns)})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Total turns"}),s.jsx("td",{children:d(e.overview.turns_total)})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Cache write tokens"}),s.jsx("td",{children:d(r.cache_write_tokens)})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Cache read tokens"}),s.jsx("td",{children:d(r.cache_read_tokens)})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Hot sessions"}),s.jsx("td",{children:d(t.length)})]})]})]})}),t.length>0&&s.jsx("div",{className:"table-wrap",children:s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Session"}),s.jsx("th",{scope:"col",children:"Cost"}),s.jsx("th",{scope:"col",children:"Turns"}),s.jsx("th",{scope:"col",children:"Context / turn"}),s.jsx("th",{scope:"col",children:"Model"})]})}),s.jsx("tbody",{children:t.map(i=>s.jsxs("tr",{children:[s.jsx("td",{children:i.session_id}),s.jsx("td",{children:v(i.usd)}),s.jsx("td",{children:d(i.turns)}),s.jsx("td",{children:d(i.avg_context_tokens)}),s.jsx("td",{children:i.model})]},i.session_id))})]})})]})}function he(){const[e,r]=p.useState({status:"loading"}),[t,i]=p.useState(null),[u,x]=p.useState(!1),[j,_]=p.useState(null),l=p.useMemo(()=>te(),[]);p.useEffect(()=>{let o=!1;return Promise.all([D(l.current),B(l.current),y(l.current),R(),I(l.current),D(l.prior),y(l.prior),I(l.prior)]).then(([h,b,S,$,H,T,C,q])=>{if(!o){if(h.data===null||b.data===null||S.data===null||$.data===null||T.data===null||C.data===null)throw new Error("Brief data was unavailable");r({status:"ok",overview:h.data,workspaces:b.data.items,cacheTrend:S.data,recs:$.data,hotSessions:H,priorOverview:T.data,priorCacheTrend:C.data,priorHotSessions:q})}}).catch(h=>{o||r({status:"error",message:String(h)})}),()=>{o=!0}},[l]);const n=e.status==="ok"?ee({scopeLabel:U(e.workspaces,t),scopeWorkspaceId:t,overview:e.overview,hotSessions:e.hotSessions,cacheTrend:e.cacheTrend,recs:e.recs.active.filter(o=>t===null||o.scope_workspace_id===null||o.scope_workspace_id===t),prior:{overview:e.priorOverview,hotSessions:e.priorHotSessions,cacheTrend:e.priorCacheTrend}}):null;async function f(){n!==null&&(await navigator.clipboard.writeText(se(n)),x(!0),window.setTimeout(()=>x(!1),2e3))}async function P(o,h){await navigator.clipboard.writeText(h),_(o),window.setTimeout(()=>_(b=>b===o?null:b),2e3)}return s.jsxs("div",{className:"briefs-page",children:[s.jsx("div",{className:"page-top",children:s.jsxs("div",{className:"page-title",children:[s.jsx("h1",{children:"Briefs"}),s.jsx("p",{className:"page-sub",children:"Your last seven days: token use, changes, and next steps"})]})}),e.status==="loading"&&s.jsx("div",{className:"card","aria-busy":"true",children:"Loading brief data..."}),e.status==="error"&&s.jsxs("div",{className:"banner banner-error",role:"alert",children:["Could not load brief: ",e.message]}),e.status==="ok"&&n!==null&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"briefs-controls",children:[s.jsxs("label",{className:"briefs-scope",htmlFor:"briefs-scope",children:["Scope",s.jsxs("select",{id:"briefs-scope",value:t??"",onChange:o=>i(o.target.value||null),children:[s.jsx("option",{value:"",children:"Global"}),e.workspaces.map(o=>s.jsx("option",{value:o.workspace_id,children:F(o)},o.workspace_id))]})]}),s.jsx("span",{className:"briefs-window",title:"Rolling seven-day window",children:l.label}),s.jsx("button",{type:"button",className:"btn-primary",onClick:()=>void f(),children:u?"Copied":"Copy as markdown"})]}),s.jsx("section",{className:"card briefs-verdict","aria-labelledby":"briefs-verdict-heading",children:s.jsxs("h2",{id:"briefs-verdict-heading",className:"briefs-verdict-line",children:[s.jsx("strong",{children:v(n.verdict.cost_usd)})," ",s.jsx(k,{label:"What list-price estimate means",content:"Estimated value at public per-token prices, not your subscription bill or remaining allowance. Check the usage bars on Overview for your current limits.",children:"list-price estimate"}),s.jsx("span",{className:"briefs-verdict-sep",children:" · "}),s.jsxs(k,{label:"What hot sessions means",content:"Sessions with the highest estimated token value in this selection. The brief lists up to five; this is not a count of wasteful sessions.",children:[d(n.verdict.hot_session_count)," hot sessions"]}),s.jsx("span",{className:"briefs-verdict-sep",children:" · "}),n.verdict.peak_friction===null?s.jsx("span",{className:"briefs-friction",children:"no friction signal"}):s.jsxs("span",{className:`briefs-friction briefs-friction-${n.verdict.peak_friction}`,children:[s.jsx(k,{label:"What peak friction means",content:"The highest level of errors, failed tests, and interruptions among these sessions. These events can be part of normal work; review the session before deciding what to change.",children:"peak friction"})," ",n.verdict.peak_friction]})]})}),s.jsxs("div",{className:"brief-tiles-head",children:[s.jsx("span",{className:"brief-tiles-heading",children:"Week-over-week changes"}),s.jsx(k,{label:"What the delta tiles show",content:"Compared with the previous seven days. Cache-write share is the proportion of cached tokens written rather than reused; lower usage alone does not prove better efficiency, and hot sessions is a capped list count."})]}),s.jsxs("div",{className:"brief-tiles",children:[s.jsx(N,{label:"Spend equivalent",value:v(n.deltas.spend_usd.current),delta:n.deltas.spend_usd,format:v}),s.jsx(N,{label:"Cache-write share",value:O(n.deltas.cache_write_share.current),delta:n.deltas.cache_write_share,format:O}),s.jsx(N,{label:"Hot sessions",value:d(n.deltas.hot_session_count.current),delta:n.deltas.hot_session_count,format:d})]}),s.jsxs("section",{className:"card briefs-actions","aria-labelledby":"briefs-actions-heading",children:[s.jsx("div",{className:"section-head",children:s.jsx("h2",{id:"briefs-actions-heading",children:"Top three next steps"})}),n.actions.length===0?s.jsx("p",{className:"kpi-off-hint",children:"No suggestions for this selection yet."}):s.jsx("ol",{className:"briefs-action-list",children:n.actions.map(o=>s.jsxs("li",{className:"briefs-action",children:[s.jsxs("div",{className:"briefs-action-main",children:[s.jsx("strong",{children:o.title}),o.title!==o.lever&&s.jsx("p",{children:o.lever}),s.jsxs("p",{className:"brief-action-scope",children:[s.jsx("strong",{children:"Where:"})," ",U(e.workspaces,o.workspace_id),o.file_ref!==null&&s.jsxs(s.Fragment,{children:[" ","· ",s.jsx("code",{children:o.file_ref})]})]}),s.jsxs("p",{children:[o.session_ids.length>0?`Based on ${o.session_ids.length} affected session${o.session_ids.length===1?"":"s"}.`:"No individual sessions are linked to this suggestion.",o.tokens_per_turn!==null&&s.jsxs(s.Fragment,{children:[" ","Possible reduction: ",d(o.tokens_per_turn)," context tokens per turn (text sent to the model)."]})]}),o.session_ids.length>0&&s.jsxs("details",{children:[s.jsx("summary",{children:"View affected sessions"}),s.jsx("ul",{children:o.session_ids.map(h=>s.jsx("li",{children:s.jsx("a",{href:`#/sessions/${encodeURIComponent(h)}`,children:h})},h))})]}),s.jsx("p",{className:"kpi-off-hint",children:o.modeled_savings_usd_per_wk===null?"No reliable savings estimate is available.":`Possible reduction: ${v(o.modeled_savings_usd_per_wk)} / week at list prices. This is an estimate, not achieved savings.`}),s.jsx("a",{href:`#/recommendations?focus=${encodeURIComponent(o.id)}`,children:"Review evidence and track this change"}),s.jsx("p",{children:o.flavor==="TURNKEY"?"Paste this prompt into Claude Code in the workspace above and review the proposed edits.":"Paste this prompt into Claude Code to review the recorded usage and decide what to change."}),s.jsx("textarea",{className:"prompt-code","aria-label":`Prompt for ${o.title}`,readOnly:!0,value:o.prompt})]}),s.jsx("button",{type:"button",className:"btn-secondary briefs-action-copy",onClick:()=>void P(o.id,o.prompt),children:j===o.id?"Copied":"Copy prompt"})]},o.id))})]}),s.jsx(re,{brief:n})]})]})}export{he as default};
|
package/dist/ui/assets/{CacheWriteSpikesChart-xdkHBE3F.js → CacheWriteSpikesChart-C641X3kK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as m}from"./index-OEoc-2Hk.js";import{C as be}from"./Chip-DvutOe8Q.js";import{u as Ie,c as Pe}from"./Skeleton-DCy0HCWx.js";import{s as K,g as O,C as Ee}from"./chart-theme-BasJ5Y6D.js";import{c as B,s as q,a as Se,b as Ce,d as se,e as le,g as Le,i as oe,f as _,h as Ne,j as je,k as Oe,u as we,l as ce,m as Y,L as M,n as z,o as j,p as De,r as Re,D as We,q as Be,t as de,v as Te,S as Ke,w as Me,x as ze,y as F,z as ue,A as Fe,B as Ve,E as $e,F as Ge,G as Xe,H as Ye,I as He,J as qe,K as Ue,Z as Ze,M as Qe,N as H,O as ee,P as Je,Q as _e,U as ea,V as ae,W as aa,_ as ta,$ as ia,a0 as na,a1 as ra,a2 as sa,a3 as la,R as oa,C as ca,X as da,Y as ua,T as pa}from"./CartesianChart-D-h-lxMH.js";import{C as ha}from"./ComposedChart-CGRu3OgM.js";import{L as ma}from"./Legend-CGv-AdS2.js";import{g as va,A as te,D as fa,R as ya,S as xa}from"./Scatter-d3NgmWkl.js";import{s as U,a as Z}from"./graphicalItemSelectors-BhZtRF4Y.js";var pe=(e,a,t)=>se(e,"xAxis",U(e,a),t),he=(e,a,t)=>le(e,"xAxis",U(e,a),t),me=(e,a,t)=>se(e,"yAxis",Z(e,a),t),ve=(e,a,t)=>le(e,"yAxis",Z(e,a),t),Aa=B([q,pe,me,he,ve],(e,a,t,i,r)=>oe(e,"xAxis")?_(a,i,!1):_(t,r,!1)),ga=(e,a)=>a,Q=B([Ne,ga],(e,a)=>e.filter(t=>t.type==="area").find(t=>t.id===a)),fe=e=>{var a=q(e),t=oe(a,"xAxis");return t?"yAxis":"xAxis"},ka=(e,a)=>{var t=fe(e);return t==="yAxis"?Z(e,a):U(e,a)},ye=(e,a,t)=>Oe(e,fe(e),ka(e,a),t),ba=B([Q,ye],(e,a)=>{var t;if(!(e==null||a==null)){var i=e.stackId,r=Le(e);if(!(i==null||r==null)){var n=(t=a[i])===null||t===void 0?void 0:t.stackedData,c=n==null?void 0:n.find(s=>s.key===r);if(c!=null)return c.map(s=>[s[0],s[1]])}}}),Ia=B([Q,ye],(e,a)=>{if(!(e==null||e.stackId==null||a==null)){var t=a[e.stackId];if(t!=null)return t.graphicalItems.map(i=>i.dataKey).filter(je)}}),Pa=B([q,pe,me,he,ve,ba,Se,Aa,Q,Ce,Ia],(e,a,t,i,r,n,c,s,d,u,p)=>{var o=c.chartData,v=c.dataStartIndex,I=c.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||a==null||t==null||i==null||r==null||i.length===0||r.length===0||s==null)){var f=d.data,y;if(f&&f.length>0?y=f:y=o==null?void 0:o.slice(v,I+1),y!=null)return Za({layout:e,xAxis:a,yAxis:t,xAxisTicks:i,yAxisTicks:r,dataStartIndex:v,areaSettings:d,stackedData:n,displayedData:y,chartBaseValue:u,bandSize:s,stackDataKeys:p})}}),Ea=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Sa=["id","baseLine"];function W(){return W=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},W.apply(null,arguments)}function ie(e,a){if(e==null)return{};var t,i,r=Ca(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)t=n[i],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function Ca(e,a){if(e==null)return{};var t={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(a.indexOf(i)!==-1)continue;t[i]=e[i]}return t}function La(e){var a,t,i=e.alpha,r=e.baseLine,n=e.points,c=e.strokeWidth,s=(a=n[0])===null||a===void 0?void 0:a.x,d=(t=n[n.length-1])===null||t===void 0?void 0:t.x;if(!z(s)||!z(d))return null;var u=i*Math.abs(s-d),p=Math.max(...n.map(o=>o.y||0));return j(r)?p=Math.max(r,p):r&&Array.isArray(r)&&r.length&&(p=Math.max(...r.map(o=>o.y||0),p)),j(p)?l.createElement("rect",{x:s<d?s:s-u,y:0,width:u,height:Math.floor(p+(c?parseInt("".concat(c),10):1))}):null}function Na(e){var a,t,i=e.alpha,r=e.baseLine,n=e.points,c=e.strokeWidth,s=(a=n[0])===null||a===void 0?void 0:a.y,d=(t=n[n.length-1])===null||t===void 0?void 0:t.y;if(!z(s)||!z(d))return null;var u=i*Math.abs(s-d),p=Math.max(...n.map(o=>o.x||0));return j(r)?p=Math.max(r,p):r&&Array.isArray(r)&&r.length&&(p=Math.max(...r.map(o=>o.x||0),p)),j(p)?l.createElement("rect",{x:0,y:s<d?s:s-u,width:p+(c?parseInt("".concat(c),10):1),height:Math.floor(u)}):null}function ja(e){var a=e.alpha,t=e.layout,i=e.points,r=e.baseLine,n=e.strokeWidth;return t==="vertical"?l.createElement(Na,{alpha:a,points:i,baseLine:r,strokeWidth:n}):l.createElement(La,{alpha:a,points:i,baseLine:r,strokeWidth:n})}function Oa(e){var a=e.animationElapsedTime,t=a===void 0?1:a,i=e.isAnimating,r=i===void 0?!1:i,n=e.isEntrance,c=n===void 0?!1:n,s=e.layout,d=e.isRange,u=e.stroke,p=e.connectNulls,o=ie(e,Ea),v=s==="vertical"?"vertical":"horizontal",I=p??!1,f=we(),y=o.id,x=o.baseLine,A=ie(o,Sa),g=ce(A),S=l.createElement(Y,W({},o,{id:y,baseLine:x,connectNulls:I,stroke:"none",className:"recharts-area-area",layout:v})),L=u!=="none"&&l.createElement(Y,W({},g,{className:"recharts-area-curve",layout:v,type:o.type,connectNulls:I,fill:"none",stroke:u,points:o.points})),k=u!=="none"&&d&&Array.isArray(x)&&l.createElement(Y,W({},g,{className:"recharts-area-curve",layout:v,type:o.type,connectNulls:I,fill:"none",stroke:u,points:x}));if(c&&(r||t<1)){var h;return l.createElement(M,null,l.createElement("defs",null,l.createElement("clipPath",{id:f},l.createElement(ja,{alpha:t,points:(h=o.points)!==null&&h!==void 0?h:[],baseLine:x,layout:v,strokeWidth:o.strokeWidth}))),l.createElement(M,{clipPath:"url(#".concat(f,")")},S,L,k))}return l.createElement(l.Fragment,null,S,L,k)}var wa=["id"],Da=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function V(){return V=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},V.apply(null,arguments)}function xe(e,a){if(e==null)return{};var t,i,r=Ra(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)t=n[i],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function Ra(e,a){if(e==null)return{};var t={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(a.indexOf(i)!==-1)continue;t[i]=e[i]}return t}function ne(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function w(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?ne(Object(t),!0).forEach(function(i){Wa(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Wa(e,a,t){return(a=Ba(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function Ba(e){var a=Ta(e,"string");return typeof a=="symbol"?a:a+""}function Ta(e,a){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,a);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var Ka=(e,a)=>e==null?[]:a===1?e.flatMap(t=>t.status==="removed"?[]:[t.next]):e.flatMap(t=>t.status==="matched"?[w(w({},t.next),{},{x:F(t.prev.x,t.next.x,a),y:F(t.prev.y,t.next.y,a)})]:t.status==="added"?[t.next]:[]),Ae={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Be,animationInterpolateFn:Ka,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:Oa,xAxisId:0,yAxisId:0,zIndex:We.area};function $(e,a){return e&&e!=="none"?e:a}var Ma=e=>{var a=e.dataKey,t=e.name,i=e.stroke,r=e.fill,n=e.legendType,c=e.hide;return[{inactive:c,dataKey:a,type:n,color:$(i,r),value:ue(t,a),payload:e}]},za=l.memo(e=>{var a=e.dataKey,t=e.data,i=e.stroke,r=e.strokeWidth,n=e.fill,c=e.name,s=e.hide,d=e.unit,u=e.formatter,p=e.tooltipType,o=e.id,v={dataDefinedOnItem:t,getPosition:Ve,settings:{stroke:i,strokeWidth:r,fill:n,dataKey:a,nameKey:void 0,name:ue(c,a),hide:s,type:p,color:$(i,n),unit:d,formatter:u,graphicalItemId:o}};return l.createElement(Fe,{tooltipEntrySettings:v})});function Fa(e){var a=e.clipPathId,t=e.points,i=e.props,r=i.needClip,n=i.dot,c=i.dataKey,s=ce(i);return l.createElement(fa,{points:t,dot:n,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:s,needClip:r,clipPathId:a})}function Va(e){var a=e.showLabels,t=e.children,i=e.points,r=i.map(n=>{var c,s,d={x:(c=n.x)!==null&&c!==void 0?c:0,y:(s=n.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return w(w({},d),{},{value:n.value,payload:n.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return l.createElement(ia,{value:a?r:void 0},t)}function $a(e){var a=e.points,t=e.baseLine,i=e.needClip,r=e.clipPathId,n=e.props,c=e.animationElapsedTime,s=e.isAnimating,d=e.isEntrance,u=n.layout,p=n.type,o=n.stroke,v=n.connectNulls,I=n.isRange,f=n.shape,y=n.id,x=xe(n,wa),A=na(x),g=w(w({},A),{},{id:y,points:a,connectNulls:v,type:p,baseLine:t,layout:u,stroke:o,isRange:I,animationElapsedTime:c,isAnimating:s,isEntrance:d});return l.createElement(l.Fragment,null,(a==null?void 0:a.length)>1&&l.createElement(M,{clipPath:i?"url(#clipPath-".concat(r,")"):void 0},l.createElement(ra,{option:f,DefaultShape:Ae.shape,shapeProps:g})),l.createElement(Fa,{points:a,props:x,clipPathId:r}))}function Ga(e,a,t){if(j(e)){var i=j(a)?a:void 0;return F(i,e,t)}if(sa(e)||la(e)){var r=j(a)?a:void 0;return F(r,0,t)}return e}function Xa(e){var a=e.needClip,t=e.clipPathId,i=e.props,r=e.previousPointsRef,n=e.previousBaselineRef,c=i.points,s=i.baseLine,d=i.isAnimationActive,u=i.animationBegin,p=i.animationDuration,o=i.animationEasing,v=i.animationMatchBy,I=i.animationInterpolateFn,f=l.useMemo(()=>({points:c,baseLine:s}),[c,s]),y=Je(f,n),x=_e(),A=ea(i.onAnimationStart,i.onAnimationEnd),g=A.isAnimating,S=A.handleAnimationStart,L=A.handleAnimationEnd,k=y.startValue;if(x==null)return null;var h;return Array.isArray(s)&&Array.isArray(k)?h=ae(k,s,v):Array.isArray(s)?h=ae(null,s,v):h=null,l.createElement(aa,{animationInput:f,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:r,isAnimationActive:d,animationBegin:u,animationDuration:p,animationEasing:o,onAnimationStart:S,onAnimationEnd:L,animationInterpolateFn:I,animationMatchBy:v,layout:x},(P,b,C)=>{var E;return b===1?E=s:Array.isArray(s)?E=I(h,b,x):E=C?s:Ga(s,k,b),y.syncStepValue(E,b),l.createElement(Va,{showLabels:!g,points:c},i.children,l.createElement($a,{points:P,baseLine:E,needClip:a,clipPathId:t,props:i,animationElapsedTime:b,isAnimating:g||b<1,isEntrance:C}),l.createElement(ta,{label:i.label}))})}function Ya(e){var a=e.needClip,t=e.clipPathId,i=e.props,r=l.useRef(null),n=l.useRef();return l.createElement(Xa,{needClip:a,clipPathId:t,props:i,previousPointsRef:r,previousBaselineRef:n})}class Ha extends l.PureComponent{render(){var a=this.props,t=a.hide,i=a.dot,r=a.points,n=a.className,c=a.top,s=a.left,d=a.needClip,u=a.xAxisId,p=a.yAxisId,o=a.width,v=a.height,I=a.id,f=a.baseLine,y=a.zIndex;if(t)return null;var x=qe("recharts-area",n),A=I,g=va(i),S=g.r,L=g.strokeWidth,k=Ue(i),h=S*2+L,P=d?"url(#clipPath-".concat(k?"":"dots-").concat(A,")"):void 0;return l.createElement(Ze,{zIndex:y},l.createElement(M,{className:x},d&&l.createElement("defs",null,l.createElement(Qe,{clipPathId:A,xAxisId:u,yAxisId:p}),!k&&l.createElement("clipPath",{id:"clipPath-dots-".concat(A)},l.createElement("rect",{x:s-h/2,y:c-h/2,width:o+h,height:v+h}))),l.createElement(Ya,{needClip:d,clipPathId:A,props:this.props})),l.createElement(te,{points:r,mainColor:$(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:P}),this.props.isRange&&Array.isArray(f)&&l.createElement(te,{points:f,mainColor:$(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:P}))}}function qa(e){var a,t=e.activeDot,i=e.animationBegin,r=e.animationDuration,n=e.animationEasing,c=e.connectNulls,s=e.dot,d=e.fill,u=e.fillOpacity,p=e.hide,o=e.isAnimationActive,v=e.legendType,I=e.stroke,f=e.xAxisId,y=e.yAxisId,x=xe(e,Da),A=$e(),g=Ge(),S=Xe(f,y),L=S.needClip,k=de(),h=(a=Ye(G=>Pa(G,e.id,k)))!==null&&a!==void 0?a:{},P=h.points,b=h.isRange,C=h.baseLine,E=He();if(A!=="horizontal"&&A!=="vertical"||E==null||g!=="AreaChart"&&g!=="ComposedChart")return null;var N=E.height,D=E.width,R=E.x,T=E.y;return!P||!P.length?null:l.createElement(Ha,V({},x,{activeDot:t,animationBegin:i,animationDuration:r,animationEasing:n,baseLine:C,connectNulls:c,dot:s,fill:d,fillOpacity:u,height:N,hide:p,layout:A,isAnimationActive:o,isRange:b,legendType:v,needClip:L,points:P,stroke:I,width:D,left:R,top:T,xAxisId:f,yAxisId:y}))}var Ua=(e,a,t,i,r)=>{var n=t??a;if(j(n))return n;var c=e==="horizontal"?r:i,s=c.scale.domain();if(c.type==="number"){var d=Math.max(s[0],s[1]),u=Math.min(s[0],s[1]);return n==="dataMin"?u:n==="dataMax"||d<0?d:Math.max(Math.min(s[0],s[1]),0)}return n==="dataMin"?s[0]:n==="dataMax"?s[1]:s[0]};function Za(e){var a=e.areaSettings,t=a.connectNulls,i=a.baseValue,r=a.dataKey,n=e.stackedData,c=e.layout,s=e.chartBaseValue,d=e.xAxis,u=e.yAxis,p=e.displayedData,o=e.dataStartIndex,v=e.xAxisTicks,I=e.yAxisTicks,f=e.bandSize,y=e.stackDataKeys,x=n&&n.length,A=Ua(c,s,i,d,u),g=c==="horizontal",S=!1,L=p.map((h,P)=>{var b,C,E,N;if(x)N=n[o+P];else{var D=H(h,r);Array.isArray(D)?(N=D,S=!0):N=[A,D]}var R=(b=(C=N)===null||C===void 0?void 0:C[1])!==null&&b!==void 0?b:null,T=H(h,r),G=x&&T==null&&y!=null&&y.length>0&&y.every(ke=>H(h,ke)==null),J=R==null||x&&!t&&T==null||G;if(g){var X;return{x:ee({axis:d,ticks:v,bandSize:f,entry:h,index:P}),y:J?null:(X=u.scale.map(R))!==null&&X!==void 0?X:null,value:N,payload:h}}return{x:J?null:(E=d.scale.map(R))!==null&&E!==void 0?E:null,y:ee({axis:u,ticks:I,bandSize:f,entry:h,index:P}),value:N,payload:h}}),k;return x||S?k=L.map(h=>{var P,b=Array.isArray(h.value)?h.value[0]:null;if(g){var C;return{x:h.x,y:b!=null&&h.y!=null&&(C=u.scale.map(b))!==null&&C!==void 0?C:null,payload:h.payload}}return{x:b!=null&&(P=d.scale.map(b))!==null&&P!==void 0?P:null,y:h.y,payload:h.payload}}):k=g?u.scale.map(A):d.scale.map(A),{points:L,baseLine:k??0,isRange:S}}function Qa(e){var a=Re(e,Ae),t=de();return l.createElement(Te,{id:a.id,type:"area"},i=>l.createElement(l.Fragment,null,l.createElement(Ke,{legendPayload:Ma(a)}),l.createElement(za,{dataKey:a.dataKey,data:a.data,stroke:a.stroke,strokeWidth:a.strokeWidth,fill:a.fill,name:a.name,hide:a.hide,unit:a.unit,formatter:a.formatter,tooltipType:a.tooltipType,id:i}),l.createElement(Me,{type:"area",id:i,data:a.data,dataKey:a.dataKey,xAxisId:a.xAxisId,yAxisId:a.yAxisId,zAxisId:0,stackId:ze(a.stackId),hide:a.hide,barSize:void 0,baseValue:a.baseValue,isPanorama:t,connectNulls:a.connectNulls}),l.createElement(qa,V({},a,{id:i}))))}var ge=l.memo(Qa,De);ge.displayName="Area";function re(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(Math.round(e))}function Ja(e){if(e.length<3)return null;const a=e.map(r=>r.cache_creation_tokens),t=a.reduce((r,n)=>r+n,0)/a.length,i=a.reduce((r,n)=>r+(n-t)**2,0)/a.length;return t+2*Math.sqrt(i)}function _a(e,a){const t=new Set(a);return e.map(i=>({...i,spike_value:t.has(i.bucket)?i.cache_creation_tokens:null}))}const et="insideTopLeft";function dt({state:e}){const a=Ie(),[t,i]=l.useState(!0),r=!a&&t;if(l.useEffect(()=>{e.status==="ok"&&e.value.data!==null&&i(!1)},[e]),e.status==="loading")return m.jsx("div",{className:"card","aria-busy":"true","aria-label":"Loading cache write spike chart",children:m.jsx(Pe,{})});if(e.status==="error")return m.jsxs("div",{className:"card",children:[m.jsx("div",{className:"kpi-off",children:"N/A"}),m.jsx("div",{className:"kpi-off-hint",children:"Cache write timeline unavailable"})]});const n=e.value.data;if(n===null||n.buckets.length===0)return m.jsxs("div",{className:"card",children:[m.jsx("div",{className:"section-head",children:m.jsx("h2",{children:"Cache writes over time · spike = likely miss event"})}),m.jsx("div",{className:"banner banner-info",children:m.jsx("span",{children:"No cache write data in this window."})})]});const{buckets:c,spike_buckets:s}=n,d=Ja(c),u=_a(c,s),p=u.some(o=>o.spike_value!==null);return m.jsxs("div",{className:"card",children:[m.jsxs("div",{className:"section-head",children:[m.jsx("h2",{children:"Cache writes over time · spike = likely miss event"}),m.jsx("div",{className:"chips",children:m.jsx(be,{kind:"LIST_EQUIV"})})]}),m.jsx("p",{className:"kpi-fn",style:{marginBottom:4},children:"Rising writes vs reads signals cache misses (A1 §09 · D8 companion view)"}),m.jsx("p",{className:"kpi-fn",style:{color:"var(--amber, #f39c12)",marginBottom:8},children:"⚠ TTL 5m/1h volatile · Spike threshold is TTL-sensitive · active TTL unknown (run /usage to confirm)"}),m.jsx(oa,{width:"100%",height:220,children:m.jsxs(ha,{data:u,margin:{top:4,right:20,bottom:4,left:8},children:[m.jsx("defs",{children:m.jsxs("linearGradient",{id:"cache-write-gradient",x1:"0",x2:"0",y1:"0",y2:"1",children:[m.jsx("stop",{offset:"0%",stopColor:K[1],stopOpacity:.24}),m.jsx("stop",{offset:"100%",stopColor:K[1],stopOpacity:0})]})}),m.jsx(ca,{...O.grid}),m.jsx(da,{dataKey:"bucket",axisLine:O.axisLine,tickLine:O.tickLine,tickCount:O.tickCount,interval:"preserveStartEnd",tick:{fontSize:11},tickFormatter:o=>o.slice(5)}),m.jsx(ua,{axisLine:O.axisLine,tickLine:O.tickLine,tickFormatter:re,tick:{fontSize:11}}),m.jsx(pa,{content:m.jsx(Ee,{labelFormatter:o=>`Bucket: ${String(o??"")}`,nameFormatter:o=>o==="cache_creation_tokens"?"cache writes":o==="spike_value"?"spike (miss event)":String(o??"Value"),valueFormatter:o=>typeof o=="number"?re(o):String(o??"N/A")})}),m.jsx(ma,{formatter:o=>o==="cache_creation_tokens"?"cache writes":o}),m.jsx(ge,{dataKey:"cache_creation_tokens",type:"step",fill:"url(#cache-write-gradient)",stroke:K[1],dot:!1,isAnimationActive:r}),d!==null&&m.jsx(ya,{y:d,stroke:"var(--red, #e74c3c)",strokeDasharray:"4 4",label:{value:"spike threshold",position:et,offset:8,fontSize:11}}),p&&m.jsx(xa,{dataKey:"spike_value",fill:K[4],name:"spike (miss event)",isAnimationActive:r})]})})]})}export{et as SPIKE_THRESHOLD_LABEL_POSITION,_a as buildCacheWriteChartRows,dt as default};
|
|
1
|
+
import{r as l,j as m}from"./index-DWsa7LPr.js";import{C as be}from"./Chip-Gem94sHD.js";import{u as Ie,c as Pe}from"./Skeleton-D5lrQpCm.js";import{s as K,g as O,C as Ee}from"./chart-theme-F_Y5-T0C.js";import{c as B,s as q,a as Se,b as Ce,d as se,e as le,g as Le,i as oe,f as _,h as Ne,j as je,k as Oe,u as we,l as ce,m as Y,L as M,n as z,o as j,p as De,r as Re,D as We,q as Be,t as de,v as Te,S as Ke,w as Me,x as ze,y as F,z as ue,A as Fe,B as Ve,E as $e,F as Ge,G as Xe,H as Ye,I as He,J as qe,K as Ue,Z as Ze,M as Qe,N as H,O as ee,P as Je,Q as _e,U as ea,V as ae,W as aa,_ as ta,$ as ia,a0 as na,a1 as ra,a2 as sa,a3 as la,R as oa,C as ca,X as da,Y as ua,T as pa}from"./CartesianChart-BTva-_b9.js";import{C as ha}from"./ComposedChart-CS5SgLoo.js";import{L as ma}from"./Legend-SbbUv9Nm.js";import{g as va,A as te,D as fa,R as ya,S as xa}from"./Scatter-xyJ9miNg.js";import{s as U,a as Z}from"./graphicalItemSelectors-XzBS96LG.js";var pe=(e,a,t)=>se(e,"xAxis",U(e,a),t),he=(e,a,t)=>le(e,"xAxis",U(e,a),t),me=(e,a,t)=>se(e,"yAxis",Z(e,a),t),ve=(e,a,t)=>le(e,"yAxis",Z(e,a),t),Aa=B([q,pe,me,he,ve],(e,a,t,i,r)=>oe(e,"xAxis")?_(a,i,!1):_(t,r,!1)),ga=(e,a)=>a,Q=B([Ne,ga],(e,a)=>e.filter(t=>t.type==="area").find(t=>t.id===a)),fe=e=>{var a=q(e),t=oe(a,"xAxis");return t?"yAxis":"xAxis"},ka=(e,a)=>{var t=fe(e);return t==="yAxis"?Z(e,a):U(e,a)},ye=(e,a,t)=>Oe(e,fe(e),ka(e,a),t),ba=B([Q,ye],(e,a)=>{var t;if(!(e==null||a==null)){var i=e.stackId,r=Le(e);if(!(i==null||r==null)){var n=(t=a[i])===null||t===void 0?void 0:t.stackedData,c=n==null?void 0:n.find(s=>s.key===r);if(c!=null)return c.map(s=>[s[0],s[1]])}}}),Ia=B([Q,ye],(e,a)=>{if(!(e==null||e.stackId==null||a==null)){var t=a[e.stackId];if(t!=null)return t.graphicalItems.map(i=>i.dataKey).filter(je)}}),Pa=B([q,pe,me,he,ve,ba,Se,Aa,Q,Ce,Ia],(e,a,t,i,r,n,c,s,d,u,p)=>{var o=c.chartData,v=c.dataStartIndex,I=c.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||a==null||t==null||i==null||r==null||i.length===0||r.length===0||s==null)){var f=d.data,y;if(f&&f.length>0?y=f:y=o==null?void 0:o.slice(v,I+1),y!=null)return Za({layout:e,xAxis:a,yAxis:t,xAxisTicks:i,yAxisTicks:r,dataStartIndex:v,areaSettings:d,stackedData:n,displayedData:y,chartBaseValue:u,bandSize:s,stackDataKeys:p})}}),Ea=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Sa=["id","baseLine"];function W(){return W=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},W.apply(null,arguments)}function ie(e,a){if(e==null)return{};var t,i,r=Ca(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)t=n[i],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function Ca(e,a){if(e==null)return{};var t={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(a.indexOf(i)!==-1)continue;t[i]=e[i]}return t}function La(e){var a,t,i=e.alpha,r=e.baseLine,n=e.points,c=e.strokeWidth,s=(a=n[0])===null||a===void 0?void 0:a.x,d=(t=n[n.length-1])===null||t===void 0?void 0:t.x;if(!z(s)||!z(d))return null;var u=i*Math.abs(s-d),p=Math.max(...n.map(o=>o.y||0));return j(r)?p=Math.max(r,p):r&&Array.isArray(r)&&r.length&&(p=Math.max(...r.map(o=>o.y||0),p)),j(p)?l.createElement("rect",{x:s<d?s:s-u,y:0,width:u,height:Math.floor(p+(c?parseInt("".concat(c),10):1))}):null}function Na(e){var a,t,i=e.alpha,r=e.baseLine,n=e.points,c=e.strokeWidth,s=(a=n[0])===null||a===void 0?void 0:a.y,d=(t=n[n.length-1])===null||t===void 0?void 0:t.y;if(!z(s)||!z(d))return null;var u=i*Math.abs(s-d),p=Math.max(...n.map(o=>o.x||0));return j(r)?p=Math.max(r,p):r&&Array.isArray(r)&&r.length&&(p=Math.max(...r.map(o=>o.x||0),p)),j(p)?l.createElement("rect",{x:0,y:s<d?s:s-u,width:p+(c?parseInt("".concat(c),10):1),height:Math.floor(u)}):null}function ja(e){var a=e.alpha,t=e.layout,i=e.points,r=e.baseLine,n=e.strokeWidth;return t==="vertical"?l.createElement(Na,{alpha:a,points:i,baseLine:r,strokeWidth:n}):l.createElement(La,{alpha:a,points:i,baseLine:r,strokeWidth:n})}function Oa(e){var a=e.animationElapsedTime,t=a===void 0?1:a,i=e.isAnimating,r=i===void 0?!1:i,n=e.isEntrance,c=n===void 0?!1:n,s=e.layout,d=e.isRange,u=e.stroke,p=e.connectNulls,o=ie(e,Ea),v=s==="vertical"?"vertical":"horizontal",I=p??!1,f=we(),y=o.id,x=o.baseLine,A=ie(o,Sa),g=ce(A),S=l.createElement(Y,W({},o,{id:y,baseLine:x,connectNulls:I,stroke:"none",className:"recharts-area-area",layout:v})),L=u!=="none"&&l.createElement(Y,W({},g,{className:"recharts-area-curve",layout:v,type:o.type,connectNulls:I,fill:"none",stroke:u,points:o.points})),k=u!=="none"&&d&&Array.isArray(x)&&l.createElement(Y,W({},g,{className:"recharts-area-curve",layout:v,type:o.type,connectNulls:I,fill:"none",stroke:u,points:x}));if(c&&(r||t<1)){var h;return l.createElement(M,null,l.createElement("defs",null,l.createElement("clipPath",{id:f},l.createElement(ja,{alpha:t,points:(h=o.points)!==null&&h!==void 0?h:[],baseLine:x,layout:v,strokeWidth:o.strokeWidth}))),l.createElement(M,{clipPath:"url(#".concat(f,")")},S,L,k))}return l.createElement(l.Fragment,null,S,L,k)}var wa=["id"],Da=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function V(){return V=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},V.apply(null,arguments)}function xe(e,a){if(e==null)return{};var t,i,r=Ra(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)t=n[i],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function Ra(e,a){if(e==null)return{};var t={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(a.indexOf(i)!==-1)continue;t[i]=e[i]}return t}function ne(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);a&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function w(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?ne(Object(t),!0).forEach(function(i){Wa(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ne(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Wa(e,a,t){return(a=Ba(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function Ba(e){var a=Ta(e,"string");return typeof a=="symbol"?a:a+""}function Ta(e,a){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,a);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var Ka=(e,a)=>e==null?[]:a===1?e.flatMap(t=>t.status==="removed"?[]:[t.next]):e.flatMap(t=>t.status==="matched"?[w(w({},t.next),{},{x:F(t.prev.x,t.next.x,a),y:F(t.prev.y,t.next.y,a)})]:t.status==="added"?[t.next]:[]),Ae={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:Be,animationInterpolateFn:Ka,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:Oa,xAxisId:0,yAxisId:0,zIndex:We.area};function $(e,a){return e&&e!=="none"?e:a}var Ma=e=>{var a=e.dataKey,t=e.name,i=e.stroke,r=e.fill,n=e.legendType,c=e.hide;return[{inactive:c,dataKey:a,type:n,color:$(i,r),value:ue(t,a),payload:e}]},za=l.memo(e=>{var a=e.dataKey,t=e.data,i=e.stroke,r=e.strokeWidth,n=e.fill,c=e.name,s=e.hide,d=e.unit,u=e.formatter,p=e.tooltipType,o=e.id,v={dataDefinedOnItem:t,getPosition:Ve,settings:{stroke:i,strokeWidth:r,fill:n,dataKey:a,nameKey:void 0,name:ue(c,a),hide:s,type:p,color:$(i,n),unit:d,formatter:u,graphicalItemId:o}};return l.createElement(Fe,{tooltipEntrySettings:v})});function Fa(e){var a=e.clipPathId,t=e.points,i=e.props,r=i.needClip,n=i.dot,c=i.dataKey,s=ce(i);return l.createElement(fa,{points:t,dot:n,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:s,needClip:r,clipPathId:a})}function Va(e){var a=e.showLabels,t=e.children,i=e.points,r=i.map(n=>{var c,s,d={x:(c=n.x)!==null&&c!==void 0?c:0,y:(s=n.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return w(w({},d),{},{value:n.value,payload:n.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return l.createElement(ia,{value:a?r:void 0},t)}function $a(e){var a=e.points,t=e.baseLine,i=e.needClip,r=e.clipPathId,n=e.props,c=e.animationElapsedTime,s=e.isAnimating,d=e.isEntrance,u=n.layout,p=n.type,o=n.stroke,v=n.connectNulls,I=n.isRange,f=n.shape,y=n.id,x=xe(n,wa),A=na(x),g=w(w({},A),{},{id:y,points:a,connectNulls:v,type:p,baseLine:t,layout:u,stroke:o,isRange:I,animationElapsedTime:c,isAnimating:s,isEntrance:d});return l.createElement(l.Fragment,null,(a==null?void 0:a.length)>1&&l.createElement(M,{clipPath:i?"url(#clipPath-".concat(r,")"):void 0},l.createElement(ra,{option:f,DefaultShape:Ae.shape,shapeProps:g})),l.createElement(Fa,{points:a,props:x,clipPathId:r}))}function Ga(e,a,t){if(j(e)){var i=j(a)?a:void 0;return F(i,e,t)}if(sa(e)||la(e)){var r=j(a)?a:void 0;return F(r,0,t)}return e}function Xa(e){var a=e.needClip,t=e.clipPathId,i=e.props,r=e.previousPointsRef,n=e.previousBaselineRef,c=i.points,s=i.baseLine,d=i.isAnimationActive,u=i.animationBegin,p=i.animationDuration,o=i.animationEasing,v=i.animationMatchBy,I=i.animationInterpolateFn,f=l.useMemo(()=>({points:c,baseLine:s}),[c,s]),y=Je(f,n),x=_e(),A=ea(i.onAnimationStart,i.onAnimationEnd),g=A.isAnimating,S=A.handleAnimationStart,L=A.handleAnimationEnd,k=y.startValue;if(x==null)return null;var h;return Array.isArray(s)&&Array.isArray(k)?h=ae(k,s,v):Array.isArray(s)?h=ae(null,s,v):h=null,l.createElement(aa,{animationInput:f,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:r,isAnimationActive:d,animationBegin:u,animationDuration:p,animationEasing:o,onAnimationStart:S,onAnimationEnd:L,animationInterpolateFn:I,animationMatchBy:v,layout:x},(P,b,C)=>{var E;return b===1?E=s:Array.isArray(s)?E=I(h,b,x):E=C?s:Ga(s,k,b),y.syncStepValue(E,b),l.createElement(Va,{showLabels:!g,points:c},i.children,l.createElement($a,{points:P,baseLine:E,needClip:a,clipPathId:t,props:i,animationElapsedTime:b,isAnimating:g||b<1,isEntrance:C}),l.createElement(ta,{label:i.label}))})}function Ya(e){var a=e.needClip,t=e.clipPathId,i=e.props,r=l.useRef(null),n=l.useRef();return l.createElement(Xa,{needClip:a,clipPathId:t,props:i,previousPointsRef:r,previousBaselineRef:n})}class Ha extends l.PureComponent{render(){var a=this.props,t=a.hide,i=a.dot,r=a.points,n=a.className,c=a.top,s=a.left,d=a.needClip,u=a.xAxisId,p=a.yAxisId,o=a.width,v=a.height,I=a.id,f=a.baseLine,y=a.zIndex;if(t)return null;var x=qe("recharts-area",n),A=I,g=va(i),S=g.r,L=g.strokeWidth,k=Ue(i),h=S*2+L,P=d?"url(#clipPath-".concat(k?"":"dots-").concat(A,")"):void 0;return l.createElement(Ze,{zIndex:y},l.createElement(M,{className:x},d&&l.createElement("defs",null,l.createElement(Qe,{clipPathId:A,xAxisId:u,yAxisId:p}),!k&&l.createElement("clipPath",{id:"clipPath-dots-".concat(A)},l.createElement("rect",{x:s-h/2,y:c-h/2,width:o+h,height:v+h}))),l.createElement(Ya,{needClip:d,clipPathId:A,props:this.props})),l.createElement(te,{points:r,mainColor:$(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:P}),this.props.isRange&&Array.isArray(f)&&l.createElement(te,{points:f,mainColor:$(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:P}))}}function qa(e){var a,t=e.activeDot,i=e.animationBegin,r=e.animationDuration,n=e.animationEasing,c=e.connectNulls,s=e.dot,d=e.fill,u=e.fillOpacity,p=e.hide,o=e.isAnimationActive,v=e.legendType,I=e.stroke,f=e.xAxisId,y=e.yAxisId,x=xe(e,Da),A=$e(),g=Ge(),S=Xe(f,y),L=S.needClip,k=de(),h=(a=Ye(G=>Pa(G,e.id,k)))!==null&&a!==void 0?a:{},P=h.points,b=h.isRange,C=h.baseLine,E=He();if(A!=="horizontal"&&A!=="vertical"||E==null||g!=="AreaChart"&&g!=="ComposedChart")return null;var N=E.height,D=E.width,R=E.x,T=E.y;return!P||!P.length?null:l.createElement(Ha,V({},x,{activeDot:t,animationBegin:i,animationDuration:r,animationEasing:n,baseLine:C,connectNulls:c,dot:s,fill:d,fillOpacity:u,height:N,hide:p,layout:A,isAnimationActive:o,isRange:b,legendType:v,needClip:L,points:P,stroke:I,width:D,left:R,top:T,xAxisId:f,yAxisId:y}))}var Ua=(e,a,t,i,r)=>{var n=t??a;if(j(n))return n;var c=e==="horizontal"?r:i,s=c.scale.domain();if(c.type==="number"){var d=Math.max(s[0],s[1]),u=Math.min(s[0],s[1]);return n==="dataMin"?u:n==="dataMax"||d<0?d:Math.max(Math.min(s[0],s[1]),0)}return n==="dataMin"?s[0]:n==="dataMax"?s[1]:s[0]};function Za(e){var a=e.areaSettings,t=a.connectNulls,i=a.baseValue,r=a.dataKey,n=e.stackedData,c=e.layout,s=e.chartBaseValue,d=e.xAxis,u=e.yAxis,p=e.displayedData,o=e.dataStartIndex,v=e.xAxisTicks,I=e.yAxisTicks,f=e.bandSize,y=e.stackDataKeys,x=n&&n.length,A=Ua(c,s,i,d,u),g=c==="horizontal",S=!1,L=p.map((h,P)=>{var b,C,E,N;if(x)N=n[o+P];else{var D=H(h,r);Array.isArray(D)?(N=D,S=!0):N=[A,D]}var R=(b=(C=N)===null||C===void 0?void 0:C[1])!==null&&b!==void 0?b:null,T=H(h,r),G=x&&T==null&&y!=null&&y.length>0&&y.every(ke=>H(h,ke)==null),J=R==null||x&&!t&&T==null||G;if(g){var X;return{x:ee({axis:d,ticks:v,bandSize:f,entry:h,index:P}),y:J?null:(X=u.scale.map(R))!==null&&X!==void 0?X:null,value:N,payload:h}}return{x:J?null:(E=d.scale.map(R))!==null&&E!==void 0?E:null,y:ee({axis:u,ticks:I,bandSize:f,entry:h,index:P}),value:N,payload:h}}),k;return x||S?k=L.map(h=>{var P,b=Array.isArray(h.value)?h.value[0]:null;if(g){var C;return{x:h.x,y:b!=null&&h.y!=null&&(C=u.scale.map(b))!==null&&C!==void 0?C:null,payload:h.payload}}return{x:b!=null&&(P=d.scale.map(b))!==null&&P!==void 0?P:null,y:h.y,payload:h.payload}}):k=g?u.scale.map(A):d.scale.map(A),{points:L,baseLine:k??0,isRange:S}}function Qa(e){var a=Re(e,Ae),t=de();return l.createElement(Te,{id:a.id,type:"area"},i=>l.createElement(l.Fragment,null,l.createElement(Ke,{legendPayload:Ma(a)}),l.createElement(za,{dataKey:a.dataKey,data:a.data,stroke:a.stroke,strokeWidth:a.strokeWidth,fill:a.fill,name:a.name,hide:a.hide,unit:a.unit,formatter:a.formatter,tooltipType:a.tooltipType,id:i}),l.createElement(Me,{type:"area",id:i,data:a.data,dataKey:a.dataKey,xAxisId:a.xAxisId,yAxisId:a.yAxisId,zAxisId:0,stackId:ze(a.stackId),hide:a.hide,barSize:void 0,baseValue:a.baseValue,isPanorama:t,connectNulls:a.connectNulls}),l.createElement(qa,V({},a,{id:i}))))}var ge=l.memo(Qa,De);ge.displayName="Area";function re(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(Math.round(e))}function Ja(e){if(e.length<3)return null;const a=e.map(r=>r.cache_creation_tokens),t=a.reduce((r,n)=>r+n,0)/a.length,i=a.reduce((r,n)=>r+(n-t)**2,0)/a.length;return t+2*Math.sqrt(i)}function _a(e,a){const t=new Set(a);return e.map(i=>({...i,spike_value:t.has(i.bucket)?i.cache_creation_tokens:null}))}const et="insideTopLeft";function dt({state:e}){const a=Ie(),[t,i]=l.useState(!0),r=!a&&t;if(l.useEffect(()=>{e.status==="ok"&&e.value.data!==null&&i(!1)},[e]),e.status==="loading")return m.jsx("div",{className:"card","aria-busy":"true","aria-label":"Loading cache write spike chart",children:m.jsx(Pe,{})});if(e.status==="error")return m.jsxs("div",{className:"card",children:[m.jsx("div",{className:"kpi-off",children:"N/A"}),m.jsx("div",{className:"kpi-off-hint",children:"Cache write timeline unavailable"})]});const n=e.value.data;if(n===null||n.buckets.length===0)return m.jsxs("div",{className:"card",children:[m.jsx("div",{className:"section-head",children:m.jsx("h2",{children:"Cache writes over time · spike = likely miss event"})}),m.jsx("div",{className:"banner banner-info",children:m.jsx("span",{children:"No cache write data in this window."})})]});const{buckets:c,spike_buckets:s}=n,d=Ja(c),u=_a(c,s),p=u.some(o=>o.spike_value!==null);return m.jsxs("div",{className:"card",children:[m.jsxs("div",{className:"section-head",children:[m.jsx("h2",{children:"Cache writes over time · spike = likely miss event"}),m.jsx("div",{className:"chips",children:m.jsx(be,{kind:"LIST_EQUIV"})})]}),m.jsx("p",{className:"kpi-fn",style:{marginBottom:4},children:"Rising writes vs reads signals cache misses (A1 §09 · D8 companion view)"}),m.jsx("p",{className:"kpi-fn",style:{color:"var(--amber, #f39c12)",marginBottom:8},children:"⚠ TTL 5m/1h volatile · Spike threshold is TTL-sensitive · active TTL unknown (run /usage to confirm)"}),m.jsx(oa,{width:"100%",height:220,children:m.jsxs(ha,{data:u,margin:{top:4,right:20,bottom:4,left:8},children:[m.jsx("defs",{children:m.jsxs("linearGradient",{id:"cache-write-gradient",x1:"0",x2:"0",y1:"0",y2:"1",children:[m.jsx("stop",{offset:"0%",stopColor:K[1],stopOpacity:.24}),m.jsx("stop",{offset:"100%",stopColor:K[1],stopOpacity:0})]})}),m.jsx(ca,{...O.grid}),m.jsx(da,{dataKey:"bucket",axisLine:O.axisLine,tickLine:O.tickLine,tickCount:O.tickCount,interval:"preserveStartEnd",tick:{fontSize:11},tickFormatter:o=>o.slice(5)}),m.jsx(ua,{axisLine:O.axisLine,tickLine:O.tickLine,tickFormatter:re,tick:{fontSize:11}}),m.jsx(pa,{content:m.jsx(Ee,{labelFormatter:o=>`Bucket: ${String(o??"")}`,nameFormatter:o=>o==="cache_creation_tokens"?"cache writes":o==="spike_value"?"spike (miss event)":String(o??"Value"),valueFormatter:o=>typeof o=="number"?re(o):String(o??"N/A")})}),m.jsx(ma,{formatter:o=>o==="cache_creation_tokens"?"cache writes":o}),m.jsx(ge,{dataKey:"cache_creation_tokens",type:"step",fill:"url(#cache-write-gradient)",stroke:K[1],dot:!1,isAnimationActive:r}),d!==null&&m.jsx(ya,{y:d,stroke:"var(--red, #e74c3c)",strokeDasharray:"4 4",label:{value:"spike threshold",position:et,offset:8,fontSize:11}}),p&&m.jsx(xa,{dataKey:"spike_value",fill:K[4],name:"spike (miss event)",isAnimationActive:r})]})})]})}export{et as SPIKE_THRESHOLD_LABEL_POSITION,_a as buildCacheWriteChartRows,dt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bp=Object.defineProperty;var Wp=(e,t,r)=>t in e?Bp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Vn=(e,t,r)=>Wp(e,typeof t!="symbol"?t+"":t,r);import{r as y,U as Fp,V as su,W as Up,X as Hp}from"./index-OEoc-2Hk.js";function jd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=jd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=jd(e))&&(n&&(n+=" "),n+=t);return n}var Kp=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function fu(e){if(typeof e!="string")return!1;var t=Kp;return t.includes(e)}var qp=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Yp=new Set(qp);function Dd(e){return typeof e!="string"?!1:Yp.has(e)}function $d(e){return typeof e=="string"&&e.startsWith("data-")}function Kt(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Dd(r)||$d(r))&&(t[r]=e[r]);return t}function Nd(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Kt(t)}return typeof e=="object"&&!Array.isArray(e)?Kt(e):null}function at(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Dd(r)||$d(r)||fu(r))&&(t[r]=e[r]);return t}function Gj(e){return e==null?null:y.isValidElement(e)?at(e.props):typeof e=="object"&&!Array.isArray(e)?at(e):null}var Gp=["children","width","height","viewBox","className","style","title","desc"];function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oo.apply(null,arguments)}function Vp(e,t){if(e==null)return{};var r,n,i=Xp(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xp(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Rd=y.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,u=e.style,l=e.title,c=e.desc,s=Vp(e,Gp),f=a||{width:n,height:i,x:0,y:0},d=oe("recharts-surface",o);return y.createElement("svg",Oo({},at(s),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),y.createElement("title",null,l),y.createElement("desc",null,c),r)}),Zp=["children","className"];function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},So.apply(null,arguments)}function Qp(e,t){if(e==null)return{};var r,n,i=Jp(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Jp(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dr=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=Qp(e,Zp),a=oe("recharts-layer",n);return y.createElement("g",So({className:a},at(i),{ref:t}),r)}),Ld=Fp();function Po(e){return e==="__proto__"}const eg=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function zd(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e===""||e.startsWith(".")||e.endsWith(".")?!1:eg.test(e);default:return!1}}function du(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function tg(e){return e==null?"":Bd(e)}function Bd(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(Bd).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function vu(e){if(Array.isArray(e))return e.map(du);if(typeof e=="symbol")return[e];e=tg(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",a="",o=!1,u=!1;const l=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push("");n<r;){const c=e[n];if(a)c==="\\"&&n+1<r?(n++,i+=e[n]):c===a?a="":i+=c;else if(o)if(c==='"'||c==="'")a=c,u=!0;else if(c==="]"){if(o=!1,!u&&i.includes(".")&&!l.test(i)){const s=i.split(".");for(let f=0;f<s.length;f++)s[f]!==""&&t.push(s[f])}else t.push(i);i=""}else i+=c;else if(c==="[")o=!0,u=!1,i&&(t.push(i),i="");else if(c==="."){i&&(t.push(i),i="");const s=e[n+1];(s===void 0||s===".")&&t.push("")}else i+=c;n++}return i&&t.push(i),t}function Et(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(Po(t))return r;const n=e[t];return n===void 0?zd(t)&&!Object.hasOwn(e,t)?Et(e,vu(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=du(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return rg(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),Po(t))return r;const n=e[t];return n===void 0?r:n}}}function rg(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||Po(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var ng=4;function Ft(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ng,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function xe(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Ft(u)+a:i+a},"")}var Ke=e=>e===0?0:e>0?1:-1,_t=e=>typeof e=="number"&&e!=+e,dr=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,$=e=>(typeof e=="number"||e instanceof Number)&&!_t(e),pt=e=>$(e)||typeof e=="string",ig=0,bn=e=>{var t=++ig;return"".concat(e||"").concat(t)},qt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!$(t)&&typeof t!="string")return n;var a;if(dr(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return _t(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Wd=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function fn(e,t,r){return $(e)&&$(t)?Ft(e+r*(t-e)):t}function Fd(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Et(n,t))===r)}var Vj=e=>{for(var t=e.length,r=0,n=0,i=0,a=0,o=1/0,u=-1/0,l=0,c=0,s=0;s<t;s++){var f,d;l=((f=e[s])===null||f===void 0?void 0:f.cx)||0,c=((d=e[s])===null||d===void 0?void 0:d.cy)||0,r+=l,n+=c,i+=l*c,a+=l*l,o=Math.min(o,l),u=Math.max(u,l)}var v=t*a!==r*r?(t*i-r*n)/(t*a-r*r):0;return{xmin:o,xmax:u,a:v,b:(n-v*r)/t}},Se=e=>e===null||typeof e>"u",hu=e=>Se(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function $e(e){return e!=null}function Mn(){}function yu(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Bl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bl(Object(r),!0).forEach(function(n){ag(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ag(e,t,r){return(t=og(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function og(e){var t=ug(e,"string");return typeof t=="symbol"?t:t+""}function ug(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lg=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,a=e.parentViewBox,o=e.clamp,u=yu(t),l=u.x,c=u.y,s=u.height,f=u.upperWidth,d=u.lowerWidth,v=l,h=l+(f-d)/2,m=(v+h)/2,p=(f+d)/2,g=v+f/2,x=s>=0?1:-1,w=x*i,A=x>0?"end":"start",O=x>0?"start":"end",b=f>=0?1:-1,P=b*i,C=b>0?"end":"start",T=b>0?"start":"end",k=a;if(r==="top"){var M={x:v+f/2,y:c-w,horizontalAnchor:"middle",verticalAnchor:A};return o&&k&&(M.height=Math.max(c-k.y,0),M.width=f),M}if(r==="bottom"){var E={x:h+d/2,y:c+s+w,horizontalAnchor:"middle",verticalAnchor:O};return o&&k&&(E.height=Math.max(k.y+k.height-(c+s),0),E.width=d),E}if(r==="left"){var _={x:m-P,y:c+s/2,horizontalAnchor:C,verticalAnchor:"middle"};return o&&k&&(_.width=Math.max(_.x-k.x,0),_.height=s),_}if(r==="right"){var N={x:m+p+P,y:c+s/2,horizontalAnchor:T,verticalAnchor:"middle"};return o&&k&&(N.width=Math.max(k.x+k.width-N.x,0),N.height=s),N}var z=o&&k?{width:p,height:s}:{};return r==="insideLeft"?st({x:m+P,y:c+s/2,horizontalAnchor:T,verticalAnchor:"middle"},z):r==="insideRight"?st({x:m+p-P,y:c+s/2,horizontalAnchor:C,verticalAnchor:"middle"},z):r==="insideTop"?st({x:v+f/2,y:c+w,horizontalAnchor:"middle",verticalAnchor:O},z):r==="insideBottom"?st({x:h+d/2,y:c+s-w,horizontalAnchor:"middle",verticalAnchor:A},z):r==="insideTopLeft"?st({x:v+P,y:c+w,horizontalAnchor:T,verticalAnchor:O},z):r==="insideTopRight"?st({x:v+f-P,y:c+w,horizontalAnchor:C,verticalAnchor:O},z):r==="insideBottomLeft"?st({x:h+P,y:c+s-w,horizontalAnchor:T,verticalAnchor:A},z):r==="insideBottomRight"?st({x:h+d-P,y:c+s-w,horizontalAnchor:C,verticalAnchor:A},z):r&&typeof r=="object"&&($(r.x)||dr(r.x))&&($(r.y)||dr(r.y))?st({x:l+qt(r.x,p),y:c+qt(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},z):st({x:g,y:c+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},cg=["top","left","right","bottom"];function sg(e){return e==null?!1:typeof e=="object"?!0:cg.includes(e)}var Ud=y.createContext(null),Xj=()=>y.useContext(Ud);function ie(e){return function(){return e}}const Eo=Math.PI,_o=2*Eo,tr=1e-6,fg=_o-tr;function Hd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function dg(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Hd;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class vg{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Hd:dg(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,l=n-t,c=i-r,s=o-t,f=u-r,d=s*s+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>tr)if(!(Math.abs(f*l-c*s)>tr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,h=i-u,m=l*l+c*c,p=v*v+h*h,g=Math.sqrt(m),x=Math.sqrt(d),w=a*Math.tan((Eo-Math.acos((m+d-p)/(2*g*x)))/2),A=w/x,O=w/g;Math.abs(A-1)>tr&&this._append`L${t+A*s},${r+A*f}`,this._append`A${a},${a},0,0,${+(f*v>s*h)},${this._x1=t+O*l},${this._y1=r+O*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),c=t+u,s=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>tr||Math.abs(this._y1-s)>tr)&&this._append`L${c},${s}`,n&&(d<0&&(d=d%_o+_o),d>fg?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=s}`:d>tr&&this._append`A${n},${n},0,${+(d>=Eo)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Kd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new vg(t)}function mu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qd(e){this._context=e}qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function aa(e){return new qd(e)}function Yd(e){return e[0]}function Gd(e){return e[1]}function Vd(e,t){var r=ie(!0),n=null,i=aa,a=null,o=Kd(u);e=typeof e=="function"?e:e===void 0?Yd:ie(e),t=typeof t=="function"?t:t===void 0?Gd:ie(t);function u(l){var c,s=(l=mu(l)).length,f,d=!1,v;for(n==null&&(a=i(v=o())),c=0;c<=s;++c)!(c<s&&r(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(v)return a=null,v+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ie(!!l),u):r},u.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),u):i},u.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),u):n},u}function Xn(e,t,r){var n=null,i=ie(!0),a=null,o=aa,u=null,l=Kd(c);e=typeof e=="function"?e:e===void 0?Yd:ie(+e),t=typeof t=="function"?t:ie(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Gd:ie(+r);function c(f){var d,v,h,m=(f=mu(f)).length,p,g=!1,x,w=new Array(m),A=new Array(m);for(a==null&&(u=o(x=l())),d=0;d<=m;++d){if(!(d<m&&i(p=f[d],d,f))===g)if(g=!g)v=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=v;--h)u.point(w[h],A[h]);u.lineEnd(),u.areaEnd()}g&&(w[d]=+e(p,d,f),A[d]=+t(p,d,f),u.point(n?+n(p,d,f):w[d],r?+r(p,d,f):A[d]))}if(x)return u=null,x+""||null}function s(){return Vd().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ie(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ie(+f),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ie(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),c):a},c}class Xd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function hg(e){return new Xd(e,!0)}function yg(e){return new Xd(e,!1)}function pi(){}function gi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Zd(e){this._context=e}Zd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mg(e){return new Zd(e)}function Qd(e){this._context=e}Qd.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pg(e){return new Qd(e)}function Jd(e){this._context=e}Jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:gi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gg(e){return new Jd(e)}function ev(e){this._context=e}ev.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bg(e){return new ev(e)}function Wl(e){return e<0?-1:1}function Fl(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(Wl(a)+Wl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Ul(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ua(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function bi(e){this._context=e}bi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ua(this,this._t0,Ul(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ua(this,Ul(this,r=Fl(this,e,t)),r);break;default:Ua(this,this._t0,r=Fl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function tv(e){this._context=new rv(e)}(tv.prototype=Object.create(bi.prototype)).point=function(e,t){bi.prototype.point.call(this,t,e)};function rv(e){this._context=e}rv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function xg(e){return new bi(e)}function wg(e){return new tv(e)}function nv(e){this._context=e}nv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Hl(e),i=Hl(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Hl(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Ag(e){return new nv(e)}function oa(e,t){this._context=e,this._t=t}oa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Og(e){return new oa(e,.5)}function Sg(e){return new oa(e,0)}function Pg(e){return new oa(e,1)}function vr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Io(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Eg(e,t){return e[t]}function _g(e){const t=[];return t.key=e,t}function Ig(){var e=ie([]),t=Io,r=vr,n=Eg;function i(a){var o=Array.from(e.apply(this,arguments),_g),u,l=o.length,c=-1,s;for(const f of a)for(u=0,++c;u<l;++u)(o[u][c]=[0,+n(f,o[u].key,c,a)]).data=f;for(u=0,s=mu(t(o));u<l;++u)o[s[u]].index=u;return r(o,s),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ie(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Io:typeof a=="function"?a:ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??vr,i):r},i}function Cg(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}vr(e,t)}}function kg(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}vr(e,t)}}function Mg(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,l=0,c=0;u<o;++u){for(var s=e[t[u]],f=s[n][1]||0,d=s[n-1][1]||0,v=(f-d)/2,h=0;h<u;++h){var m=e[t[h]],p=m[n][1]||0,g=m[n-1][1]||0;v+=p-g}l+=f,c+=v*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,vr(e,t)}}var iv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Tg=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{fu(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},jg=(e,t,r)=>n=>(e(t,r,n),null),Dg=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];fu(i)&&typeof a=="function"&&(n||(n={}),n[i]=jg(a,t,r))}),n},Zj=e=>Array.isArray(e)&&e.length>0;function Kl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $g(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kl(Object(r),!0).forEach(function(n){Ng(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ng(e,t,r){return(t=Rg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rg(e){var t=Lg(e,"string");return typeof t=="symbol"?t:t+""}function Lg(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ut(e,t){var r=$g({},e),n=t,i=Object.keys(t),a=i.reduce((o,u)=>(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function zg(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],a=t(i,n,e);r.has(a)||r.set(a,i)}return Array.from(r.values())}function Bg(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function av(e){return e}function Wg(e){return Number.isSafeInteger(e)&&e>=0}function pu(e){return e!=null&&typeof e!="function"&&Wg(e.length)}function Fg(e){return function(t){return Et(t,e)}}function ov(e){return e==null||typeof e!="object"&&typeof e!="function"}function Ug(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Co(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function $r(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const uv="[object RegExp]",gu="[object String]",bu="[object Number]",xu="[object Boolean]",lv="[object Arguments]",cv="[object Symbol]",sv="[object Date]",fv="[object Map]",dv="[object Set]",vv="[object Array]",Hg="[object Function]",hv="[object ArrayBuffer]",di="[object Object]",Kg="[object Error]",yv="[object DataView]",mv="[object Uint8Array]",pv="[object Uint8ClampedArray]",gv="[object Uint16Array]",bv="[object Uint32Array]",qg="[object BigUint64Array]",xv="[object Int8Array]",wv="[object Int16Array]",Av="[object Int32Array]",Yg="[object BigInt64Array]",Ov="[object Float32Array]",Sv="[object Float64Array]",ql=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function ko(e){return typeof ql.Buffer<"u"&&ql.Buffer.isBuffer(e)}function Gg(e,t){return ir(e,void 0,e,new Map,t)}function ir(e,t,r,n=new Map,i=void 0){const a=i==null?void 0:i(e,t,r,n);if(a!==void 0)return a;if(ov(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=new Array(e.length);n.set(e,o);for(let u=0;u<e.length;u++)o[u]=ir(e[u],u,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[u,l]of e)o.set(u,ir(l,u,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const u of e)o.add(ir(u,void 0,r,n,i));return o}if(ko(e))return e.subarray();if(Ug(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let u=0;u<e.length;u++)o[u]=ir(e[u],u,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),rt(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),rt(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),rt(o,e,r,n,i),o}if(e instanceof Error){const o=structuredClone(e);return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,rt(o,e,r,n,i),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return n.set(e,o),rt(o,e,r,n,i),o}if(e instanceof Number){const o=new Number(e.valueOf());return n.set(e,o),rt(o,e,r,n,i),o}if(e instanceof String){const o=new String(e.valueOf());return n.set(e,o),rt(o,e,r,n,i),o}if(typeof e=="object"&&Vg(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),rt(o,e,r,n,i),o}return e}function rt(e,t,r=e,n,i){const a=[...Object.keys(t),...Co(t)];for(let o=0;o<a.length;o++){const u=a[o],l=Object.getOwnPropertyDescriptor(e,u);(l==null||l.writable)&&(e[u]=ir(t[u],u,r,n,i))}}function Vg(e){switch($r(e)){case lv:case vv:case hv:case yv:case xu:case sv:case Ov:case Sv:case xv:case wv:case Av:case fv:case bu:case di:case uv:case dv:case gu:case cv:case mv:case pv:case gv:case bv:return!0;default:return!1}}function Xg(e){return ir(e,void 0,e,new Map,void 0)}function yn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Pv(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function Ev(e,t,r){return typeof r!="function"?Ev(e,t,()=>{}):Mo(e,t,function n(i,a,o,u,l,c){const s=r(i,a,o,u,l,c);return s!==void 0?!!s:Mo(i,a,n,c,!1)},new Map,!0)}function Mo(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return Zg(e,t,r,n,i);case"function":return Object.keys(t).length>0?Mo(e,{...t},r,n,i):yn(e,t);default:return Pv(e)&&i?typeof t=="string"?t==="":!0:yn(e,t)}}function Zg(e,t,r,n,i=!1){if(t==null)return!0;if(Array.isArray(t))return _v(e,t,r,n);if(t instanceof Map)return Qg(e,t,r,n);if(t instanceof Set)return Jg(e,t,r,n);const a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)ov(e)&&(e=Object(e));else{const o=$r(e);if(o!=="[object Object]"&&o!=="[object Arguments]")return!1}if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o<a.length;o++){const u=a[o];if(!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function Qg(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,a]of t.entries())if(r(e.get(i),a,i,e,t,n)===!1)return!1;return!0}function _v(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let a=0;a<t.length;a++){const o=t[a];let u=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;const c=e[l];let s=!1;if(r(c,o,a,e,t,n)&&(s=!0),s){i.add(l),u=!0;break}}if(!u)return!1}return!0}function Jg(e,t,r,n){return t.size===0?!0:e instanceof Set?_v([...e],[...t],r,n):!1}function Iv(e,t){return Ev(e,t,()=>{})}function e0(e){return e=Xg(e),t=>Iv(t,e)}function t0(e,t){return Gg(e,(r,n,i,a)=>{if(typeof e=="object"){if($r(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),rt(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case bu:case gu:case xu:{const o=new e.constructor(e==null?void 0:e.valueOf());return rt(o,e),o}case lv:{const o={};return rt(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function r0(e){return t0(e)}const n0=/^(?:0|[1-9]\d*)$/;function Cv(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return n0.test(e)}}function i0(e){return e!==null&&typeof e=="object"&&$r(e)==="[object Arguments]"}function a0(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&zd(t)&&!(t in Object(e))?r=vu(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const a=r[i];if((n==null||!Object.hasOwn(n,a))&&!((Array.isArray(n)||i0(n))&&Cv(a)&&a<n.length))return!1;n=n[a]}return!0}function o0(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=du(e);break}return t=r0(t),function(r){const n=Et(r,e);return n===void 0?a0(r,e):t===void 0?n===void 0:Iv(n,t)}}function u0(e){if(e==null)return av;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?o0(e[0],e[1]):e0(e);default:return Fg(e)}}function l0(e){return e===0?0:e}function Yl(e,t=av){return pu(e)?zg(Array.from(e),Bg(u0(t),1)).map(l0):[]}function c0(e,t,r){return t===!0?Yl(e,r):typeof t=="function"?Yl(e,t):e}var Ha={exports:{}},Ka={},qa={exports:{}},Ya={};/**
|
|
1
|
+
var Bp=Object.defineProperty;var Wp=(e,t,r)=>t in e?Bp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Vn=(e,t,r)=>Wp(e,typeof t!="symbol"?t+"":t,r);import{r as y,U as Fp,V as su,W as Up,X as Hp}from"./index-DWsa7LPr.js";function jd(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=jd(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function oe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=jd(e))&&(n&&(n+=" "),n+=t);return n}var Kp=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function fu(e){if(typeof e!="string")return!1;var t=Kp;return t.includes(e)}var qp=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Yp=new Set(qp);function Dd(e){return typeof e!="string"?!1:Yp.has(e)}function $d(e){return typeof e=="string"&&e.startsWith("data-")}function Kt(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Dd(r)||$d(r))&&(t[r]=e[r]);return t}function Nd(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Kt(t)}return typeof e=="object"&&!Array.isArray(e)?Kt(e):null}function at(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Dd(r)||$d(r)||fu(r))&&(t[r]=e[r]);return t}function Gj(e){return e==null?null:y.isValidElement(e)?at(e.props):typeof e=="object"&&!Array.isArray(e)?at(e):null}var Gp=["children","width","height","viewBox","className","style","title","desc"];function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oo.apply(null,arguments)}function Vp(e,t){if(e==null)return{};var r,n,i=Xp(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xp(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Rd=y.forwardRef((e,t)=>{var r=e.children,n=e.width,i=e.height,a=e.viewBox,o=e.className,u=e.style,l=e.title,c=e.desc,s=Vp(e,Gp),f=a||{width:n,height:i,x:0,y:0},d=oe("recharts-surface",o);return y.createElement("svg",Oo({},at(s),{className:d,width:n,height:i,style:u,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),y.createElement("title",null,l),y.createElement("desc",null,c),r)}),Zp=["children","className"];function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},So.apply(null,arguments)}function Qp(e,t){if(e==null)return{};var r,n,i=Jp(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Jp(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dr=y.forwardRef((e,t)=>{var r=e.children,n=e.className,i=Qp(e,Zp),a=oe("recharts-layer",n);return y.createElement("g",So({className:a},at(i),{ref:t}),r)}),Ld=Fp();function Po(e){return e==="__proto__"}const eg=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function zd(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e===""||e.startsWith(".")||e.endsWith(".")?!1:eg.test(e);default:return!1}}function du(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function tg(e){return e==null?"":Bd(e)}function Bd(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(Bd).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function vu(e){if(Array.isArray(e))return e.map(du);if(typeof e=="symbol")return[e];e=tg(e);const t=[],r=e.length;if(r===0)return t;let n=0,i="",a="",o=!1,u=!1;const l=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push("");n<r;){const c=e[n];if(a)c==="\\"&&n+1<r?(n++,i+=e[n]):c===a?a="":i+=c;else if(o)if(c==='"'||c==="'")a=c,u=!0;else if(c==="]"){if(o=!1,!u&&i.includes(".")&&!l.test(i)){const s=i.split(".");for(let f=0;f<s.length;f++)s[f]!==""&&t.push(s[f])}else t.push(i);i=""}else i+=c;else if(c==="[")o=!0,u=!1,i&&(t.push(i),i="");else if(c==="."){i&&(t.push(i),i="");const s=e[n+1];(s===void 0||s===".")&&t.push("")}else i+=c;n++}return i&&t.push(i),t}function Et(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(Po(t))return r;const n=e[t];return n===void 0?zd(t)&&!Object.hasOwn(e,t)?Et(e,vu(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=du(t));const n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return rg(e,t,r);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),Po(t))return r;const n=e[t];return n===void 0?r:n}}}function rg(e,t,r){if(t.length===0)return r;let n=e;for(let i=0;i<t.length;i++){if(n==null||Po(t[i]))return r;n=n[t[i]]}return n===void 0?r:n}var ng=4;function Ft(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ng,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function xe(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var u=r[o-1];return typeof u=="string"?i+u+a:u!==void 0?i+Ft(u)+a:i+a},"")}var Ke=e=>e===0?0:e>0?1:-1,_t=e=>typeof e=="number"&&e!=+e,dr=e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,$=e=>(typeof e=="number"||e instanceof Number)&&!_t(e),pt=e=>$(e)||typeof e=="string",ig=0,bn=e=>{var t=++ig;return"".concat(e||"").concat(t)},qt=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!$(t)&&typeof t!="string")return n;var a;if(dr(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return _t(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Wd=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function fn(e,t,r){return $(e)&&$(t)?Ft(e+r*(t-e)):t}function Fd(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Et(n,t))===r)}var Vj=e=>{for(var t=e.length,r=0,n=0,i=0,a=0,o=1/0,u=-1/0,l=0,c=0,s=0;s<t;s++){var f,d;l=((f=e[s])===null||f===void 0?void 0:f.cx)||0,c=((d=e[s])===null||d===void 0?void 0:d.cy)||0,r+=l,n+=c,i+=l*c,a+=l*l,o=Math.min(o,l),u=Math.max(u,l)}var v=t*a!==r*r?(t*i-r*n)/(t*a-r*r):0;return{xmin:o,xmax:u,a:v,b:(n-v*r)/t}},Se=e=>e===null||typeof e>"u",hu=e=>Se(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function $e(e){return e!=null}function Mn(){}function yu(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}function Bl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bl(Object(r),!0).forEach(function(n){ag(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ag(e,t,r){return(t=og(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function og(e){var t=ug(e,"string");return typeof t=="symbol"?t:t+""}function ug(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lg=e=>{var t=e.viewBox,r=e.position,n=e.offset,i=n===void 0?0:n,a=e.parentViewBox,o=e.clamp,u=yu(t),l=u.x,c=u.y,s=u.height,f=u.upperWidth,d=u.lowerWidth,v=l,h=l+(f-d)/2,m=(v+h)/2,p=(f+d)/2,g=v+f/2,x=s>=0?1:-1,w=x*i,A=x>0?"end":"start",O=x>0?"start":"end",b=f>=0?1:-1,P=b*i,C=b>0?"end":"start",T=b>0?"start":"end",k=a;if(r==="top"){var M={x:v+f/2,y:c-w,horizontalAnchor:"middle",verticalAnchor:A};return o&&k&&(M.height=Math.max(c-k.y,0),M.width=f),M}if(r==="bottom"){var E={x:h+d/2,y:c+s+w,horizontalAnchor:"middle",verticalAnchor:O};return o&&k&&(E.height=Math.max(k.y+k.height-(c+s),0),E.width=d),E}if(r==="left"){var _={x:m-P,y:c+s/2,horizontalAnchor:C,verticalAnchor:"middle"};return o&&k&&(_.width=Math.max(_.x-k.x,0),_.height=s),_}if(r==="right"){var N={x:m+p+P,y:c+s/2,horizontalAnchor:T,verticalAnchor:"middle"};return o&&k&&(N.width=Math.max(k.x+k.width-N.x,0),N.height=s),N}var z=o&&k?{width:p,height:s}:{};return r==="insideLeft"?st({x:m+P,y:c+s/2,horizontalAnchor:T,verticalAnchor:"middle"},z):r==="insideRight"?st({x:m+p-P,y:c+s/2,horizontalAnchor:C,verticalAnchor:"middle"},z):r==="insideTop"?st({x:v+f/2,y:c+w,horizontalAnchor:"middle",verticalAnchor:O},z):r==="insideBottom"?st({x:h+d/2,y:c+s-w,horizontalAnchor:"middle",verticalAnchor:A},z):r==="insideTopLeft"?st({x:v+P,y:c+w,horizontalAnchor:T,verticalAnchor:O},z):r==="insideTopRight"?st({x:v+f-P,y:c+w,horizontalAnchor:C,verticalAnchor:O},z):r==="insideBottomLeft"?st({x:h+P,y:c+s-w,horizontalAnchor:T,verticalAnchor:A},z):r==="insideBottomRight"?st({x:h+d-P,y:c+s-w,horizontalAnchor:C,verticalAnchor:A},z):r&&typeof r=="object"&&($(r.x)||dr(r.x))&&($(r.y)||dr(r.y))?st({x:l+qt(r.x,p),y:c+qt(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},z):st({x:g,y:c+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},cg=["top","left","right","bottom"];function sg(e){return e==null?!1:typeof e=="object"?!0:cg.includes(e)}var Ud=y.createContext(null),Xj=()=>y.useContext(Ud);function ie(e){return function(){return e}}const Eo=Math.PI,_o=2*Eo,tr=1e-6,fg=_o-tr;function Hd(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function dg(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Hd;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class vg{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Hd:dg(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,u=this._y1,l=n-t,c=i-r,s=o-t,f=u-r,d=s*s+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>tr)if(!(Math.abs(f*l-c*s)>tr)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-o,h=i-u,m=l*l+c*c,p=v*v+h*h,g=Math.sqrt(m),x=Math.sqrt(d),w=a*Math.tan((Eo-Math.acos((m+d-p)/(2*g*x)))/2),A=w/x,O=w/g;Math.abs(A-1)>tr&&this._append`L${t+A*s},${r+A*f}`,this._append`A${a},${a},0,0,${+(f*v>s*h)},${this._x1=t+O*l},${this._y1=r+O*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),l=n*Math.sin(i),c=t+u,s=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${s}`:(Math.abs(this._x1-c)>tr||Math.abs(this._y1-s)>tr)&&this._append`L${c},${s}`,n&&(d<0&&(d=d%_o+_o),d>fg?this._append`A${n},${n},0,1,${f},${t-u},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=s}`:d>tr&&this._append`A${n},${n},0,${+(d>=Eo)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Kd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new vg(t)}function mu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function qd(e){this._context=e}qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function aa(e){return new qd(e)}function Yd(e){return e[0]}function Gd(e){return e[1]}function Vd(e,t){var r=ie(!0),n=null,i=aa,a=null,o=Kd(u);e=typeof e=="function"?e:e===void 0?Yd:ie(e),t=typeof t=="function"?t:t===void 0?Gd:ie(t);function u(l){var c,s=(l=mu(l)).length,f,d=!1,v;for(n==null&&(a=i(v=o())),c=0;c<=s;++c)!(c<s&&r(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(v)return a=null,v+""||null}return u.x=function(l){return arguments.length?(e=typeof l=="function"?l:ie(+l),u):e},u.y=function(l){return arguments.length?(t=typeof l=="function"?l:ie(+l),u):t},u.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ie(!!l),u):r},u.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),u):i},u.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),u):n},u}function Xn(e,t,r){var n=null,i=ie(!0),a=null,o=aa,u=null,l=Kd(c);e=typeof e=="function"?e:e===void 0?Yd:ie(+e),t=typeof t=="function"?t:ie(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Gd:ie(+r);function c(f){var d,v,h,m=(f=mu(f)).length,p,g=!1,x,w=new Array(m),A=new Array(m);for(a==null&&(u=o(x=l())),d=0;d<=m;++d){if(!(d<m&&i(p=f[d],d,f))===g)if(g=!g)v=d,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=d-1;h>=v;--h)u.point(w[h],A[h]);u.lineEnd(),u.areaEnd()}g&&(w[d]=+e(p,d,f),A[d]=+t(p,d,f),u.point(n?+n(p,d,f):w[d],r?+r(p,d,f):A[d]))}if(x)return u=null,x+""||null}function s(){return Vd().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ie(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ie(+f),c):r},c.lineX0=c.lineY0=function(){return s().x(e).y(t)},c.lineY1=function(){return s().x(e).y(r)},c.lineX1=function(){return s().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ie(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(u=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=u=null:u=o(a=f),c):a},c}class Xd{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function hg(e){return new Xd(e,!0)}function yg(e){return new Xd(e,!1)}function pi(){}function gi(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Zd(e){this._context=e}Zd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mg(e){return new Zd(e)}function Qd(e){this._context=e}Qd.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pg(e){return new Qd(e)}function Jd(e){this._context=e}Jd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:gi(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gg(e){return new Jd(e)}function ev(e){this._context=e}ev.prototype={areaStart:pi,areaEnd:pi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bg(e){return new ev(e)}function Wl(e){return e<0?-1:1}function Fl(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),u=(a*i+o*n)/(n+i);return(Wl(a)+Wl(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(u))||0}function Ul(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ua(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,o-u*r,a,o)}function bi(e){this._context=e}bi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ua(this,this._t0,Ul(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ua(this,Ul(this,r=Fl(this,e,t)),r);break;default:Ua(this,this._t0,r=Fl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function tv(e){this._context=new rv(e)}(tv.prototype=Object.create(bi.prototype)).point=function(e,t){bi.prototype.point.call(this,t,e)};function rv(e){this._context=e}rv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function xg(e){return new bi(e)}function wg(e){return new tv(e)}function nv(e){this._context=e}nv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Hl(e),i=Hl(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Hl(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Ag(e){return new nv(e)}function oa(e,t){this._context=e,this._t=t}oa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Og(e){return new oa(e,.5)}function Sg(e){return new oa(e,0)}function Pg(e){return new oa(e,1)}function vr(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,u=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Io(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Eg(e,t){return e[t]}function _g(e){const t=[];return t.key=e,t}function Ig(){var e=ie([]),t=Io,r=vr,n=Eg;function i(a){var o=Array.from(e.apply(this,arguments),_g),u,l=o.length,c=-1,s;for(const f of a)for(u=0,++c;u<l;++u)(o[u][c]=[0,+n(f,o[u].key,c,a)]).data=f;for(u=0,s=mu(t(o));u<l;++u)o[s[u]].index=u;return r(o,s),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ie(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Io:typeof a=="function"?a:ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??vr,i):r},i}function Cg(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}vr(e,t)}}function kg(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,u=0;o<i;++o)u+=e[o][r][1]||0;n[r][1]+=n[r][0]=-u/2}vr(e,t)}}function Mg(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var u=0,l=0,c=0;u<o;++u){for(var s=e[t[u]],f=s[n][1]||0,d=s[n-1][1]||0,v=(f-d)/2,h=0;h<u;++h){var m=e[t[h]],p=m[n][1]||0,g=m[n-1][1]||0;v+=p-g}l+=f,c+=v*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,vr(e,t)}}var iv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Tg=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(y.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{fu(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},jg=(e,t,r)=>n=>(e(t,r,n),null),Dg=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];fu(i)&&typeof a=="function"&&(n||(n={}),n[i]=jg(a,t,r))}),n},Zj=e=>Array.isArray(e)&&e.length>0;function Kl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $g(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kl(Object(r),!0).forEach(function(n){Ng(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ng(e,t,r){return(t=Rg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rg(e){var t=Lg(e,"string");return typeof t=="symbol"?t:t+""}function Lg(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ut(e,t){var r=$g({},e),n=t,i=Object.keys(t),a=i.reduce((o,u)=>(o[u]===void 0&&n[u]!==void 0&&(o[u]=n[u]),o),r);return a}function zg(e,t){const r=new Map;for(let n=0;n<e.length;n++){const i=e[n],a=t(i,n,e);r.has(a)||r.set(a,i)}return Array.from(r.values())}function Bg(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function av(e){return e}function Wg(e){return Number.isSafeInteger(e)&&e>=0}function pu(e){return e!=null&&typeof e!="function"&&Wg(e.length)}function Fg(e){return function(t){return Et(t,e)}}function ov(e){return e==null||typeof e!="object"&&typeof e!="function"}function Ug(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Co(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function $r(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const uv="[object RegExp]",gu="[object String]",bu="[object Number]",xu="[object Boolean]",lv="[object Arguments]",cv="[object Symbol]",sv="[object Date]",fv="[object Map]",dv="[object Set]",vv="[object Array]",Hg="[object Function]",hv="[object ArrayBuffer]",di="[object Object]",Kg="[object Error]",yv="[object DataView]",mv="[object Uint8Array]",pv="[object Uint8ClampedArray]",gv="[object Uint16Array]",bv="[object Uint32Array]",qg="[object BigUint64Array]",xv="[object Int8Array]",wv="[object Int16Array]",Av="[object Int32Array]",Yg="[object BigInt64Array]",Ov="[object Float32Array]",Sv="[object Float64Array]",ql=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function ko(e){return typeof ql.Buffer<"u"&&ql.Buffer.isBuffer(e)}function Gg(e,t){return ir(e,void 0,e,new Map,t)}function ir(e,t,r,n=new Map,i=void 0){const a=i==null?void 0:i(e,t,r,n);if(a!==void 0)return a;if(ov(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=new Array(e.length);n.set(e,o);for(let u=0;u<e.length;u++)o[u]=ir(e[u],u,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[u,l]of e)o.set(u,ir(l,u,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const u of e)o.add(ir(u,void 0,r,n,i));return o}if(ko(e))return e.subarray();if(Ug(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let u=0;u<e.length;u++)o[u]=ir(e[u],u,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),rt(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),rt(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),rt(o,e,r,n,i),o}if(e instanceof Error){const o=structuredClone(e);return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,rt(o,e,r,n,i),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return n.set(e,o),rt(o,e,r,n,i),o}if(e instanceof Number){const o=new Number(e.valueOf());return n.set(e,o),rt(o,e,r,n,i),o}if(e instanceof String){const o=new String(e.valueOf());return n.set(e,o),rt(o,e,r,n,i),o}if(typeof e=="object"&&Vg(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),rt(o,e,r,n,i),o}return e}function rt(e,t,r=e,n,i){const a=[...Object.keys(t),...Co(t)];for(let o=0;o<a.length;o++){const u=a[o],l=Object.getOwnPropertyDescriptor(e,u);(l==null||l.writable)&&(e[u]=ir(t[u],u,r,n,i))}}function Vg(e){switch($r(e)){case lv:case vv:case hv:case yv:case xu:case sv:case Ov:case Sv:case xv:case wv:case Av:case fv:case bu:case di:case uv:case dv:case gu:case cv:case mv:case pv:case gv:case bv:return!0;default:return!1}}function Xg(e){return ir(e,void 0,e,new Map,void 0)}function yn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Pv(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function Ev(e,t,r){return typeof r!="function"?Ev(e,t,()=>{}):Mo(e,t,function n(i,a,o,u,l,c){const s=r(i,a,o,u,l,c);return s!==void 0?!!s:Mo(i,a,n,c,!1)},new Map,!0)}function Mo(e,t,r,n,i=!1){if(t===e)return!0;switch(typeof t){case"object":return Zg(e,t,r,n,i);case"function":return Object.keys(t).length>0?Mo(e,{...t},r,n,i):yn(e,t);default:return Pv(e)&&i?typeof t=="string"?t==="":!0:yn(e,t)}}function Zg(e,t,r,n,i=!1){if(t==null)return!0;if(Array.isArray(t))return _v(e,t,r,n);if(t instanceof Map)return Qg(e,t,r,n);if(t instanceof Set)return Jg(e,t,r,n);const a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)ov(e)&&(e=Object(e));else{const o=$r(e);if(o!=="[object Object]"&&o!=="[object Arguments]")return!1}if(a.length===0)return!0;if(n!=null&&n.has(t))return n.get(t)===e;n==null||n.set(t,e);try{for(let o=0;o<a.length;o++){const u=a[o];if(!(u in e)||t[u]===void 0&&e[u]!==void 0||t[u]===null&&e[u]!==null||!r(e[u],t[u],u,e,t,n))return!1}return!0}finally{n==null||n.delete(t)}}function Qg(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,a]of t.entries())if(r(e.get(i),a,i,e,t,n)===!1)return!1;return!0}function _v(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let a=0;a<t.length;a++){const o=t[a];let u=!1;for(let l=0;l<e.length;l++){if(i.has(l))continue;const c=e[l];let s=!1;if(r(c,o,a,e,t,n)&&(s=!0),s){i.add(l),u=!0;break}}if(!u)return!1}return!0}function Jg(e,t,r,n){return t.size===0?!0:e instanceof Set?_v([...e],[...t],r,n):!1}function Iv(e,t){return Ev(e,t,()=>{})}function e0(e){return e=Xg(e),t=>Iv(t,e)}function t0(e,t){return Gg(e,(r,n,i,a)=>{if(typeof e=="object"){if($r(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),rt(o,e,i,a),o}switch(Object.prototype.toString.call(e)){case bu:case gu:case xu:{const o=new e.constructor(e==null?void 0:e.valueOf());return rt(o,e),o}case lv:{const o={};return rt(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function r0(e){return t0(e)}const n0=/^(?:0|[1-9]\d*)$/;function Cv(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return n0.test(e)}}function i0(e){return e!==null&&typeof e=="object"&&$r(e)==="[object Arguments]"}function a0(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&zd(t)&&!(t in Object(e))?r=vu(t):r=[t],r.length===0)return!1;let n=e;for(let i=0;i<r.length;i++){const a=r[i];if((n==null||!Object.hasOwn(n,a))&&!((Array.isArray(n)||i0(n))&&Cv(a)&&a<n.length))return!1;n=n[a]}return!0}function o0(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=du(e);break}return t=r0(t),function(r){const n=Et(r,e);return n===void 0?a0(r,e):t===void 0?n===void 0:Iv(n,t)}}function u0(e){if(e==null)return av;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?o0(e[0],e[1]):e0(e);default:return Fg(e)}}function l0(e){return e===0?0:e}function Yl(e,t=av){return pu(e)?zg(Array.from(e),Bg(u0(t),1)).map(l0):[]}function c0(e,t,r){return t===!0?Yl(e,r):typeof t=="function"?Yl(e,t):e}var Ha={exports:{}},Ka={},qa={exports:{}},Ya={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.js
|
|
4
4
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as E}from"./index-DWsa7LPr.js";const a={LIST_EQUIV:"chip-list-equiv",LIST_EQUIV_STALE:"chip-stale",PROXY:"chip-proxy",OBS_PROXY:"chip-obs-proxy",EXPERIMENTAL:"chip-experimental",DIRECTIONAL:"chip-directional",N_A:"chip-na",EXACT:"chip-exact",LIVE:"chip-live",MODELED:"chip-modeled",PASS:"chip-exact",ATTENTION:"chip-stale",NO_DATA:"chip-na",VERIFIED_SOURCE:"chip-list-equiv"},t={LIST_EQUIV:"ESTIMATED VALUE",LIST_EQUIV_STALE:"PRICE ESTIMATE MAY BE OLD",PROXY:"ESTIMATE",OBS_PROXY:"TOKEN-BASED ESTIMATE",EXPERIMENTAL:"EARLY ESTIMATE",DIRECTIONAL:"TREND ONLY",N_A:"NO DATA",EXACT:"MEASURED",LIVE:"LIVE",MODELED:"PROJECTED",PASS:"ON TRACK",ATTENTION:"REVIEW",NO_DATA:"NO DATA",VERIFIED_SOURCE:"VERIFIED SOURCE"},r={LIST_EQUIV:"Estimated value at public API list prices. This is not your billed spend.",OBS_PROXY:"Token-based estimate from observed use. It may differ from the exact token count.",EXPERIMENTAL:"Early estimate from a method that is still being checked.",DIRECTIONAL:"Trend only: a broad signal from observed counts, not a precise measurement.",EXACT:"Measured directly from recorded session data.",PROXY:"Estimate used when a direct measurement is unavailable.",MODELED:"Projected outcome from a model, not a result that has happened yet.",N_A:"This measure is available here, but there is no value yet.",LIVE:"LIVE: session is currently active.",LIST_EQUIV_STALE:"Estimated value based on public API prices that may be out of date.",PASS:"This practice is on track based on the current measurement signal.",ATTENTION:"Review this practice: the current signal is outside its stated range.",NO_DATA:"There is not enough activity in this period to assess this practice.",VERIFIED_SOURCE:"Source checked: this links to the Anthropic documentation or post behind the practice."};function o({kind:e,label:i,title:s}){return E.jsx("span",{className:`chip ${a[e]}`,role:"status","aria-label":t[e],title:s??r[e],children:i??t[e]})}export{o as C,r as K};
|