semiotic 3.10.2 → 3.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +21 -26
  2. package/ai/artifact-surface-inventory.json +1 -1
  3. package/ai/behaviorContracts.cjs +15 -5
  4. package/ai/behaviorContracts.d.cts +3 -0
  5. package/ai/cli.js +17 -166
  6. package/ai/componentMetadata.cjs +68 -15
  7. package/ai/componentMetadata.d.cts +3 -0
  8. package/ai/dist/diagnose-operation.js +3 -0
  9. package/ai/dist/mcp-server.js +59 -59
  10. package/ai/reference.md +6 -6
  11. package/ai/schema.json +1 -1
  12. package/ai/surface-manifest.json +1 -1
  13. package/ai/system-prompt.md +2 -2
  14. package/ai/task-packets/compare-category-totals.json +7 -7
  15. package/ai/task-packets/compare-category-totals.md +3 -3
  16. package/ai/task-packets/correct-published-chart.json +7 -7
  17. package/ai/task-packets/correct-published-chart.md +3 -3
  18. package/ai/task-packets/index.json +6 -6
  19. package/ai/task-packets/update-live-chart.json +7 -7
  20. package/ai/task-packets/update-live-chart.md +3 -3
  21. package/dist/c-2MHSD3TN.min.js +209 -0
  22. package/dist/{c-PZ3NEGNG.min.js → c-6XGGN5OS.min.js} +1 -1
  23. package/dist/{c-FDUQDCBC.min.js → c-CO4NDAD6.min.js} +23 -23
  24. package/dist/c-EK6XI2U7.min.js +26 -0
  25. package/dist/c-FMCUQ6JX.min.js +1 -0
  26. package/dist/{c-C4KIXUWU.min.js → c-GK263BF4.min.js} +1 -1
  27. package/dist/{c-TTKWXGAI.min.js → c-HNHKIMIV.min.js} +3 -3
  28. package/dist/c-IJCZGUG6.min.js +31 -0
  29. package/dist/{c-4XLHPQTP.min.js → c-JBWPJNTJ.min.js} +1 -1
  30. package/dist/{c-4MD53L2J.min.js → c-JC76YAHB.min.js} +28 -28
  31. package/dist/{c-VXIYF7V2.min.js → c-JOPGDP6N.min.js} +1 -1
  32. package/dist/c-KWP4QTCM.min.js +4 -0
  33. package/dist/c-LRV7PO45.min.js +393 -0
  34. package/dist/c-LVHJJUOF.min.js +1 -0
  35. package/dist/c-M43PK7K4.min.js +1 -0
  36. package/dist/c-NUBZ63VU.min.js +1 -0
  37. package/dist/{c-7ASK4WBF.min.js → c-PITYSOPK.min.js} +1 -1
  38. package/dist/{c-2TW5H5PD.min.js → c-QPO24R7Q.min.js} +1 -1
  39. package/dist/{c-SG2Y7EBY.min.js → c-RWHLEUX6.min.js} +1 -1
  40. package/dist/{c-4JKDJUYD.min.js → c-S746GRV4.min.js} +1 -1
  41. package/dist/{c-KGROWFT2.min.js → c-SAP5KY6R.min.js} +2 -2
  42. package/dist/c-UMGHCBH5.min.js +114 -0
  43. package/dist/c-UQBWSYKI.min.js +41 -0
  44. package/dist/{c-6ZU3QVLB.min.js → c-VEMCBQZZ.min.js} +33 -33
  45. package/dist/{c-IPYGNVN6.min.js → c-WD2RL76M.min.js} +45 -45
  46. package/dist/{c-PQOZPM4G.min.js → c-YL7HJL5J.min.js} +1 -1
  47. package/dist/c-Z6GRGS53.min.js +1 -0
  48. package/dist/components/CategoryColors.d.ts +7 -0
  49. package/dist/components/LinkedCharts.d.ts +2 -1
  50. package/dist/components/ai/chartClinic.d.ts +1 -1
  51. package/dist/components/ai/chartClinicMetadata.generated.d.ts +2 -2
  52. package/dist/components/charts/shared/{chartDefinitionPilot.d.ts → chartDefinition.d.ts} +30 -34
  53. package/dist/components/charts/shared/chartDefinitions.d.ts +10 -0
  54. package/dist/components/charts/shared/chartDefinitionsNetwork.d.ts +17 -0
  55. package/dist/components/charts/shared/chartDefinitionsOrdinal.d.ts +23 -0
  56. package/dist/components/charts/shared/chartDefinitionsPhysics.d.ts +17 -0
  57. package/dist/components/charts/shared/chartDefinitionsRealtime.d.ts +12 -0
  58. package/dist/components/charts/shared/chartDefinitionsXY.d.ts +26 -0
  59. package/dist/components/charts/shared/useChartSetup.d.ts +1 -1
  60. package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -1
  61. package/dist/components/data/transforms.d.ts +1 -0
  62. package/dist/components/server/serverChartConfigs.d.ts +36 -36
  63. package/dist/components/server/serverChartConfigsNetwork.generated.d.ts +17 -0
  64. package/dist/components/server/serverChartConfigsOrdinal.generated.d.ts +23 -0
  65. package/dist/components/server/serverChartConfigsPhysics.generated.d.ts +17 -0
  66. package/dist/components/server/serverChartConfigsRealtime.generated.d.ts +13 -0
  67. package/dist/components/server/serverChartConfigsXY.generated.d.ts +22 -0
  68. package/dist/components/stream/physics/PhysicsOptionalEngineAdapters.d.ts +5 -0
  69. package/dist/geo.min.js +3 -3
  70. package/dist/geo.module.min.js +10 -10
  71. package/dist/network.module.min.js +1 -1
  72. package/dist/ordinal.module.min.js +1 -1
  73. package/dist/physics-matter.min.js +4 -1
  74. package/dist/physics-matter.module.min.js +1 -1
  75. package/dist/physics-rapier.min.js +4 -1
  76. package/dist/physics-rapier.module.min.js +1 -1
  77. package/dist/physics.module.min.js +1 -1
  78. package/dist/physicsWorker.js +1 -1
  79. package/dist/semiotic-ai-core.min.js +3 -3
  80. package/dist/semiotic-ai-core.module.min.js +3 -3
  81. package/dist/semiotic-ai.module.min.js +7 -7
  82. package/dist/semiotic-artifact.min.js +1 -1
  83. package/dist/semiotic-artifact.module.min.js +1 -1
  84. package/dist/semiotic-atlas-selection.module.min.js +1 -1
  85. package/dist/semiotic-client-cjs-shared.min.js +903 -902
  86. package/dist/semiotic-data.min.js +1 -1
  87. package/dist/semiotic-data.module.min.js +1 -1
  88. package/dist/semiotic-experimental-auxiliary.module.min.js +3 -3
  89. package/dist/semiotic-experimental-node-auxiliary.module.min.js +3 -3
  90. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  91. package/dist/semiotic-line.module.min.js +1 -1
  92. package/dist/semiotic-realtime-core.module.min.js +1 -1
  93. package/dist/semiotic-recipes-core-cjs-base.min.js +1 -1
  94. package/dist/semiotic-recipes-core.module.min.js +13 -13
  95. package/dist/semiotic-server-edge-node.module.min.js +393 -391
  96. package/dist/semiotic-server-edge.min.js +393 -391
  97. package/dist/semiotic-server-edge.module.min.js +374 -372
  98. package/dist/semiotic-server-node.min.js +393 -391
  99. package/dist/semiotic-server-node.module.min.js +1 -1
  100. package/dist/semiotic-utils-core.min.js +1 -1
  101. package/dist/semiotic-utils-core.module.min.js +1 -1
  102. package/dist/semiotic.module.min.js +10 -10
  103. package/dist/server.min.js +393 -391
  104. package/dist/server.module.min.js +1 -1
  105. package/dist/xy.module.min.js +1 -1
  106. package/package.json +12 -8
  107. package/dist/c-3OFVBWQY.min.js +0 -1
  108. package/dist/c-6IVBV5NO.min.js +0 -1
  109. package/dist/c-72CBVNYX.min.js +0 -209
  110. package/dist/c-7LY46QUI.min.js +0 -41
  111. package/dist/c-AKLBQMQF.min.js +0 -391
  112. package/dist/c-F2GGJB2S.min.js +0 -31
  113. package/dist/c-G53AVC42.min.js +0 -113
  114. package/dist/c-HQ27AHMC.min.js +0 -1
  115. package/dist/c-IHWZ2C6D.min.js +0 -26
  116. package/dist/c-MOP2NGLH.min.js +0 -1
  117. package/dist/c-PKY4JFY5.min.js +0 -1
  118. package/dist/c-UBHICVSC.min.js +0 -1
@@ -1 +1 @@
1
- async function e(e,t,n={}){let{execution:r="auto",signal:o,workerThreshold:l,nodeRadius:d,...p}=n,c=p.iterations??260;if(!u()||!a(r,e.length,t.length,c,l))return s(e,t,{...p,nodeRadius:d});let f={kind:"normalized",nodes:e.map(e=>({...e})),edges:t.map(e=>({...e})),options:p,nodeRadii:"function"==typeof d?Object.fromEntries(e.map(e=>[e.id,d(e)])):null==d?void 0:Object.fromEntries(e.map(e=>[e.id,d]))};try{return(await i(f,o)).positions}catch(n){if("AbortError"===n?.name)throw n;return s(e,t,{...p,nodeRadius:d})}}function t(e){let t=[];for(let n of Object.keys(e).sort()){let r=e[n];if(void 0!==r){if("function"==typeof r)return null;t.push(`${n}:${r+""}`)}}return t.join("|")}function n(e,t,n){return null==n?null:m.get(e)?.get(t)?.get(n)??null}function r(e,t,n,r){if(null==n)return;let o=m.get(e);o||(o=/* @__PURE__ */new WeakMap,m.set(e,o));let i=o.get(t);if(i||(i=/* @__PURE__ */new Map,o.set(t,i)),!i.has(n)&&i.size>=16){let e=i.keys().next().value;void 0!==e&&i.delete(e)}i.set(n,r)}function o(o,i,a={}){let u=l(),{seed:m,iterations:g,repulsion:h,linkDistance:k,linkStrength:y,centerStrength:w,damping:j,nodeRadius:v,nodePadding:b,inset:R,execution:x,workerThreshold:E}=a,M=p(()=>({seed:m,iterations:g,repulsion:h,linkDistance:k,linkStrength:y,centerStrength:w,damping:j,nodeRadius:v,nodePadding:b,inset:R,execution:x,workerThreshold:E}),[m,g,h,k,y,w,j,v,b,R,x,E]),O=c(u),[S,A]=f(()=>{if(typeof window>"u"||u){let e=s(o,i,M);return r(o,i,t(M),e),{positions:e,status:"ready",error:null}}let e=n(o,i,t(M));return e?{positions:e,status:"ready",error:null}:{positions:null,status:"pending",error:null}});return d(()=>{if(O.current)return void(O.current=!1);let s=t(M),a=n(o,i,s);if(a)return void A(e=>"ready"===e.status&&e.positions===a?e:{positions:a,status:"ready",error:null});let u=new AbortController;return A(e=>({positions:e.positions,status:"pending",error:null})),e(o,i,{...M,signal:u.signal}).then(e=>{r(o,i,s,e),A({positions:e,status:"ready",error:null})}).catch(e=>{"AbortError"!==e.name&&A(t=>({positions:t.positions,status:"error",error:e}))}),()=>u.abort()},[o,i,M]),S}import{d as i}from"./c-6IVBV5NO.min.js";import{v as s}from"./c-7LY46QUI.min.js";import{c as a,d as u}from"./c-YMFUIO54.min.js";import{ka as l}from"./c-G53AVC42.min.js";import{useEffect as d,useMemo as p,useRef as c,useState as f}from"react";var m=/* @__PURE__ */new WeakMap;export{o as a};
1
+ async function e(e,t,n={}){let{execution:r="auto",signal:o,workerThreshold:l,nodeRadius:d,...p}=n,c=p.iterations??260;if(!u()||!a(r,e.length,t.length,c,l))return s(e,t,{...p,nodeRadius:d});let f={kind:"normalized",nodes:e.map(e=>({...e})),edges:t.map(e=>({...e})),options:p,nodeRadii:"function"==typeof d?Object.fromEntries(e.map(e=>[e.id,d(e)])):null==d?void 0:Object.fromEntries(e.map(e=>[e.id,d]))};try{return(await i(f,o)).positions}catch(n){if("AbortError"===n?.name)throw n;return s(e,t,{...p,nodeRadius:d})}}function t(e){let t=[];for(let n of Object.keys(e).sort()){let r=e[n];if(void 0!==r){if("function"==typeof r)return null;t.push(`${n}:${r+""}`)}}return t.join("|")}function n(e,t,n){return null==n?null:m.get(e)?.get(t)?.get(n)??null}function r(e,t,n,r){if(null==n)return;let o=m.get(e);o||(o=/* @__PURE__ */new WeakMap,m.set(e,o));let i=o.get(t);if(i||(i=/* @__PURE__ */new Map,o.set(t,i)),!i.has(n)&&i.size>=16){let e=i.keys().next().value;void 0!==e&&i.delete(e)}i.set(n,r)}function o(o,i,a={}){let u=l(),{seed:m,iterations:g,repulsion:h,linkDistance:k,linkStrength:y,centerStrength:w,damping:j,nodeRadius:v,nodePadding:b,inset:R,execution:M,workerThreshold:S}=a,x=p(()=>({seed:m,iterations:g,repulsion:h,linkDistance:k,linkStrength:y,centerStrength:w,damping:j,nodeRadius:v,nodePadding:b,inset:R,execution:M,workerThreshold:S}),[m,g,h,k,y,w,j,v,b,R,M,S]),E=c(u),[U,O]=f(()=>{if(typeof window>"u"||u){let e=s(o,i,x);return r(o,i,t(x),e),{positions:e,status:"ready",error:null}}let e=n(o,i,t(x));return e?{positions:e,status:"ready",error:null}:{positions:null,status:"pending",error:null}});return d(()=>{if(E.current)return void(E.current=!1);let s=t(x),a=n(o,i,s);if(a)return void O(e=>"ready"===e.status&&e.positions===a?e:{positions:a,status:"ready",error:null});let u=new AbortController;return O(e=>({positions:e.positions,status:"pending",error:null})),e(o,i,{...x,signal:u.signal}).then(e=>{r(o,i,s,e),O({positions:e,status:"ready",error:null})}).catch(e=>{"AbortError"!==e.name&&O(t=>({positions:t.positions,status:"error",error:e}))}),()=>u.abort()},[o,i,x]),U}import{d as i}from"./c-NUBZ63VU.min.js";import{v as s}from"./c-UQBWSYKI.min.js";import{c as a,d as u}from"./c-YMFUIO54.min.js";import{ka as l}from"./c-UMGHCBH5.min.js";import{useEffect as d,useMemo as p,useRef as c,useState as f}from"react";var m=/* @__PURE__ */new WeakMap;export{o as a};
@@ -1,51 +1,51 @@
1
- function e(e){let{accessor:t,data:o,isPushMode:i}=e,a=Ft(null),[r,l]=Dt(0),n=Pt(e=>{if(!i||!t)return;let o=!1;for(let i of e){let e="function"==typeof t?t(i):i[t];if(null==e)continue;let r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(a.current?(a.current[0]>r&&(a.current[0]=r,o=!0),r>a.current[1]&&(a.current[1]=r,o=!0)):(a.current=[r,r],o=!0))}o&&l(e=>e+1)},[i,t]),s=Pt(()=>{i&&(a.current=null,l(e=>e+1))},[i]);return{domain:Bt(()=>{if(i)return a.current??void 0;if(!t||0===o.length)return;let e="function"==typeof t?t:e=>e[t],r=1/0,l=-1/0;for(let t of o){let o=e(t);if(null==o)continue;let i="number"==typeof o?o:Number(o);Number.isFinite(i)&&(r>i&&(r=i),i>l&&(l=i))}return Number.isFinite(r)&&Number.isFinite(l)?[r,l]:void 0},[o,t,i,r]),trackPushed:n,reset:s}}function t(e,t){return pt(1===t?.5:e/(t-1))}function o(e){return e instanceof Date?"date:"+e.getTime():`${typeof e}:${e+""}`}function i(e,t,o){return"function"==typeof e?e(t,o):t[e]}function a(e,t){if(!e?.length)return;let i=new Map(t.map((e,t)=>[o(e),t]));return e.map(e=>{let t={...e},a=a=>{if(!(a in e))return;let r=i.get(o(e[a]));void 0!==r&&(t[a]=r)};return a("x"),a("x0"),a("x1"),"string"==typeof e.type&&("x-threshold"===e.type||"x"===e.type)&&a("value"),t})}function r(e){let{seriesOrder:t,overallOrder:o,highlightTop:i,color:a,colorScheme:r,neutralColor:l,themeCategorical:n,themeNeutral:s}=e;if(null==i&&null==a)return r;let c=new Set(o.slice(0,null==i?o.length:Math.max(0,Math.floor(i)))),h=/* @__PURE__ */new Map,m={};for(let e of t)Object.defineProperty(m,e,{configurable:!0,enumerable:!0,writable:!0,value:a??(c.has(e)?De(void 0,n,r,e,h):l??s??"#b8bec8")});return m}function l(e,t={}){let a=t.xAccessor??"x",r=t.yAccessor??"y",l=t.lineBy??"series",n=t.rankDirection??"descending",s=[],c=/* @__PURE__ */new Map,h=/* @__PURE__ */new Map,m=[],d=/* @__PURE__ */new Map,u=1/0,p=-1/0;e.forEach((e,t)=>{let n=i(a,e,t),y=o(n),f=c.get(y);null==f&&(f=s.length,c.set(y,f),s.push(n),h.set(f,[]));let g=i(l,e,t)+"";d.has(g)||(d.set(g,m.length),m.push(g));let b=Number(i(r,e,t));Number.isFinite(b)&&(u=Math.min(u,b),p=Math.max(p,b),h.get(f)?.push({datum:e,inputIndex:t,series:g,value:b}))});let y=[],f=/* @__PURE__ */new Map,g=/* @__PURE__ */new Map;for(let e=0;s.length>e;e++){let t=h.get(e)??[];t.sort((e,t)=>("descending"===n?t.value-e.value:e.value-t.value)||(d.get(e.series)??0)-(d.get(t.series)??0)),t.forEach((t,o)=>{let i=o+1;y.push({datum:t.datum,xIndex:e,xValue:s[e],series:t.series,value:t.value,rank:i}),f.set(t.series,(f.get(t.series)??0)+i),g.set(t.series,(g.get(t.series)??0)+1)})}let b=m.length+1,x=[...m].sort((e,t)=>{let o=g.get(e)??0,i=g.get(t)??0;return((f.get(e)??0)+(s.length-o)*b)/Math.max(1,s.length)-((f.get(t)??0)+(s.length-i)*b)/Math.max(1,s.length)||(d.get(e)??0)-(d.get(t)??0)}),v=new Set(x.slice(0,null==t.highlightTop?x.length:Math.max(0,Math.floor(t.highlightTop))));return{data:y.map(e=>{let t=v.has(e.series);return{...e.datum,x:e.xIndex,y:e.rank,__bumpRaw:e.datum,__bumpSeries:e.series,__bumpColorGroup:t?e.series:"Other",__bumpValue:e.value,__bumpRank:e.rank,__bumpXValue:e.xValue,__bumpHighlighted:t}}),xValues:s,seriesOrder:m,overallOrder:x,valueExtent:u===1/0?[0,0]:[u,p]}}function n({tooltip:e,xValues:t,xFormat:o,yFormat:i}){let a=Yt((e,i)=>{if(0===t.length)return"";let a=t[Math.max(0,Math.min(t.length-1,Math.round(Number(e))))];return o?o(a,i):(a instanceof Date?a.toLocaleDateString():a)+""},[o,t]),r=Yt(e=>i?i(e):e.toLocaleString(),[i]),l=je(e),n=qt(()=>l?void 0:Qe(e),[l,e]),s=Yt(t=>{let o=t?.data??t;return o&&!1!==e?n?n({...t,data:o.__bumpRaw,__semioticHoverData:!0}):/* @__PURE__ */Ut(ut,{children:[
1
+ function e(e){let{accessor:t,data:o,isPushMode:i}=e,a=Ft(null),[r,l]=Dt(0),n=Pt(e=>{if(!i||!t)return;let o=!1;for(let i of e){let e="function"==typeof t?t(i):i[t];if(null==e)continue;let r="number"==typeof e?e:Number(e);Number.isFinite(r)&&(a.current?(a.current[0]>r&&(a.current[0]=r,o=!0),r>a.current[1]&&(a.current[1]=r,o=!0)):(a.current=[r,r],o=!0))}o&&l(e=>e+1)},[i,t]),s=Pt(()=>{i&&(a.current=null,l(e=>e+1))},[i]);return{domain:Bt(()=>{if(i)return a.current??void 0;if(!t||0===o.length)return;let e="function"==typeof t?t:e=>e[t],r=1/0,l=-1/0;for(let t of o){let o=e(t);if(null==o)continue;let i="number"==typeof o?o:Number(o);Number.isFinite(i)&&(r>i&&(r=i),i>l&&(l=i))}return Number.isFinite(r)&&Number.isFinite(l)?[r,l]:void 0},[o,t,i,r]),trackPushed:n,reset:s}}function t(e,t){return pt(1===t?.5:e/(t-1))}function o(e){return e instanceof Date?"date:"+e.getTime():`${typeof e}:${e+""}`}function i(e,t,o){return"function"==typeof e?e(t,o):t[e]}function a(e,t){if(!e?.length)return;let i=new Map(t.map((e,t)=>[o(e),t]));return e.map(e=>{let t={...e},a=a=>{if(!(a in e))return;let r=i.get(o(e[a]));void 0!==r&&(t[a]=r)};return a("x"),a("x0"),a("x1"),"string"==typeof e.type&&("x-threshold"===e.type||"x"===e.type)&&a("value"),t})}function r(e){let{seriesOrder:t,overallOrder:o,highlightTop:i,color:a,colorScheme:r,neutralColor:l,themeCategorical:n,themeNeutral:s}=e;if(null==i&&null==a)return r;let c=new Set(o.slice(0,null==i?o.length:Math.max(0,Math.floor(i)))),h=/* @__PURE__ */new Map,m={};for(let e of t)Object.defineProperty(m,e,{configurable:!0,enumerable:!0,writable:!0,value:a??(c.has(e)?De(void 0,n,r,e,h):l??s??"#b8bec8")});return m}function l(e,t={}){let a=t.xAccessor??"x",r=t.yAccessor??"y",l=t.lineBy??"series",n=t.rankDirection??"descending",s=[],c=/* @__PURE__ */new Map,h=/* @__PURE__ */new Map,m=[],d=/* @__PURE__ */new Map,u=1/0,p=-1/0;e.forEach((e,t)=>{let n=i(a,e,t),y=o(n),f=c.get(y);null==f&&(f=s.length,c.set(y,f),s.push(n),h.set(f,[]));let g=i(l,e,t)+"";d.has(g)||(d.set(g,m.length),m.push(g));let b=Number(i(r,e,t));Number.isFinite(b)&&(u=Math.min(u,b),p=Math.max(p,b),h.get(f)?.push({datum:e,inputIndex:t,series:g,value:b}))});let y=[],f=/* @__PURE__ */new Map,g=/* @__PURE__ */new Map;for(let e=0;s.length>e;e++){let t=h.get(e)??[];t.sort((e,t)=>("descending"===n?t.value-e.value:e.value-t.value)||(d.get(e.series)??0)-(d.get(t.series)??0)),t.forEach((t,o)=>{let i=o+1;y.push({datum:t.datum,xIndex:e,xValue:s[e],series:t.series,value:t.value,rank:i}),f.set(t.series,(f.get(t.series)??0)+i),g.set(t.series,(g.get(t.series)??0)+1)})}let b=m.length+1,x=[...m].sort((e,t)=>{let o=g.get(e)??0,i=g.get(t)??0;return((f.get(e)??0)+(s.length-o)*b)/Math.max(1,s.length)-((f.get(t)??0)+(s.length-i)*b)/Math.max(1,s.length)||(d.get(e)??0)-(d.get(t)??0)}),v=new Set(x.slice(0,null==t.highlightTop?x.length:Math.max(0,Math.floor(t.highlightTop))));return{data:y.map(e=>{let t=v.has(e.series);return{...e.datum,x:e.xIndex,y:e.rank,__bumpRaw:e.datum,__bumpSeries:e.series,__bumpColorGroup:t?e.series:"Other",__bumpValue:e.value,__bumpRank:e.rank,__bumpXValue:e.xValue,__bumpHighlighted:t}}),xValues:s,seriesOrder:m,overallOrder:x,valueExtent:u===1/0?[0,0]:[u,p]}}function n({tooltip:e,xValues:t,xFormat:o,yFormat:i}){let a=Kt((e,i)=>{if(0===t.length)return"";let a=t[Math.max(0,Math.min(t.length-1,Math.round(Number(e))))];return o?o(a,i):(a instanceof Date?a.toLocaleDateString():a)+""},[o,t]),r=Kt(e=>i?i(e):e.toLocaleString(),[i]),l=je(e),n=qt(()=>l?void 0:Ye(e),[l,e]),s=Kt(t=>{let o=t?.data??t;return o&&!1!==e?n?n({...t,data:o.__bumpRaw,__semioticHoverData:!0}):/* @__PURE__ */Ut(dt,{children:[
2
2
  /* @__PURE__ */Jt("div",{style:{fontWeight:700},children:o.__bumpSeries}),
3
3
  /* @__PURE__ */Ut("div",{children:[a(o.x)," · Rank ",o.__bumpRank]}),
4
- /* @__PURE__ */Ut("div",{children:["Value: ",r(o.__bumpValue)]})]}):null},[r,a,n,e]),c=Yt(t=>{let o=(Array.isArray(t.allSeries)?t.allSeries:[]).map(e=>{let t=e.datum;return{...e,value:t?.__bumpValue??e.value,rank:t?.__bumpRank,datum:t?.__bumpRaw??e.datum}}),i=t?.data??t,l={...i?.__bumpRaw??{},xValue:i?.__bumpXValue??t.xValue,allSeries:o};if(ze(e)&&"function"==typeof e.content)return e.content(l);let n=t.xValue??i?.x;/* @__PURE__ */
5
- return Ut(ut,{children:[null!=n&&/* @__PURE__ */Jt("div",{style:{fontWeight:700,marginBottom:4},children:a(n)}),o.map((e,t)=>/* @__PURE__ */Ut("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
4
+ /* @__PURE__ */Ut("div",{children:["Value: ",r(o.__bumpValue)]})]}):null},[r,a,n,e]),c=Kt(t=>{let o=(Array.isArray(t.allSeries)?t.allSeries:[]).map(e=>{let t=e.datum;return{...e,value:t?.__bumpValue??e.value,rank:t?.__bumpRank,datum:t?.__bumpRaw??e.datum}}),i=t?.data??t,l={...i?.__bumpRaw??{},xValue:i?.__bumpXValue??t.xValue,allSeries:o};if(ze(e)&&"function"==typeof e.content)return e.content(l);let n=t.xValue??i?.x;/* @__PURE__ */
5
+ return Ut(dt,{children:[null!=n&&/* @__PURE__ */Jt("div",{style:{fontWeight:700,marginBottom:4},children:a(n)}),o.map((e,t)=>/* @__PURE__ */Ut("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
6
6
  /* @__PURE__ */Jt("span",{style:{width:8,height:8,borderRadius:"50%",background:e.color,flexShrink:0}}),
7
7
  /* @__PURE__ */Jt("span",{style:{flex:1},children:e.group}),
8
8
  /* @__PURE__ */Ut("span",{children:[null!=e.rank?`Rank ${e.rank} · `:"",r(e.value)]})]},`${e.group}-${t}`))]})},[r,a,e]);return{tooltip:qt(()=>!1!==e&&(l?{mode:"multi",content:c}:s),[l,c,s,e]),formatX:a}}function s(e,t,o,i,a){let r=1-a;return r*r*r*e+3*r*r*a*t+3*r*a*a*o+a*a*a*i}function c(e,t,o,i,a){let r=1-a;return 3*r*r*(t-e)+6*r*a*(o-t)+3*a*a*(i-o)}function h(e,t,o,i,a){let r=[],l=(e.x+t.x)/2;for(let n=0;a>=n;n++){let h,m,d,u,p=n/a;"linear"===i?(h=e.x+(t.x-e.x)*p,m=e.y+(t.y-e.y)*p,d=t.x-e.x,u=t.y-e.y):(h=s(e.x,l,l,t.x,p),m=s(e.y,e.y,t.y,t.y,p),d=c(e.x,l,l,t.x,p),u=c(e.y,e.y,t.y,t.y,p)),r.push({x:h,y:m,dx:d,dy:u,radius:e.radius+(t.radius-e.radius)*p,datumIndex:.5>p?o:o+1})}return r}function m(e,t={}){let o=[],i=[],a=[];if(2>e.length)return{topPath:o,bottomPath:i,datumIndices:a};let r=t.curve??"smooth",l=Math.max(2,Math.floor(t.samplesPerSegment??12));for(let t=0;e.length-1>t;t++){let n=h(e[t],e[t+1],t,r,l);for(let e=0===t?0:1;n.length>e;e++){let t=n[e],r=Math.hypot(t.dx,t.dy)||1,l=-t.dy/r,s=t.dx/r,c=Math.max(0,t.radius);o.push([t.x+l*c,t.y+s*c]),i.push([t.x-l*c,t.y-s*c]),a.push(t.datumIndex)}}return{topPath:o,bottomPath:i,datumIndices:a}}function d(e,t,o,i){let a=Math.max(1,Math.floor(t/18)),r="auto"===o?Number.isFinite(i)&&(i??0)>=0?Math.min(a,Math.floor(i)):a:1/0,l=e.map((e,t)=>({candidate:e,index:t})).sort((e,t)=>(t.candidate.priority??0)-(e.candidate.priority??0)||Number(t.candidate.highlighted)-Number(e.candidate.highlighted)||e.candidate.rank-t.candidate.rank||e.index-t.index),n=[];for(let{candidate:e}of l){if(n.length>=r)break;n.some(t=>t.side===e.side&&14>Math.abs(t.y-e.y))||n.push(e)}return new Set(n.map(e=>e.id))}function u({datum:e,x:t,y:o,side:i,color:a,highlighted:r,labelStyle:l}){let n=_e(),s=n.isActive&&!n.predicate(e),c="function"==typeof l?l(e.__bumpRaw):l;/* @__PURE__ */
9
9
  return Zt("text",{className:"semiotic-bump-label",x:t+("end"===i?8:-8),y:o,dy:"0.35em",textAnchor:"end"===i?"start":"end",fill:a,fillOpacity:s?.16:1,fontWeight:r?650:450,fontSize:12,style:{pointerEvents:"none",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-axis-label-font-size, 12px)",...c},children:e.__bumpSeries})}function p(e){let t=Array.isArray(e.datum)?e.datum[0]:e.datum;return t&&"object"==typeof t&&"__bumpSeries"in t?t:void 0}function y(e,t,o){let[i,a]=t,[r,l]=o;return a===i?(r+l)/2:r+(l-r)*Math.max(0,Math.min(1,(e-i)/(a-i)))}function f(e){let t=e.__bumpXValue instanceof Date?e.__bumpXValue.getTime():Number(e.__bumpXValue);return{value:e.__bumpValue,x:Number.isFinite(t)?t:void 0,y:e.__bumpValue,category:e.__bumpSeries}}function g(e){let t=e.config,o=/* @__PURE__ */new Map;for(let t of e.data){let e=o.get(t.__bumpSeries)??[];e.push(t),o.set(t.__bumpSeries,e)}let i=t.seriesOrder.filter(e=>o.has(e)).sort((e,i)=>(o.get(e)?.[0]?.__bumpHighlighted?1:0)-(o.get(i)?.[0]?.__bumpHighlighted?1:0)||t.seriesOrder.indexOf(e)-t.seriesOrder.indexOf(i)),a=[],r=[],l=[];for(let r of i){let i=(o.get(r)??[]).sort((e,t)=>e.x-t.x);if(2>i.length)continue;let n=i[0].__bumpHighlighted,s=(t.colorMap&&vt(t.colorMap,r))??e.resolveColor(i[0].__bumpSeries,i[0]),c=t.color??(n?s:t.neutralColor??e.theme.semantic.textSecondary??e.theme.semantic.border??s),h=i.map(o=>({x:e.scales.x(o.x),y:e.scales.y(o.y),radius:t.ribbon?y(o.__bumpValue,t.valueExtent,t.ribbonSizeRange)/2:Math.max(.5,t.lineWidth/2)})),d=m(h,{curve:t.curve,samplesPerSegment:t.samplesPerSegment}),u={fill:c,fillOpacity:1,opacity:n?t.ribbon?t.ribbonOpacity:t.lineOpacity:Math.min(t.ribbon?t.ribbonOpacity:t.lineOpacity,.58)};t.styleRules?.length&&Object.assign(u,Ve(i[0].__bumpRaw,t.styleRules,f(i[0]))),t.areaStyle&&Object.assign(u,t.areaStyle(i[0].__bumpRaw)??{}),void 0!==t.stroke&&(u.stroke=t.stroke),void 0!==t.strokeWidth&&(u.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(u.opacity=t.opacity),a.push({type:"area",topPath:d.topPath,bottomPath:d.bottomPath,style:u,datum:d.datumIndices.map(e=>i[e]),accessibleDatum:i.map(e=>e.__bumpRaw),accessibility:{label:r+" ranking trajectory",tableFields:i.map(e=>e.__bumpRaw)},group:r,interactive:!0}),t.showPoints&&i.forEach((e,o)=>{let i={fill:c,stroke:"none",opacity:n?1:.75};t.styleRules?.length&&Object.assign(i,Ve(e.__bumpRaw,t.styleRules,f(e))),t.pointStyle&&Object.assign(i,t.pointStyle(e.__bumpRaw)??{}),void 0!==t.stroke&&(i.stroke=t.stroke),void 0!==t.strokeWidth&&(i.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(i.opacity=t.opacity),a.push({type:"point",x:h[o].x,y:h[o].y,r:i.r??t.pointRadius,style:i,datum:e,accessibleDatum:e.__bumpRaw,accessibility:{label:`${r}, rank ${e.__bumpRank}, value ${e.__bumpValue}`},pointId:`${r}:${e.x}`})});let p=!0===t.showLabels?"end":t.showLabels,g=(e,o,i)=>{let a=null==t.labelPriorityAccessor?void 0:"function"==typeof t.labelPriorityAccessor?t.labelPriorityAccessor(e.__bumpRaw):Number(e.__bumpRaw[t.labelPriorityAccessor]);l.push({id:`${r}\0${i}`,datum:e,x:h[o].x,y:h[o].y,side:i,rank:e.__bumpRank,highlighted:n,priority:Number.isFinite(a)?a:void 0,color:"string"==typeof u.fill?u.fill:c})};("start"===p||"both"===p)&&g(i[0],0,"start"),("end"===p||"both"===p||"auto"===p)&&g(i.at(-1),i.length-1,"end")}let n=d(l,e.dimensions.plot.height,"auto"!==(!0===t.showLabels?"end":t.showLabels)||"auto",t.maxLabels);for(let e of l)n.has(e.id)&&r.push(
10
- /* @__PURE__ */Zt(u,{datum:e.datum,x:e.x,y:e.y,side:e.side,color:e.color,highlighted:e.highlighted,labelStyle:t.labelStyle},e.id));return{nodes:a,overlays:r.length?/* @__PURE__ */Zt("g",{className:"semiotic-bump-labels",children:r}):void 0,restyle:(e,t)=>{let o=p(e);if(t?.isActive&&o&&!t.predicate(o))return{opacity:.14}}}}function b({data:e,safeData:t,areaBy:o,lineDataAccessor:i}){if(null==e)return[];let a,r=void 0!==t[0]?.[i];if(!r&&!o)return t;if(r)a=t;else{let e=t.reduce((e,t)=>{let a="function"==typeof o?o(t):t[o],r=a+"";if(!e[r]){let t={[i]:[]};"string"==typeof o&&(t[o]=a),e[r]=t}return e[r][i].push(t),e},{});a=Object.values(e)}return a.flatMap(e=>{let t=Array.isArray(e[i])?e[i]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}function x(e){let{safeData:t,data:o,areaBy:i,lineDataAccessor:a,colorBy:r,colorScale:l,color:n,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:m,resolvedSelection:d,areaOpacity:u,showLine:p,lineWidth:y,showPoints:f,pointRadius:g,xAccessor:x,yAccessor:v,xLabel:A,yLabel:w,xFormat:S,yFormat:k,groupField:C,styleRules:R,ruleContext:L}=e,_=ro(()=>b({data:o,safeData:t,areaBy:i,lineDataAccessor:a}),[o,t,i,a]),H=ro(()=>e=>{let t={};if(r){if(l){let o=xt(e,r,l);t.fill=o,p?(t.stroke=o,t.strokeWidth=y):t.stroke="none"}}else{let e=n||gt;t.fill=e,p?(t.stroke=e,t.strokeWidth=y):t.stroke="none"}return t.fillOpacity=u,R&&R.length>0&&Object.assign(t,Ve(e,R,L?L(e):{value:void 0})),t},[r,l,n,u,p,y,R,L]),I=ro(()=>Le(H,{stroke:s,strokeWidth:c,opacity:h}),[H,s,c,h]);return{flattenedData:_,lineStyle:ro(()=>tt(I,m??null,d),[I,m,d]),pointStyle:ro(()=>{if(f)return e=>{let t={r:g,fillOpacity:1};return r?l&&(t.fill=xt(e.parentLine||e,r,l)):t.fill=n||gt,t}},[f,g,r,l,n]),defaultTooltipContent:ro(()=>Se([{label:A||Ae(x),accessor:x,role:"x",format:S},{label:w||Ae(v),accessor:v,role:"y",format:k},...C?[{label:Ae(C),accessor:C,role:"group"}]:[],...we(e.band,k)]),[x,v,A,w,C,S,k,e.band])}}function v(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[],l=0,n=null,s=null,c=[],h=(e,t)=>e>t?"A":t>e?"B":null,m=e=>`seg-${l}-${e}`,d=e=>r.push(e),u=(e,t)=>{d({__x:e.x,__y:e.y,__y0:e.y,__diffSegment:m(t),__diffWinner:t,__valA:e.y,__valB:e.y,__sourceDatum:e.datum})};for(let e=0;a.length>e;e++){let r=a[e],p=t(r),y=o(r),f=i(r);if(!Number.isFinite(p)||!Number.isFinite(y)||!Number.isFinite(f))continue;let g=h(y,f);if(null!==g){if(null==n){n=g;for(let e of c)u(e,n);c=[],d({__x:p,__y:f>y?f:y,__y0:f>y?y:f,__diffSegment:m(n),__diffWinner:n,__valA:y,__valB:f,__sourceDatum:r}),s={x:p,a:y,b:f,w:g};continue}if(s&&s.w!==g){let e,t;if(c.length>0)e=c[0].x,t=c[0].y;else{let o=y-s.a-(f-s.b);if(0!==o){let i=Math.max(0,Math.min(1,(s.b-s.a)/o));e=s.x+i*(p-s.x),t=s.a+i*(y-s.a)}else e=s.x,t=s.a}d({__x:e,__y:t,__y0:t,__diffSegment:m(n),__diffWinner:n,__valA:t,__valB:t}),l++,n=g,d({__x:e,__y:t,__y0:t,__diffSegment:m(n),__diffWinner:n,__valA:t,__valB:t});for(let e=1;c.length>e;e++)u(c[e],n)}else for(let e of c)u(e,n);c=[],d({__x:p,__y:f>y?f:y,__y0:f>y?y:f,__diffSegment:m(n),__diffWinner:n,__valA:y,__valB:f,__sourceDatum:r}),s={x:p,a:y,b:f,w:g}}else c.push({x:p,y:y,datum:r})}for(let e of c)u(e,n??"A");return r}function A(e){if("A"===e.__diffWinner||"B"===e.__diffWinner)return e.__diffWinner;let t=(e.__diffSegment??"")+"";return"line-A"===t||t.endsWith("-A")?"A":"B"}function w(e,t){return Xe(e,t,e=>{let t=Number(e.__x),o=Number(e.__y);return{value:Number.isFinite(o)?o:void 0,x:Number.isFinite(t)?t:void 0,y:Number.isFinite(o)?o:void 0,category:A(e)}},e=>e.__sourceDatum?{...e.__sourceDatum,...e}:e)}function S(e){let{seriesAColor:t,seriesBColor:o,areaOpacity:i,styleRules:a}=e;return w(e=>({fill:"A"===A(e)?t:o,stroke:"none",fillOpacity:i}),a)}function k(e){let{seriesAColor:t,seriesBColor:o,lineWidth:i,styleRules:a}=e;return w(e=>({stroke:"A"===A(e)?t:o,strokeWidth:i,fill:"none"}),a)}function C(e){let{seriesAColor:t,seriesBColor:o,pointRadius:i,styleRules:a}=e;return w(e=>({fill:"A"===A(e)?t:o,r:i}),a)}function R(e){if(null==e)return NaN;if("number"==typeof e)return e;if(e instanceof Date)return e.getTime();if("string"==typeof e){if(""===e.trim())return NaN;let t=+e;return Number.isFinite(t)?t:NaN}return NaN}function L(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(let e of a){let a=t(e),l=o(e),n=i(e);Number.isFinite(l)&&r.push({__x:a,__y:l,__diffSegment:"line-A",__diffWinner:"A",__sourceDatum:e}),Number.isFinite(n)&&r.push({__x:a,__y:n,__diffSegment:"line-B",__diffWinner:"B",__sourceDatum:e})}return r}function _(e){let[t,o]=zo.useState(()=>Vo);return zo.useEffect(()=>{if(t)return;let e=!1;return(Vo?Promise.resolve(Vo):(Xo||(Xo=import("./c-EPJWM2UT.min.js").then(e=>Vo=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw Xo=null,e})),Xo)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?/* @__PURE__ */Go(t,{...e}):null}function H({data:e,xField:t,yField:o,fieldLabels:i,cellSize:a,pointRadius:r,pointOpacity:l,styleRules:n,colorBy:s,colorScale:c,brushSelectionName:h,hoverSelectionName:m,unselectedOpacity:d,maxDevicePixelRatio:u,mobileInteraction:p,mode:y,onPointHover:f,onPointClick:g}){let b=jo(null),x=ot({name:h,clientId:`splom-${t}-${o}`,fields:[t,o]}),v=it({name:h,xField:t,yField:o}),A=ot({name:m,clientId:"splom-hover-source",fields:[Ko]}),w=A.selectPoints,S=Eo(e=>{e?v.brushInteraction.during(e):v.brushInteraction.end(null)},[v.brushInteraction]),k=Eo(e=>{if(!e)return void f?.(null);let t=e.data,o=t?.[Ko];void 0!==o&&(w({[Ko]:[o]}),f?.(t,e.x+Yo.left,e.y+Yo.top))},[w,f]),C=Eo(e=>{if(!e)return void g?.(null);let t=e.data;t&&g?.(t,e.x+Yo.left,e.y+Yo.top)},[g]),R=Oo(()=>Ee(t,o),[t,o]),L=Oo(()=>Xe(e=>({opacity:l,r:r,fill:s?xt(e,s,c):gt}),n,R),[l,r,s,c,n,R]),H=Eo(e=>{let t={...L(e)};return"hover"===y?A.isActive&&A.predicate(e)?(t.opacity=1,t.r=2.5*r,t.stroke="#333",t.strokeWidth=1.5):A.isActive&&(t.opacity=.6*("number"==typeof t.opacity?t.opacity:l)):x.isActive&&!x.predicate(e)&&(t.opacity=d),t},[L,y,A,x,d,r,l]);/* @__PURE__ */
11
- return Qo("div",{style:{position:"relative",width:a,height:a},children:[
12
- /* @__PURE__ */$o(he,{ref:b,chartType:"scatter",data:e,size:[a,a],xAccessor:t,yAccessor:o,pointStyle:H,margin:Yo,showAxes:!1,maxDevicePixelRatio:u,enableHover:"hover"===y,accessibleTable:!1,description:`${vt(i,t)??t} versus ${vt(i,o)??o} scatterplot`,...Ce({forceHoverBehavior:"hover"===y,forceClickBehavior:!!g,mobileInteraction:p,customHoverBehavior:k,customClickBehavior:C}),tooltipContent:"hover"===y?()=>null:void 0}),"brush"===y&&/* @__PURE__ */$o(_,{frameRef:b,cellSize:a,onBrush:S})]})}function I({data:e,field:t,label:o,cellSize:i,bins:a,colorBy:r,colorScale:l,brushSelectionName:n,hoverSelectionName:s,mode:c}){let h=ot({name:n,clientId:"splom-diag-"+t,fields:[t]}),m=ot({name:s,clientId:`splom-diag-${t}-hover`,fields:[Ko]}),d="hover"===c?m:h,u=d.isActive,p=d.predicate,y=Oo(()=>{let o="string"==typeof r?r:null,l=[],n=/* @__PURE__ */new Set;for(let i of e){let e=i[t];if(null!=e&&!isNaN(e)&&l.push(Number(e)),o){let e=i[o];null!=e&&n.add(e+"")}}if(0===l.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};let[s,c]=Ct(l),h=(c-s)/a||1,m=Array.from(n),d=new Map(m.map((e,t)=>[e,t])),y=Array(a).fill(0),f=Array(a).fill(0),g=Array.from({length:a},()=>Array(m.length).fill(0)),b=Array.from({length:a},()=>Array(m.length).fill(0));for(let i of e){let e=i[t];if(null==e||isNaN(e))continue;let r=Math.min(Math.floor((e-s)/h),a-1);if(y[r]++,(!u||p(i))&&f[r]++,o){let e=d.get(i[o]+"");void 0!==e&&(g[r][e]++,(!u||p(i))&&b[r][e]++)}}let x=Rt(y,1),v=g.map((e,t)=>{let o=0;return e.map((e,r)=>{let l=e/x*(i-24),n={x:t/a*i,w:i/a-1,h:l,y0:o,category:m[r]};return o+=l,n})}),A=b.map((e,t)=>{let o=0;return e.map((e,r)=>{let l=e/x*(i-24),n={x:t/a*i,w:i/a-1,h:l,y0:o,category:m[r]};return o+=l,n})});return{bars:y.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),selectedBars:f.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),categoryBars:v,selectedCategoryBars:A,max:x,categories:m}},[e,t,a,i,u,p,r]);/* @__PURE__ */
13
- return Qo("svg",{width:i,height:i,style:{overflow:"hidden"},children:[
10
+ /* @__PURE__ */Zt(u,{datum:e.datum,x:e.x,y:e.y,side:e.side,color:e.color,highlighted:e.highlighted,labelStyle:t.labelStyle},e.id));return{nodes:a,overlays:r.length?/* @__PURE__ */Zt("g",{className:"semiotic-bump-labels",children:r}):void 0,restyle:(e,t)=>{let o=p(e);if(t?.isActive&&o&&!t.predicate(o))return{opacity:.14}}}}function b({data:e,safeData:t,areaBy:o,lineDataAccessor:i}){if(null==e)return[];let a,r=void 0!==t[0]?.[i];if(!r&&!o)return t;if(r)a=t;else{let e=t.reduce((e,t)=>{let a="function"==typeof o?o(t):t[o],r=a+"";if(!e[r]){let t={[i]:[]};"string"==typeof o&&(t[o]=a),e[r]=t}return e[r][i].push(t),e},{});a=Object.values(e)}return a.flatMap(e=>{let t=Array.isArray(e[i])?e[i]:[];return"string"==typeof o?t.map(t=>({...t,[o]:t[o]??e[o]})):t})}function x(e){let{safeData:t,data:o,areaBy:i,lineDataAccessor:a,colorBy:r,colorScale:l,color:n,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:m,resolvedSelection:d,areaOpacity:u,showLine:p,lineWidth:y,showPoints:f,pointRadius:g,xAccessor:x,yAccessor:v,xLabel:A,yLabel:w,xFormat:S,yFormat:k,groupField:C,styleRules:R,ruleContext:L}=e,_=ro(()=>b({data:o,safeData:t,areaBy:i,lineDataAccessor:a}),[o,t,i,a]),H=ro(()=>e=>{let t={};if(r){if(l){let o=xt(e,r,l);t.fill=o,p?(t.stroke=o,t.strokeWidth=y):t.stroke="none"}}else{let e=n||gt;t.fill=e,p?(t.stroke=e,t.strokeWidth=y):t.stroke="none"}return t.fillOpacity=u,R&&R.length>0&&Object.assign(t,Ve(e,R,L?L(e):{value:void 0})),t},[r,l,n,u,p,y,R,L]),I=ro(()=>Le(H,{stroke:s,strokeWidth:c,opacity:h}),[H,s,c,h]);return{flattenedData:_,lineStyle:ro(()=>tt(I,m??null,d),[I,m,d]),pointStyle:ro(()=>{if(f)return e=>{let t={r:g,fillOpacity:1};return r?l&&(t.fill=xt(e.parentLine||e,r,l)):t.fill=n||gt,t}},[f,g,r,l,n]),defaultTooltipContent:ro(()=>Se([{label:A||Ae(x),accessor:x,role:"x",format:S},{label:w||Ae(v),accessor:v,role:"y",format:k},...C?[{label:Ae(C),accessor:C,role:"group"}]:[],...we(e.band,k)]),[x,v,A,w,C,S,k,e.band])}}function v(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[],l=0,n=null,s=null,c=[],h=(e,t)=>e>t?"A":t>e?"B":null,m=e=>`seg-${l}-${e}`,d=e=>r.push(e),u=(e,t)=>{d({__x:e.x,__y:e.y,__y0:e.y,__diffSegment:m(t),__diffWinner:t,__valA:e.y,__valB:e.y,__sourceDatum:e.datum})};for(let e=0;a.length>e;e++){let r=a[e],p=t(r),y=o(r),f=i(r);if(!Number.isFinite(p)||!Number.isFinite(y)||!Number.isFinite(f))continue;let g=h(y,f);if(null!==g){if(null==n){n=g;for(let e of c)u(e,n);c=[],d({__x:p,__y:f>y?f:y,__y0:f>y?y:f,__diffSegment:m(n),__diffWinner:n,__valA:y,__valB:f,__sourceDatum:r}),s={x:p,a:y,b:f,w:g};continue}if(s&&s.w!==g){let e,t;if(c.length>0)e=c[0].x,t=c[0].y;else{let o=y-s.a-(f-s.b);if(0!==o){let i=Math.max(0,Math.min(1,(s.b-s.a)/o));e=s.x+i*(p-s.x),t=s.a+i*(y-s.a)}else e=s.x,t=s.a}d({__x:e,__y:t,__y0:t,__diffSegment:m(n),__diffWinner:n,__valA:t,__valB:t}),l++,n=g,d({__x:e,__y:t,__y0:t,__diffSegment:m(n),__diffWinner:n,__valA:t,__valB:t});for(let e=1;c.length>e;e++)u(c[e],n)}else for(let e of c)u(e,n);c=[],d({__x:p,__y:f>y?f:y,__y0:f>y?y:f,__diffSegment:m(n),__diffWinner:n,__valA:y,__valB:f,__sourceDatum:r}),s={x:p,a:y,b:f,w:g}}else c.push({x:p,y:y,datum:r})}for(let e of c)u(e,n??"A");return r}function A(e){if("A"===e.__diffWinner||"B"===e.__diffWinner)return e.__diffWinner;let t=(e.__diffSegment??"")+"";return"line-A"===t||t.endsWith("-A")?"A":"B"}function w(e,t){return $e(e,t,e=>{let t=Number(e.__x),o=Number(e.__y);return{value:Number.isFinite(o)?o:void 0,x:Number.isFinite(t)?t:void 0,y:Number.isFinite(o)?o:void 0,category:A(e)}},e=>e.__sourceDatum?{...e.__sourceDatum,...e}:e)}function S(e){let{seriesAColor:t,seriesBColor:o,areaOpacity:i,styleRules:a}=e;return w(e=>({fill:"A"===A(e)?t:o,stroke:"none",fillOpacity:i}),a)}function k(e){let{seriesAColor:t,seriesBColor:o,lineWidth:i,styleRules:a}=e;return w(e=>({stroke:"A"===A(e)?t:o,strokeWidth:i,fill:"none"}),a)}function C(e){let{seriesAColor:t,seriesBColor:o,pointRadius:i,styleRules:a}=e;return w(e=>({fill:"A"===A(e)?t:o,r:i}),a)}function R(e){if(null==e)return NaN;if("number"==typeof e)return e;if(e instanceof Date)return e.getTime();if("string"==typeof e){if(""===e.trim())return NaN;let t=+e;return Number.isFinite(t)?t:NaN}return NaN}function L(e,t,o,i){if(!e.length)return[];let a=e.filter(e=>Number.isFinite(t(e))).sort((e,o)=>t(e)-t(o)),r=[];for(let e of a){let a=t(e),l=o(e),n=i(e);Number.isFinite(l)&&r.push({__x:a,__y:l,__diffSegment:"line-A",__diffWinner:"A",__sourceDatum:e}),Number.isFinite(n)&&r.push({__x:a,__y:n,__diffSegment:"line-B",__diffWinner:"B",__sourceDatum:e})}return r}function _(e){let[t,o]=zo.useState(()=>Vo);return zo.useEffect(()=>{if(t)return;let e=!1;return(Vo?Promise.resolve(Vo):(Xo||(Xo=import("./c-EPJWM2UT.min.js").then(e=>Vo=e.ScatterplotMatrixBrushOverlay).catch(e=>{throw Xo=null,e})),Xo)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?/* @__PURE__ */Go(t,{...e}):null}function H({data:e,xField:t,yField:o,fieldLabels:i,cellSize:a,pointRadius:r,pointOpacity:l,styleRules:n,colorBy:s,colorScale:c,brushSelectionName:h,hoverSelectionName:m,unselectedOpacity:d,maxDevicePixelRatio:u,mobileInteraction:p,mode:y,onPointHover:f,onPointClick:g}){let b=jo(null),x=ot({name:h,clientId:`splom-${t}-${o}`,fields:[t,o]}),v=it({name:h,xField:t,yField:o}),A=ot({name:m,clientId:"splom-hover-source",fields:[Qo]}),w=A.selectPoints,S=Eo(e=>{e?v.brushInteraction.during(e):v.brushInteraction.end(null)},[v.brushInteraction]),k=Eo(e=>{if(!e)return void f?.(null);let t=e.data,o=t?.[Qo];void 0!==o&&(w({[Qo]:[o]}),f?.(t,e.x+Ko.left,e.y+Ko.top))},[w,f]),C=Eo(e=>{if(!e)return void g?.(null);let t=e.data;t&&g?.(t,e.x+Ko.left,e.y+Ko.top)},[g]),R=Oo(()=>Ee(t,o),[t,o]),L=Oo(()=>$e(e=>({opacity:l,r:r,fill:s?xt(e,s,c):gt}),n,R),[l,r,s,c,n,R]),H=Eo(e=>{let t={...L(e)};return"hover"===y?A.isActive&&A.predicate(e)?(t.opacity=1,t.r=2.5*r,t.stroke="#333",t.strokeWidth=1.5):A.isActive&&(t.opacity=.6*("number"==typeof t.opacity?t.opacity:l)):x.isActive&&!x.predicate(e)&&(t.opacity=d),t},[L,y,A,x,d,r,l]);/* @__PURE__ */
11
+ return Yo("div",{style:{position:"relative",width:a,height:a},children:[
12
+ /* @__PURE__ */$o(he,{ref:b,chartType:"scatter",data:e,size:[a,a],xAccessor:t,yAccessor:o,pointStyle:H,margin:Ko,showAxes:!1,maxDevicePixelRatio:u,enableHover:"hover"===y,accessibleTable:!1,description:`${vt(i,t)??t} versus ${vt(i,o)??o} scatterplot`,...Ce({forceHoverBehavior:"hover"===y,forceClickBehavior:!!g,mobileInteraction:p,customHoverBehavior:k,customClickBehavior:C}),tooltipContent:"hover"===y?()=>null:void 0}),"brush"===y&&/* @__PURE__ */$o(_,{frameRef:b,cellSize:a,onBrush:S})]})}function I({data:e,field:t,label:o,cellSize:i,bins:a,colorBy:r,colorScale:l,brushSelectionName:n,hoverSelectionName:s,mode:c}){let h=ot({name:n,clientId:"splom-diag-"+t,fields:[t]}),m=ot({name:s,clientId:`splom-diag-${t}-hover`,fields:[Qo]}),d="hover"===c?m:h,u=d.isActive,p=d.predicate,y=Oo(()=>{let o="string"==typeof r?r:null,l=[],n=/* @__PURE__ */new Set;for(let i of e){let e=i[t];if(null!=e&&!isNaN(e)&&l.push(Number(e)),o){let e=i[o];null!=e&&n.add(e+"")}}if(0===l.length)return{bars:[],selectedBars:[],categoryBars:[],selectedCategoryBars:[],max:0,categories:[]};let[s,c]=Ct(l),h=(c-s)/a||1,m=Array.from(n),d=new Map(m.map((e,t)=>[e,t])),y=Array(a).fill(0),f=Array(a).fill(0),g=Array.from({length:a},()=>Array(m.length).fill(0)),b=Array.from({length:a},()=>Array(m.length).fill(0));for(let i of e){let e=i[t];if(null==e||isNaN(e))continue;let r=Math.min(Math.floor((e-s)/h),a-1);if(y[r]++,(!u||p(i))&&f[r]++,o){let e=d.get(i[o]+"");void 0!==e&&(g[r][e]++,(!u||p(i))&&b[r][e]++)}}let x=Rt(y,1),v=g.map((e,t)=>{let o=0;return e.map((e,r)=>{let l=e/x*(i-24),n={x:t/a*i,w:i/a-1,h:l,y0:o,category:m[r]};return o+=l,n})}),A=b.map((e,t)=>{let o=0;return e.map((e,r)=>{let l=e/x*(i-24),n={x:t/a*i,w:i/a-1,h:l,y0:o,category:m[r]};return o+=l,n})});return{bars:y.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),selectedBars:f.map((e,t)=>({x:t/a*i,w:i/a-1,h:e/x*(i-24),count:e})),categoryBars:v,selectedCategoryBars:A,max:x,categories:m}},[e,t,a,i,u,p,r]);/* @__PURE__ */
13
+ return Yo("svg",{width:i,height:i,style:{overflow:"hidden"},children:[
14
14
  /* @__PURE__ */$o("text",{x:i/2,y:14,textAnchor:"middle",fontSize:11,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:o}),y.categories.length>0?y.categoryBars.map((e,t)=>e.map((e,o)=>/* @__PURE__ */$o("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:l?l(e.category):gt,opacity:u?.3:.6},`bg-${t}-${o}`))):y.bars.map((e,t)=>/* @__PURE__ */$o("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:gt,opacity:u?.3:.6},"bg-"+t)),u&&(y.categories.length>0?y.selectedCategoryBars.map((e,t)=>e.map((e,o)=>/* @__PURE__ */$o("rect",{x:e.x,y:i-e.y0-e.h,width:Math.max(e.w,1),height:e.h,fill:l?l(e.category):gt,opacity:.7},`sel-${t}-${o}`))):y.selectedBars.map((e,t)=>/* @__PURE__ */$o("rect",{x:e.x,y:i-e.h,width:Math.max(e.w,1),height:e.h,fill:gt,opacity:.7},"sel-"+t)))]})}function P({label:e,cellSize:t}){/* @__PURE__ */
15
- return $o("svg",{width:t,height:t,children:/* @__PURE__ */$o("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})})}function B(e){let{data:t,fields:o,fieldLabels:i={},colorBy:a,colorScheme:r,cellSize:l=150,cellGap:n=4,pointRadius:s=2,pointOpacity:c=.5,diagonal:h="histogram",histogramBins:m=20,brushMode:d="crossfilter",hoverMode:u=!0,unselectedOpacity:p=.1,showGrid:y=!1,maxDevicePixelRatio:f,tooltip:g,showLegend:b,idAccessor:x,styleRules:v,width:A,className:w,title:S,description:k,summary:C,accessibleTable:R=!0,onObservation:L,onClick:_,chartId:B}=e,F="splom",D="splom-hover",N=rt(e.mobileInteraction,{mode:e.mode,width:A??o.length*l,mobileSemantics:e.mobileSemantics}),M=u?"hover":d?"brush":"hover",W=St(e=>e.clearSelection),[T,O]=To(null),E=Wo(()=>{W(D),O(null)},[W,D]),j=Mo(()=>(t||[]).map((e,t)=>void 0!==e[Ko]?e:{...e,[Ko]:t}),[t]),z=Ne(j,a,r),G=No.useId().replace(/:/g,"")+"-data-table",V=Mo(()=>(t||[]).map(e=>({type:"point",datum:e})),[t]),X=Mo(()=>Qe(g),[g]),$=40,Q=Wo((e,t,o,i)=>[$+n+e*(l+n)+(o??0),t*(l+n)+(i??0)],[$,l,n]),K=void 0!==b?b:!!a,Y=Mo(()=>{if(!K||!a)return null;let e="string"==typeof a?a:null;return e?Array.from(new Set(j.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:e+"",color:z?z(e+""):gt})):null},[K,a,j,z]),q=Mo(()=>({display:"grid",gridTemplateColumns:"40px "+o.map(()=>l+"px").join(" "),gridTemplateRows:o.map(()=>l+"px").join(" ")+" 40px",gap:n+"px",width:"fit-content"}),[o,l,n,$]);/* @__PURE__ */
15
+ return $o("svg",{width:t,height:t,children:/* @__PURE__ */$o("text",{x:t/2,y:t/2,textAnchor:"middle",dominantBaseline:"middle",fontSize:12,fontWeight:"bold",fill:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})})}function B(e){let{data:t,fields:o,fieldLabels:i={},colorBy:a,colorScheme:r,cellSize:l=150,cellGap:n=4,pointRadius:s=2,pointOpacity:c=.5,diagonal:h="histogram",histogramBins:m=20,brushMode:d="crossfilter",hoverMode:u=!0,unselectedOpacity:p=.1,showGrid:y=!1,maxDevicePixelRatio:f,tooltip:g,showLegend:b,idAccessor:x,styleRules:v,width:A,className:w,title:S,description:k,summary:C,accessibleTable:R=!0,onObservation:L,onClick:_,chartId:B}=e,F="splom",D="splom-hover",N=rt(e.mobileInteraction,{mode:e.mode,width:A??o.length*l,mobileSemantics:e.mobileSemantics}),M=u?"hover":d?"brush":"hover",W=St(e=>e.clearSelection),[T,O]=To(null),E=Wo(()=>{W(D),O(null)},[W,D]),j=Mo(()=>(t||[]).map((e,t)=>void 0!==e[Qo]?e:{...e,[Qo]:t}),[t]),z=Ne(j,a,r),G=No.useId().replace(/:/g,"")+"-data-table",V=Mo(()=>(t||[]).map(e=>({type:"point",datum:e})),[t]),X=Mo(()=>Ye(g),[g]),$=40,Y=Wo((e,t,o,i)=>[$+n+e*(l+n)+(o??0),t*(l+n)+(i??0)],[$,l,n]),Q=void 0!==b?b:!!a,K=Mo(()=>{if(!Q||!a)return null;let e="string"==typeof a?a:null;return e?Array.from(new Set(j.map(t=>t[e]).filter(e=>null!=e))).map(e=>({label:e+"",color:z?z(e+""):gt})):null},[Q,a,j,z]),q=Mo(()=>({display:"grid",gridTemplateColumns:"40px "+o.map(()=>l+"px").join(" "),gridTemplateRows:o.map(()=>l+"px").join(" ")+" 40px",gap:n+"px",width:"fit-content"}),[o,l,n,$]);/* @__PURE__ */
16
16
  return Jo("div",{className:w,style:{position:"relative",color:"var(--semiotic-text, #333)",fontFamily:"var(--semiotic-font-family, sans-serif)"},role:"group","aria-label":k||S||`Scatterplot matrix comparing ${o.length} fields`,children:[S&&/* @__PURE__ */qo("div",{className:"semiotic-chart-title",style:{fontWeight:600,marginBottom:8},children:S}),R&&/* @__PURE__ */qo(at,{accessibleTable:R,children:/* @__PURE__ */qo(ct,{tableId:G})}),
17
- /* @__PURE__ */qo(st,{summary:C}),Y&&/* @__PURE__ */qo("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:Y.map(e=>/* @__PURE__ */Jo("div",{style:{display:"flex",alignItems:"center",gap:4},children:[
17
+ /* @__PURE__ */qo(st,{summary:C}),K&&/* @__PURE__ */qo("div",{style:{display:"flex",gap:12,marginBottom:8,flexWrap:"wrap"},children:K.map(e=>/* @__PURE__ */Jo("div",{style:{display:"flex",alignItems:"center",gap:4},children:[
18
18
  /* @__PURE__ */qo("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",backgroundColor:e.color}}),
19
19
  /* @__PURE__ */qo("span",{style:{fontSize:11},children:e.label})]},e.label))}),
20
20
  /* @__PURE__ */Jo("div",{style:{position:"relative",width:"fit-content"},children:[
21
21
  /* @__PURE__ */Jo("div",{style:q,onMouseLeave:"hover"===M?E:void 0,children:[o.map((e,t)=>/* @__PURE__ */Jo(No.Fragment,{children:[
22
- /* @__PURE__ */qo("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-rl",transform:"rotate(180deg)",fontSize:11,fontWeight:"bold",color:"var(--semiotic-text, #333)"},children:vt(i,e)??e}),o.map((o,r)=>t===r?"label"===h?/* @__PURE__ */qo(P,{label:vt(i,e)??e,cellSize:l},"diag-"+e):/* @__PURE__ */qo(I,{data:j,field:e,label:vt(i,e)??e,cellSize:l,bins:m,colorBy:a,colorScale:z,brushSelectionName:F,hoverSelectionName:D,unselectedOpacity:p,mode:M},"diag-"+e):/* @__PURE__ */qo(H,{data:j,xField:o,yField:e,fieldLabels:i,cellSize:l,pointRadius:s,pointOpacity:c,styleRules:v,colorBy:a,colorScale:z,brushSelectionName:F,hoverSelectionName:D,unselectedOpacity:p,showGrid:y,maxDevicePixelRatio:f,mobileInteraction:N,mode:M,onPointHover:"hover"===M?(i,a,l)=>{if(i){if(O({datum:i,xField:o,yField:e,colIndex:r,rowIndex:t,px:a??0,py:l??0}),L){let[e,o]=Q(r,t,a,l);L({type:"hover",datum:i,x:e,y:o,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:B})}}else O(null),L&&L({type:"hover-end",timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:B})}:void 0,onPointClick:_||L?(e,o,i)=>{if(!e)return;let[a,l]=Q(r,t,o,i);_&&_(e,{x:a,y:l}),L&&L({type:"click",datum:e,x:a,y:l,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:B})}:void 0},`cell-${e}-${o}`))]},"row-"+e)),
23
- /* @__PURE__ */qo("div",{})," ",o.map(e=>/* @__PURE__ */qo("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:"bold",color:"#333"},children:vt(i,e)??e},"col-label-"+e))]}),T&&"hover"===M&&!1!==g&&(()=>{let e=T.datum,t=vt(i,T.xField)??T.xField,r=vt(i,T.yField)??T.yField,s=a?"function"==typeof a?a(e):e[a]:null,c=x?"function"==typeof x?x(e):e[x]:"Row "+e[Ko],h=$+n+T.colIndex*(l+n)+T.px,m=T.rowIndex*(l+n)+T.py,d={...e};delete d[Ko];let u="function"==typeof X,p=u?X(d):null,y=/* @__PURE__ */Jo(ut,{style:{color:"var(--semiotic-tooltip-text, #333)",background:"var(--semiotic-tooltip-bg, rgba(255,255,255,0.95))",border:"1px solid var(--semiotic-border, #ddd)",borderRadius:3,padding:"4px 8px",fontSize:11,lineHeight:1.4,whiteSpace:"nowrap",boxShadow:"none"},children:[
22
+ /* @__PURE__ */qo("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-rl",transform:"rotate(180deg)",fontSize:11,fontWeight:"bold",color:"var(--semiotic-text, #333)"},children:vt(i,e)??e}),o.map((o,r)=>t===r?"label"===h?/* @__PURE__ */qo(P,{label:vt(i,e)??e,cellSize:l},"diag-"+e):/* @__PURE__ */qo(I,{data:j,field:e,label:vt(i,e)??e,cellSize:l,bins:m,colorBy:a,colorScale:z,brushSelectionName:F,hoverSelectionName:D,unselectedOpacity:p,mode:M},"diag-"+e):/* @__PURE__ */qo(H,{data:j,xField:o,yField:e,fieldLabels:i,cellSize:l,pointRadius:s,pointOpacity:c,styleRules:v,colorBy:a,colorScale:z,brushSelectionName:F,hoverSelectionName:D,unselectedOpacity:p,showGrid:y,maxDevicePixelRatio:f,mobileInteraction:N,mode:M,onPointHover:"hover"===M?(i,a,l)=>{if(i){if(O({datum:i,xField:o,yField:e,colIndex:r,rowIndex:t,px:a??0,py:l??0}),L){let[e,o]=Y(r,t,a,l);L({type:"hover",datum:i,x:e,y:o,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:B})}}else O(null),L&&L({type:"hover-end",timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:B})}:void 0,onPointClick:_||L?(e,o,i)=>{if(!e)return;let[a,l]=Y(r,t,o,i);_&&_(e,{x:a,y:l}),L&&L({type:"click",datum:e,x:a,y:l,timestamp:Date.now(),chartType:"ScatterplotMatrix",chartId:B})}:void 0},`cell-${e}-${o}`))]},"row-"+e)),
23
+ /* @__PURE__ */qo("div",{})," ",o.map(e=>/* @__PURE__ */qo("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:"bold",color:"#333"},children:vt(i,e)??e},"col-label-"+e))]}),T&&"hover"===M&&!1!==g&&(()=>{let e=T.datum,t=vt(i,T.xField)??T.xField,r=vt(i,T.yField)??T.yField,s=a?"function"==typeof a?a(e):e[a]:null,c=x?"function"==typeof x?x(e):e[x]:"Row "+e[Qo],h=$+n+T.colIndex*(l+n)+T.px,m=T.rowIndex*(l+n)+T.py,d={...e};delete d[Qo];let u="function"==typeof X,p=u?X(d):null,y=/* @__PURE__ */Jo(dt,{style:{color:"var(--semiotic-tooltip-text, #333)",background:"var(--semiotic-tooltip-bg, rgba(255,255,255,0.95))",border:"1px solid var(--semiotic-border, #ddd)",borderRadius:3,padding:"4px 8px",fontSize:11,lineHeight:1.4,whiteSpace:"nowrap",boxShadow:"none"},children:[
24
24
  /* @__PURE__ */qo("div",{style:{fontWeight:"bold",marginBottom:2},children:c+""}),
25
25
  /* @__PURE__ */Jo("div",{children:[t,": ",null!=e[T.xField]?Number(e[T.xField]).toFixed(1):"–"]}),
26
- /* @__PURE__ */Jo("div",{children:[r,": ",null!=e[T.yField]?Number(e[T.yField]).toFixed(1):"–"]}),null!=s&&/* @__PURE__ */Jo("div",{style:{opacity:.8},children:["string"==typeof a?a:"group",": ",s+""]})]}),f=u?p:y;return f?/* @__PURE__ */qo(Ie,{x:h,y:m,containerWidth:$+o.length*l+o.length*n,containerHeight:o.length*l+$+o.length*n,margin:{top:0,right:0,bottom:0,left:0},className:"scatterplot-matrix-tooltip",zIndex:10,children:f}):null})()]}),R&&/* @__PURE__ */qo(at,{accessibleTable:R,children:/* @__PURE__ */qo(lt,{scene:V,chartType:"scatterplot matrix",tableId:G,chartTitle:S})})]})}function F(e){let{brushMode:t="crossfilter",hoverMode:o=!0}=e,i={};return!o&&t&&(i.splom={resolution:t}),o&&(i["splom-hover"]={resolution:"union"}),/* @__PURE__ */qo(mt,{selections:i,children:/* @__PURE__ */qo(B,{...e})})}function D(e){let[t,o]=ii.useState(()=>ri);return ii.useEffect(()=>{if(t)return;let e=!1;return(ri?Promise.resolve(ri):(li||(li=import("./c-FD2BXSRG.min.js").then(e=>ri=e.MinimapBrushOverlay).catch(e=>{throw li=null,e})),li)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?/* @__PURE__ */ai(t,{...e}):null}function N(e){let{data:t,width:o=600,height:i=400,margin:a,className:r,title:l,description:n,summary:s,xLabel:c,yLabel:h,xFormat:m,yFormat:d,xAccessor:u="x",yAccessor:p="y",lineBy:y,lineDataAccessor:f="coordinates",colorBy:g,colorScheme:b,curve:x="linear",lineWidth:v=2,styleRules:A,fillArea:w=!1,areaOpacity:S=.3,showPoints:k=!1,pointRadius:C=3,enableHover:R=!0,showGrid:L=!1,showLegend:_,legendPosition:H,tooltip:I,minimap:P={},renderBefore:B=!1,onBrush:F,brushExtent:N,yExtent:M,frameProps:W={},loading:T,loadingContent:O,emptyContent:E}=e,j=Ue(T,o,i,O),z=j?null:Je(t,o,i,E),G=ti(()=>qe(t),[t]),[V,X]=Uo(null),Q=N??V,K=oi(e=>{N||X(e),F?.(e)},[N,F]),Y=Zo(null),[J,U]=Uo(null);ei(()=>{let e=0,t=!1,o=()=>{if(t)return;let i=Y.current?.getScales?.();i?U(i):e=requestAnimationFrame(o)};return e=requestAnimationFrame(o),()=>{t=!0,e&&cancelAnimationFrame(e)}},[t]);let Z=void 0!==G[0]?.[f],ee=ti(()=>{if(Z)return G;if(y){let e=G.reduce((e,t)=>{let o="function"==typeof y?y(t):t[y];if(!e[o]){let t={[f]:[]};"string"==typeof y&&(t[y]=o),e[o]=t}return e[o][f].push(t),e},{});return Object.values(e)}return[{[f]:G}]},[G,y,f,Z]),te=ti(()=>Z||y?ee.flatMap(e=>{let t=e[f]||[];return y&&"string"==typeof y?t.map(t=>({...t,[y]:e[y]})):t}):G,[ee,f,Z,y,G]),oe=Ne(G,g,b),ie=ti(()=>Ee(u,p),[u,p]),ae=$({lineWidth:v,colorBy:g,colorScale:oe,fillArea:w,areaOpacity:S,styleRules:A,ruleContext:ie}),re=ti(()=>{if(P.lineStyle)return P.lineStyle},[P.lineStyle]),le=$({lineWidth:1,colorBy:g,colorScale:oe,styleRules:A,ruleContext:ie}),ne=re??le,se=ti(()=>k?Xe(e=>{let t={r:C,fillOpacity:1};return t.fill=g?xt(e.parentLine||e,g,oe):gt,t},A,ie,e=>e.parentLine||e):void 0,[k,C,g,oe,A,ie]),{legend:ce,margin:me,legendPosition:de,legendMarginReserved:ue}=He({data:ee,colorBy:g,colorScale:oe,showLegend:_,legendPosition:H,userMargin:a,chartWidth:o,chartHeight:i,frameLegend:W,hasTitle:!!l,axisChrome:dt(W,{showAxes:!0,xLabel:c,yLabel:h})}),pe=P.height||60,ye=ti(()=>({top:P.margin?.top??0,bottom:P.margin?.bottom??20,left:P.margin?.left??me.left,right:P.margin?.right??me.right}),[P.margin,me]),fe=P.brushDirection||"x",ge=ti(()=>Se([{label:c||Ae(u),accessor:u,role:"x",format:m},{label:h||Ae(p),accessor:p,role:"y",format:d}]),[u,p,c,h,m,d]),be=q({componentName:"MinimapChart",data:t,accessors:{xAccessor:u,yAccessor:p}});if(be)/* @__PURE__ */return ni(Ke,{componentName:"MinimapChart",message:be,width:o,height:i});let xe=w?"area":"line",ve={chartType:xe,data:te,xAccessor:u,yAccessor:p,groupAccessor:y||void 0,curve:x,lineStyle:ae,...k&&{pointStyle:se},size:[o,i],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:me,showAxes:!0,xLabel:c,yLabel:h,xFormat:m,yFormat:d,enableHover:R,showGrid:L,...ce&&{legend:ce,legendPosition:de},...ue&&{__legendMarginReservedFor:ce},...l&&{title:l},...n&&{description:n},...s&&{summary:s},...void 0!==e.accessibleTable&&{accessibleTable:e.accessibleTable},...void 0!==e.animate&&{animate:e.animate},...void 0!==e.hoverRadius&&{hoverRadius:e.hoverRadius},...Ge({tooltip:I,defaultTooltipContent:ge}),...Q&&{xExtent:Q},...M&&{yExtent:M},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...W},we={chartType:xe,data:te,xAccessor:u,yAccessor:p,groupAccessor:y||void 0,curve:x,lineStyle:ne,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},size:[o,pe+ye.top+ye.bottom],margin:ye,showAxes:P.showAxes??!1,background:P.background,enableHover:!1,accessibleTable:!1,description:(n||l||"Chart")+" overview minimap",animate:!1,...M&&{yExtent:M}},ke=/* @__PURE__ */si("div",{style:{position:"relative",width:o,overflow:"hidden"},children:[
27
- /* @__PURE__ */ni(he,{ref:Y,...we}),
28
- /* @__PURE__ */ni(D,{width:o-ye.left-ye.right,height:pe,margin:ye,scales:J,brushDirection:fe,extent:Q,onBrush:K})]},"minimap"),Ce=/* @__PURE__ */ni("div",{style:{overflow:"hidden"},children:/* @__PURE__ */ni(he,{...ve})},"main");return j||z||/* @__PURE__ */ni(Ye,{componentName:"MinimapChart",width:o,height:i,children:/* @__PURE__ */si("div",{className:"minimap-chart"+(r?" "+r:""),role:"group","aria-label":n||l||"Chart with overview minimap",children:[B?ke:Ce,B?Ce:ke]})})}function M(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}function W(e,t,o){let i=bt(t,o,ft),a=t&&"object"==typeof t&&!Array.isArray(t)?t:null;return e.map((e,t)=>{if("string"==typeof e.color&&e.color.length>0)return e.color;let o=e.label||"Series "+(t+1),r=a?.[o];return"string"==typeof r&&r.length>0?r:i[t%i.length]})}function T(e,t){let o=Oe(e),i=t.map((e,t)=>({label:e.label||"Series "+(t+1),readY:Oe(e.yAccessor)}));return(e,t)=>{let a=(e[ki]??t??"")+"",r=(i.find(e=>e.label===a)??i[0])?.readY(e);return{value:r,x:o(e),y:r,category:a||void 0}}}function O(e,t){let o=1/0,i=-1/0,a="function"==typeof t?t:e=>e[t];for(let t of e){let e=a(t);null!=e&&isFinite(e)&&(o>e&&(o=e),e>i&&(i=e))}if(!isFinite(o)||!isFinite(i))return[0,1];if(o===i){let e=0===o?1:.1*Math.abs(o);return[o-e,i+e]}return[o,i]}function E(e,t){let o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function j(e,t){return t[0]+e*(t[1]-t[0])}import{a as z}from"./c-27DCB5T6.min.js";import{a as G,b as V,c as X,d as $}from"./c-7ASK4WBF.min.js";import{a as Q}from"./c-PDQHLOKU.min.js";import{a as K,c as Y}from"./c-PQOZPM4G.min.js";import{b as q}from"./c-IBRLFKWA.min.js";import{a as J,b as U,c as Z}from"./c-HQ27AHMC.min.js";import{a as ee}from"./c-C4KIXUWU.min.js";import{a as te,b as oe,c as ie,d as ae,g as re,h as le}from"./c-AXJ2QI3F.min.js";import{e as ne}from"./c-CLDCKFBE.min.js";import{b as se,c as ce,d as he,e as me}from"./c-TTKWXGAI.min.js";import{a as de,h as ue,j as pe,k as ye}from"./c-MTX2AO5S.min.js";import{j as fe,k as ge,l as be,m as xe,n as ve}from"./c-HK4OSLZA.min.js";import{H as Ae,J as we,K as Se,X as ke,Y as Ce,Z as Re,_ as Le}from"./c-KGROWFT2.min.js";import{b as _e}from"./c-CLLCX3PT.min.js";import{Bb as He,Ca as Ie,Cb as Pe,Eb as Be,Fb as Fe,Hb as De,Ib as Ne,Kb as Me,Lb as We,Mb as Te,Nb as Oe,Ob as Ee,Qa as je,Ra as ze,Sa as Ge,Sb as Ve,Tb as Xe,Ua as $e,Va as Qe,_a as Ke,ab as Ye,b as qe,bb as Je,cb as Ue,db as Ze,ib as et,jb as tt,kb as ot,nb as it,qa as at,rb as rt,ta as lt,v as nt,va as st,wa as ct,ya as ht,yb as mt,z as dt,za as ut}from"./c-G53AVC42.min.js";import{b as pt,d as yt,m as ft,n as gt,o as bt,r as xt,s as vt,u as At}from"./c-Y342FJ6K.min.js";import{m as wt}from"./c-3BYZXCX3.min.js";import{o as St,v as kt}from"./c-5NYONM6V.min.js";import{a as Ct,c as Rt}from"./c-3PFVJFBK.min.js";import{useMemo as Lt,useCallback as _t,forwardRef as Ht,useRef as It}from"react";import{useCallback as Pt,useMemo as Bt,useRef as Ft,useState as Dt}from"react";import{jsx as Nt}from"react/jsx-runtime";se(z),de(oe);var Mt=Ht(function(t,o){let i=It(null),a=Te(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:r,margin:l,className:n,xFormat:s,yFormat:c,xAccessor:h="x",yAccessor:m="y",xScaleType:d,yScaleType:u,colorBy:p,colorScheme:y,styleRules:f,sizeBy:g,sizeRange:b=[3,15],symbolBy:x,symbolMap:v,pointRadius:A=5,pointOpacity:w=.8,tooltip:S,marginalGraphics:k,pointIdAccessor:C,annotations:R,regression:L,forecast:_,anomaly:H,xExtent:I,yExtent:P,pulse:B,decay:F,staleness:D,frameProps:N={},selection:M,linkedHover:W,linkedBrush:T,brush:O,onBrush:E,onObservation:j,onClick:z,hoverHighlight:X,chartId:$,loading:K,loadingContent:Y,emptyContent:J,legendInteraction:ee,legendPosition:te,color:oe,stroke:ie,strokeWidth:ae,opacity:re}=t,{width:le,height:ne,enableHover:se,showGrid:ce,showLegend:de,title:ue,description:pe,summary:ye,accessibleTable:fe,xLabel:ge,yLabel:be}=a,xe=Lt(()=>qe(r),[r]),ve=void 0===r,{domain:we,trackPushed:Le,reset:_e}=e({accessor:g,data:xe,isPushMode:ve}),He=_t(e=>{Le([e]),i.current?.push(e)},[Le]),Ie=_t(e=>{Le(e),i.current?.pushMany(e)},[Le]);Z(o,{variant:"xy",frameRef:i,overrides:{push:He,pushMany:Ie,clear:()=>{_e(),i.current?.clear()}}});let Pe=U({data:xe,rawData:r,colorBy:p,colorScheme:y,legendInteraction:ee,legendPosition:te,frameLegend:N,selection:M,linkedHover:W,fallbackFields:p?["string"==typeof p?p:""]:[],unwrapData:!1,onObservation:j,onClick:z,hoverHighlight:X,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"Scatterplot",chartId:$,showLegend:de,userMargin:l,marginDefaults:a.marginDefaults,loading:K,loadingContent:Y,emptyContent:J,width:le,height:ne,hasTitle:!!ue,axisChrome:dt(N,{showAxes:a.showAxes,xLabel:ge,yLabel:be})}),{brushStreamProps:Be}=me({brush:O,onBrush:E,linkedBrush:T,xAccessor:h,yAccessor:m,defaultDimension:"xy"});Ze("Scatterplot",xe,"xAccessor",h),Ze("Scatterplot",xe,"yAccessor",m);let Fe=Lt(()=>g?we??[0,1]:void 0,[g,we]),De=Lt(()=>g?e=>At(e,g,b,Fe):void 0,[g,b,Fe]),Ne=Lt(()=>Ee(h,m),[h,m]),Me=G({colorBy:p,colorScale:Pe.colorScale,color:oe,pointRadius:A,fillOpacity:w,radiusFn:De,stroke:ie,strokeWidth:ae,opacity:re,styleRules:f,ruleContext:Ne,effectiveSelectionHook:Pe.effectiveSelectionHook,resolvedSelection:Pe.resolvedSelection}),We=Lt(()=>Se([{label:ge||Ae(h),accessor:h,role:"x",format:s},{label:be||Ae(m),accessor:m,role:"y",format:c},...p?[{label:Ae(p),accessor:p,role:"color"}]:[],...g?[{label:Ae(g),accessor:g,role:"size"}]:[]]),[h,m,ge,be,p,g,s,c]),{effectiveData:Oe,statisticalAnnotations:je}=V({data:xe,xAccessor:h,yAccessor:m,forecast:_,anomaly:H}),ze=Lt(()=>{let e=Q(L);return e||0!==je.length?[...e?[e]:[],...R||[],...je]:R},[L,R,je]);if(Pe.earlyReturn)return Pe.earlyReturn;let Ge=q({componentName:"Scatterplot",data:r,accessors:{xAccessor:h,yAccessor:m}});if(Ge)/* @__PURE__ */return Nt(Ke,{componentName:"Scatterplot",message:Ge,width:le,height:ne});let Ve={chartType:"scatter",...null!=r&&{data:Oe},xAccessor:h,yAccessor:m,xScaleType:d,yScaleType:u,colorAccessor:p||void 0,sizeAccessor:g||void 0,...x&&{symbolAccessor:x},...v&&{symbolMap:v},sizeRange:b,pointStyle:Me,colorScheme:y,size:[le,ne],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:Pe.margin,showAxes:a.showAxes,xLabel:ge,yLabel:be,xFormat:s,yFormat:c,enableHover:se,showGrid:ce,...Pe.legendBehaviorProps,...ke({title:ue,description:pe,summary:ye,accessibleTable:fe,className:n,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...Re({tooltip:S,defaultTooltipContent:We}),...Ce({linkedHover:W,selection:M,onObservation:j,onClick:z,hoverHighlight:X,hoverRadius:t.hoverRadius,mobileInteraction:Pe.mobileInteraction,customHoverBehavior:Pe.customHoverBehavior,customClickBehavior:Pe.customClickBehavior}),...k&&{marginalGraphics:k},...C&&{pointIdAccessor:C},...B&&{pulse:B},...F&&{decay:F},...D&&{staleness:D},...ze&&ze.length>0&&{annotations:ze},...I&&{xExtent:I},...P&&{yExtent:P},...Be,...Pe.crosshairProps,...N};/* @__PURE__ */
29
- return Nt(Ye,{componentName:"Scatterplot",width:le,height:ne,children:/* @__PURE__ */Nt(he,{ref:i,...Ve})})});Mt.displayName="Scatterplot";import{useMemo as Wt,forwardRef as Tt,useRef as Ot}from"react";import{Fragment as Et,jsx as jt}from"react/jsx-runtime";de(oe);var zt=Tt(function(e,o){let i=Ot(null);Z(o,{variant:"xy",frameRef:i});let a=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:r,margin:l,className:n,xFormat:s,yFormat:c,xAccessor:h="x",yAccessor:m="y",orderAccessor:d,orderLabel:u,styleRules:p,pointRadius:y=4,tooltip:f,pointIdAccessor:g,annotations:b,regression:x,forecast:v,anomaly:A,xExtent:w,yExtent:S,pulse:k,decay:C,staleness:R,frameProps:L={},selection:_,linkedHover:H,onObservation:I,onClick:P,hoverHighlight:B,chartId:F,loading:D,loadingContent:N,emptyContent:M,legendInteraction:W,stroke:T,strokeWidth:O,opacity:E}=e,{width:j,height:z,enableHover:X,showGrid:$,title:K,description:Y,summary:J,accessibleTable:ee,xLabel:te,yLabel:oe}=a,{safeData:ie,orderMap:ae}=Wt(()=>{let e=r||[],t="function"==typeof h?h:e=>e[h],o="function"==typeof m?m:e=>e[m],i=e;if(d&&e.length>0){let t="function"==typeof d?d:e=>e[d];i=[...e].sort((e,o)=>{let i=t(e),a=t(o);return(i instanceof Date?i.getTime():+i)-(a instanceof Date?a.getTime():+a)})}let a=/* @__PURE__ */new WeakMap,l=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&l++}let n=0;for(let e of i){let i=t(e),r=o(e);null!=i&&null!=r&&isFinite(i)&&isFinite(r)&&a.set(e,{idx:n++,total:l})}return{safeData:i,orderMap:a}},[r,d,h,m]);Ze("ConnectedScatterplot",ie,"xAccessor",h),Ze("ConnectedScatterplot",ie,"yAccessor",m);let re=U({data:ie,rawData:r,colorBy:void 0,colorScheme:void 0,legendInteraction:W,selection:_,linkedHover:H,fallbackFields:[],unwrapData:!1,onObservation:I,onClick:P,hoverHighlight:B,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"ConnectedScatterplot",chartId:F,showLegend:void 0,userMargin:l,marginDefaults:a.marginDefaults,loading:D,loadingContent:N,emptyContent:M,width:j,height:z,hasTitle:!!K,axisChrome:dt(L,{showAxes:a.showAxes,xLabel:te,yLabel:oe})}),le=re.resolvedSelection?.unselectedOpacity??et,ne=Wt(()=>(e,o)=>{let i=o.filter(e=>"point"===e.type);if(2>i.length)return;let a=re.effectiveSelectionHook?.isActive,r=re.effectiveSelectionHook?.predicate,l=100>i.length,n=i.length;e.lineCap="round";for(let o=0;n-1>o;o++){let s=i[o],c=i[o+1],h=t(o,n),m=!a||!r||r(s.datum??s)||r(c.datum??c),d=a?m?1:le:1;l&&(e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(c.x,c.y),e.strokeStyle="white",e.lineWidth=y+2,e.globalAlpha=.5*d,e.stroke()),e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(c.x,c.y),e.strokeStyle=h,e.lineWidth=y,e.globalAlpha=d,e.stroke()}e.globalAlpha=1},[y,re.effectiveSelectionHook,le]),se=Wt(()=>[ne],[ne]),ce=Wt(()=>(e,o,i)=>{let a=e.filter(e=>"point"===e.type);if(2>a.length)return null;let r=a.length,l=100>r,n=[];for(let e=0;r-1>e;e++){let o=a[e],i=a[e+1],s=t(e,r),c=Math.min("number"==typeof o.style?.opacity?o.style.opacity:1,"number"==typeof i.style?.opacity?i.style.opacity:1);l&&n.push(
26
+ /* @__PURE__ */Jo("div",{children:[r,": ",null!=e[T.yField]?Number(e[T.yField]).toFixed(1):"–"]}),null!=s&&/* @__PURE__ */Jo("div",{style:{opacity:.8},children:["string"==typeof a?a:"group",": ",s+""]})]}),f=u?p:y;return f?/* @__PURE__ */qo(He,{x:h,y:m,containerWidth:$+o.length*l+o.length*n,containerHeight:o.length*l+$+o.length*n,margin:{top:0,right:0,bottom:0,left:0},className:"scatterplot-matrix-tooltip",zIndex:10,children:f}):null})()]}),R&&/* @__PURE__ */qo(at,{accessibleTable:R,children:/* @__PURE__ */qo(lt,{scene:V,chartType:"scatterplot matrix",tableId:G,chartTitle:S})})]})}function F(e){let{brushMode:t="crossfilter",hoverMode:o=!0}=e,i={};return!o&&t&&(i.splom={resolution:t}),o&&(i["splom-hover"]={resolution:"union"}),/* @__PURE__ */qo(ut,{selections:i,children:/* @__PURE__ */qo(B,{...e})})}function D(e){let[t,o]=ii.useState(()=>ri);return ii.useEffect(()=>{if(t)return;let e=!1;return(ri?Promise.resolve(ri):(li||(li=import("./c-FD2BXSRG.min.js").then(e=>ri=e.MinimapBrushOverlay).catch(e=>{throw li=null,e})),li)).then(t=>{e||o(()=>t)}).catch(()=>{}),()=>{e=!0}},[t]),t?/* @__PURE__ */ai(t,{...e}):null}function N(e){let{data:t,width:o=600,height:i=400,margin:a,className:r,title:l,description:n,summary:s,xLabel:c,yLabel:h,xFormat:m,yFormat:d,xAccessor:u="x",yAccessor:p="y",lineBy:y,lineDataAccessor:f="coordinates",colorBy:g,colorScheme:b,curve:x="linear",lineWidth:v=2,styleRules:A,fillArea:w=!1,areaOpacity:S=.3,showPoints:k=!1,pointRadius:C=3,enableHover:R=!0,showGrid:L=!1,showLegend:_,legendPosition:H,tooltip:I,minimap:P={},renderBefore:B=!1,onBrush:F,brushExtent:N,yExtent:M,frameProps:W={},loading:T,loadingContent:O,emptyContent:E}=e,j=Ue(T,o,i,O),z=j?null:Je(t,o,i,E),G=ti(()=>qe(t),[t]),[V,X]=Uo(null),Y=N??V,Q=oi(e=>{N||X(e),F?.(e)},[N,F]),K=Zo(null),[J,U]=Uo(null);ei(()=>{let e=0,t=!1,o=()=>{if(t)return;let i=K.current?.getScales?.();i?U(i):e=requestAnimationFrame(o)};return e=requestAnimationFrame(o),()=>{t=!0,e&&cancelAnimationFrame(e)}},[t]);let Z=void 0!==G[0]?.[f],ee=ti(()=>{if(Z)return G;if(y){let e=G.reduce((e,t)=>{let o="function"==typeof y?y(t):t[y];if(!e[o]){let t={[f]:[]};"string"==typeof y&&(t[y]=o),e[o]=t}return e[o][f].push(t),e},{});return Object.values(e)}return[{[f]:G}]},[G,y,f,Z]),te=ti(()=>Z||y?ee.flatMap(e=>{let t=e[f]||[];return y&&"string"==typeof y?t.map(t=>({...t,[y]:e[y]})):t}):G,[ee,f,Z,y,G]),oe=Ne(G,g,b),ie=ti(()=>Ee(u,p),[u,p]),ae=$({lineWidth:v,colorBy:g,colorScale:oe,fillArea:w,areaOpacity:S,styleRules:A,ruleContext:ie}),re=ti(()=>{if(P.lineStyle)return P.lineStyle},[P.lineStyle]),le=$({lineWidth:1,colorBy:g,colorScale:oe,styleRules:A,ruleContext:ie}),ne=re??le,se=ti(()=>k?$e(e=>{let t={r:C,fillOpacity:1};return t.fill=g?xt(e.parentLine||e,g,oe):gt,t},A,ie,e=>e.parentLine||e):void 0,[k,C,g,oe,A,ie]),{legend:ce,margin:me,legendPosition:de,legendMarginReserved:ue}=Ie({data:ee,colorBy:g,colorScale:oe,showLegend:_,legendPosition:H,userMargin:a,chartWidth:o,chartHeight:i,frameLegend:W,hasTitle:!!l,axisChrome:mt(W,{showAxes:!0,xLabel:c,yLabel:h})}),pe=P.height||60,ye=ti(()=>({top:P.margin?.top??0,bottom:P.margin?.bottom??20,left:P.margin?.left??me.left,right:P.margin?.right??me.right}),[P.margin,me]),fe=P.brushDirection||"x",ge=ti(()=>Se([{label:c||Ae(u),accessor:u,role:"x",format:m},{label:h||Ae(p),accessor:p,role:"y",format:d}]),[u,p,c,h,m,d]),be=q({componentName:"MinimapChart",data:t,accessors:{xAccessor:u,yAccessor:p}});if(be)/* @__PURE__ */return ni(Qe,{componentName:"MinimapChart",message:be,width:o,height:i});let xe=w?"area":"line",ve={chartType:xe,data:te,xAccessor:u,yAccessor:p,groupAccessor:y||void 0,curve:x,lineStyle:ae,...k&&{pointStyle:se},size:[o,i],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:me,showAxes:!0,xLabel:c,yLabel:h,xFormat:m,yFormat:d,enableHover:R,showGrid:L,...ce&&{legend:ce,legendPosition:de},...ue&&{__legendMarginReservedFor:ce},...l&&{title:l},...n&&{description:n},...s&&{summary:s},...void 0!==e.accessibleTable&&{accessibleTable:e.accessibleTable},...void 0!==e.animate&&{animate:e.animate},...void 0!==e.hoverRadius&&{hoverRadius:e.hoverRadius},...Ge({tooltip:I,defaultTooltipContent:ge}),...Y&&{xExtent:Y},...M&&{yExtent:M},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...W},we={chartType:xe,data:te,xAccessor:u,yAccessor:p,groupAccessor:y||void 0,curve:x,lineStyle:ne,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},size:[o,pe+ye.top+ye.bottom],margin:ye,showAxes:P.showAxes??!1,background:P.background,enableHover:!1,accessibleTable:!1,description:(n||l||"Chart")+" overview minimap",animate:!1,...M&&{yExtent:M}},ke=/* @__PURE__ */si("div",{style:{position:"relative",width:o,overflow:"hidden"},children:[
27
+ /* @__PURE__ */ni(he,{ref:K,...we}),
28
+ /* @__PURE__ */ni(D,{width:o-ye.left-ye.right,height:pe,margin:ye,scales:J,brushDirection:fe,extent:Y,onBrush:Q})]},"minimap"),Ce=/* @__PURE__ */ni("div",{style:{overflow:"hidden"},children:/* @__PURE__ */ni(he,{...ve})},"main");return j||z||/* @__PURE__ */ni(Ke,{componentName:"MinimapChart",width:o,height:i,children:/* @__PURE__ */si("div",{className:"minimap-chart"+(r?" "+r:""),role:"group","aria-label":n||l||"Chart with overview minimap",children:[B?ke:Ce,B?Ce:ke]})})}function M(e,t){return{label:t?.label??e.label,color:t?.color??e.color,opacity:t?.opacity??e.opacity}}function W(e,t,o){let i=bt(t,o,ft),a=t&&"object"==typeof t&&!Array.isArray(t)?t:null;return e.map((e,t)=>{if("string"==typeof e.color&&e.color.length>0)return e.color;let o=e.label||"Series "+(t+1),r=a?.[o];return"string"==typeof r&&r.length>0?r:i[t%i.length]})}function T(e,t){let o=Oe(e),i=t.map((e,t)=>({label:e.label||"Series "+(t+1),readY:Oe(e.yAccessor)}));return(e,t)=>{let a=(e[ki]??t??"")+"",r=(i.find(e=>e.label===a)??i[0])?.readY(e);return{value:r,x:o(e),y:r,category:a||void 0}}}function O(e,t){let o=1/0,i=-1/0,a="function"==typeof t?t:e=>e[t];for(let t of e){let e=a(t);null!=e&&isFinite(e)&&(o>e&&(o=e),e>i&&(i=e))}if(!isFinite(o)||!isFinite(i))return[0,1];if(o===i){let e=0===o?1:.1*Math.abs(o);return[o-e,i+e]}return[o,i]}function E(e,t){let o=t[1]-t[0];return 0===o?.5:(e-t[0])/o}function j(e,t){return t[0]+e*(t[1]-t[0])}import{a as z}from"./c-27DCB5T6.min.js";import{a as G,b as V,c as X,d as $}from"./c-PITYSOPK.min.js";import{a as Y}from"./c-PDQHLOKU.min.js";import{a as Q,c as K}from"./c-YL7HJL5J.min.js";import{b as q}from"./c-IBRLFKWA.min.js";import{a as J,b as U,c as Z}from"./c-FMCUQ6JX.min.js";import{a as ee}from"./c-GK263BF4.min.js";import{a as te,b as oe,c as ie,d as ae,g as re,h as le}from"./c-AXJ2QI3F.min.js";import{e as ne}from"./c-CLDCKFBE.min.js";import{b as se,c as ce,d as he,e as me}from"./c-HNHKIMIV.min.js";import{a as de,h as ue,j as pe,k as ye}from"./c-MTX2AO5S.min.js";import{j as fe,k as ge,l as be,m as xe,n as ve}from"./c-HK4OSLZA.min.js";import{H as Ae,J as we,K as Se,X as ke,Y as Ce,Z as Re,_ as Le}from"./c-SAP5KY6R.min.js";import{b as _e}from"./c-CLLCX3PT.min.js";import{Ca as He,Cb as Ie,Db as Pe,Fb as Be,Gb as Fe,Ib as De,Jb as Ne,Lb as Me,Mb as We,Nb as Te,Ob as Oe,Pb as Ee,Qa as je,Ra as ze,Sa as Ge,Tb as Ve,Ua as Xe,Ub as $e,Va as Ye,_a as Qe,ab as Ke,b as qe,bb as Je,cb as Ue,db as Ze,jb as et,kb as tt,lb as ot,ob as it,qa as at,sb as rt,ta as lt,v as nt,va as st,wa as ct,ya as ht,z as mt,za as dt,zb as ut}from"./c-UMGHCBH5.min.js";import{b as pt,d as yt,m as ft,n as gt,o as bt,r as xt,s as vt,u as At}from"./c-Y342FJ6K.min.js";import{m as wt}from"./c-3BYZXCX3.min.js";import{o as St,v as kt}from"./c-5NYONM6V.min.js";import{a as Ct,c as Rt}from"./c-3PFVJFBK.min.js";import{useMemo as Lt,useCallback as _t,forwardRef as Ht,useRef as It}from"react";import{useCallback as Pt,useMemo as Bt,useRef as Ft,useState as Dt}from"react";import{jsx as Nt}from"react/jsx-runtime";se(z),de(oe);var Mt=Ht(function(t,o){let i=It(null),a=Te(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:r,margin:l,className:n,xFormat:s,yFormat:c,xAccessor:h="x",yAccessor:m="y",xScaleType:d,yScaleType:u,colorBy:p,colorScheme:y,styleRules:f,sizeBy:g,sizeRange:b=[3,15],symbolBy:x,symbolMap:v,pointRadius:A=5,pointOpacity:w=.8,tooltip:S,marginalGraphics:k,pointIdAccessor:C,annotations:R,regression:L,forecast:_,anomaly:H,xExtent:I,yExtent:P,pulse:B,decay:F,staleness:D,frameProps:N={},selection:M,linkedHover:W,linkedBrush:T,brush:O,onBrush:E,onObservation:j,onClick:z,hoverHighlight:X,chartId:$,loading:Q,loadingContent:K,emptyContent:J,legendInteraction:ee,legendPosition:te,color:oe,stroke:ie,strokeWidth:ae,opacity:re}=t,{width:le,height:ne,enableHover:se,showGrid:ce,showLegend:de,title:ue,description:pe,summary:ye,accessibleTable:fe,xLabel:ge,yLabel:be}=a,xe=Lt(()=>qe(r),[r]),ve=void 0===r,{domain:we,trackPushed:Le,reset:_e}=e({accessor:g,data:xe,isPushMode:ve}),He=_t(e=>{Le([e]),i.current?.push(e)},[Le]),Ie=_t(e=>{Le(e),i.current?.pushMany(e)},[Le]);Z(o,{variant:"xy",frameRef:i,overrides:{push:He,pushMany:Ie,clear:()=>{_e(),i.current?.clear()}}});let Pe=U({data:xe,rawData:r,colorBy:p,colorScheme:y,legendInteraction:ee,legendPosition:te,frameLegend:N,selection:M,linkedHover:W,fallbackFields:p?["string"==typeof p?p:""]:[],unwrapData:!1,onObservation:j,onClick:z,hoverHighlight:X,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"Scatterplot",chartId:$,showLegend:de,userMargin:l,marginDefaults:a.marginDefaults,loading:Q,loadingContent:K,emptyContent:J,width:le,height:ne,hasTitle:!!ue,axisChrome:mt(N,{showAxes:a.showAxes,xLabel:ge,yLabel:be})}),{brushStreamProps:Be}=me({brush:O,onBrush:E,linkedBrush:T,xAccessor:h,yAccessor:m,defaultDimension:"xy"});Ze("Scatterplot",xe,"xAccessor",h),Ze("Scatterplot",xe,"yAccessor",m);let Fe=Lt(()=>g?we??[0,1]:void 0,[g,we]),De=Lt(()=>g?e=>At(e,g,b,Fe):void 0,[g,b,Fe]),Ne=Lt(()=>Ee(h,m),[h,m]),Me=G({colorBy:p,colorScale:Pe.colorScale,color:oe,pointRadius:A,fillOpacity:w,radiusFn:De,stroke:ie,strokeWidth:ae,opacity:re,styleRules:f,ruleContext:Ne,effectiveSelectionHook:Pe.effectiveSelectionHook,resolvedSelection:Pe.resolvedSelection}),We=Lt(()=>Se([{label:ge||Ae(h),accessor:h,role:"x",format:s},{label:be||Ae(m),accessor:m,role:"y",format:c},...p?[{label:Ae(p),accessor:p,role:"color"}]:[],...g?[{label:Ae(g),accessor:g,role:"size"}]:[]]),[h,m,ge,be,p,g,s,c]),{effectiveData:Oe,statisticalAnnotations:je}=V({data:xe,xAccessor:h,yAccessor:m,forecast:_,anomaly:H}),ze=Lt(()=>{let e=Y(L);return e||0!==je.length?[...e?[e]:[],...R||[],...je]:R},[L,R,je]);if(Pe.earlyReturn)return Pe.earlyReturn;let Ge=q({componentName:"Scatterplot",data:r,accessors:{xAccessor:h,yAccessor:m}});if(Ge)/* @__PURE__ */return Nt(Qe,{componentName:"Scatterplot",message:Ge,width:le,height:ne});let Ve={chartType:"scatter",...null!=r&&{data:Oe},xAccessor:h,yAccessor:m,xScaleType:d,yScaleType:u,colorAccessor:p||void 0,sizeAccessor:g||void 0,...x&&{symbolAccessor:x},...v&&{symbolMap:v},sizeRange:b,pointStyle:Me,colorScheme:y,size:[le,ne],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:Pe.margin,showAxes:a.showAxes,xLabel:ge,yLabel:be,xFormat:s,yFormat:c,enableHover:se,showGrid:ce,...Pe.legendBehaviorProps,...ke({title:ue,description:pe,summary:ye,accessibleTable:fe,className:n,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...Re({tooltip:S,defaultTooltipContent:We}),...Ce({linkedHover:W,selection:M,onObservation:j,onClick:z,hoverHighlight:X,hoverRadius:t.hoverRadius,mobileInteraction:Pe.mobileInteraction,customHoverBehavior:Pe.customHoverBehavior,customClickBehavior:Pe.customClickBehavior}),...k&&{marginalGraphics:k},...C&&{pointIdAccessor:C},...B&&{pulse:B},...F&&{decay:F},...D&&{staleness:D},...ze&&ze.length>0&&{annotations:ze},...I&&{xExtent:I},...P&&{yExtent:P},...Be,...Pe.crosshairProps,...N};/* @__PURE__ */
29
+ return Nt(Ke,{componentName:"Scatterplot",width:le,height:ne,children:/* @__PURE__ */Nt(he,{ref:i,...Ve})})});Mt.displayName="Scatterplot";import{useMemo as Wt,forwardRef as Tt,useRef as Ot}from"react";import{Fragment as Et,jsx as jt}from"react/jsx-runtime";de(oe);var zt=Tt(function(e,o){let i=Ot(null);Z(o,{variant:"xy",frameRef:i});let a=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:r,margin:l,className:n,xFormat:s,yFormat:c,xAccessor:h="x",yAccessor:m="y",orderAccessor:d,orderLabel:u,styleRules:p,pointRadius:y=4,tooltip:f,pointIdAccessor:g,annotations:b,regression:x,forecast:v,anomaly:A,xExtent:w,yExtent:S,pulse:k,decay:C,staleness:R,frameProps:L={},selection:_,linkedHover:H,onObservation:I,onClick:P,hoverHighlight:B,chartId:F,loading:D,loadingContent:N,emptyContent:M,legendInteraction:W,stroke:T,strokeWidth:O,opacity:E}=e,{width:j,height:z,enableHover:X,showGrid:$,title:Q,description:K,summary:J,accessibleTable:ee,xLabel:te,yLabel:oe}=a,{safeData:ie,orderMap:ae}=Wt(()=>{let e=r||[],t="function"==typeof h?h:e=>e[h],o="function"==typeof m?m:e=>e[m],i=e;if(d&&e.length>0){let t="function"==typeof d?d:e=>e[d];i=[...e].sort((e,o)=>{let i=t(e),a=t(o);return(i instanceof Date?i.getTime():+i)-(a instanceof Date?a.getTime():+a)})}let a=/* @__PURE__ */new WeakMap,l=0;for(let e of i){let i=t(e),a=o(e);null!=i&&null!=a&&isFinite(i)&&isFinite(a)&&l++}let n=0;for(let e of i){let i=t(e),r=o(e);null!=i&&null!=r&&isFinite(i)&&isFinite(r)&&a.set(e,{idx:n++,total:l})}return{safeData:i,orderMap:a}},[r,d,h,m]);Ze("ConnectedScatterplot",ie,"xAccessor",h),Ze("ConnectedScatterplot",ie,"yAccessor",m);let re=U({data:ie,rawData:r,colorBy:void 0,colorScheme:void 0,legendInteraction:W,selection:_,linkedHover:H,fallbackFields:[],unwrapData:!1,onObservation:I,onClick:P,hoverHighlight:B,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"ConnectedScatterplot",chartId:F,showLegend:void 0,userMargin:l,marginDefaults:a.marginDefaults,loading:D,loadingContent:N,emptyContent:M,width:j,height:z,hasTitle:!!Q,axisChrome:mt(L,{showAxes:a.showAxes,xLabel:te,yLabel:oe})}),le=re.resolvedSelection?.unselectedOpacity??et,ne=Wt(()=>(e,o)=>{let i=o.filter(e=>"point"===e.type);if(2>i.length)return;let a=re.effectiveSelectionHook?.isActive,r=re.effectiveSelectionHook?.predicate,l=100>i.length,n=i.length;e.lineCap="round";for(let o=0;n-1>o;o++){let s=i[o],c=i[o+1],h=t(o,n),m=!a||!r||r(s.datum??s)||r(c.datum??c),d=a?m?1:le:1;l&&(e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(c.x,c.y),e.strokeStyle="white",e.lineWidth=y+2,e.globalAlpha=.5*d,e.stroke()),e.beginPath(),e.moveTo(s.x,s.y),e.lineTo(c.x,c.y),e.strokeStyle=h,e.lineWidth=y,e.globalAlpha=d,e.stroke()}e.globalAlpha=1},[y,re.effectiveSelectionHook,le]),se=Wt(()=>[ne],[ne]),ce=Wt(()=>(e,o,i)=>{let a=e.filter(e=>"point"===e.type);if(2>a.length)return null;let r=a.length,l=100>r,n=[];for(let e=0;r-1>e;e++){let o=a[e],i=a[e+1],s=t(e,r),c=Math.min("number"==typeof o.style?.opacity?o.style.opacity:1,"number"==typeof i.style?.opacity?i.style.opacity:1);l&&n.push(
30
30
  /* @__PURE__ */jt("line",{x1:o.x,y1:o.y,x2:i.x,y2:i.y,stroke:"white",strokeWidth:y+2,strokeLinecap:"round",opacity:.5*c},"halo-"+e)),n.push(
31
31
  /* @__PURE__ */jt("line",{x1:o.x,y1:o.y,x2:i.x,y2:i.y,stroke:s,strokeWidth:y,strokeLinecap:"round",opacity:c},"seg-"+e))}/* @__PURE__ */
32
- return jt(Et,{children:n})},[y]),me=Wt(()=>[ce],[ce]),de=Wt(()=>e=>{let o=ae.get(e),i=o?.idx??0,a=o?.total??1;return{fill:a>0?t(i,a):"#6366f1",stroke:"white",strokeWidth:1,r:y,fillOpacity:1}},[y,ae]),ue=Wt(()=>Ee(h,m),[h,m]),pe=G({colorScale:void 0,baseStyleExtras:de,stroke:T,strokeWidth:O,opacity:E,styleRules:p,ruleContext:ue,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ye=u||("string"==typeof d?d:"Order"),fe=Wt(()=>Se([{label:te||Ae(h),accessor:h,role:"x",format:s},{label:oe||Ae(m),accessor:m,role:"y",format:c},...d?[{label:ye,accessor:d,role:"group"}]:[]]),[h,m,te,oe,d,ye,s,c]),ge=q({componentName:"ConnectedScatterplot",data:r,accessors:{xAccessor:h,yAccessor:m}}),{effectiveData:be,statisticalAnnotations:xe}=V({data:ie,xAccessor:h,yAccessor:m,forecast:v,anomaly:A});if(re.earlyReturn)return re.earlyReturn;let ve=Q(x),we=ve||xe.length>0?[...ve?[ve]:[],...b||[],...xe]:b,Le={chartType:"scatter",...null!=r&&{data:be},xAccessor:h,yAccessor:m,pointStyle:pe,size:[j,z],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:a.showAxes,xLabel:te,yLabel:oe,xFormat:s,yFormat:c,enableHover:X,showGrid:$,...ke({title:K,description:Y,summary:J,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:f,defaultTooltipContent:fe}),...Ce({linkedHover:H,selection:_,onObservation:I,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...g&&{pointIdAccessor:g},...k&&{pulse:k},...C&&{decay:C},...R&&{staleness:R},canvasPreRenderers:se,svgPreRenderers:me,...we&&we.length>0&&{annotations:we},...w&&{xExtent:w},...S&&{yExtent:S},...re.crosshairProps,...L};return ge?/* @__PURE__ */jt(Ke,{componentName:"ConnectedScatterplot",message:ge,width:j,height:z}):/* @__PURE__ */jt(Ye,{componentName:"ConnectedScatterplot",width:j,height:z,children:/* @__PURE__ */jt(he,{ref:i,...Le})})});zt.displayName="ConnectedScatterplot";import{forwardRef as Gt,useMemo as Vt}from"react";import{jsx as Xt}from"react/jsx-runtime";de(ne);var $t=Gt(function(e,t){let{data:o,layout:i,layoutConfig:a,onLayoutError:r,xExtent:l,yExtent:n,showAxes:s=!1,margin:c,className:h,annotations:m,onObservation:d,onClick:u,selection:p,linkedHover:y,hoverHighlight:f,chartId:g,loading:b,loadingContent:x,emptyContent:v,colorBy:A,colorScheme:w,legend:S,legendInteraction:k,legendPosition:C,frameProps:R={}}=e,{legend:L,..._}=R,H=Vt(()=>nt(L,S),[L,S]),{frameRef:I,resolved:P,safeData:B,setup:F,earlyReturn:D}=Y({imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:A,colorScheme:w,legend:H,legendInteraction:k,legendPosition:C,frameLegend:_,selection:p,linkedHover:y,hoverHighlight:f,onObservation:d,onClick:u,chartId:g,loading:b,loadingContent:x,emptyContent:v,margin:c,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules,xLabel:e.xLabel,yLabel:e.yLabel}),N=F.effectiveSelectionHook,M=Vt(()=>N?.isActive?{isActive:!0,predicate:N.predicate}:null,[N?.isActive,N?.predicate]),W=Vt(()=>Ge({tooltip:e.tooltip,defaultTooltipContent:e=>/* @__PURE__ */Xt(ce,{hover:e})}),[e.tooltip]);if(D)return D;let{width:T,height:O,enableHover:E,showGrid:j,title:z,description:G,summary:V,accessibleTable:X,xLabel:$,yLabel:Q}=P,K={chartType:"custom",...null!=o&&{data:B},customLayout:i,layoutConfig:a,onLayoutError:r,...M&&{layoutSelection:M},xExtent:l,yExtent:n,colorAccessor:A,colorScheme:w,size:[T,O],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:F.margin,showAxes:s,xLabel:$,yLabel:Q,enableHover:E,showGrid:j,...F.legendBehaviorProps,...ke({title:z,description:G,summary:V,accessibleTable:X,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...W,...Ce({linkedHover:y,selection:p,onObservation:d,onClick:u,hoverRadius:e.hoverRadius,hoverHighlight:f,mobileInteraction:F.mobileInteraction,customHoverBehavior:F.customHoverBehavior,customClickBehavior:F.customClickBehavior}),...m&&m.length>0&&{annotations:m},...F.crosshairProps,..._};/* @__PURE__ */
33
- return Xt(Ye,{componentName:"XYCustomChart",width:T,height:O,children:/* @__PURE__ */Xt(he,{ref:I,...K})})});$t.displayName="XYCustomChart";import{forwardRef as Qt,useMemo as Kt}from"react";import{useCallback as Yt,useMemo as qt}from"react";import{jsx as Jt,jsxs as Ut}from"react/jsx-runtime";import{jsx as Zt}from"react/jsx-runtime";import{jsx as eo}from"react/jsx-runtime";var to=Qt(function(e,t){let o=Be(),i=kt(),{data:s,xAccessor:c,yAccessor:h,lineBy:m,rankDirection:d="descending",ribbon:u=!1,curve:p="smooth",ribbonSizeRange:y=[4,28],samplesPerSegment:f=12,lineWidth:b=3,highlightTop:x,neutralColor:v,styleRules:A,labelStyle:w,colorScheme:S,ribbonOpacity:k=.82,lineOpacity:C=.9,showPoints:R=!1,pointRadius:L=3,showLabels:_=!0,labelPriorityAccessor:H,maxLabels:I,showAxes:P=!0,showGrid:B=!0,showLegend:F=!1,enableHover:D=!0,hoverHighlight:N=!0,tooltip:M,frameProps:W={},xFormat:T,yFormat:O,onClick:E}=e,j=Kt(()=>l(s,{xAccessor:c,yAccessor:h,lineBy:m,rankDirection:d,highlightTop:x}),[s,c,h,m,d,x]),{axes:z,areaStyle:G,pointStyle:V,...X}=W,$=Kt(()=>r({seriesOrder:j.seriesOrder,overallOrder:j.overallOrder,highlightTop:x,color:e.color,colorScheme:S,neutralColor:v,themeCategorical:o,themeNeutral:i.colors.textSecondary}),[j.seriesOrder,j.overallOrder,x,e.color,S,v,o,i.colors.textSecondary]),Q=Kt(()=>({ribbon:u,curve:p,samplesPerSegment:f,ribbonSizeRange:y,valueExtent:j.valueExtent,seriesOrder:j.seriesOrder,lineWidth:b,ribbonOpacity:k,lineOpacity:C,neutralColor:v,color:e.color,colorMap:$&&"object"==typeof $&&!Array.isArray($)?$:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,styleRules:A,areaStyle:G,pointStyle:V,labelStyle:w,showPoints:R,pointRadius:L,showLabels:_,labelPriorityAccessor:H,maxLabels:I}),[u,p,f,y,j.valueExtent,j.seriesOrder,b,k,C,v,$,e.color,e.stroke,e.strokeWidth,e.opacity,A,G,V,w,R,L,_,H,I]),{tooltip:K,formatX:Y}=n({tooltip:M,xValues:j.xValues,xFormat:T,yFormat:O}),q=Kt(()=>{if(E)return(e,t)=>{E(e.__bumpRaw??e,t)}},[E]),J=Math.max(1,j.seriesOrder.length),U=j.xValues.map((e,t)=>t),Z=Array.from({length:J},(e,t)=>t+1),ee=z??[{orient:"left",tickValues:Z,tickFormat:e=>e+"",label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:U,tickFormat:Y,label:e.xLabel,tickAnchor:"edges"}],te=Kt(()=>a(e.annotations,j.xValues),[e.annotations,j.xValues]);/* @__PURE__ */
34
- return eo($t,{ref:t,data:j.data,layout:g,layoutConfig:Q,xExtent:[0,Math.max(1,j.xValues.length-1)],yExtent:[J+.5,.5],showAxes:P,showGrid:B,showLegend:F,enableHover:D,hoverHighlight:N,colorBy:"__bumpSeries",colorScheme:$,tooltip:K,onClick:q,hoverRadius:e.hoverRadius,width:e.width,height:e.height,responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,responsiveRules:e.responsiveRules,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,mode:e.mode,margin:e.margin??{top:20,right:_?110:24,bottom:48,left:48},className:e.className,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,selection:e.selection,linkedHover:e.linkedHover,legend:e.legend,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,onObservation:e.onObservation,chartId:e.chartId,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,animate:e.animate,autoPlaceAnnotations:e.autoPlaceAnnotations,annotations:te,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:ee,axisExtent:"exact",...X}})});to.displayName="BumpChart";import{useMemo as oo,forwardRef as io,useRef as ao}from"react";import{useMemo as ro}from"react";import{jsx as lo}from"react/jsx-runtime";de(pe);var no=io(function(e,t){let o=ao(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:m,y0Accessor:d,gradientFill:u=!1,semanticGradient:p,semanticLine:y=!0,lineDataAccessor:f="coordinates",colorBy:g,colorScheme:b,styleRules:v,curve:A="monotoneX",areaOpacity:w=.7,lineGradient:S,showLine:k=!0,lineWidth:C=2,showPoints:R=!1,pointRadius:L=3,tooltip:_,annotations:H,forecast:I,anomaly:P,band:B,xExtent:F,yExtent:D,frameProps:N={},selection:M,linkedHover:W,onObservation:T,onClick:O,hoverHighlight:E,chartId:j,loading:z,loadingContent:G,emptyContent:X,legendInteraction:$,legendPosition:Q,color:K,stroke:Y,strokeWidth:J,opacity:ee}=e,{width:te,height:oe,enableHover:ie,showGrid:ae,showLegend:re,title:le,description:ne,summary:se,accessibleTable:ce,xLabel:me,yLabel:de}=i,ue=oo(()=>qe(a),[a]),pe=g||m,ye=oo(()=>be(p),[p]),Ae=oo(()=>ye?.stops.length?ve(ye):fe(u),[ye,u]),we=oo(()=>ge(S),[S]),Se=oo(()=>y?xe(ye):void 0,[ye,y]);Ze("AreaChart",ue,"xAccessor",c),Ze("AreaChart",ue,"yAccessor",h);let Re=U({data:ue,rawData:a,colorBy:pe,colorScheme:b,legendInteraction:$,legendPosition:Q,frameLegend:N,selection:M,linkedHover:W,fallbackFields:pe?["string"==typeof pe?pe:""]:[],unwrapData:!1,onObservation:T,onClick:O,hoverHighlight:E,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"AreaChart",chartId:j,showLegend:re,userMargin:r,marginDefaults:i.marginDefaults,loading:z,loadingContent:G,emptyContent:X,width:te,height:oe,hasTitle:!!le,axisChrome:dt(N,{showAxes:i.showAxes,xLabel:me,yLabel:de})}),{effectiveData:Le,statisticalAnnotations:_e}=V({data:ue,xAccessor:c,yAccessor:h,forecast:I,anomaly:P,groupBy:m}),He=oo(()=>Ee(c,h),[c,h]),{flattenedData:Ie,lineStyle:Pe,pointStyle:Be,defaultTooltipContent:Fe}=x({safeData:Le,data:a,areaBy:m,lineDataAccessor:f,colorBy:pe,colorScale:Re.colorScale,color:K,stroke:Y,strokeWidth:J,opacity:ee,effectiveSelectionHook:Re.effectiveSelectionHook,resolvedSelection:Re.resolvedSelection,areaOpacity:w,showLine:k,lineWidth:C,showPoints:R,pointRadius:L,xAccessor:c,yAccessor:h,xLabel:me,yLabel:de,xFormat:n,yFormat:s,groupField:m||g,band:B,styleRules:v,ruleContext:He}),De=q({componentName:"AreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),Ne={chartType:"area",...null!=a&&{data:Ie},xAccessor:c,yAccessor:h,groupAccessor:m||void 0,...d&&{y0Accessor:d},...B&&{band:B},...Ae&&{gradientFill:Ae},...we&&{lineGradient:we},...Se&&{semanticLineStops:Se},curve:A,lineStyle:Pe,...R&&Be&&{pointStyle:Be},size:[te,oe],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Re.margin,showAxes:i.showAxes,xLabel:me,yLabel:de,xFormat:n,yFormat:s,enableHover:ie,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:ae,...Re.legendBehaviorProps,...ke({title:le,description:ne,summary:se,accessibleTable:ce,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Ge({tooltip:_,defaultTooltipContent:Fe,multiDefaultContent:$e()}),...Ce({linkedHover:W,selection:M,onObservation:T,onClick:O,hoverHighlight:E,hoverRadius:e.hoverRadius,mobileInteraction:Re.mobileInteraction,customHoverBehavior:Re.customHoverBehavior,customClickBehavior:Re.customClickBehavior}),...(H&&H.length>0||_e.length>0)&&{annotations:[...H||[],..._e]},...F&&{xExtent:F},...D&&{yExtent:D},...Re.crosshairProps,...N};return Re.earlyReturn?Re.earlyReturn:De?/* @__PURE__ */lo(Ke,{componentName:"AreaChart",message:De,width:te,height:oe}):/* @__PURE__ */lo(Ye,{componentName:"AreaChart",width:te,height:oe,children:/* @__PURE__ */lo(he,{ref:o,...Ne})})});no.displayName="AreaChart";import{useMemo as so,forwardRef as co,useRef as ho,useState as mo,useImperativeHandle as uo,useCallback as po}from"react";import{jsx as yo,jsxs as fo}from"react/jsx-runtime";de(ye);var go=co(function(e,t){let o=ho(null),i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",seriesAAccessor:h="a",seriesBAccessor:m="b",seriesALabel:d="A",seriesBLabel:u="B",seriesAColor:p="var(--semiotic-danger, #dc2626)",seriesBColor:y="var(--semiotic-info, #2563eb)",showLines:f=!0,lineWidth:g=1.5,showPoints:b=!1,pointRadius:x=3,curve:A="linear",areaOpacity:w=.6,gradientFill:_,styleRules:H,tooltip:I,annotations:P,xExtent:B,yExtent:F,frameProps:D={},selection:N,linkedHover:M,onObservation:W,onClick:T,hoverHighlight:O,chartId:E,loading:j,loadingContent:z,emptyContent:G,legendInteraction:V,legendPosition:X,pointIdAccessor:$,windowSize:Q}=e,{width:K,height:Y,enableHover:q,showGrid:J,showLegend:Z,title:ee,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,le=so(()=>"function"==typeof c?e=>R(c(e)):e=>R(e[c]),[c]),ne=so(()=>"function"==typeof h?e=>R(h(e)):e=>R(e[h]),[h]),se=so(()=>"function"==typeof m?e=>R(m(e)):e=>R(e[m]),[m]),[ce,me]=mo([]),de=ho([]),ue=null==a,pe=so(()=>qe(ue?ce:a),[ue,ce,a]),ye=so(()=>v(pe,le,ne,se),[pe,le,ne,se]),ge=so(()=>f?L(pe,le,ne,se):[],[f,pe,le,ne,se]),be=so(()=>[...ye,...ge],[ye,ge]),xe=so(()=>{let e=/* @__PURE__ */new Set;for(let t of ye)e.add(t.__diffSegment);return Array.from(e)},[ye]);uo(t,()=>{let e=e=>{let t=Q&&e.length>Q?e.slice(e.length-Q):e;de.current=t,me(t)},t=$?"function"==typeof $?$:e=>e[$]:null;return{push:t=>e([...de.current,t]),pushMany:t=>e([...de.current,...t]),remove:o=>{if(!t)return[];let i=Array.isArray(o)?o:[o],a=[],r=[];for(let e of de.current)i.includes(t(e))?a.push(e):r.push(e);return e(r),a},update:(o,i)=>{if(!t)return[];let a=Array.isArray(o)?o:[o],r=[],l=de.current.map(e=>{if(a.includes(t(e))){let t=i(e);return r.push(t),t}return e});return e(l),r},clear:()=>e([]),getData:()=>ue?de.current:pe,getScales:()=>o.current?.getScales()??null}},[ue,pe,$,Q]);let ve=so(()=>!1===Z?void 0:{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:d,color:p},{label:u,color:y}]}]},[Z,d,u,p,y]),Ae=Object.hasOwn(D,"legend")?D:{...D,legend:ve},we=U({data:pe,rawData:a,colorBy:"__diffWinner",colorScheme:[p,y],legendInteraction:V,legendPosition:X,frameLegend:Ae,selection:N,linkedHover:M,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:W,onClick:T,hoverHighlight:O,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DifferenceChart",chartId:E,showLegend:Z,userMargin:r,marginDefaults:i.marginDefaults,loading:j,loadingContent:z,emptyContent:G,width:K,height:Y,hasTitle:!!ee,axisChrome:dt(D,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),Se=so(()=>S({seriesAColor:p,seriesBColor:y,areaOpacity:w,styleRules:H}),[p,y,w,H]),Re=so(()=>k({seriesAColor:p,seriesBColor:y,lineWidth:g,styleRules:H}),[p,y,g,H]),Le=so(()=>C({seriesAColor:p,seriesBColor:y,pointRadius:x,styleRules:H}),[p,y,x,H]),[_e,He,Ie]=so(()=>[Se,Re,Le].map(e=>tt(e,we.effectiveSelectionHook,we.resolvedSelection)),[Se,Re,Le,we.effectiveSelectionHook,we.resolvedSelection]),Pe=po(e=>{let t=e.data,o=e.allSeries,i=e.xValue??t?.__x,a=t?.__valA,r=t?.__valB;if(o&&o.length>0){let e=o.find(e=>"line-A"===e.group),t=o.find(e=>"line-B"===e.group);null!=e?.value&&Number.isFinite(e.value)&&(a=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=i&&(null==a||null==r)){let e=pe.find(e=>le(e)===i);e&&(null==a&&(a=ne(e)),null==r&&(r=se(e)))}let l=e=>null!=e&&Number.isFinite(e)?""+Math.round(100*e)/100:"—",s=n&&null!=i?n(i):null!=i?i+"":"";/* @__PURE__ */
32
+ return jt(Et,{children:n})},[y]),me=Wt(()=>[ce],[ce]),de=Wt(()=>e=>{let o=ae.get(e),i=o?.idx??0,a=o?.total??1;return{fill:a>0?t(i,a):"#6366f1",stroke:"white",strokeWidth:1,r:y,fillOpacity:1}},[y,ae]),ue=Wt(()=>Ee(h,m),[h,m]),pe=G({colorScale:void 0,baseStyleExtras:de,stroke:T,strokeWidth:O,opacity:E,styleRules:p,ruleContext:ue,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ye=u||("string"==typeof d?d:"Order"),fe=Wt(()=>Se([{label:te||Ae(h),accessor:h,role:"x",format:s},{label:oe||Ae(m),accessor:m,role:"y",format:c},...d?[{label:ye,accessor:d,role:"group"}]:[]]),[h,m,te,oe,d,ye,s,c]),ge=q({componentName:"ConnectedScatterplot",data:r,accessors:{xAccessor:h,yAccessor:m}}),{effectiveData:be,statisticalAnnotations:xe}=V({data:ie,xAccessor:h,yAccessor:m,forecast:v,anomaly:A});if(re.earlyReturn)return re.earlyReturn;let ve=Y(x),we=ve||xe.length>0?[...ve?[ve]:[],...b||[],...xe]:b,Le={chartType:"scatter",...null!=r&&{data:be},xAccessor:h,yAccessor:m,pointStyle:pe,size:[j,z],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,showAxes:a.showAxes,xLabel:te,yLabel:oe,xFormat:s,yFormat:c,enableHover:X,showGrid:$,...ke({title:Q,description:K,summary:J,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:f,defaultTooltipContent:fe}),...Ce({linkedHover:H,selection:_,onObservation:I,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...g&&{pointIdAccessor:g},...k&&{pulse:k},...C&&{decay:C},...R&&{staleness:R},canvasPreRenderers:se,svgPreRenderers:me,...we&&we.length>0&&{annotations:we},...w&&{xExtent:w},...S&&{yExtent:S},...re.crosshairProps,...L};return ge?/* @__PURE__ */jt(Qe,{componentName:"ConnectedScatterplot",message:ge,width:j,height:z}):/* @__PURE__ */jt(Ke,{componentName:"ConnectedScatterplot",width:j,height:z,children:/* @__PURE__ */jt(he,{ref:i,...Le})})});zt.displayName="ConnectedScatterplot";import{forwardRef as Gt,useMemo as Vt}from"react";import{jsx as Xt}from"react/jsx-runtime";de(ne);var $t=Gt(function(e,t){let{data:o,layout:i,layoutConfig:a,onLayoutError:r,xExtent:l,yExtent:n,showAxes:s=!1,margin:c,className:h,annotations:m,onObservation:d,onClick:u,selection:p,linkedHover:y,hoverHighlight:f,chartId:g,loading:b,loadingContent:x,emptyContent:v,colorBy:A,colorScheme:w,legend:S,legendInteraction:k,legendPosition:C,frameProps:R={}}=e,{legend:L,..._}=R,H=Vt(()=>nt(L,S),[L,S]),{frameRef:I,resolved:P,safeData:B,setup:F,earlyReturn:D}=K({imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"XYCustomChart",unwrapData:!1,data:o,colorBy:A,colorScheme:w,legend:H,legendInteraction:k,legendPosition:C,frameLegend:_,selection:p,linkedHover:y,hoverHighlight:f,onObservation:d,onClick:u,chartId:g,loading:b,loadingContent:x,emptyContent:v,margin:c,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules,xLabel:e.xLabel,yLabel:e.yLabel}),N=F.effectiveSelectionHook,M=Vt(()=>N?.isActive?{isActive:!0,predicate:N.predicate}:null,[N?.isActive,N?.predicate]),W=Vt(()=>Ge({tooltip:e.tooltip,defaultTooltipContent:e=>/* @__PURE__ */Xt(ce,{hover:e})}),[e.tooltip]);if(D)return D;let{width:T,height:O,enableHover:E,showGrid:j,title:z,description:G,summary:V,accessibleTable:X,xLabel:$,yLabel:Y}=P,Q={chartType:"custom",...null!=o&&{data:B},customLayout:i,layoutConfig:a,onLayoutError:r,...M&&{layoutSelection:M},xExtent:l,yExtent:n,colorAccessor:A,colorScheme:w,size:[T,O],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:F.margin,showAxes:s,xLabel:$,yLabel:Y,enableHover:E,showGrid:j,...F.legendBehaviorProps,...ke({title:z,description:G,summary:V,accessibleTable:X,className:h,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...W,...Ce({linkedHover:y,selection:p,onObservation:d,onClick:u,hoverRadius:e.hoverRadius,hoverHighlight:f,mobileInteraction:F.mobileInteraction,customHoverBehavior:F.customHoverBehavior,customClickBehavior:F.customClickBehavior}),...m&&m.length>0&&{annotations:m},...F.crosshairProps,..._};/* @__PURE__ */
33
+ return Xt(Ke,{componentName:"XYCustomChart",width:T,height:O,children:/* @__PURE__ */Xt(he,{ref:I,...Q})})});$t.displayName="XYCustomChart";import{forwardRef as Yt,useMemo as Qt}from"react";import{useCallback as Kt,useMemo as qt}from"react";import{jsx as Jt,jsxs as Ut}from"react/jsx-runtime";import{jsx as Zt}from"react/jsx-runtime";import{jsx as eo}from"react/jsx-runtime";var to=Yt(function(e,t){let o=Be(),i=kt(),{data:s,xAccessor:c,yAccessor:h,lineBy:m,rankDirection:d="descending",ribbon:u=!1,curve:p="smooth",ribbonSizeRange:y=[4,28],samplesPerSegment:f=12,lineWidth:b=3,highlightTop:x,neutralColor:v,styleRules:A,labelStyle:w,colorScheme:S,ribbonOpacity:k=.82,lineOpacity:C=.9,showPoints:R=!1,pointRadius:L=3,showLabels:_=!0,labelPriorityAccessor:H,maxLabels:I,showAxes:P=!0,showGrid:B=!0,showLegend:F=!1,enableHover:D=!0,hoverHighlight:N=!0,tooltip:M,frameProps:W={},xFormat:T,yFormat:O,onClick:E}=e,j=Qt(()=>l(s,{xAccessor:c,yAccessor:h,lineBy:m,rankDirection:d,highlightTop:x}),[s,c,h,m,d,x]),{axes:z,areaStyle:G,pointStyle:V,...X}=W,$=Qt(()=>r({seriesOrder:j.seriesOrder,overallOrder:j.overallOrder,highlightTop:x,color:e.color,colorScheme:S,neutralColor:v,themeCategorical:o,themeNeutral:i.colors.textSecondary}),[j.seriesOrder,j.overallOrder,x,e.color,S,v,o,i.colors.textSecondary]),Y=Qt(()=>({ribbon:u,curve:p,samplesPerSegment:f,ribbonSizeRange:y,valueExtent:j.valueExtent,seriesOrder:j.seriesOrder,lineWidth:b,ribbonOpacity:k,lineOpacity:C,neutralColor:v,color:e.color,colorMap:$&&"object"==typeof $&&!Array.isArray($)?$:void 0,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,styleRules:A,areaStyle:G,pointStyle:V,labelStyle:w,showPoints:R,pointRadius:L,showLabels:_,labelPriorityAccessor:H,maxLabels:I}),[u,p,f,y,j.valueExtent,j.seriesOrder,b,k,C,v,$,e.color,e.stroke,e.strokeWidth,e.opacity,A,G,V,w,R,L,_,H,I]),{tooltip:Q,formatX:K}=n({tooltip:M,xValues:j.xValues,xFormat:T,yFormat:O}),q=Qt(()=>{if(E)return(e,t)=>{E(e.__bumpRaw??e,t)}},[E]),J=Math.max(1,j.seriesOrder.length),U=j.xValues.map((e,t)=>t),Z=Array.from({length:J},(e,t)=>t+1),ee=z??[{orient:"left",tickValues:Z,tickFormat:e=>e+"",label:e.yLabel??"Rank",baseline:!1},{orient:"bottom",tickValues:U,tickFormat:K,label:e.xLabel,tickAnchor:"edges"}],te=Qt(()=>a(e.annotations,j.xValues),[e.annotations,j.xValues]);/* @__PURE__ */
34
+ return eo($t,{ref:t,data:j.data,layout:g,layoutConfig:Y,xExtent:[0,Math.max(1,j.xValues.length-1)],yExtent:[J+.5,.5],showAxes:P,showGrid:B,showLegend:F,enableHover:D,hoverHighlight:N,colorBy:"__bumpSeries",colorScheme:$,tooltip:Q,onClick:q,hoverRadius:e.hoverRadius,width:e.width,height:e.height,responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,responsiveRules:e.responsiveRules,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,mode:e.mode,margin:e.margin??{top:20,right:_?110:24,bottom:48,left:48},className:e.className,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,selection:e.selection,linkedHover:e.linkedHover,legend:e.legend,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,onObservation:e.onObservation,chartId:e.chartId,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,animate:e.animate,autoPlaceAnnotations:e.autoPlaceAnnotations,annotations:te,xLabel:e.xLabel,yLabel:e.yLabel??"Rank",frameProps:{axes:ee,axisExtent:"exact",...X}})});to.displayName="BumpChart";import{useMemo as oo,forwardRef as io,useRef as ao}from"react";import{useMemo as ro}from"react";import{jsx as lo}from"react/jsx-runtime";de(pe);var no=io(function(e,t){let o=ao(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:m,y0Accessor:d,gradientFill:u=!1,semanticGradient:p,semanticLine:y=!0,lineDataAccessor:f="coordinates",colorBy:g,colorScheme:b,styleRules:v,curve:A="monotoneX",areaOpacity:w=.7,lineGradient:S,showLine:k=!0,lineWidth:C=2,showPoints:R=!1,pointRadius:L=3,tooltip:_,annotations:H,forecast:I,anomaly:P,band:B,xExtent:F,yExtent:D,frameProps:N={},selection:M,linkedHover:W,onObservation:T,onClick:O,hoverHighlight:E,chartId:j,loading:z,loadingContent:G,emptyContent:X,legendInteraction:$,legendPosition:Y,color:Q,stroke:K,strokeWidth:J,opacity:ee}=e,{width:te,height:oe,enableHover:ie,showGrid:ae,showLegend:re,title:le,description:ne,summary:se,accessibleTable:ce,xLabel:me,yLabel:de}=i,ue=oo(()=>qe(a),[a]),pe=g||m,ye=oo(()=>be(p),[p]),Ae=oo(()=>ye?.stops.length?ve(ye):fe(u),[ye,u]),we=oo(()=>ge(S),[S]),Se=oo(()=>y?xe(ye):void 0,[ye,y]);Ze("AreaChart",ue,"xAccessor",c),Ze("AreaChart",ue,"yAccessor",h);let Re=U({data:ue,rawData:a,colorBy:pe,colorScheme:b,legendInteraction:$,legendPosition:Y,frameLegend:N,selection:M,linkedHover:W,fallbackFields:pe?["string"==typeof pe?pe:""]:[],unwrapData:!1,onObservation:T,onClick:O,hoverHighlight:E,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"AreaChart",chartId:j,showLegend:re,userMargin:r,marginDefaults:i.marginDefaults,loading:z,loadingContent:G,emptyContent:X,width:te,height:oe,hasTitle:!!le,axisChrome:mt(N,{showAxes:i.showAxes,xLabel:me,yLabel:de})}),{effectiveData:Le,statisticalAnnotations:_e}=V({data:ue,xAccessor:c,yAccessor:h,forecast:I,anomaly:P,groupBy:m}),He=oo(()=>Ee(c,h),[c,h]),{flattenedData:Ie,lineStyle:Pe,pointStyle:Be,defaultTooltipContent:Fe}=x({safeData:Le,data:a,areaBy:m,lineDataAccessor:f,colorBy:pe,colorScale:Re.colorScale,color:Q,stroke:K,strokeWidth:J,opacity:ee,effectiveSelectionHook:Re.effectiveSelectionHook,resolvedSelection:Re.resolvedSelection,areaOpacity:w,showLine:k,lineWidth:C,showPoints:R,pointRadius:L,xAccessor:c,yAccessor:h,xLabel:me,yLabel:de,xFormat:n,yFormat:s,groupField:m||g,band:B,styleRules:v,ruleContext:He}),De=q({componentName:"AreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),Ne={chartType:"area",...null!=a&&{data:Ie},xAccessor:c,yAccessor:h,groupAccessor:m||void 0,...d&&{y0Accessor:d},...B&&{band:B},...Ae&&{gradientFill:Ae},...we&&{lineGradient:we},...Se&&{semanticLineStops:Se},curve:A,lineStyle:Pe,...R&&Be&&{pointStyle:Be},size:[te,oe],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Re.margin,showAxes:i.showAxes,xLabel:me,yLabel:de,xFormat:n,yFormat:s,enableHover:ie,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:ae,...Re.legendBehaviorProps,...ke({title:le,description:ne,summary:se,accessibleTable:ce,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Ge({tooltip:_,defaultTooltipContent:Fe,multiDefaultContent:Xe()}),...Ce({linkedHover:W,selection:M,onObservation:T,onClick:O,hoverHighlight:E,hoverRadius:e.hoverRadius,mobileInteraction:Re.mobileInteraction,customHoverBehavior:Re.customHoverBehavior,customClickBehavior:Re.customClickBehavior}),...(H&&H.length>0||_e.length>0)&&{annotations:[...H||[],..._e]},...F&&{xExtent:F},...D&&{yExtent:D},...Re.crosshairProps,...N};return Re.earlyReturn?Re.earlyReturn:De?/* @__PURE__ */lo(Qe,{componentName:"AreaChart",message:De,width:te,height:oe}):/* @__PURE__ */lo(Ke,{componentName:"AreaChart",width:te,height:oe,children:/* @__PURE__ */lo(he,{ref:o,...Ne})})});no.displayName="AreaChart";import{useMemo as so,forwardRef as co,useRef as ho,useState as mo,useImperativeHandle as uo,useCallback as po}from"react";import{jsx as yo,jsxs as fo}from"react/jsx-runtime";de(ye);var go=co(function(e,t){let o=ho(null),i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",seriesAAccessor:h="a",seriesBAccessor:m="b",seriesALabel:d="A",seriesBLabel:u="B",seriesAColor:p="var(--semiotic-danger, #dc2626)",seriesBColor:y="var(--semiotic-info, #2563eb)",showLines:f=!0,lineWidth:g=1.5,showPoints:b=!1,pointRadius:x=3,curve:A="linear",areaOpacity:w=.6,gradientFill:_,styleRules:H,tooltip:I,annotations:P,xExtent:B,yExtent:F,frameProps:D={},selection:N,linkedHover:M,onObservation:W,onClick:T,hoverHighlight:O,chartId:E,loading:j,loadingContent:z,emptyContent:G,legendInteraction:V,legendPosition:X,pointIdAccessor:$,windowSize:Y}=e,{width:Q,height:K,enableHover:q,showGrid:J,showLegend:Z,title:ee,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,le=so(()=>"function"==typeof c?e=>R(c(e)):e=>R(e[c]),[c]),ne=so(()=>"function"==typeof h?e=>R(h(e)):e=>R(e[h]),[h]),se=so(()=>"function"==typeof m?e=>R(m(e)):e=>R(e[m]),[m]),[ce,me]=mo([]),de=ho([]),ue=null==a,pe=so(()=>qe(ue?ce:a),[ue,ce,a]),ye=so(()=>v(pe,le,ne,se),[pe,le,ne,se]),ge=so(()=>f?L(pe,le,ne,se):[],[f,pe,le,ne,se]),be=so(()=>[...ye,...ge],[ye,ge]),xe=so(()=>{let e=/* @__PURE__ */new Set;for(let t of ye)e.add(t.__diffSegment);return Array.from(e)},[ye]);uo(t,()=>{let e=e=>{let t=Y&&e.length>Y?e.slice(e.length-Y):e;de.current=t,me(t)},t=$?"function"==typeof $?$:e=>e[$]:null;return{push:t=>e([...de.current,t]),pushMany:t=>e([...de.current,...t]),remove:o=>{if(!t)return[];let i=Array.isArray(o)?o:[o],a=[],r=[];for(let e of de.current)i.includes(t(e))?a.push(e):r.push(e);return e(r),a},update:(o,i)=>{if(!t)return[];let a=Array.isArray(o)?o:[o],r=[],l=de.current.map(e=>{if(a.includes(t(e))){let t=i(e);return r.push(t),t}return e});return e(l),r},clear:()=>e([]),getData:()=>ue?de.current:pe,getScales:()=>o.current?.getScales()??null}},[ue,pe,$,Y]);let ve=so(()=>!1===Z?void 0:{legendGroups:[{label:"",type:"fill",styleFn:e=>({fill:e.color||"currentColor"}),items:[{label:d,color:p},{label:u,color:y}]}]},[Z,d,u,p,y]),Ae=Object.hasOwn(D,"legend")?D:{...D,legend:ve},we=U({data:pe,rawData:a,colorBy:"__diffWinner",colorScheme:[p,y],legendInteraction:V,legendPosition:X,frameLegend:Ae,selection:N,linkedHover:M,fallbackFields:["__diffWinner"],unwrapData:!1,onObservation:W,onClick:T,hoverHighlight:O,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"DifferenceChart",chartId:E,showLegend:Z,userMargin:r,marginDefaults:i.marginDefaults,loading:j,loadingContent:z,emptyContent:G,width:Q,height:K,hasTitle:!!ee,axisChrome:mt(D,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),Se=so(()=>S({seriesAColor:p,seriesBColor:y,areaOpacity:w,styleRules:H}),[p,y,w,H]),Re=so(()=>k({seriesAColor:p,seriesBColor:y,lineWidth:g,styleRules:H}),[p,y,g,H]),Le=so(()=>C({seriesAColor:p,seriesBColor:y,pointRadius:x,styleRules:H}),[p,y,x,H]),[_e,He,Ie]=so(()=>[Se,Re,Le].map(e=>tt(e,we.effectiveSelectionHook,we.resolvedSelection)),[Se,Re,Le,we.effectiveSelectionHook,we.resolvedSelection]),Pe=po(e=>{let t=e.data,o=e.allSeries,i=e.xValue??t?.__x,a=t?.__valA,r=t?.__valB;if(o&&o.length>0){let e=o.find(e=>"line-A"===e.group),t=o.find(e=>"line-B"===e.group);null!=e?.value&&Number.isFinite(e.value)&&(a=e.value),null!=t?.value&&Number.isFinite(t.value)&&(r=t.value)}if(null!=i&&(null==a||null==r)){let e=pe.find(e=>le(e)===i);e&&(null==a&&(a=ne(e)),null==r&&(r=se(e)))}let l=e=>null!=e&&Number.isFinite(e)?""+Math.round(100*e)/100:"—",s=n&&null!=i?n(i):null!=i?i+"":"";/* @__PURE__ */
35
35
  return fo("div",{className:"semiotic-tooltip",style:ht,children:[s&&/* @__PURE__ */yo("div",{style:{fontWeight:600,marginBottom:4},children:s}),
36
36
  /* @__PURE__ */fo("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
37
37
  /* @__PURE__ */yo("span",{style:{width:10,height:10,background:p,display:"inline-block",borderRadius:2}}),
38
38
  /* @__PURE__ */fo("span",{children:[d,": ",l(a)]})]}),
39
39
  /* @__PURE__ */fo("div",{style:{display:"flex",alignItems:"center",gap:6},children:[
40
40
  /* @__PURE__ */yo("span",{style:{width:10,height:10,background:y,display:"inline-block",borderRadius:2}}),
41
- /* @__PURE__ */fo("span",{children:[u,": ",l(r)]})]}),null!=a&&null!=r&&Number.isFinite(a)&&Number.isFinite(r)&&/* @__PURE__ */fo("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",l(a-r)]})]})},[pe,le,ne,se,n,p,y,d,u]),{tooltipContent:Be,tooltipMode:Fe}=so(()=>Ge({tooltip:I,defaultTooltipContent:Pe,multiDefaultContent:Pe}),[I,Pe]),De=so(()=>fe(_,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[_]);if(we.earlyReturn)return we.earlyReturn;let Ne={chartType:"mixed",data:be,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:xe,curve:A,areaStyle:_e,lineStyle:He,...b&&{pointStyle:Ie},size:[K,Y],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:we.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:n,yFormat:s,enableHover:q,showGrid:J,...De&&{gradientFill:De},...we.legendBehaviorProps,...ke({title:ee,description:te,summary:oe,accessibleTable:ie,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:Be,..."multi"===Fe&&{tooltipMode:"multi"},...Ce({linkedHover:M,selection:N,onObservation:W,onClick:T,hoverHighlight:O,hoverRadius:e.hoverRadius,mobileInteraction:we.mobileInteraction,customHoverBehavior:we.customHoverBehavior,customClickBehavior:we.customClickBehavior}),...P&&P.length>0&&{annotations:P},...B&&{xExtent:B},...F&&{yExtent:F},...we.crosshairProps,...D};/* @__PURE__ */
42
- return yo(Ye,{componentName:"DifferenceChart",width:K,height:Y,children:/* @__PURE__ */yo(he,{ref:o,...Ne})})});"function"==typeof go&&(go.displayName="DifferenceChart");import{useMemo as bo,forwardRef as xo,useRef as vo}from"react";import{jsx as Ao}from"react/jsx-runtime";de(te);var wo=xo(function(e,t){let o=vo(null),i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:m,lineDataAccessor:d="coordinates",colorBy:u,colorScheme:p,styleRules:y,curve:f="monotoneX",areaOpacity:g=.7,showLine:b=!0,lineWidth:v=2,showPoints:A=!1,pointRadius:w=3,normalize:S=!1,baseline:k="zero",stackOrder:C,tooltip:R,annotations:L,xExtent:_,yExtent:H,frameProps:I={},selection:P,linkedHover:B,onObservation:F,onClick:D,hoverHighlight:N,chartId:M,loading:W,loadingContent:T,emptyContent:O,legendInteraction:E,legendPosition:j,color:z,stroke:G,strokeWidth:V,opacity:X}=e,{width:$,height:Q,enableHover:K,showGrid:Y,showLegend:J,title:ee,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,le=bo(()=>qe(a),[a]),ne=u||m;Z(t,{variant:"xy",frameRef:o});let se=U({data:le,rawData:a,colorBy:ne,colorScheme:p,legendInteraction:E,legendPosition:j,frameLegend:I,selection:P,linkedHover:B,fallbackFields:ne?["string"==typeof ne?ne:""]:[],unwrapData:!1,onObservation:F,onClick:D,hoverHighlight:N,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedAreaChart",chartId:M,showLegend:J,userMargin:r,marginDefaults:i.marginDefaults,loading:W,loadingContent:T,emptyContent:O,width:$,height:Q,hasTitle:!!ee,axisChrome:dt(I,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),ce=bo(()=>Ee(c,h),[c,h]),{flattenedData:me,lineStyle:de,pointStyle:ue,defaultTooltipContent:pe}=x({safeData:le,data:a,areaBy:m,lineDataAccessor:d,colorBy:ne,colorScale:se.colorScale,color:z,stroke:G,strokeWidth:V,opacity:X,effectiveSelectionHook:se.effectiveSelectionHook,resolvedSelection:se.resolvedSelection,areaOpacity:g,showLine:b,lineWidth:v,showPoints:A,pointRadius:w,xAccessor:c,yAccessor:h,xLabel:ae,yLabel:re,xFormat:n,yFormat:s,groupField:m||u,styleRules:y,ruleContext:ce}),ye=q({componentName:"StackedAreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),fe={chartType:"stackedarea",...null!=a&&{data:me},xAccessor:c,yAccessor:h,groupAccessor:m||void 0,curve:f,normalize:S,baseline:S?"zero":k,stackOrder:C,lineStyle:de,...A&&ue&&{pointStyle:ue},size:[$,Q],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:se.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:n,yFormat:s,enableHover:K,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:Y,...se.legendBehaviorProps,...ke({title:ee,description:te,summary:oe,accessibleTable:ie,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Ge({tooltip:R,defaultTooltipContent:pe,multiDefaultContent:$e()}),...Ce({linkedHover:B,selection:P,onObservation:F,onClick:D,hoverHighlight:N,hoverRadius:e.hoverRadius,mobileInteraction:se.mobileInteraction,customHoverBehavior:se.customHoverBehavior,customClickBehavior:se.customClickBehavior}),...L&&L.length>0&&{annotations:L},..._&&{xExtent:_},...H&&{yExtent:H},...se.crosshairProps,...I};return se.earlyReturn?se.earlyReturn:ye?/* @__PURE__ */Ao(Ke,{componentName:"StackedAreaChart",message:ye,width:$,height:Q}):/* @__PURE__ */Ao(Ye,{componentName:"StackedAreaChart",width:$,height:Q,children:/* @__PURE__ */Ao(he,{ref:o,...fe})})});wo.displayName="StackedAreaChart";import{useMemo as So,forwardRef as ko,useRef as Co}from"react";import{scaleSequential as Ro}from"d3-scale";import{jsx as Lo}from"react/jsx-runtime";de(ae);var _o=ko(function(e,t){let o=Co(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:void 0,enableHover:e.enableHover,showLegend:void 0,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xAccessor:n="x",yAccessor:s="y",valueAccessor:c="value",xFormat:h,yFormat:m,colorScheme:d,customColorScale:u,showValues:p=!1,valueFormat:y,cellBorderColor:f="#fff",cellBorderWidth:g=1,tooltip:b,annotations:x,heatmapAggregation:v,heatmapXBins:A,heatmapYBins:w,styleRules:S,xExtent:k,yExtent:C,frameProps:R={},selection:L,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:P,chartId:B,loading:F,loadingContent:D,emptyContent:N,showLegend:M,legendPosition:W,legend:T,legendInteraction:O}=e,{width:E,height:j,enableHover:z,title:G,description:V,summary:X,accessibleTable:$,xLabel:Q,yLabel:K}=i,Y=Ue(F,E,j,D),U=Y?null:Je(a,E,j,N),te=So(()=>qe(a),[a]),oe=Fe(),ie=("string"==typeof R.colorScheme?R.colorScheme:void 0)??d??oe??"blues",ae="function"==typeof R.heatmapColorScale?R.heatmapColorScale:"custom"===ie&&"function"==typeof u?u:void 0,re=M??!1,le=W??"right",{activeSelectionHook:ne,customHoverBehavior:se,customClickBehavior:ce,crosshairSourceId:me}=Me({selection:L,linkedHover:_,fallbackFields:[],onObservation:H,onClick:I,chartType:"Heatmap",chartId:B,hoverHighlight:P,colorByField:void 0,mobileInteraction:i.mobileInteraction}),de=J(L),ue=We(_,me);Pe(O,void 0,[]);let pe=So(()=>"function"==typeof c?e=>c(e):e=>e[c],[c]),ye=So(()=>{let e=te.map(pe);return Ct(e)},[te,pe]),fe=So(()=>{if(ae)return ae;let e=yt(ie);return Ro(e).domain(ye)},[ie,ae,ye]),ge=So(()=>{let e=Number.isFinite(g)?Math.max(0,g):1;return()=>({stroke:f,strokeWidth:e})},[f,g]),be=So(()=>ee(n,s,c),[n,s,c]),xe=So(()=>Xe(ge,S,be),[ge,S,be]),ve=So(()=>tt(xe,ne,de),[ne,xe,de]),we=So(()=>Se([{label:Q||Ae(n),accessor:n,role:"x",format:h},{label:K||Ae(s),accessor:s,role:"y",format:m},{label:Ae(c),accessor:c,role:"value",format:y}]),[n,s,Q,K,c,h,m,y]),Le=q({componentName:"Heatmap",data:a,accessors:{xAccessor:n,yAccessor:s,valueAccessor:c}}),_e=So(()=>re?{gradient:{colorFn:e=>fe(e),domain:ye,label:"string"==typeof c?c:"value",format:y},legendDistance:T?.legendDistance}:void 0,[re,fe,ye,c,y,T?.legendDistance]),{margin:Ie,legend:Be,legendPosition:De,legendMarginReserved:Ne}=He({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:le,userMargin:r,defaults:i.marginDefaults,additionalLegend:_e,chartWidth:E,chartHeight:j,legendLayout:R.legendLayout,frameLegend:R,hasTitle:!!G,axisChrome:dt(R,{showAxes:i.showAxes,xLabel:Q,yLabel:K})}),Oe={chartType:"heatmap",...null!=a&&{data:te},xAccessor:n,yAccessor:s,valueAccessor:c,colorScheme:"custom"!==ie?ie:void 0,...ae&&{heatmapColorScale:ae},areaStyle:ve,showValues:p,heatmapValueFormat:y,size:[E,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Ie,showAxes:i.showAxes,xLabel:Q,yLabel:K,xFormat:h,yFormat:m,enableHover:z,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Be&&{legend:Be,legendPosition:De},...Ne&&{__legendMarginReservedFor:Be},...ke({title:G,description:V,summary:X,accessibleTable:$,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:b,defaultTooltipContent:we}),...Ce({linkedHover:_,selection:L,onObservation:H,onClick:I,hoverHighlight:P,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:se,customClickBehavior:ce}),...x&&x.length>0&&{annotations:x},...v&&{heatmapAggregation:v},...null!=A&&{heatmapXBins:A},...null!=w&&{heatmapYBins:w},...k&&{xExtent:k},...C&&{yExtent:C},...ue,...R};return Y||U||(Le?/* @__PURE__ */Lo(Ke,{componentName:"Heatmap",message:Le,width:E,height:j}):/* @__PURE__ */Lo(Ye,{componentName:"Heatmap",width:E,height:j,children:/* @__PURE__ */Lo(he,{ref:o,...Oe})}))});_o.displayName="Heatmap";import{useMemo as Ho,useCallback as Io,forwardRef as Po,useRef as Bo}from"react";import{jsx as Fo}from"react/jsx-runtime";se(z),de(ie);var Do=Po(function(t,o){let i=Bo(null),a=Te(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:r,margin:l,className:n,xFormat:s,yFormat:c,xAccessor:h="x",yAccessor:m="y",sizeBy:d,sizeRange:u=[5,40],colorBy:p,colorScheme:y,styleRules:f,bubbleOpacity:g=.6,bubbleStrokeWidth:b=1,bubbleStrokeColor:x="white",tooltip:v,marginalGraphics:A,pointIdAccessor:w,annotations:S,regression:k,xExtent:C,yExtent:R,pulse:L,decay:_,staleness:H,frameProps:I={},selection:P,linkedHover:B,linkedBrush:F,brush:D,onBrush:N,onObservation:M,onClick:W,hoverHighlight:T,chartId:O,loading:E,loadingContent:j,emptyContent:z,legendInteraction:V,legendPosition:X,color:$,stroke:K,strokeWidth:Y,opacity:J}=t,{width:ee,height:te,enableHover:oe,showGrid:ie,showLegend:ae,title:re,description:le,summary:ne,accessibleTable:se,xLabel:ce,yLabel:de}=a,ue=Ho(()=>qe(r),[r]),pe=void 0===r,ye=U({data:ue,rawData:r,colorBy:p,colorScheme:y,legendInteraction:V,legendPosition:X,frameLegend:I,selection:P,linkedHover:B,fallbackFields:p?["string"==typeof p?p:""]:[],unwrapData:!1,onObservation:M,onClick:W,hoverHighlight:T,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"BubbleChart",chartId:O,showLegend:ae,userMargin:l,marginDefaults:a.marginDefaults,loading:E,loadingContent:j,emptyContent:z,width:ee,height:te,hasTitle:!!re,axisChrome:dt(I,{showAxes:a.showAxes,xLabel:ce,yLabel:de})}),{domain:fe,trackPushed:ge,reset:be}=e({accessor:d,data:ue,isPushMode:pe}),xe=Io(e=>{ge([e]),i.current?.push(e)},[ge]),ve=Io(e=>{ge(e),i.current?.pushMany(e)},[ge]);Z(o,{variant:"xy",frameRef:i,overrides:{push:xe,pushMany:ve,clear:()=>{be(),i.current?.clear()}}});let{brushStreamProps:we}=me({brush:D,onBrush:N,linkedBrush:F,xAccessor:h,yAccessor:m,defaultDimension:"xy"}),Le=Ho(()=>({stroke:x,strokeWidth:b}),[x,b]),_e=Ho(()=>fe??[0,1],[fe]),He=Io(e=>At(e,d,u,_e),[d,u,_e]),Ie=Ho(()=>Ee(h,m),[h,m]),Pe=G({colorBy:p,colorScale:ye.colorScale,color:$,fillOpacity:g,radiusFn:He,baseStyleExtras:Le,stroke:K,strokeWidth:Y,opacity:J,styleRules:f,ruleContext:Ie,effectiveSelectionHook:ye.effectiveSelectionHook,resolvedSelection:ye.resolvedSelection}),Be=Ho(()=>Se([{label:ce||Ae(h),accessor:h,role:"x",format:s},{label:de||Ae(m),accessor:m,role:"y",format:c},{label:Ae(d),accessor:d,role:"size"},...p?[{label:Ae(p),accessor:p,role:"color"}]:[]]),[h,m,ce,de,d,p,s,c]);if(ye.earlyReturn)return ye.earlyReturn;let Fe=q({componentName:"BubbleChart",data:r,accessors:{xAccessor:h,yAccessor:m},requiredProps:{sizeBy:d}});if(Fe)/* @__PURE__ */return Fo(Ke,{componentName:"BubbleChart",message:Fe,width:ee,height:te});let De=Q(k),Ne=De?[De,...S||[]]:S,Me={chartType:"bubble",...null!=r&&{data:ue},xAccessor:h,yAccessor:m,colorAccessor:p||void 0,sizeAccessor:d,sizeRange:u,pointStyle:Pe,colorScheme:y,size:[ee,te],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:ye.margin,showAxes:a.showAxes,xLabel:ce,yLabel:de,xFormat:s,yFormat:c,enableHover:oe,showGrid:ie,...ye.legendBehaviorProps,...ke({title:re,description:le,summary:ne,accessibleTable:se,className:n,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...Re({tooltip:v,defaultTooltipContent:Be}),...Ce({linkedHover:B,selection:P,onObservation:M,onClick:W,hoverHighlight:T,hoverRadius:t.hoverRadius,mobileInteraction:ye.mobileInteraction,customHoverBehavior:ye.customHoverBehavior,customClickBehavior:ye.customClickBehavior}),...A&&{marginalGraphics:A},...w&&{pointIdAccessor:w},...L&&{pulse:L},..._&&{decay:_},...H&&{staleness:H},...Ne&&Ne.length>0&&{annotations:Ne},...C&&{xExtent:C},...R&&{yExtent:R},...ye.crosshairProps,...we,...I};/* @__PURE__ */
43
- return Fo(Ye,{componentName:"BubbleChart",width:ee,height:te,children:/* @__PURE__ */Fo(he,{ref:i,...Me})})});Do.displayName="BubbleChart";import*as No from"react";import{useMemo as Mo,useCallback as Wo,useState as To}from"react";import{useMemo as Oo,useCallback as Eo,useRef as jo}from"react";import*as zo from"react";import{jsx as Go}from"react/jsx-runtime";var Vo=null,Xo=null;import{jsx as $o,jsxs as Qo}from"react/jsx-runtime";de(oe);var Ko="__splomIdx",Yo={top:4,bottom:4,left:4,right:4};import{jsx as qo,jsxs as Jo}from"react/jsx-runtime";F.displayName="ScatterplotMatrix";import{useState as Uo,useRef as Zo,useEffect as ei,useMemo as ti,useCallback as oi}from"react";import*as ii from"react";import{jsx as ai}from"react/jsx-runtime";var ri=null,li=null;import{jsx as ni,jsxs as si}from"react/jsx-runtime";X(),N.displayName="MinimapChart";import{useMemo as ci,forwardRef as hi,useRef as mi}from"react";var di={topLeft:{label:"Low / High",color:"#E9C46A",opacity:.08},topRight:{label:"High / High",color:"#2A9D8F",opacity:.08},bottomLeft:{label:"Low / Low",color:"#E76F51",opacity:.08},bottomRight:{label:"High / Low",color:"#86BBD8",opacity:.08}};import{Fragment as ui,jsx as pi,jsxs as yi}from"react/jsx-runtime";de(oe);var fi=hi(function(e,t){let o=mi(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",xCenter:m,yCenter:d,quadrants:u,centerlineStyle:p={},showQuadrantLabels:y=!0,quadrantLabelSize:f=12,colorBy:g,colorScheme:b,styleRules:x,sizeBy:v,sizeRange:A=[3,15],pointRadius:w=5,pointOpacity:S=.8,tooltip:k,pointIdAccessor:C,annotations:R,frameProps:L={},selection:_,linkedHover:H,onObservation:I,onClick:P,hoverHighlight:B,chartId:F,loading:D,loadingContent:N,emptyContent:W,legendInteraction:T,legendPosition:O,color:E,stroke:j,strokeWidth:z,opacity:V}=e,{width:X,height:$,enableHover:Q,showGrid:K,showLegend:Y,title:J,description:ee,summary:te,accessibleTable:oe,xLabel:ie,yLabel:ae}=i,re=ci(()=>({topLeft:M(di.topLeft,u?.topLeft),topRight:M(di.topRight,u?.topRight),bottomLeft:M(di.bottomLeft,u?.bottomLeft),bottomRight:M(di.bottomRight,u?.bottomRight)}),[u]),le=ci(()=>qe(a),[a]),ne=U({data:le,rawData:a,colorBy:g,colorScheme:b,legendInteraction:T,legendPosition:O,frameLegend:L,selection:_,linkedHover:H,fallbackFields:"string"==typeof g?[g]:[],unwrapData:!1,onObservation:I,onClick:P,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"QuadrantChart",chartId:F,showLegend:Y,userMargin:r,marginDefaults:i.marginDefaults,loading:D,loadingContent:N,emptyContent:W,width:X,height:$,hasTitle:!!J,axisChrome:dt(L,{showAxes:i.showAxes,xLabel:ie,yLabel:ae})});Ze("QuadrantChart",le,"xAccessor",c),Ze("QuadrantChart",le,"yAccessor",h);let se=ci(()=>{if(!le.length)return;let e="function"==typeof c?c:e=>+e[c],t="function"==typeof h?h:e=>+e[h],o=1/0,i=-1/0,a=1/0,r=-1/0;for(let l of le){let n=e(l),s=t(l);isFinite(n)&&(o>n&&(o=n),n>i&&(i=n)),isFinite(s)&&(a>s&&(a=s),s>r&&(r=s))}if(null!=m&&isFinite(m)&&(o>m&&(o=m),m>i&&(i=m)),null!=d&&isFinite(d)&&(a>d&&(a=d),d>r&&(r=d)),o===1/0)return;let l=.1*(i-o)||1,n=.1*(r-a)||1;return{xExtent:[o-l,i+l],yExtent:[a-n,r+n]}},[le,c,h,m,d]),ce=ci(()=>{if(!v||0===le.length)return;let e=le.map(e=>"function"==typeof v?v(e):e[v]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?Ct(e):void 0},[le,v]),me=ci(()=>"function"==typeof c?c:e=>+e[c],[c]),de=ci(()=>"function"==typeof h?h:e=>+e[h],[h]),ue=ci(()=>e=>{let t=me(e),o=de(e),i=null!=m?t>=m:void 0,a=null!=d?o>=d:void 0;return void 0===a||void 0===i?E||gt:a&&i?re.topRight.color:a&&!i?re.topLeft.color:!a&&i?re.bottomRight.color:re.bottomLeft.color},[me,de,m,d,re,E]),pe=ci(()=>v?e=>At(e,v,A,ce):void 0,[v,A,ce]),ye=ci(()=>Ee(c,h),[c,h]),fe=G({colorBy:g,colorScale:ne.colorScale,color:E,pointRadius:w,fillOpacity:S,radiusFn:pe,fallbackFill:ue,stroke:j,strokeWidth:z,opacity:V,styleRules:x,ruleContext:ye,effectiveSelectionHook:ne.effectiveSelectionHook,resolvedSelection:ne.resolvedSelection}),ge=ci(()=>{if(!le.length)return;let e=/* @__PURE__ */new Set;"string"==typeof c&&e.add(c),"string"==typeof h&&e.add(h),"string"==typeof g&&e.add(g),"string"==typeof v&&e.add(v);let t=le[0];for(let o of Object.keys(t))if(!o.startsWith("_")&&!e.has(o)&&"string"==typeof t[o])return o},[le,c,h,g,v]),be=ci(()=>Se([...ge?[{label:ge,accessor:ge,role:"title"}]:[],{label:ie||Ae(c),accessor:c,role:"x",format:n},{label:ae||Ae(h),accessor:h,role:"y",format:s},...g?[{label:Ae(g),accessor:g,role:"color"}]:[],...v?[{label:Ae(v),accessor:v,role:"size"}]:[]]),[ge,c,h,ie,ae,g,v,n,s]),xe=q({componentName:"QuadrantChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),ve=ci(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray||[]};return[(t,o,i,a)=>{if(!i?.x||!i?.y)return;let r=a.width,l=a.height,n=null!=m?i.x(m):r/2,s=null!=d?i.y(d):l/2;if(null!=m&&!isFinite(n)||null!=d&&!isFinite(s))return;let c=Math.max(0,Math.min(r,n)),h=Math.max(0,Math.min(l,s)),u=[{config:re.topLeft,x:0,y:0,w:c,h:h},{config:re.topRight,x:c,y:0,w:r-c,h:h},{config:re.bottomLeft,x:0,y:h,w:c,h:l-h},{config:re.bottomRight,x:c,y:h,w:r-c,h:l-h}];for(let e of u)0>=e.w||0>=e.h||(t.fillStyle=e.config.color,t.globalAlpha=e.config.opacity??.08,t.fillRect(e.x,e.y,e.w,e.h));t.globalAlpha=1,t.strokeStyle=e.stroke,t.lineWidth=e.strokeWidth,e.dashArray.length>0&&t.setLineDash(e.dashArray),t.beginPath(),t.moveTo(c,0),t.lineTo(c,l),t.stroke(),t.beginPath(),t.moveTo(0,h),t.lineTo(r,h),t.stroke(),t.setLineDash([])}]},[m,d,re,p]),we=ci(()=>y?[...ve,(e,t,o,i)=>{if(!o?.x||!o?.y)return;let a=i.width,r=i.height,l=null!=m?o.x(m):a/2,n=null!=d?o.y(d):r/2;if(null!=m&&!isFinite(l)||null!=d&&!isFinite(n))return;let s=wt(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.font=`600 ${f}px ${s}`,e.globalAlpha=.5,e.fillStyle=re.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(re.topLeft.label,8,8),e.fillStyle=re.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(re.topRight.label,a-8,8),e.fillStyle=re.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(re.bottomLeft.label,8,r-8),e.fillStyle=re.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(re.bottomRight.label,a-8,r-8),e.globalAlpha=1}]:ve,[ve,y,f,re,m,d]),ke=ci(()=>{let e=L.canvasPreRenderers||[];return[...we,...e]},[we,L.canvasPreRenderers]),Re=ci(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray?Array.isArray(p.strokeDasharray)?p.strokeDasharray.join(","):p.strokeDasharray:void 0};return[(t,o,i)=>{if(!o?.x||!o?.y)return null;let a=i.width,r=i.height,l=null!=m?o.x(m):a/2,n=null!=d?o.y(d):r/2;if(null!=m&&!isFinite(l)||null!=d&&!isFinite(n))return null;let s=Math.max(0,Math.min(a,l)),c=Math.max(0,Math.min(r,n));/* @__PURE__ */
41
+ /* @__PURE__ */fo("span",{children:[u,": ",l(r)]})]}),null!=a&&null!=r&&Number.isFinite(a)&&Number.isFinite(r)&&/* @__PURE__ */fo("div",{style:{marginTop:4,opacity:.7},children:["Δ = ",l(a-r)]})]})},[pe,le,ne,se,n,p,y,d,u]),{tooltipContent:Be,tooltipMode:Fe}=so(()=>Ge({tooltip:I,defaultTooltipContent:Pe,multiDefaultContent:Pe}),[I,Pe]),De=so(()=>fe(_,{stops:[{offset:0,opacity:.85},{offset:1,opacity:.15}]}),[_]);if(we.earlyReturn)return we.earlyReturn;let Ne={chartType:"mixed",data:be,xAccessor:"__x",yAccessor:"__y",y0Accessor:"__y0",groupAccessor:"__diffSegment",areaGroups:xe,curve:A,areaStyle:_e,lineStyle:He,...b&&{pointStyle:Ie},size:[Q,K],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:we.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:n,yFormat:s,enableHover:q,showGrid:J,...De&&{gradientFill:De},...we.legendBehaviorProps,...ke({title:ee,description:te,summary:oe,accessibleTable:ie,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),tooltipContent:Be,..."multi"===Fe&&{tooltipMode:"multi"},...Ce({linkedHover:M,selection:N,onObservation:W,onClick:T,hoverHighlight:O,hoverRadius:e.hoverRadius,mobileInteraction:we.mobileInteraction,customHoverBehavior:we.customHoverBehavior,customClickBehavior:we.customClickBehavior}),...P&&P.length>0&&{annotations:P},...B&&{xExtent:B},...F&&{yExtent:F},...we.crosshairProps,...D};/* @__PURE__ */
42
+ return yo(Ke,{componentName:"DifferenceChart",width:Q,height:K,children:/* @__PURE__ */yo(he,{ref:o,...Ne})})});"function"==typeof go&&(go.displayName="DifferenceChart");import{useMemo as bo,forwardRef as xo,useRef as vo}from"react";import{jsx as Ao}from"react/jsx-runtime";de(te);var wo=xo(function(e,t){let o=vo(null),i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",areaBy:m,lineDataAccessor:d="coordinates",colorBy:u,colorScheme:p,styleRules:y,curve:f="monotoneX",areaOpacity:g=.7,showLine:b=!0,lineWidth:v=2,showPoints:A=!1,pointRadius:w=3,normalize:S=!1,baseline:k="zero",stackOrder:C,tooltip:R,annotations:L,xExtent:_,yExtent:H,frameProps:I={},selection:P,linkedHover:B,onObservation:F,onClick:D,hoverHighlight:N,chartId:M,loading:W,loadingContent:T,emptyContent:O,legendInteraction:E,legendPosition:j,color:z,stroke:G,strokeWidth:V,opacity:X}=e,{width:$,height:Y,enableHover:Q,showGrid:K,showLegend:J,title:ee,description:te,summary:oe,accessibleTable:ie,xLabel:ae,yLabel:re}=i,le=bo(()=>qe(a),[a]),ne=u||m;Z(t,{variant:"xy",frameRef:o});let se=U({data:le,rawData:a,colorBy:ne,colorScheme:p,legendInteraction:E,legendPosition:j,frameLegend:I,selection:P,linkedHover:B,fallbackFields:ne?["string"==typeof ne?ne:""]:[],unwrapData:!1,onObservation:F,onClick:D,hoverHighlight:N,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"StackedAreaChart",chartId:M,showLegend:J,userMargin:r,marginDefaults:i.marginDefaults,loading:W,loadingContent:T,emptyContent:O,width:$,height:Y,hasTitle:!!ee,axisChrome:mt(I,{showAxes:i.showAxes,xLabel:ae,yLabel:re})}),ce=bo(()=>Ee(c,h),[c,h]),{flattenedData:me,lineStyle:de,pointStyle:ue,defaultTooltipContent:pe}=x({safeData:le,data:a,areaBy:m,lineDataAccessor:d,colorBy:ne,colorScale:se.colorScale,color:z,stroke:G,strokeWidth:V,opacity:X,effectiveSelectionHook:se.effectiveSelectionHook,resolvedSelection:se.resolvedSelection,areaOpacity:g,showLine:b,lineWidth:v,showPoints:A,pointRadius:w,xAccessor:c,yAccessor:h,xLabel:ae,yLabel:re,xFormat:n,yFormat:s,groupField:m||u,styleRules:y,ruleContext:ce}),ye=q({componentName:"StackedAreaChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),fe={chartType:"stackedarea",...null!=a&&{data:me},xAccessor:c,yAccessor:h,groupAccessor:m||void 0,curve:f,normalize:S,baseline:S?"zero":k,stackOrder:C,lineStyle:de,...A&&ue&&{pointStyle:ue},size:[$,Y],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:se.margin,showAxes:i.showAxes,xLabel:ae,yLabel:re,xFormat:n,yFormat:s,enableHover:Q,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:K,...se.legendBehaviorProps,...ke({title:ee,description:te,summary:oe,accessibleTable:ie,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Ge({tooltip:R,defaultTooltipContent:pe,multiDefaultContent:Xe()}),...Ce({linkedHover:B,selection:P,onObservation:F,onClick:D,hoverHighlight:N,hoverRadius:e.hoverRadius,mobileInteraction:se.mobileInteraction,customHoverBehavior:se.customHoverBehavior,customClickBehavior:se.customClickBehavior}),...L&&L.length>0&&{annotations:L},..._&&{xExtent:_},...H&&{yExtent:H},...se.crosshairProps,...I};return se.earlyReturn?se.earlyReturn:ye?/* @__PURE__ */Ao(Qe,{componentName:"StackedAreaChart",message:ye,width:$,height:Y}):/* @__PURE__ */Ao(Ke,{componentName:"StackedAreaChart",width:$,height:Y,children:/* @__PURE__ */Ao(he,{ref:o,...fe})})});wo.displayName="StackedAreaChart";import{useMemo as So,forwardRef as ko,useRef as Co}from"react";import{scaleSequential as Ro}from"d3-scale";import{jsx as Lo}from"react/jsx-runtime";de(ae);var _o=ko(function(e,t){let o=Co(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:void 0,enableHover:e.enableHover,showLegend:void 0,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xAccessor:n="x",yAccessor:s="y",valueAccessor:c="value",xFormat:h,yFormat:m,colorScheme:d,customColorScale:u,showValues:p=!1,valueFormat:y,cellBorderColor:f="#fff",cellBorderWidth:g=1,tooltip:b,annotations:x,heatmapAggregation:v,heatmapXBins:A,heatmapYBins:w,styleRules:S,xExtent:k,yExtent:C,frameProps:R={},selection:L,linkedHover:_,onObservation:H,onClick:I,hoverHighlight:P,chartId:B,loading:F,loadingContent:D,emptyContent:N,showLegend:M,legendPosition:W,legend:T,legendInteraction:O}=e,{width:E,height:j,enableHover:z,title:G,description:V,summary:X,accessibleTable:$,xLabel:Y,yLabel:Q}=i,K=Ue(F,E,j,D),U=K?null:Je(a,E,j,N),te=So(()=>qe(a),[a]),oe=Fe(),ie=("string"==typeof R.colorScheme?R.colorScheme:void 0)??d??oe??"blues",ae="function"==typeof R.heatmapColorScale?R.heatmapColorScale:"custom"===ie&&"function"==typeof u?u:void 0,re=M??!1,le=W??"right",{activeSelectionHook:ne,customHoverBehavior:se,customClickBehavior:ce,crosshairSourceId:me}=Me({selection:L,linkedHover:_,fallbackFields:[],onObservation:H,onClick:I,chartType:"Heatmap",chartId:B,hoverHighlight:P,colorByField:void 0,mobileInteraction:i.mobileInteraction}),de=J(L),ue=We(_,me);Pe(O,void 0,[]);let pe=So(()=>"function"==typeof c?e=>c(e):e=>e[c],[c]),ye=So(()=>{let e=te.map(pe);return Ct(e)},[te,pe]),fe=So(()=>{if(ae)return ae;let e=yt(ie);return Ro(e).domain(ye)},[ie,ae,ye]),ge=So(()=>{let e=Number.isFinite(g)?Math.max(0,g):1;return()=>({stroke:f,strokeWidth:e})},[f,g]),be=So(()=>ee(n,s,c),[n,s,c]),xe=So(()=>$e(ge,S,be),[ge,S,be]),ve=So(()=>tt(xe,ne,de),[ne,xe,de]),we=So(()=>Se([{label:Y||Ae(n),accessor:n,role:"x",format:h},{label:Q||Ae(s),accessor:s,role:"y",format:m},{label:Ae(c),accessor:c,role:"value",format:y}]),[n,s,Y,Q,c,h,m,y]),Le=q({componentName:"Heatmap",data:a,accessors:{xAccessor:n,yAccessor:s,valueAccessor:c}}),_e=So(()=>re?{gradient:{colorFn:e=>fe(e),domain:ye,label:"string"==typeof c?c:"value",format:y},legendDistance:T?.legendDistance}:void 0,[re,fe,ye,c,y,T?.legendDistance]),{margin:He,legend:Be,legendPosition:De,legendMarginReserved:Ne}=Ie({data:[],colorBy:void 0,colorScale:void 0,showLegend:!1,legendPosition:le,userMargin:r,defaults:i.marginDefaults,additionalLegend:_e,chartWidth:E,chartHeight:j,legendLayout:R.legendLayout,frameLegend:R,hasTitle:!!G,axisChrome:mt(R,{showAxes:i.showAxes,xLabel:Y,yLabel:Q})}),Oe={chartType:"heatmap",...null!=a&&{data:te},xAccessor:n,yAccessor:s,valueAccessor:c,colorScheme:"custom"!==ie?ie:void 0,...ae&&{heatmapColorScale:ae},areaStyle:ve,showValues:p,heatmapValueFormat:y,size:[E,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:He,showAxes:i.showAxes,xLabel:Y,yLabel:Q,xFormat:h,yFormat:m,enableHover:z,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...Be&&{legend:Be,legendPosition:De},...Ne&&{__legendMarginReservedFor:Be},...ke({title:G,description:V,summary:X,accessibleTable:$,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:b,defaultTooltipContent:we}),...Ce({linkedHover:_,selection:L,onObservation:H,onClick:I,hoverHighlight:P,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:se,customClickBehavior:ce}),...x&&x.length>0&&{annotations:x},...v&&{heatmapAggregation:v},...null!=A&&{heatmapXBins:A},...null!=w&&{heatmapYBins:w},...k&&{xExtent:k},...C&&{yExtent:C},...ue,...R};return K||U||(Le?/* @__PURE__ */Lo(Qe,{componentName:"Heatmap",message:Le,width:E,height:j}):/* @__PURE__ */Lo(Ke,{componentName:"Heatmap",width:E,height:j,children:/* @__PURE__ */Lo(he,{ref:o,...Oe})}))});_o.displayName="Heatmap";import{useMemo as Ho,useCallback as Io,forwardRef as Po,useRef as Bo}from"react";import{jsx as Fo}from"react/jsx-runtime";se(z),de(ie);var Do=Po(function(t,o){let i=Bo(null),a=Te(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:r,margin:l,className:n,xFormat:s,yFormat:c,xAccessor:h="x",yAccessor:m="y",sizeBy:d,sizeRange:u=[5,40],colorBy:p,colorScheme:y,styleRules:f,bubbleOpacity:g=.6,bubbleStrokeWidth:b=1,bubbleStrokeColor:x="white",tooltip:v,marginalGraphics:A,pointIdAccessor:w,annotations:S,regression:k,xExtent:C,yExtent:R,pulse:L,decay:_,staleness:H,frameProps:I={},selection:P,linkedHover:B,linkedBrush:F,brush:D,onBrush:N,onObservation:M,onClick:W,hoverHighlight:T,chartId:O,loading:E,loadingContent:j,emptyContent:z,legendInteraction:V,legendPosition:X,color:$,stroke:Q,strokeWidth:K,opacity:J}=t,{width:ee,height:te,enableHover:oe,showGrid:ie,showLegend:ae,title:re,description:le,summary:ne,accessibleTable:se,xLabel:ce,yLabel:de}=a,ue=Ho(()=>qe(r),[r]),pe=void 0===r,ye=U({data:ue,rawData:r,colorBy:p,colorScheme:y,legendInteraction:V,legendPosition:X,frameLegend:I,selection:P,linkedHover:B,fallbackFields:p?["string"==typeof p?p:""]:[],unwrapData:!1,onObservation:M,onClick:W,hoverHighlight:T,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"BubbleChart",chartId:O,showLegend:ae,userMargin:l,marginDefaults:a.marginDefaults,loading:E,loadingContent:j,emptyContent:z,width:ee,height:te,hasTitle:!!re,axisChrome:mt(I,{showAxes:a.showAxes,xLabel:ce,yLabel:de})}),{domain:fe,trackPushed:ge,reset:be}=e({accessor:d,data:ue,isPushMode:pe}),xe=Io(e=>{ge([e]),i.current?.push(e)},[ge]),ve=Io(e=>{ge(e),i.current?.pushMany(e)},[ge]);Z(o,{variant:"xy",frameRef:i,overrides:{push:xe,pushMany:ve,clear:()=>{be(),i.current?.clear()}}});let{brushStreamProps:we}=me({brush:D,onBrush:N,linkedBrush:F,xAccessor:h,yAccessor:m,defaultDimension:"xy"}),Le=Ho(()=>({stroke:x,strokeWidth:b}),[x,b]),_e=Ho(()=>fe??[0,1],[fe]),He=Io(e=>At(e,d,u,_e),[d,u,_e]),Ie=Ho(()=>Ee(h,m),[h,m]),Pe=G({colorBy:p,colorScale:ye.colorScale,color:$,fillOpacity:g,radiusFn:He,baseStyleExtras:Le,stroke:Q,strokeWidth:K,opacity:J,styleRules:f,ruleContext:Ie,effectiveSelectionHook:ye.effectiveSelectionHook,resolvedSelection:ye.resolvedSelection}),Be=Ho(()=>Se([{label:ce||Ae(h),accessor:h,role:"x",format:s},{label:de||Ae(m),accessor:m,role:"y",format:c},{label:Ae(d),accessor:d,role:"size"},...p?[{label:Ae(p),accessor:p,role:"color"}]:[]]),[h,m,ce,de,d,p,s,c]);if(ye.earlyReturn)return ye.earlyReturn;let Fe=q({componentName:"BubbleChart",data:r,accessors:{xAccessor:h,yAccessor:m},requiredProps:{sizeBy:d}});if(Fe)/* @__PURE__ */return Fo(Qe,{componentName:"BubbleChart",message:Fe,width:ee,height:te});let De=Y(k),Ne=De?[De,...S||[]]:S,Me={chartType:"bubble",...null!=r&&{data:ue},xAccessor:h,yAccessor:m,colorAccessor:p||void 0,sizeAccessor:d,sizeRange:u,pointStyle:Pe,colorScheme:y,size:[ee,te],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,margin:ye.margin,showAxes:a.showAxes,xLabel:ce,yLabel:de,xFormat:s,yFormat:c,enableHover:oe,showGrid:ie,...ye.legendBehaviorProps,...ke({title:re,description:le,summary:ne,accessibleTable:se,className:n,animate:t.animate,maxDevicePixelRatio:t.maxDevicePixelRatio,axisExtent:t.axisExtent,autoPlaceAnnotations:t.autoPlaceAnnotations}),...Re({tooltip:v,defaultTooltipContent:Be}),...Ce({linkedHover:B,selection:P,onObservation:M,onClick:W,hoverHighlight:T,hoverRadius:t.hoverRadius,mobileInteraction:ye.mobileInteraction,customHoverBehavior:ye.customHoverBehavior,customClickBehavior:ye.customClickBehavior}),...A&&{marginalGraphics:A},...w&&{pointIdAccessor:w},...L&&{pulse:L},..._&&{decay:_},...H&&{staleness:H},...Ne&&Ne.length>0&&{annotations:Ne},...C&&{xExtent:C},...R&&{yExtent:R},...ye.crosshairProps,...we,...I};/* @__PURE__ */
43
+ return Fo(Ke,{componentName:"BubbleChart",width:ee,height:te,children:/* @__PURE__ */Fo(he,{ref:i,...Me})})});Do.displayName="BubbleChart";import*as No from"react";import{useMemo as Mo,useCallback as Wo,useState as To}from"react";import{useMemo as Oo,useCallback as Eo,useRef as jo}from"react";import*as zo from"react";import{jsx as Go}from"react/jsx-runtime";var Vo=null,Xo=null;import{jsx as $o,jsxs as Yo}from"react/jsx-runtime";de(oe);var Qo="__splomIdx",Ko={top:4,bottom:4,left:4,right:4};import{jsx as qo,jsxs as Jo}from"react/jsx-runtime";F.displayName="ScatterplotMatrix";import{useState as Uo,useRef as Zo,useEffect as ei,useMemo as ti,useCallback as oi}from"react";import*as ii from"react";import{jsx as ai}from"react/jsx-runtime";var ri=null,li=null;import{jsx as ni,jsxs as si}from"react/jsx-runtime";X(),N.displayName="MinimapChart";import{useMemo as ci,forwardRef as hi,useRef as mi}from"react";var di={topLeft:{label:"Low / High",color:"#E9C46A",opacity:.08},topRight:{label:"High / High",color:"#2A9D8F",opacity:.08},bottomLeft:{label:"Low / Low",color:"#E76F51",opacity:.08},bottomRight:{label:"High / Low",color:"#86BBD8",opacity:.08}};import{Fragment as ui,jsx as pi,jsxs as yi}from"react/jsx-runtime";de(oe);var fi=hi(function(e,t){let o=mi(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",xCenter:m,yCenter:d,quadrants:u,centerlineStyle:p={},showQuadrantLabels:y=!0,quadrantLabelSize:f=12,colorBy:g,colorScheme:b,styleRules:x,sizeBy:v,sizeRange:A=[3,15],pointRadius:w=5,pointOpacity:S=.8,tooltip:k,pointIdAccessor:C,annotations:R,frameProps:L={},selection:_,linkedHover:H,onObservation:I,onClick:P,hoverHighlight:B,chartId:F,loading:D,loadingContent:N,emptyContent:W,legendInteraction:T,legendPosition:O,color:E,stroke:j,strokeWidth:z,opacity:V}=e,{width:X,height:$,enableHover:Y,showGrid:Q,showLegend:K,title:J,description:ee,summary:te,accessibleTable:oe,xLabel:ie,yLabel:ae}=i,re=ci(()=>({topLeft:M(di.topLeft,u?.topLeft),topRight:M(di.topRight,u?.topRight),bottomLeft:M(di.bottomLeft,u?.bottomLeft),bottomRight:M(di.bottomRight,u?.bottomRight)}),[u]),le=ci(()=>qe(a),[a]),ne=U({data:le,rawData:a,colorBy:g,colorScheme:b,legendInteraction:T,legendPosition:O,frameLegend:L,selection:_,linkedHover:H,fallbackFields:"string"==typeof g?[g]:[],unwrapData:!1,onObservation:I,onClick:P,hoverHighlight:B,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"QuadrantChart",chartId:F,showLegend:K,userMargin:r,marginDefaults:i.marginDefaults,loading:D,loadingContent:N,emptyContent:W,width:X,height:$,hasTitle:!!J,axisChrome:mt(L,{showAxes:i.showAxes,xLabel:ie,yLabel:ae})});Ze("QuadrantChart",le,"xAccessor",c),Ze("QuadrantChart",le,"yAccessor",h);let se=ci(()=>{if(!le.length)return;let e="function"==typeof c?c:e=>+e[c],t="function"==typeof h?h:e=>+e[h],o=1/0,i=-1/0,a=1/0,r=-1/0;for(let l of le){let n=e(l),s=t(l);isFinite(n)&&(o>n&&(o=n),n>i&&(i=n)),isFinite(s)&&(a>s&&(a=s),s>r&&(r=s))}if(null!=m&&isFinite(m)&&(o>m&&(o=m),m>i&&(i=m)),null!=d&&isFinite(d)&&(a>d&&(a=d),d>r&&(r=d)),o===1/0)return;let l=.1*(i-o)||1,n=.1*(r-a)||1;return{xExtent:[o-l,i+l],yExtent:[a-n,r+n]}},[le,c,h,m,d]),ce=ci(()=>{if(!v||0===le.length)return;let e=le.map(e=>"function"==typeof v?v(e):e[v]).filter(e=>"number"==typeof e&&Number.isFinite(e));return 0!==e.length?Ct(e):void 0},[le,v]),me=ci(()=>"function"==typeof c?c:e=>+e[c],[c]),de=ci(()=>"function"==typeof h?h:e=>+e[h],[h]),ue=ci(()=>e=>{let t=me(e),o=de(e),i=null!=m?t>=m:void 0,a=null!=d?o>=d:void 0;return void 0===a||void 0===i?E||gt:a&&i?re.topRight.color:a&&!i?re.topLeft.color:!a&&i?re.bottomRight.color:re.bottomLeft.color},[me,de,m,d,re,E]),pe=ci(()=>v?e=>At(e,v,A,ce):void 0,[v,A,ce]),ye=ci(()=>Ee(c,h),[c,h]),fe=G({colorBy:g,colorScale:ne.colorScale,color:E,pointRadius:w,fillOpacity:S,radiusFn:pe,fallbackFill:ue,stroke:j,strokeWidth:z,opacity:V,styleRules:x,ruleContext:ye,effectiveSelectionHook:ne.effectiveSelectionHook,resolvedSelection:ne.resolvedSelection}),ge=ci(()=>{if(!le.length)return;let e=/* @__PURE__ */new Set;"string"==typeof c&&e.add(c),"string"==typeof h&&e.add(h),"string"==typeof g&&e.add(g),"string"==typeof v&&e.add(v);let t=le[0];for(let o of Object.keys(t))if(!o.startsWith("_")&&!e.has(o)&&"string"==typeof t[o])return o},[le,c,h,g,v]),be=ci(()=>Se([...ge?[{label:ge,accessor:ge,role:"title"}]:[],{label:ie||Ae(c),accessor:c,role:"x",format:n},{label:ae||Ae(h),accessor:h,role:"y",format:s},...g?[{label:Ae(g),accessor:g,role:"color"}]:[],...v?[{label:Ae(v),accessor:v,role:"size"}]:[]]),[ge,c,h,ie,ae,g,v,n,s]),xe=q({componentName:"QuadrantChart",data:a,accessors:{xAccessor:c,yAccessor:h}}),ve=ci(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray||[]};return[(t,o,i,a)=>{if(!i?.x||!i?.y)return;let r=a.width,l=a.height,n=null!=m?i.x(m):r/2,s=null!=d?i.y(d):l/2;if(null!=m&&!isFinite(n)||null!=d&&!isFinite(s))return;let c=Math.max(0,Math.min(r,n)),h=Math.max(0,Math.min(l,s)),u=[{config:re.topLeft,x:0,y:0,w:c,h:h},{config:re.topRight,x:c,y:0,w:r-c,h:h},{config:re.bottomLeft,x:0,y:h,w:c,h:l-h},{config:re.bottomRight,x:c,y:h,w:r-c,h:l-h}];for(let e of u)0>=e.w||0>=e.h||(t.fillStyle=e.config.color,t.globalAlpha=e.config.opacity??.08,t.fillRect(e.x,e.y,e.w,e.h));t.globalAlpha=1,t.strokeStyle=e.stroke,t.lineWidth=e.strokeWidth,e.dashArray.length>0&&t.setLineDash(e.dashArray),t.beginPath(),t.moveTo(c,0),t.lineTo(c,l),t.stroke(),t.beginPath(),t.moveTo(0,h),t.lineTo(r,h),t.stroke(),t.setLineDash([])}]},[m,d,re,p]),we=ci(()=>y?[...ve,(e,t,o,i)=>{if(!o?.x||!o?.y)return;let a=i.width,r=i.height,l=null!=m?o.x(m):a/2,n=null!=d?o.y(d):r/2;if(null!=m&&!isFinite(l)||null!=d&&!isFinite(n))return;let s=wt(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.font=`600 ${f}px ${s}`,e.globalAlpha=.5,e.fillStyle=re.topLeft.color,e.textAlign="left",e.textBaseline="top",e.fillText(re.topLeft.label,8,8),e.fillStyle=re.topRight.color,e.textAlign="right",e.textBaseline="top",e.fillText(re.topRight.label,a-8,8),e.fillStyle=re.bottomLeft.color,e.textAlign="left",e.textBaseline="bottom",e.fillText(re.bottomLeft.label,8,r-8),e.fillStyle=re.bottomRight.color,e.textAlign="right",e.textBaseline="bottom",e.fillText(re.bottomRight.label,a-8,r-8),e.globalAlpha=1}]:ve,[ve,y,f,re,m,d]),ke=ci(()=>{let e=L.canvasPreRenderers||[];return[...we,...e]},[we,L.canvasPreRenderers]),Re=ci(()=>{let e={stroke:p.stroke||"#999",strokeWidth:p.strokeWidth??1,dashArray:p.strokeDasharray?Array.isArray(p.strokeDasharray)?p.strokeDasharray.join(","):p.strokeDasharray:void 0};return[(t,o,i)=>{if(!o?.x||!o?.y)return null;let a=i.width,r=i.height,l=null!=m?o.x(m):a/2,n=null!=d?o.y(d):r/2;if(null!=m&&!isFinite(l)||null!=d&&!isFinite(n))return null;let s=Math.max(0,Math.min(a,l)),c=Math.max(0,Math.min(r,n));/* @__PURE__ */
44
44
  return yi(ui,{children:[[{config:re.topLeft,x:0,y:0,w:s,h:c},{config:re.topRight,x:s,y:0,w:a-s,h:c},{config:re.bottomLeft,x:0,y:c,w:s,h:r-c},{config:re.bottomRight,x:s,y:c,w:a-s,h:r-c}].map((e,t)=>e.w>0&&e.h>0?/* @__PURE__ */pi("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:e.config.color,opacity:e.config.opacity??.08},"qf-"+t):null),
45
45
  /* @__PURE__ */pi("line",{x1:s,y1:0,x2:s,y2:r,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),
46
46
  /* @__PURE__ */pi("line",{x1:0,y1:c,x2:a,y2:c,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.dashArray}),y&&/* @__PURE__ */yi(ui,{children:[
47
47
  /* @__PURE__ */pi("text",{x:8,y:8+f,fill:re.topLeft.color,fontWeight:600,fontSize:f,opacity:.5,children:re.topLeft.label}),
48
48
  /* @__PURE__ */pi("text",{x:a-8,y:8+f,fill:re.topRight.color,fontWeight:600,fontSize:f,opacity:.5,textAnchor:"end",children:re.topRight.label}),
49
49
  /* @__PURE__ */pi("text",{x:8,y:r-8,fill:re.bottomLeft.color,fontWeight:600,fontSize:f,opacity:.5,children:re.bottomLeft.label}),
50
- /* @__PURE__ */pi("text",{x:a-8,y:r-8,fill:re.bottomRight.color,fontWeight:600,fontSize:f,opacity:.5,textAnchor:"end",children:re.bottomRight.label})]})]})}]},[m,d,re,p,y,f]);if(ne.earlyReturn)return ne.earlyReturn;let Le={chartType:"scatter",...null!=a&&{data:le},xAccessor:c,yAccessor:h,colorAccessor:g||void 0,sizeAccessor:v||void 0,sizeRange:A,pointStyle:fe,colorScheme:b,size:[X,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:ne.margin,showAxes:i.showAxes,xLabel:ie,yLabel:ae,xFormat:n,yFormat:s,enableHover:Q,showGrid:K,...se&&{xExtent:se.xExtent,yExtent:se.yExtent},...ne.legendBehaviorProps,...J&&{title:J},...ee&&{description:ee},...te&&{summary:te},...void 0!==oe&&{accessibleTable:oe},...l&&{className:l},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===k?()=>null:!0===k||void 0===k?be:Qe(k)||be,...Ce({linkedHover:H,selection:_,onObservation:I,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:ne.mobileInteraction,customHoverBehavior:ne.customHoverBehavior,customClickBehavior:ne.customClickBehavior}),...C&&{pointIdAccessor:C},...R&&R.length>0&&{annotations:R},canvasPreRenderers:ke,...ne.crosshairProps,...L,...ke.length>0&&{canvasPreRenderers:ke},svgPreRenderers:Re};return xe?/* @__PURE__ */pi(Ke,{componentName:"QuadrantChart",message:xe,width:X,height:$}):/* @__PURE__ */pi(Ye,{componentName:"QuadrantChart",width:X,height:$,children:/* @__PURE__ */pi(he,{ref:o,...Le})})});fi.displayName="QuadrantChart";import*as gi from"react";import{useMemo as bi,useCallback as xi,forwardRef as vi,useRef as Ai,useImperativeHandle as wi}from"react";var Si="__ma_unitized",ki="__ma_series";import{jsx as Ci}from"react/jsx-runtime";de(ue);var Ri=vi(function(e,t){let o=Ai(null),i=Ai([]),a=Ai(e.series);a.current=e.series,wi(t,()=>{let e=()=>(a.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;let a=e(),r=t;for(let e=0;a.length>e&&2>e;e++){let t=a[e],l=t.extent||i.current[e];if(!l)continue;let n=("function"==typeof t.yAccessor?t.yAccessor:e=>e[t.yAccessor])(r);null==n||!isFinite(n)||o.current.push({...r,[Si]:E(n,l),[ki]:t.label||"Series "+(e+1)})}},pushMany:t=>{if(!o.current)return;let a=e(),r=[];for(let e of t)for(let t=0;a.length>t&&2>t;t++){let o=a[t],l=o.extent||i.current[t];if(!l)continue;let n=("function"==typeof o.yAccessor?o.yAccessor:e=>e[o.yAccessor])(e);null==n||!isFinite(n)||r.push({...e,[Si]:E(n,l),[ki]:o.label||"Series "+(t+1)})}o.current.pushMany(r)},remove:e=>o.current?.remove(e)??[],update:(e,t)=>o.current?.update(e,t)??[],clear:()=>o.current?.clear(),getData:()=>o.current?.getData()??[],getScales:()=>o.current?.getScales()??null}},[]);let r=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},{width:800,height:400}),{data:l,margin:n,className:s,xFormat:c,xAccessor:h="x",series:m,colorScheme:d,curve:u="monotoneX",lineWidth:p=2,styleRules:y,tooltip:f,annotations:g,frameProps:b={},selection:x,linkedHover:v,onObservation:A,onClick:w,hoverHighlight:S,chartId:k,loading:C,loadingContent:R,emptyContent:L,legendInteraction:_,legendPosition:H,stroke:I,strokeWidth:P,opacity:B}=e,{width:F,height:D,enableHover:N,showGrid:M,showLegend:z=!0,title:G,description:V,summary:X,accessibleTable:Q,xLabel:K}=r,Y=bi(()=>qe(l),[l]),J=bi(()=>qe(m),[m]),Z=J,ee=2===J.length,te=bi(()=>ee?{...b.legendLayout,sideGutter:b.legendLayout?.sideGutter??70}:b.legendLayout,[b.legendLayout,ee]);"u">typeof process&&"production"!==process.env?.NODE_ENV&&!ee&&console.warn(`[MultiAxisLineChart] Expected exactly 2 series for dual-axis mode, got ${J.length}. Rendering as a standard multi-line chart.`);let oe=Ue(C,F,D,R),ie=oe?null:Je(l,F,D,L),ae=Be(),re=bi(()=>W(Z,d,ae),[Z,d,ae]),le=bi(()=>J.map((e,t)=>e.label||"Series "+(t+1)),[J]),{unitizedData:ne,extents:se}=bi(()=>{if(0===Y.length){let e=J.map(e=>e.extent||null).filter(Boolean);return e.length===J.length&&(i.current=e),{unitizedData:[],extents:e.length===J.length?e:[]}}let e=J.map(e=>e.extent||O(Y,e.yAccessor));if(i.current=e,!ee){let t=[];for(let e of Y)for(let o=0;J.length>o;o++){let i=J[o],a=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(e);null!=a&&t.push({...e,[Si]:a,[ki]:le[o]})}return{unitizedData:t,extents:e}}let t=[];for(let o of Y)for(let i=0;2>i;i++){let a=J[i],r=("function"==typeof a.yAccessor?a.yAccessor:e=>e[a.yAccessor])(o);null!=r&&t.push({...o,[Si]:E(r,e[i]),[ki]:le[i]})}return{unitizedData:t,extents:e}},[Y,J,ee,le]),ce=bi(()=>{if(!ee||2>se.length)return;let e=e=>t=>{let o=j(t,se[e]),i=J[e]?.format;return"function"==typeof i?i(o):Number.isInteger(o)?o+"":o.toFixed(1)},t=e(0),o=e(1);return[{orient:"left",label:le[0],tickFormat:t},{orient:"right",label:le[1],tickFormat:o},{orient:"bottom"}]},[ee,se,J,le]),me=bi(()=>ne.length>0?ne:le.map(e=>({[ki]:e})),[ne,le]),de=U({data:me,rawData:l,colorBy:ki,colorScheme:re,legendInteraction:_,legendPosition:H,frameLegend:{...b,legendLayout:te},selection:x,linkedHover:v,fallbackFields:[ki],unwrapData:!1,onObservation:A,onClick:w,hoverHighlight:S,mobileInteraction:r.mobileInteraction,mobileSemantics:r.mobileSemantics,chartType:"MultiAxisLineChart",chartId:k,showLegend:z,legendLayout:te,userMargin:n,marginDefaults:ee?{...r.marginDefaults,left:70,right:70}:r.marginDefaults,loading:C,loadingContent:R,emptyContent:L,width:F,height:D,hasTitle:!!G,axisChrome:dt(b,{showAxes:r.showAxes,xLabel:K,yLabel:le[0],yLabelRight:le[1],axes:ce})}),ue=bi(()=>{let e=/* @__PURE__ */new Map;return le.forEach((t,o)=>e.set(t,re[o])),e},[le,re]),pe=xi(e=>ue.get(e[ki])||re[0],[ue,re]),ye=bi(()=>T(h,J),[h,J]),fe=$({lineWidth:p,resolveStroke:pe,stroke:I,strokeWidth:P,opacity:B,effectiveSelectionHook:de.effectiveSelectionHook,resolvedSelection:de.resolvedSelection,styleRules:y,ruleContext:ye}),ge=bi(()=>e=>{let t=e.data||e,o=t[ki],i=le.indexOf(o),a=t[Si],r=ee&&i>=0&&se[i]?j(a,se[i]):a,l=i>=0&&J[i]?.format?J[i].format:e=>Number.isInteger(e)?e+"":e.toFixed(2),n="function"==typeof h?h(t):t[h];return gi.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},gi.createElement("div",{style:{fontWeight:600,marginBottom:4,color:re[i]||"inherit"}},o),gi.createElement("div",null,`${"string"==typeof h?h:"x"}: ${n}`),gi.createElement("div",null,`${o}: ${l(r)}`))},[le,re,se,ee,J,h]),be=xi(e=>{let t=(Array.isArray(e.allSeries)?e.allSeries:[]).map(e=>{let t=le.indexOf(e.group),o=ee&&t>=0&&se[t]?j(e.value,se[t]):e.value,i=e.datum;return i&&(i={...i},delete i[Si],delete i[ki]),{...e,value:o,datum:i}}),o=e.data&&"object"==typeof e.data&&!Array.isArray(e.data)?{...e.data}:e.data;o&&"object"==typeof o&&!Array.isArray(o)&&(delete o[Si],delete o[ki]);let i={...e,data:o,allSeries:t};return delete i[Si],delete i[ki],i},[se,ee,le]),xe=bi(()=>$e(),[]),ve=xi(e=>xe(be(e)),[xe,be]),Ae=bi(()=>ze(f)&&"function"==typeof f.content?{mode:"multi",content:e=>f.content(be(e))}:f,[be,f]),we=bi(()=>Ge({tooltip:Ae,defaultTooltipContent:ge,multiDefaultContent:ve}),[ge,ve,Ae]);if(de.earlyReturn)return de.earlyReturn;let Se=q({componentName:"MultiAxisLineChart",data:l,accessors:{xAccessor:h}}),ke=ee?[0,1]:void 0,Re={chartType:"line",...null!=l&&{data:ne},xAccessor:h,yAccessor:Si,groupAccessor:ki,lineStyle:fe,colorScheme:re,size:[F,D],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:de.margin,showAxes:r.showAxes,...ce&&{axes:ce},xLabel:K,...ee?{}:{yLabel:le[0]},xFormat:c,...ee&&ke&&{yExtent:ke},enableHover:N,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:M,curve:u,...de.legendBehaviorProps,...G&&{title:G},...V&&{description:V},...X&&{summary:X},...void 0!==Q&&{accessibleTable:Q},...s&&{className:s},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...we,...g&&{annotations:g},...Ce({linkedHover:v,selection:x,onObservation:A,onClick:w,hoverHighlight:S,hoverRadius:e.hoverRadius,mobileInteraction:de.mobileInteraction,customHoverBehavior:de.customHoverBehavior,customClickBehavior:de.customClickBehavior}),...de.crosshairProps,...b,...te&&{legendLayout:te}};return oe||ie||(Se?/* @__PURE__ */Ci(Ke,{componentName:"MultiAxisLineChart",message:Se,width:F,height:D}):/* @__PURE__ */Ci(Ye,{componentName:"MultiAxisLineChart",width:F,height:D,children:/* @__PURE__ */Ci(he,{ref:o,...Re})}))});Ri.displayName="MultiAxisLineChart";import{useMemo as Li,forwardRef as _i,useRef as Hi}from"react";import{jsx as Ii}from"react/jsx-runtime";de(le);var Pi=_i(function(e,t){let o=Hi(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",highAccessor:h="high",lowAccessor:m="low",openAccessor:d,closeAccessor:u,candlestickStyle:p,styleRules:y,tooltip:f,annotations:g,xExtent:b,yExtent:x,frameProps:v={},selection:A,linkedHover:w,onObservation:S,onClick:k,chartId:C,loading:R,loadingContent:L,emptyContent:_}=e,{width:H,height:I,enableHover:P,showGrid:B,title:F,description:D,summary:N,accessibleTable:M,xLabel:W,yLabel:T}=i,O=Ue(R,H,I,L),E=O?null:Je(a,H,I,_),j=Li(()=>qe(a),[a]),z=null==d||null==u;Ze("CandlestickChart",j,"xAccessor",c),Ze("CandlestickChart",j,"highAccessor",h),Ze("CandlestickChart",j,"lowAccessor",m),z||(Ze("CandlestickChart",j,"openAccessor",d),Ze("CandlestickChart",j,"closeAccessor",u));let{activeSelectionHook:G,customHoverBehavior:V,customClickBehavior:X,crosshairSourceId:$}=Me({selection:A,linkedHover:w,onObservation:S,onClick:k,chartType:"CandlestickChart",chartId:C,mobileInteraction:i.mobileInteraction}),Q=J(A),Y=Li(()=>Ee(c,z?h:u),[c,h,u,z]),U=Li(()=>tt(Xe(void 0,y,Y),G,Q),[y,Y,G,Q]),ee=We(w,$),te=Li(()=>{let e=i.marginDefaults,t="sparkline"===i.mode?{...e,top:0,bottom:0}:e;return null==r?t:{...t,...K(r)}},[r,i.marginDefaults,i.mode]),oe=Li(()=>{let e=[{label:W||Ae(c),accessor:c,role:"x",format:n}];return z?(e.push({label:"High",accessor:h,role:"y",format:s}),e.push({label:"Low",accessor:m,format:s})):(e.push({label:"Open",accessor:d,format:s}),e.push({label:"High",accessor:h,format:s}),e.push({label:"Low",accessor:m,format:s}),e.push({label:"Close",accessor:u,format:s})),Se(e)},[c,W,n,s,h,m,d,u,z]),ie=q({componentName:"CandlestickChart",data:a,accessors:{xAccessor:c,highAccessor:h,lowAccessor:m,...!z&&{openAccessor:d,closeAccessor:u}}}),ae=Math.max(2,Math.min(12,Math.round(H/40))),re=H>200?.1:.02,le={chartType:"candlestick",...null!=a&&{data:j},xAccessor:c,yAccessor:h,highAccessor:h,lowAccessor:m,...!z&&{openAccessor:d,closeAccessor:u},...p&&{candlestickStyle:p},...(G||y?.length)&&{pointStyle:U},scalePadding:ae,extentPadding:re,size:[H,I],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:te,showAxes:i.showAxes,xLabel:W,yLabel:T,xFormat:n,yFormat:s,enableHover:P,showGrid:B,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...ke({title:F,description:D,summary:N,accessibleTable:M,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:f,defaultTooltipContent:oe}),...Ce({linkedHover:w,selection:A,onObservation:S,onClick:k,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:V,customClickBehavior:X}),...g&&g.length>0&&{annotations:g},...b&&{xExtent:b},...x&&{yExtent:x},...ee,...v};return O||E||(ie?/* @__PURE__ */Ii(Ke,{componentName:"CandlestickChart",message:ie,width:H,height:I}):/* @__PURE__ */Ii(Ye,{componentName:"CandlestickChart",width:H,height:I,children:/* @__PURE__ */Ii(he,{ref:o,...le})}))});Pi.displayName="CandlestickChart";import{useMemo as Bi,forwardRef as Fi,useRef as Di}from"react";import{jsx as Ni}from"react/jsx-runtime";de(re);var Mi=Fi(function(e,t){let o=Di(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",pointIdAccessor:m,xScaleType:d,positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:f,gap:g,styleRules:b,tooltip:x,annotations:v,xExtent:A,yExtent:w,frameProps:S={},selection:k,linkedHover:C,onObservation:R,onClick:L,hoverHighlight:_,chartId:H,loading:I,loadingContent:P,emptyContent:B,legendInteraction:F,legendPosition:D}=e,{areaStyle:N,...M}=S,{width:W,height:T,enableHover:O,showGrid:E,showLegend:j,title:z,description:G,summary:V,accessibleTable:X,xLabel:$,yLabel:Q}=i,K=Bi(()=>qe(a),[a]),Y=Di({next:0,indexOf:/* @__PURE__ */new WeakMap,idOf:/* @__PURE__ */new Map,labels:/* @__PURE__ */new Map}),{plotData:J,plotXAccessor:ee,plotXFormat:te,usesIndex:oe}=Bi(()=>{let e="function"==typeof c?c:e=>e[c],t=m?"function"==typeof m?m:e=>e[m]:void 0,o=e=>"number"==typeof e&&Number.isFinite(e)||e instanceof Date,i=(e,t)=>{let o=e??t;return n?n(o):o+""};if(null!=a&&!K.some((t,i)=>!o(e(t,i))))return{plotData:K,plotXAccessor:c,plotXFormat:n,usesIndex:!1};if(null!=a){let t=K.map((t,o)=>e(t,o));return{plotData:K.map((e,t)=>({...e,__waterfallX:t})),plotXAccessor:"__waterfallX",plotXFormat:e=>i(t[Number(e)],e),usesIndex:!0}}let r=Y.current,l=(e,t,o,i)=>{e&&"object"==typeof e&&(r.indexOf.set(e,t),!Object.isFrozen(e)&&!Object.isSealed(e)&&(e.__waterfallX=t)),o&&r.idOf.set(o,t),r.labels.set(t,i)};return{plotData:K,plotXAccessor:(i,a)=>{let n=e(i,a);if(o(n))return n;let s=t?(t(i,a)??"")+"":"",c=i&&"object"==typeof i?i.__waterfallX:void 0,h="number"==typeof c&&Number.isFinite(c)?c:(i&&"object"==typeof i?r.indexOf.get(i):void 0)??(s?r.idOf.get(s):void 0);if("number"==typeof h)return l(i,h,s,n),h;let m="number"==typeof a?a:r.next;return r.next=Math.max(r.next,m+1),l(i,m,s,n),m},plotXFormat:e=>i(r.labels.get(Number(e)),e),usesIndex:!0}},[a,K,c,n,m]),ie=Bi(()=>{if(oe&&null!=a)return[{orient:"bottom",tickValues:J.map((e,t)=>t)}]},[a,J,oe]),ae=U({data:J,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:F,legendPosition:D,frameLegend:S,selection:k,linkedHover:C,fallbackFields:["string"==typeof c?c:"x"],unwrapData:!1,onObservation:R,onClick:L,hoverHighlight:_,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"WaterfallChart",chartId:H,showLegend:j,userMargin:r,marginDefaults:i.marginDefaults,loading:I,loadingContent:P,emptyContent:B,width:W,height:T,hasTitle:!!z,axisChrome:dt(S,{showAxes:i.showAxes,xLabel:$,yLabel:Q,axes:S.axes??ie})}),re=Bi(()=>({positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:f,gap:g,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity}),[u,p,y,f,g,e.stroke,e.strokeWidth,e.opacity]),le=Bi(()=>Ee(c,h),[c,h]),ne=Bi(()=>Xe(void 0,b,le),[b,le]),se=Bi(()=>tt(e=>{let t=ne(e);if(!N)return t;let o="function"==typeof N?N(e):N;return o?{...t,...o}:t},ae.effectiveSelectionHook,ae.resolvedSelection),[ne,N,ae.effectiveSelectionHook,ae.resolvedSelection]),ce=Bi(()=>Se([{label:$||Ae(c),accessor:c,role:"x",format:n},{label:Q||"Change",accessor:h,role:"y",format:s}]),[c,h,$,Q,n,s]);if(ae.earlyReturn)return ae.earlyReturn;let me=q({componentName:"WaterfallChart",data:a,accessors:{xAccessor:c,yAccessor:h}});if(me)/* @__PURE__ */return Ni(Ke,{componentName:"WaterfallChart",message:me,width:W,height:T});let de={chartType:"waterfall",...null!=a&&{data:J},xAccessor:ee,yAccessor:h,xScaleType:null!=a&&oe?"linear":d,waterfallStyle:re,areaStyle:se,size:[W,T],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ae.margin,showAxes:i.showAxes,xLabel:$,yLabel:Q,xFormat:te,yFormat:s,enableHover:O,showGrid:E,...ie&&{axes:ie},...ae.legendBehaviorProps,...ke({title:z,description:G,summary:V,accessibleTable:X,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:x,defaultTooltipContent:ce}),...Ce({linkedHover:C,selection:k,onObservation:R,onClick:L,hoverHighlight:_,hoverRadius:e.hoverRadius,mobileInteraction:ae.mobileInteraction,customHoverBehavior:ae.customHoverBehavior,customClickBehavior:ae.customClickBehavior}),...m&&{pointIdAccessor:m},...v&&v.length>0&&{annotations:v},...A&&{xExtent:A},...w&&{yExtent:w},...M};/* @__PURE__ */
51
- return Ni(Ye,{componentName:"WaterfallChart",width:W,height:T,children:/* @__PURE__ */Ni(he,{ref:o,...de})})});Mi.displayName="WaterfallChart";export{Mt as a,zt as b,$t as c,o as d,l as e,to as f,no as g,go as h,wo as i,_o as j,Do as k,F as l,N as m,di as n,fi as o,Ri as p,Pi as q,Mi as r};
50
+ /* @__PURE__ */pi("text",{x:a-8,y:r-8,fill:re.bottomRight.color,fontWeight:600,fontSize:f,opacity:.5,textAnchor:"end",children:re.bottomRight.label})]})]})}]},[m,d,re,p,y,f]);if(ne.earlyReturn)return ne.earlyReturn;let Le={chartType:"scatter",...null!=a&&{data:le},xAccessor:c,yAccessor:h,colorAccessor:g||void 0,sizeAccessor:v||void 0,sizeRange:A,pointStyle:fe,colorScheme:b,size:[X,$],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:ne.margin,showAxes:i.showAxes,xLabel:ie,yLabel:ae,xFormat:n,yFormat:s,enableHover:Y,showGrid:Q,...se&&{xExtent:se.xExtent,yExtent:se.yExtent},...ne.legendBehaviorProps,...J&&{title:J},...ee&&{description:ee},...te&&{summary:te},...void 0!==oe&&{accessibleTable:oe},...l&&{className:l},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===k?()=>null:!0===k||void 0===k?be:Ye(k)||be,...Ce({linkedHover:H,selection:_,onObservation:I,onClick:P,hoverHighlight:B,hoverRadius:e.hoverRadius,mobileInteraction:ne.mobileInteraction,customHoverBehavior:ne.customHoverBehavior,customClickBehavior:ne.customClickBehavior}),...C&&{pointIdAccessor:C},...R&&R.length>0&&{annotations:R},canvasPreRenderers:ke,...ne.crosshairProps,...L,...ke.length>0&&{canvasPreRenderers:ke},svgPreRenderers:Re};return xe?/* @__PURE__ */pi(Qe,{componentName:"QuadrantChart",message:xe,width:X,height:$}):/* @__PURE__ */pi(Ke,{componentName:"QuadrantChart",width:X,height:$,children:/* @__PURE__ */pi(he,{ref:o,...Le})})});fi.displayName="QuadrantChart";import*as gi from"react";import{useMemo as bi,useCallback as xi,forwardRef as vi,useRef as Ai,useImperativeHandle as wi}from"react";var Si="__ma_unitized",ki="__ma_series";import{jsx as Ci}from"react/jsx-runtime";de(ue);var Ri=vi(function(e,t){let o=Ai(null),i=Ai([]),a=Ai(e.series);a.current=e.series,wi(t,()=>{let e=()=>(a.current??[]).filter(e=>null!=e&&"object"==typeof e);return{push:t=>{if(!o.current)return;let a=e(),r=t;for(let e=0;a.length>e&&2>e;e++){let t=a[e],l=t.extent||i.current[e];if(!l)continue;let n=("function"==typeof t.yAccessor?t.yAccessor:e=>e[t.yAccessor])(r);null==n||!isFinite(n)||o.current.push({...r,[Si]:E(n,l),[ki]:t.label||"Series "+(e+1)})}},pushMany:t=>{if(!o.current)return;let a=e(),r=[];for(let e of t)for(let t=0;a.length>t&&2>t;t++){let o=a[t],l=o.extent||i.current[t];if(!l)continue;let n=("function"==typeof o.yAccessor?o.yAccessor:e=>e[o.yAccessor])(e);null==n||!isFinite(n)||r.push({...e,[Si]:E(n,l),[ki]:o.label||"Series "+(t+1)})}o.current.pushMany(r)},remove:e=>o.current?.remove(e)??[],update:(e,t)=>o.current?.update(e,t)??[],clear:()=>o.current?.clear(),getData:()=>o.current?.getData()??[],getScales:()=>o.current?.getScales()??null}},[]);let r=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},{width:800,height:400}),{data:l,margin:n,className:s,xFormat:c,xAccessor:h="x",series:m,colorScheme:d,curve:u="monotoneX",lineWidth:p=2,styleRules:y,tooltip:f,annotations:g,frameProps:b={},selection:x,linkedHover:v,onObservation:A,onClick:w,hoverHighlight:S,chartId:k,loading:C,loadingContent:R,emptyContent:L,legendInteraction:_,legendPosition:H,stroke:I,strokeWidth:P,opacity:B}=e,{width:F,height:D,enableHover:N,showGrid:M,showLegend:z=!0,title:G,description:V,summary:X,accessibleTable:Y,xLabel:Q}=r,K=bi(()=>qe(l),[l]),J=bi(()=>qe(m),[m]),Z=J,ee=2===J.length,te=bi(()=>ee?{...b.legendLayout,sideGutter:b.legendLayout?.sideGutter??70}:b.legendLayout,[b.legendLayout,ee]);"u">typeof process&&"production"!==process.env?.NODE_ENV&&!ee&&console.warn(`[MultiAxisLineChart] Expected exactly 2 series for dual-axis mode, got ${J.length}. Rendering as a standard multi-line chart.`);let oe=Ue(C,F,D,R),ie=oe?null:Je(l,F,D,L),ae=Be(),re=bi(()=>W(Z,d,ae),[Z,d,ae]),le=bi(()=>J.map((e,t)=>e.label||"Series "+(t+1)),[J]),{unitizedData:ne,extents:se}=bi(()=>{if(0===K.length){let e=J.map(e=>e.extent||null).filter(Boolean);return e.length===J.length&&(i.current=e),{unitizedData:[],extents:e.length===J.length?e:[]}}let e=J.map(e=>e.extent||O(K,e.yAccessor));if(i.current=e,!ee){let t=[];for(let e of K)for(let o=0;J.length>o;o++){let i=J[o],a=("function"==typeof i.yAccessor?i.yAccessor:e=>e[i.yAccessor])(e);null!=a&&t.push({...e,[Si]:a,[ki]:le[o]})}return{unitizedData:t,extents:e}}let t=[];for(let o of K)for(let i=0;2>i;i++){let a=J[i],r=("function"==typeof a.yAccessor?a.yAccessor:e=>e[a.yAccessor])(o);null!=r&&t.push({...o,[Si]:E(r,e[i]),[ki]:le[i]})}return{unitizedData:t,extents:e}},[K,J,ee,le]),ce=bi(()=>{if(!ee||2>se.length)return;let e=e=>t=>{let o=j(t,se[e]),i=J[e]?.format;return"function"==typeof i?i(o):Number.isInteger(o)?o+"":o.toFixed(1)},t=e(0),o=e(1);return[{orient:"left",label:le[0],tickFormat:t},{orient:"right",label:le[1],tickFormat:o},{orient:"bottom"}]},[ee,se,J,le]),me=bi(()=>ne.length>0?ne:le.map(e=>({[ki]:e})),[ne,le]),de=U({data:me,rawData:l,colorBy:ki,colorScheme:re,legendInteraction:_,legendPosition:H,frameLegend:{...b,legendLayout:te},selection:x,linkedHover:v,fallbackFields:[ki],unwrapData:!1,onObservation:A,onClick:w,hoverHighlight:S,mobileInteraction:r.mobileInteraction,mobileSemantics:r.mobileSemantics,chartType:"MultiAxisLineChart",chartId:k,showLegend:z,legendLayout:te,userMargin:n,marginDefaults:ee?{...r.marginDefaults,left:70,right:70}:r.marginDefaults,loading:C,loadingContent:R,emptyContent:L,width:F,height:D,hasTitle:!!G,axisChrome:mt(b,{showAxes:r.showAxes,xLabel:Q,yLabel:le[0],yLabelRight:le[1],axes:ce})}),ue=bi(()=>{let e=/* @__PURE__ */new Map;return le.forEach((t,o)=>e.set(t,re[o])),e},[le,re]),pe=xi(e=>ue.get(e[ki])||re[0],[ue,re]),ye=bi(()=>T(h,J),[h,J]),fe=$({lineWidth:p,resolveStroke:pe,stroke:I,strokeWidth:P,opacity:B,effectiveSelectionHook:de.effectiveSelectionHook,resolvedSelection:de.resolvedSelection,styleRules:y,ruleContext:ye}),ge=bi(()=>e=>{let t=e.data||e,o=t[ki],i=le.indexOf(o),a=t[Si],r=ee&&i>=0&&se[i]?j(a,se[i]):a,l=i>=0&&J[i]?.format?J[i].format:e=>Number.isInteger(e)?e+"":e.toFixed(2),n="function"==typeof h?h(t):t[h];return gi.createElement("div",{style:{padding:"6px 10px",fontFamily:"var(--semiotic-font-family, sans-serif)",fontSize:"var(--semiotic-tooltip-font-size, 13px)"}},gi.createElement("div",{style:{fontWeight:600,marginBottom:4,color:re[i]||"inherit"}},o),gi.createElement("div",null,`${"string"==typeof h?h:"x"}: ${n}`),gi.createElement("div",null,`${o}: ${l(r)}`))},[le,re,se,ee,J,h]),be=xi(e=>{let t=(Array.isArray(e.allSeries)?e.allSeries:[]).map(e=>{let t=le.indexOf(e.group),o=ee&&t>=0&&se[t]?j(e.value,se[t]):e.value,i=e.datum;return i&&(i={...i},delete i[Si],delete i[ki]),{...e,value:o,datum:i}}),o=e.data&&"object"==typeof e.data&&!Array.isArray(e.data)?{...e.data}:e.data;o&&"object"==typeof o&&!Array.isArray(o)&&(delete o[Si],delete o[ki]);let i={...e,data:o,allSeries:t};return delete i[Si],delete i[ki],i},[se,ee,le]),xe=bi(()=>Xe(),[]),ve=xi(e=>xe(be(e)),[xe,be]),Ae=bi(()=>ze(f)&&"function"==typeof f.content?{mode:"multi",content:e=>f.content(be(e))}:f,[be,f]),we=bi(()=>Ge({tooltip:Ae,defaultTooltipContent:ge,multiDefaultContent:ve}),[ge,ve,Ae]);if(de.earlyReturn)return de.earlyReturn;let Se=q({componentName:"MultiAxisLineChart",data:l,accessors:{xAccessor:h}}),ke=ee?[0,1]:void 0,Re={chartType:"line",...null!=l&&{data:ne},xAccessor:h,yAccessor:Si,groupAccessor:ki,lineStyle:fe,colorScheme:re,size:[F,D],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,...void 0!==e.maxDevicePixelRatio&&{maxDevicePixelRatio:e.maxDevicePixelRatio},margin:de.margin,showAxes:r.showAxes,...ce&&{axes:ce},xLabel:Q,...ee?{}:{yLabel:le[0]},xFormat:c,...ee&&ke&&{yExtent:ke},enableHover:N,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},showGrid:M,curve:u,...de.legendBehaviorProps,...G&&{title:G},...V&&{description:V},...X&&{summary:X},...void 0!==Y&&{accessibleTable:Y},...s&&{className:s},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...we,...g&&{annotations:g},...Ce({linkedHover:v,selection:x,onObservation:A,onClick:w,hoverHighlight:S,hoverRadius:e.hoverRadius,mobileInteraction:de.mobileInteraction,customHoverBehavior:de.customHoverBehavior,customClickBehavior:de.customClickBehavior}),...de.crosshairProps,...b,...te&&{legendLayout:te}};return oe||ie||(Se?/* @__PURE__ */Ci(Qe,{componentName:"MultiAxisLineChart",message:Se,width:F,height:D}):/* @__PURE__ */Ci(Ke,{componentName:"MultiAxisLineChart",width:F,height:D,children:/* @__PURE__ */Ci(he,{ref:o,...Re})}))});Ri.displayName="MultiAxisLineChart";import{useMemo as Li,forwardRef as _i,useRef as Hi}from"react";import{jsx as Ii}from"react/jsx-runtime";de(le);var Pi=_i(function(e,t){let o=Hi(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",highAccessor:h="high",lowAccessor:m="low",openAccessor:d,closeAccessor:u,candlestickStyle:p,styleRules:y,tooltip:f,annotations:g,xExtent:b,yExtent:x,frameProps:v={},selection:A,linkedHover:w,onObservation:S,onClick:k,chartId:C,loading:R,loadingContent:L,emptyContent:_}=e,{width:H,height:I,enableHover:P,showGrid:B,title:F,description:D,summary:N,accessibleTable:M,xLabel:W,yLabel:T}=i,O=Ue(R,H,I,L),E=O?null:Je(a,H,I,_),j=Li(()=>qe(a),[a]),z=null==d||null==u;Ze("CandlestickChart",j,"xAccessor",c),Ze("CandlestickChart",j,"highAccessor",h),Ze("CandlestickChart",j,"lowAccessor",m),z||(Ze("CandlestickChart",j,"openAccessor",d),Ze("CandlestickChart",j,"closeAccessor",u));let{activeSelectionHook:G,customHoverBehavior:V,customClickBehavior:X,crosshairSourceId:$}=Me({selection:A,linkedHover:w,onObservation:S,onClick:k,chartType:"CandlestickChart",chartId:C,mobileInteraction:i.mobileInteraction}),Y=J(A),K=Li(()=>Ee(c,z?h:u),[c,h,u,z]),U=Li(()=>tt($e(void 0,y,K),G,Y),[y,K,G,Y]),ee=We(w,$),te=Li(()=>{let e=i.marginDefaults,t="sparkline"===i.mode?{...e,top:0,bottom:0}:e;return null==r?t:{...t,...Q(r)}},[r,i.marginDefaults,i.mode]),oe=Li(()=>{let e=[{label:W||Ae(c),accessor:c,role:"x",format:n}];return z?(e.push({label:"High",accessor:h,role:"y",format:s}),e.push({label:"Low",accessor:m,format:s})):(e.push({label:"Open",accessor:d,format:s}),e.push({label:"High",accessor:h,format:s}),e.push({label:"Low",accessor:m,format:s}),e.push({label:"Close",accessor:u,format:s})),Se(e)},[c,W,n,s,h,m,d,u,z]),ie=q({componentName:"CandlestickChart",data:a,accessors:{xAccessor:c,highAccessor:h,lowAccessor:m,...!z&&{openAccessor:d,closeAccessor:u}}}),ae=Math.max(2,Math.min(12,Math.round(H/40))),re=H>200?.1:.02,le={chartType:"candlestick",...null!=a&&{data:j},xAccessor:c,yAccessor:h,highAccessor:h,lowAccessor:m,...!z&&{openAccessor:d,closeAccessor:u},...p&&{candlestickStyle:p},...(G||y?.length)&&{pointStyle:U},scalePadding:ae,extentPadding:re,size:[H,I],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:te,showAxes:i.showAxes,xLabel:W,yLabel:T,xFormat:n,yFormat:s,enableHover:P,showGrid:B,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...ke({title:F,description:D,summary:N,accessibleTable:M,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:f,defaultTooltipContent:oe}),...Ce({linkedHover:w,selection:A,onObservation:S,onClick:k,hoverRadius:e.hoverRadius,mobileInteraction:i.mobileInteraction,customHoverBehavior:V,customClickBehavior:X}),...g&&g.length>0&&{annotations:g},...b&&{xExtent:b},...x&&{yExtent:x},...ee,...v};return O||E||(ie?/* @__PURE__ */Ii(Qe,{componentName:"CandlestickChart",message:ie,width:H,height:I}):/* @__PURE__ */Ii(Ke,{componentName:"CandlestickChart",width:H,height:I,children:/* @__PURE__ */Ii(he,{ref:o,...le})}))});Pi.displayName="CandlestickChart";import{useMemo as Bi,forwardRef as Fi,useRef as Di}from"react";import{jsx as Ni}from"react/jsx-runtime";de(re);var Mi=Fi(function(e,t){let o=Di(null);Z(t,{variant:"xy",frameRef:o});let i=Te(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,xLabel:e.xLabel,yLabel:e.yLabel,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:a,margin:r,className:l,xFormat:n,yFormat:s,xAccessor:c="x",yAccessor:h="y",pointIdAccessor:m,xScaleType:d,positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:f,gap:g,styleRules:b,tooltip:x,annotations:v,xExtent:A,yExtent:w,frameProps:S={},selection:k,linkedHover:C,onObservation:R,onClick:L,hoverHighlight:_,chartId:H,loading:I,loadingContent:P,emptyContent:B,legendInteraction:F,legendPosition:D}=e,{areaStyle:N,...M}=S,{width:W,height:T,enableHover:O,showGrid:E,showLegend:j,title:z,description:G,summary:V,accessibleTable:X,xLabel:$,yLabel:Y}=i,Q=Bi(()=>qe(a),[a]),K=Di({next:0,indexOf:/* @__PURE__ */new WeakMap,idOf:/* @__PURE__ */new Map,labels:/* @__PURE__ */new Map}),{plotData:J,plotXAccessor:ee,plotXFormat:te,usesIndex:oe}=Bi(()=>{let e="function"==typeof c?c:e=>e[c],t=m?"function"==typeof m?m:e=>e[m]:void 0,o=e=>"number"==typeof e&&Number.isFinite(e)||e instanceof Date,i=(e,t)=>{let o=e??t;return n?n(o):o+""};if(null!=a&&!Q.some((t,i)=>!o(e(t,i))))return{plotData:Q,plotXAccessor:c,plotXFormat:n,usesIndex:!1};if(null!=a){let t=Q.map((t,o)=>e(t,o));return{plotData:Q.map((e,t)=>({...e,__waterfallX:t})),plotXAccessor:"__waterfallX",plotXFormat:e=>i(t[Number(e)],e),usesIndex:!0}}let r=K.current,l=(e,t,o,i)=>{e&&"object"==typeof e&&(r.indexOf.set(e,t),!Object.isFrozen(e)&&!Object.isSealed(e)&&(e.__waterfallX=t)),o&&r.idOf.set(o,t),r.labels.set(t,i)};return{plotData:Q,plotXAccessor:(i,a)=>{let n=e(i,a);if(o(n))return n;let s=t?(t(i,a)??"")+"":"",c=i&&"object"==typeof i?i.__waterfallX:void 0,h="number"==typeof c&&Number.isFinite(c)?c:(i&&"object"==typeof i?r.indexOf.get(i):void 0)??(s?r.idOf.get(s):void 0);if("number"==typeof h)return l(i,h,s,n),h;let m="number"==typeof a?a:r.next;return r.next=Math.max(r.next,m+1),l(i,m,s,n),m},plotXFormat:e=>i(r.labels.get(Number(e)),e),usesIndex:!0}},[a,Q,c,n,m]),ie=Bi(()=>{if(oe&&null!=a)return[{orient:"bottom",tickValues:J.map((e,t)=>t)}]},[a,J,oe]),ae=U({data:J,rawData:a,colorBy:void 0,colorScheme:void 0,legendInteraction:F,legendPosition:D,frameLegend:S,selection:k,linkedHover:C,fallbackFields:["string"==typeof c?c:"x"],unwrapData:!1,onObservation:R,onClick:L,hoverHighlight:_,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"WaterfallChart",chartId:H,showLegend:j,userMargin:r,marginDefaults:i.marginDefaults,loading:I,loadingContent:P,emptyContent:B,width:W,height:T,hasTitle:!!z,axisChrome:mt(S,{showAxes:i.showAxes,xLabel:$,yLabel:Y,axes:S.axes??ie})}),re=Bi(()=>({positiveColor:u,negativeColor:p,connectorStroke:y,connectorWidth:f,gap:g,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity}),[u,p,y,f,g,e.stroke,e.strokeWidth,e.opacity]),le=Bi(()=>Ee(c,h),[c,h]),ne=Bi(()=>$e(void 0,b,le),[b,le]),se=Bi(()=>tt(e=>{let t=ne(e);if(!N)return t;let o="function"==typeof N?N(e):N;return o?{...t,...o}:t},ae.effectiveSelectionHook,ae.resolvedSelection),[ne,N,ae.effectiveSelectionHook,ae.resolvedSelection]),ce=Bi(()=>Se([{label:$||Ae(c),accessor:c,role:"x",format:n},{label:Y||"Change",accessor:h,role:"y",format:s}]),[c,h,$,Y,n,s]);if(ae.earlyReturn)return ae.earlyReturn;let me=q({componentName:"WaterfallChart",data:a,accessors:{xAccessor:c,yAccessor:h}});if(me)/* @__PURE__ */return Ni(Qe,{componentName:"WaterfallChart",message:me,width:W,height:T});let de={chartType:"waterfall",...null!=a&&{data:J},xAccessor:ee,yAccessor:h,xScaleType:null!=a&&oe?"linear":d,waterfallStyle:re,areaStyle:se,size:[W,T],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ae.margin,showAxes:i.showAxes,xLabel:$,yLabel:Y,xFormat:te,yFormat:s,enableHover:O,showGrid:E,...ie&&{axes:ie},...ae.legendBehaviorProps,...ke({title:z,description:G,summary:V,accessibleTable:X,className:l,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Re({tooltip:x,defaultTooltipContent:ce}),...Ce({linkedHover:C,selection:k,onObservation:R,onClick:L,hoverHighlight:_,hoverRadius:e.hoverRadius,mobileInteraction:ae.mobileInteraction,customHoverBehavior:ae.customHoverBehavior,customClickBehavior:ae.customClickBehavior}),...m&&{pointIdAccessor:m},...v&&v.length>0&&{annotations:v},...A&&{xExtent:A},...w&&{yExtent:w},...M};/* @__PURE__ */
51
+ return Ni(Ke,{componentName:"WaterfallChart",width:W,height:T,children:/* @__PURE__ */Ni(he,{ref:o,...de})})});Mi.displayName="WaterfallChart";export{Mt as a,zt as b,$t as c,o as d,l as e,to as f,no as g,go as h,wo as i,_o as j,Do as k,F as l,N as m,di as n,fi as o,Ri as p,Pi as q,Mi as r};