h2o-library 2.2.0 → 2.2.2

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 (28) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/charts/charts/src/bar/chart-bar.d.ts +2 -0
  3. package/dist/charts/charts/src/chart/chart.d.ts +1 -1
  4. package/dist/charts/charts/src/heatmap/chart-heatmap.d.ts +9 -2
  5. package/dist/charts/charts/src/waterfall/chart-waterfall.d.ts +23 -7
  6. package/dist/charts/index.cjs.js +1 -1
  7. package/dist/charts/index.js +1 -1
  8. package/dist/charts/src/bar/chart-bar.d.ts +2 -0
  9. package/dist/charts/src/chart/chart.d.ts +1 -1
  10. package/dist/charts/src/heatmap/chart-heatmap.d.ts +9 -2
  11. package/dist/charts/src/waterfall/chart-waterfall.d.ts +23 -7
  12. package/dist/esm/charts/src/bar/chart-bar.d.ts +2 -0
  13. package/dist/esm/charts/src/chart/chart.d.ts +1 -1
  14. package/dist/esm/charts/src/heatmap/chart-heatmap.d.ts +9 -2
  15. package/dist/esm/charts/src/waterfall/chart-waterfall.d.ts +23 -7
  16. package/dist/hooks/charts/src/bar/chart-bar.d.ts +2 -0
  17. package/dist/hooks/charts/src/chart/chart.d.ts +1 -1
  18. package/dist/hooks/charts/src/heatmap/chart-heatmap.d.ts +9 -2
  19. package/dist/hooks/charts/src/waterfall/chart-waterfall.d.ts +23 -7
  20. package/dist/types/charts/src/bar/chart-bar.d.ts +2 -0
  21. package/dist/types/charts/src/chart/chart.d.ts +1 -1
  22. package/dist/types/charts/src/heatmap/chart-heatmap.d.ts +9 -2
  23. package/dist/types/charts/src/waterfall/chart-waterfall.d.ts +23 -7
  24. package/dist/utils/charts/src/bar/chart-bar.d.ts +2 -0
  25. package/dist/utils/charts/src/chart/chart.d.ts +1 -1
  26. package/dist/utils/charts/src/heatmap/chart-heatmap.d.ts +9 -2
  27. package/dist/utils/charts/src/waterfall/chart-waterfall.d.ts +23 -7
  28. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as e,Fragment as t}from"react/jsx-runtime";import o,{useState as a,useCallback as l,useLayoutEffect as n,useRef as c,useId as i,useEffect as s,useMemo as d}from"react";import{ResponsiveContainer as h,BarChart as u,CartesianGrid as p,Tooltip as k,Legend as v,Bar as m,Cell as C,XAxis as y,YAxis as g,ComposedChart as M,Area as f,Line as x,PieChart as b,Pie as w,Sector as N,ReferenceLine as $}from"recharts";import{createPortal as S}from"react-dom";function A(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t}"function"==typeof SuppressedError&&SuppressedError;const z={backgroundColor:"hsl(var(--tooltip-dark-bg))",color:"hsl(var(--tooltip-dark-fg))",padding:"0.5rem 0.75rem",borderRadius:"6px",fontSize:"0.8125rem",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",whiteSpace:"nowrap",lineHeight:1.5},L={background:"none",border:"none",padding:0,boxShadow:"none",outline:"none"};Object.assign(Object.assign({},z),{position:"fixed",pointerEvents:"none",zIndex:9999,transform:"translate(-50%, calc(-100% - 10px))"});const H=({active:t,payload:o,label:a,bars:l,hoveredBar:n})=>{var c,i,s;if(!t||!(null==o?void 0:o.length)||!n)return null;const d=o.find((r=>r.dataKey===n.dataKey));if(!d)return null;const h=l.find((r=>r.key===n.dataKey)),u=null!==(c=null==h?void 0:h.unit)&&void 0!==c?c:"",p=null!==(s=null!==(i=null==h?void 0:h.label)&&void 0!==i?i:d.name)&&void 0!==s?s:"";return e("div",{style:z,children:[r("div",{style:{fontSize:"0.75rem",opacity:.8},children:a}),r("div",{children:`${p}: ${d.value}${u?` ${u}`:""}`})]})},O=({x:e,y:t,payload:o,onClick:a})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"hsl(var(--muted-200))",fontSize:12,style:{cursor:a?"pointer":"default"},onClick:a?r=>a(o.value,r):void 0,children:o.value})}),j=({x:e,y:t,payload:o,onClick:a})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:4,textAnchor:"end",fill:"hsl(var(--muted-200))",fontSize:12,style:{cursor:a?"pointer":"default"},onClick:a?r=>a(o.value,r):void 0,children:o.value})}),V=({x:e,y:t,payload:o,maxWidth:a,onClick:l})=>r("g",{transform:`translate(${e},${t})`,children:r("foreignObject",{x:-a/2,y:2,width:a,height:22,children:r("div",{title:String(o.value),style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"center",fontSize:12,color:"hsl(var(--muted-200))",padding:"4px 4px 0",cursor:l?"pointer":"default"},onClick:l?r=>l(o.value,r):void 0,onKeyDown:l?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),l(o.value,r))}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:String(o.value)})})}),E=({x:e,y:t,payload:o,onClick:a})=>{const l=String(o.value);return r("g",{transform:`translate(${e},${t})`,children:r("foreignObject",{x:-144,y:-16,width:140,height:32,children:r("div",{title:l,className:"bar-chart-y-label",style:{cursor:a?"pointer":"default"},onClick:a?r=>a(o.value,r):void 0,onKeyDown:a?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),a(o.value,r))}:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,children:l})})})},T=({data:t,bars:o,layout:n="single",orientation:c="vertical",showGrid:i=!0,showLegend:s=!1,height:d=400,className:M,onXAxisTickClick:f,onYAxisTickClick:x,onBarClick:b})=>{const[w,N]=a(null),[$,S]=a(null),[A,z]=a(0),T=l((r=>z(r)),[]),D=(()=>{const r=(()=>{if("stacked"===n)return Math.max(...t.map((r=>o.reduce(((e,t)=>e+(Number(r[t.key])||0)),0))));if("grouped-stacked"===n){const r=[...new Set(o.filter((r=>r.stackId)).map((r=>r.stackId)))];return r.length?Math.max(...t.map((e=>Math.max(...r.map((r=>o.filter((e=>e.stackId===r)).reduce(((r,t)=>r+(Number(e[t.key])||0)),0))))))):Math.max(...t.map((r=>Math.max(...o.map((e=>Number(r[e.key])||0))))))}return Math.max(...t.map((r=>Math.max(...o.map((e=>Number(r[e.key])||0))))))})();if(0===r)return 5;const e=1.2*r,a=Math.floor(Math.log10(e)),l=Math.pow(10,a),c=e/l;let i;return i=c<=1?1:c<=1.2?1.2:c<=1.5?1.5:c<=2?2:c<=2.5?2.5:c<=3?3:c<=4?4:c<=5?5:c<=6?6:c<=8?8:10,i*l})(),I=()=>{S(null),N(null)},K=r=>"stacked"===n?"a":"grouped-stacked"===n?r.stackId:void 0;return r("div",{className:"bar-chart-container"+(M?` ${M}`:""),children:r(h,{width:"100%",height:d,onResize:T,children:e(u,{data:t,layout:"vertical"===c?"horizontal":"vertical",barGap:"grouped"===n||"grouped-stacked"===n?0:4,margin:{top:5,right:20,left:10,bottom:5},children:[i&&r(p,{stroke:"hsl(var(--muted))",vertical:"horizontal"===c,horizontal:"vertical"===c}),(()=>{if("vertical"===c){const e=Math.max(20,(A-80)/t.length);return r(y,{dataKey:"x",axisLine:!1,tickLine:!1,tick:t=>r(V,Object.assign({},t,{maxWidth:e,onClick:f})),interval:0})}return r(y,{type:"number",axisLine:!1,tickLine:!1,domain:[0,D],tick:e=>r(O,Object.assign({},e,{onClick:f}))})})(),r(g,"vertical"===c?{axisLine:!1,tickLine:!1,tick:e=>r(j,Object.assign({},e,{onClick:x})),domain:[0,D]}:{type:"category",dataKey:"x",axisLine:!1,tickLine:!1,tick:e=>r(E,Object.assign({},e,{onClick:x})),width:148,tickMargin:5,interval:0}),r(k,{cursor:!1,content:r(H,{bars:o,hoveredBar:$}),wrapperStyle:L,position:null!=w?w:void 0,isAnimationActive:!1}),s&&r(v,{}),o.map((e=>{var o;return r(m,{dataKey:e.key,fill:e.color,name:null!==(o=e.label)&&void 0!==o?o:e.key,stackId:K(e),onMouseLeave:I,onClick:b?(r,t,o)=>b(r,t,e.key,o):void 0,style:{cursor:b?"pointer":void 0},children:t.map(((t,o)=>r(C,{onMouseEnter:r=>{const t=r.currentTarget.getBoundingClientRect(),a=r.currentTarget.closest(".recharts-wrapper");if(a){const r=a.getBoundingClientRect();((r,e,t,o,a,l)=>{S({dataKey:r,index:e}),N("vertical"===c?{x:t+a/2,y:o}:{x:t+a,y:o+l/2})})(e.key,o,t.left-r.left,t.top-r.top,t.width,t.height)}}},`cell-${o}`)))},e.key)}))]})})})},D=({cx:e,cy:t,stroke:o,setTooltipPosition:a})=>(n((()=>{void 0!==e&&void 0!==t&&a({x:e,y:t})}),[e,t,a]),r("circle",{cx:e,cy:t,r:6,stroke:"hsl(var(--background))",strokeWidth:2,fill:o})),I=({active:t,payload:o,label:a,lines:l,hoveredDataKey:n,showTooltipLabel:c})=>{var i,s,d;if(!t||!(null==o?void 0:o.length)||!n)return null;const h=o.find((r=>r.dataKey===n));if(!h)return null;const u=l.find((r=>r.key===h.dataKey)),p=null!==(i=null==u?void 0:u.unit)&&void 0!==i?i:"",k=null!==(d=null!==(s=null==u?void 0:u.label)&&void 0!==s?s:h.name)&&void 0!==d?d:"";return e("div",{style:z,children:[c&&r("div",{style:{fontSize:"0.75rem",opacity:.8},children:a}),r("div",{children:`${k}: ${h.value}${p?` ${p}`:""}`})]})},K=({x:e,y:t,payload:o,onClick:a})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:4,textAnchor:"end",fill:"hsl(var(--muted-200))",fontSize:12,style:{cursor:a?"pointer":"default"},onClick:a?r=>a(o.value,r):void 0,children:o.value})}),R=({x:e,y:t,payload:o,maxWidth:a,onClick:l})=>r("g",{transform:`translate(${e},${t})`,children:r("foreignObject",{x:-a/2,y:2,width:a,height:22,children:r("div",{title:String(o.value),style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"center",fontSize:12,color:"hsl(var(--muted-200))",padding:"4px 4px 0",cursor:l?"pointer":"default"},onClick:l?r=>l(o.value,r):void 0,onKeyDown:l?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),l(o.value,r))}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:String(o.value)})})}),W=({data:t,lines:o,showGrid:n=!0,showLegend:c=!1,showGradient:i=!0,height:s=400,showTooltipLabel:d=!1,className:u,onXAxisTickClick:m,onYAxisTickClick:C,onDataPointClick:b})=>{const[w,N]=a(null),[$,S]=a(null),[A,z]=a(0),H=l((r=>z(r)),[]),O=(()=>{const r=(()=>{let r=0;return t.forEach((e=>{o.forEach((t=>{const o=e[t.key];"number"==typeof o&&o>r&&(r=o)}))})),r})();if(0===r)return 5;const e=1.2*r,a=Math.floor(Math.log10(e)),l=Math.pow(10,a),n=e/l;let c;return c=n<=1?1:n<=1.2?1.2:n<=1.5?1.5:n<=2?2:n<=2.5?2.5:n<=3?3:n<=4?4:n<=5?5:n<=6?6:n<=8?8:10,c*l})();return r("div",{className:"line-chart-container"+(u?` ${u}`:""),children:r(h,{width:"100%",height:s,onResize:H,children:e(M,{data:t,onMouseLeave:()=>{N(null),S(null)},children:[n&&r(p,{stroke:"hsl(var(--muted))",vertical:!1}),r(y,{dataKey:"x",axisLine:!1,tickLine:!1,tick:e=>r(R,Object.assign({},e,{maxWidth:Math.max(20,(A-60)/t.length),onClick:m})),interval:0}),r(g,{axisLine:!1,tickLine:!1,tick:e=>r(K,Object.assign({},e,{onClick:C})),domain:[0,O]}),r(k,{cursor:!1,content:r(I,{lines:o,hoveredDataKey:w,showTooltipLabel:d}),wrapperStyle:L,offset:10,position:null!=$?$:void 0,isAnimationActive:!1}),c&&r(v,{}),i&&r("defs",{children:o.map((t=>e("linearGradient",{id:`colorGradient_${t.key.replace(/\s/g,"")}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[r("stop",{offset:"5%",stopColor:t.color,stopOpacity:.4}),r("stop",{offset:"95%",stopColor:t.color,stopOpacity:0})]},`${t.key}-gradient`)))}),o.map((e=>r(f,{type:"monotone",dataKey:e.key,stroke:"none",fill:i?`url(#colorGradient_${e.key.replace(/\s/g,"")})`:"none",fillOpacity:1,isAnimationActive:!1,connectNulls:!0,activeDot:!1},`${e.key}-fill`))),o.map((e=>{var t;return r(x,{type:"monotone",dataKey:e.key,stroke:e.color,strokeWidth:null!==(t=e.lineWidth)&&void 0!==t?t:2,strokeDasharray:e.dashed?"5 5":"0",dot:!1,activeDot:w===e.key?r(D,{setTooltipPosition:S}):void 0,isAnimationActive:!1,connectNulls:!0},`${e.key}-line`)})),o.map((e=>r(x,{type:"monotone",dataKey:e.key,stroke:"transparent",strokeWidth:20,onMouseOver:()=>N(e.key),dot:!!b&&(t=>r("circle",{cx:t.cx,cy:t.cy,r:10,fill:"transparent",style:{cursor:"pointer"},onClick:r=>{r.stopPropagation(),b(t.payload,t.index,e.key,r)}},`${e.key}-hit-${t.index}`)),activeDot:!1,isAnimationActive:!1,connectNulls:!0},`${e.key}-hover`)))]})})})};function P(r){var e,t,o="";if("string"==typeof r||"number"==typeof r)o+=r;else if("object"==typeof r)if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=P(r[e]))&&(o&&(o+=" "),o+=t)}else for(t in r)r[t]&&(o&&(o+=" "),o+=t);return o}function F(){for(var r,e,t=0,o="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=P(r))&&(o&&(o+=" "),o+=e);return o}const B=({items:t,itemStyle:o="rectangle",direction:a="horizontal",ariaLabel:l,className:n,itemClassName:c,labelClassName:i,colorClassName:s})=>{const d=(e,t)=>{const o={line:{backgroundColor:e},"dashed-line":{borderColor:e},circle:{backgroundColor:e},rectangle:{backgroundColor:e}};return r("div",{className:F("legend-swatch",`legend-swatch--${t}`,s),style:o[t]})};return r("div",{className:F("legend","vertical"===a&&"legend--vertical",n),"aria-label":l,role:l?"region":void 0,children:t.map((t=>{var a;return e("div",{className:F("legend-item",t.onClick&&"legend-item--clickable",c),onClick:t.onClick,role:t.onClick?"button":void 0,tabIndex:t.onClick?0:void 0,onKeyDown:t.onClick?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),t.onClick())}:void 0,children:[d(t.color,null!==(a=t.style)&&void 0!==a?a:o),r("span",{className:F("legend-label",i),children:t.label})]},t.label)}))})},G=["hsl(225, 91%, 59%)","hsl(280, 91%, 59%)","hsl(330, 91%, 59%)","hsl(30, 91%, 59%)","hsl(150, 91%, 59%)","hsl(190, 91%, 59%)"],_=e=>{var t,o,a,l,n;const c=Math.PI/180,{startAngle:i,endAngle:s,fill:d}=e,h=Number(null!==(t=e.cx)&&void 0!==t?t:0),u=Number(null!==(o=e.cy)&&void 0!==o?o:0),p=Number(null!==(a=e.innerRadius)&&void 0!==a?a:0),k=Number(null!==(l=e.outerRadius)&&void 0!==l?l:0),v=Number(null!==(n=e.midAngle)&&void 0!==n?n:0),m=h+8*Math.cos(-v*c),C=u+8*Math.sin(-v*c);return r(N,{cx:m,cy:C,innerRadius:p,outerRadius:k+4,startAngle:i,endAngle:s,fill:d})},U=({data:t,variant:o="pie",showLegend:l=!1,height:n=400,showLabels:c=!1,showPercentageInTooltip:i=!1,className:s,onSliceClick:d})=>{const[u,p]=a(void 0),[v,m]=a(null),y=t.map(((r,e)=>{var t;return Object.assign(Object.assign({},r),{color:null!==(t=r.color)&&void 0!==t?t:G[e%G.length]})})),g=y.reduce(((r,e)=>r+e.value),0),M=Math.PI/180;return e("div",{className:`pie-chart-container${d?" pie-chart-clickable":""}${s?` ${s}`:""}`,children:[l&&r(B,{itemStyle:"circle",items:y.map((r=>({label:r.label,color:r.color}))),className:"pie-chart-legend"}),r(h,{width:"100%",height:n,style:{cursor:d?"pointer":void 0},children:e(b,{children:[r(k,{content:({active:t,payload:o})=>{var a;if(!t||!(null==o?void 0:o.length)||void 0===u)return null;const l=o[0].payload,n=null!==(a=l.unit)&&void 0!==a?a:"",c=g>0?(l.value/g*100).toFixed(1):"0";return e("div",{style:z,children:[r("div",{style:{fontSize:"0.75rem",opacity:.8},children:l.label}),r("div",{children:`${l.value}${n?` ${n}`:""}${i?` (${c}%)`:""}`})]})},wrapperStyle:L,position:null!=v?v:void 0,isAnimationActive:!1}),r(w,{data:y,dataKey:"value",nameKey:"label",cx:"50%",cy:"50%",outerRadius:"80%",innerRadius:"donut"===o?"40%":"0%",activeIndex:u,activeShape:_,onMouseEnter:(r,e)=>{var t,o,a,l,n;p(e);const c=Number(null!==(t=r.cx)&&void 0!==t?t:0),i=Number(null!==(o=r.cy)&&void 0!==o?o:0),s=Number(null!==(a=r.midAngle)&&void 0!==a?a:0),d=Number(null!==(l=r.innerRadius)&&void 0!==l?l:0),h=d+(Number(null!==(n=r.outerRadius)&&void 0!==n?n:0)-d)/2,u=c+h*Math.cos(-s*M),k=i+h*Math.sin(-s*M);m({x:u,y:k})},onMouseLeave:()=>{p(void 0),m(null)},style:{cursor:d?"pointer":void 0},onClick:d?(r,e,t)=>d(r,e,t):void 0,labelLine:!1,label:!!c&&(e=>{const{cx:t,cy:o,midAngle:a,innerRadius:l,outerRadius:n,percent:c}=e,i=l+.5*(n-l),s=t+i*Math.cos(-a*M),d=o+i*Math.sin(-a*M);return r("text",{x:s,y:d,fill:"hsl(var(--background))",textAnchor:"middle",dominantBaseline:"central",fontSize:12,children:`${(100*(null!=c?c:0)).toFixed(0)}%`})}),children:y.map(((e,t)=>r(C,{fill:e.color,stroke:"none"},`cell-${t}`)))})]})})]})},X=new Set,q=()=>{X.forEach((r=>r()))},Y=({text:o,position:n="top",className:d="",contentClassName:h="",children:u,content:p,variant:k="dark",delay:v=0,maxWidth:m})=>{const[C,y]=a(!1),[g,M]=a({}),[f,x]=a(!1),b=c(null),w=c(null),N=c(),$=i(),A=p||o;s((()=>{x(!0)}),[]);const z=l((()=>{clearTimeout(N.current),y(!1)}),[]),L=l((()=>{v>0?N.current=setTimeout((()=>y(!0)),v):y(!0)}),[v]),H=l((()=>{if(!b.current||!w.current)return;const r=b.current.getBoundingClientRect(),e=w.current.getBoundingClientRect();let t=0,o=0;switch(n){case"top":t=r.top-e.height-8,o=r.left+r.width/2-e.width/2;break;case"bottom":t=r.bottom+8,o=r.left+r.width/2-e.width/2;break;case"left":t=r.top+r.height/2-e.height/2,o=r.left-e.width-8;break;case"right":t=r.top+r.height/2-e.height/2,o=r.right+8}M({top:`${t}px`,left:`${o}px`})}),[n]);s((()=>{if(C)return H(),r=z,0===X.size&&"undefined"!=typeof window&&window.addEventListener("scroll",q,{capture:!0,passive:!0}),X.add(r),()=>(r=>{X.delete(r),0===X.size&&"undefined"!=typeof window&&window.removeEventListener("scroll",q,{capture:!0})})(z);var r}),[C,H,z]),s((()=>()=>clearTimeout(N.current)),[]);const O=void 0!==m?"number"==typeof m?`${m}px`:m:void 0,j=r("div",{id:$,ref:w,role:"tooltip",className:`tooltip-box tooltip-box--${k}${C?" tooltip-visible":""} ${h}`,"data-position":n,style:Object.assign(Object.assign({},g),O?{maxWidth:O}:{}),children:A});return e(t,{children:[r("div",{ref:b,className:`tooltip-container ${d}`,"aria-describedby":C?$:void 0,onMouseEnter:L,onMouseLeave:z,onFocus:L,onBlur:z,children:u}),f&&S(j,document.body)]})},Z=({data:t,showValue:a=!0,showPercentage:l=!1,height:n,className:c,onRowClick:i,onColumnClick:s,onCellClick:d})=>{const{rows:h,columns:u,matrix:p}=t,k=p.flat(),v=Math.max(...k,0),m=r=>({backgroundColor:`hsl(var(--heatmap-hue, 225), var(--heatmap-saturation, 92%), ${(95-50*(v>0?r/v:0)).toFixed(1)}%)`}),C=r=>{const e=v>0?r/v:0;if(95-50*e<65)return{color:"hsl(0, 0%, 100%)"};return{color:`hsl(var(--heatmap-hue, 225), var(--heatmap-saturation, 92%), ${(60-30*e).toFixed(1)}%)`}},y=r=>r.toString().includes(".")?r.toFixed(2):String(r);return r("div",{className:"heatmap-container"+(c?` ${c}`:""),style:{height:n},children:e("div",{className:"heatmap-grid",style:{gridTemplateColumns:`repeat(${u.length+1}, 1fr)`,gridTemplateRows:`auto repeat(${h.length}, 1fr)`},children:[r("div",{className:"heatmap-col-header"}),u.map((e=>r("div",{className:"heatmap-col-tooltip",children:r(Y,{text:e,position:"top",className:"heatmap-col-tooltip",children:r("div",{className:"heatmap-col-header heatmap-header-label",style:{cursor:s?"pointer":"default"},onClick:s?r=>s(e,r):void 0,role:s?"button":void 0,tabIndex:s?0:void 0,onKeyDown:s?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),s(e,r))}:void 0,children:e})})},e))),h.map(((t,n)=>e(o.Fragment,{children:[r("div",{className:"heatmap-row-tooltip",children:r(Y,{text:t,position:"top",className:"heatmap-row-tooltip",children:r("div",{className:"heatmap-row-header heatmap-header-label",style:{cursor:i?"pointer":"default"},onClick:i?r=>i(t,r):void 0,role:i?"button":void 0,tabIndex:i?0:void 0,onKeyDown:i?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),i(t,r))}:void 0,children:t})})}),p[n].map(((t,c)=>{const i=h[n],s=u[c],p=v>0?(t/v*100).toFixed(0):"0",k=e("div",{className:"heatmap-cell",style:Object.assign(Object.assign({},m(t)),{cursor:d?"pointer":void 0}),onClick:d?r=>d(i,s,t,r):void 0,onKeyDown:d?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),d(i,s,t,r))}:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,children:[a&&r("div",{className:"heatmap-cell-content heatmap-cell-value-container",style:C(t),children:r("span",{children:y(t)})}),l&&r("div",{className:"heatmap-cell-content heatmap-cell-percentage-container",style:C(t),children:e("span",{children:[p,"%"]})})]});return a||l?r(o.Fragment,{children:k},`${n}-${c}`):r(Y,{content:e("div",{className:"heatmap-cell-tooltip-content",children:[e("div",{children:["Value: ",y(t)]}),r("div",{children:v>0?`${(t/v*100).toFixed(0)}% of max`:"0% of max"})]}),position:"top",children:k},`${n}-${c}`)}))]},t)))]})})},J={alert:e(t,{children:[r("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",stroke:"currentColor"}),r("path",{d:"M12 9v4",stroke:"currentColor"}),r("path",{d:"M12 17h.01",stroke:"currentColor"})]}),"align-center":e(t,{children:[r("path",{d:"M21 5H3",stroke:"currentColor"}),r("path",{d:"M17 12H7",stroke:"currentColor"}),r("path",{d:"M19 19H5",stroke:"currentColor"})]}),"align-left":e(t,{children:[r("path",{d:"M21 5H3",stroke:"currentColor"}),r("path",{d:"M15 12H3",stroke:"currentColor"}),r("path",{d:"M17 19H3",stroke:"currentColor"})]}),"align-right":e(t,{children:[r("path",{d:"M21 5H3",stroke:"currentColor"}),r("path",{d:"M21 12H9",stroke:"currentColor"}),r("path",{d:"M21 19H7",stroke:"currentColor"})]}),"arrow-down":e(t,{children:[r("path",{d:"M12 5v14",stroke:"currentColor"}),r("path",{d:"m19 12-7 7-7-7",stroke:"currentColor"})]}),"arrow-down-narrow-wide":e(t,{children:[r("path",{d:"m3 16 4 4 4-4",stroke:"currentColor"}),r("path",{d:"M7 20V4",stroke:"currentColor"}),r("path",{d:"M11 4h4",stroke:"currentColor"}),r("path",{d:"M11 8h7",stroke:"currentColor"}),r("path",{d:"M11 12h10",stroke:"currentColor"})]}),"arrow-down-wide-narrow":e(t,{children:[r("path",{d:"m3 16 4 4 4-4",stroke:"currentColor"}),r("path",{d:"M7 20V4",stroke:"currentColor"}),r("path",{d:"M11 4h10",stroke:"currentColor"}),r("path",{d:"M11 8h7",stroke:"currentColor"}),r("path",{d:"M11 12h4",stroke:"currentColor"})]}),"arrow-left":e(t,{children:[r("path",{d:"m12 19-7-7 7-7",stroke:"currentColor"}),r("path",{d:"M19 12H5",stroke:"currentColor"})]}),"arrow-right":e(t,{children:[r("path",{d:"M5 12h14",stroke:"currentColor"}),r("path",{d:"m12 5 7 7-7 7",stroke:"currentColor"})]}),"arrow-up":e(t,{children:[r("path",{d:"m5 12 7-7 7 7",stroke:"currentColor"}),r("path",{d:"M12 19V5",stroke:"currentColor"})]}),"arrow-up-narrow-wide":e(t,{children:[r("path",{d:"m3 8 4-4 4 4",stroke:"currentColor"}),r("path",{d:"M7 4v16",stroke:"currentColor"}),r("path",{d:"M11 12h4",stroke:"currentColor"}),r("path",{d:"M11 16h7",stroke:"currentColor"}),r("path",{d:"M11 20h10",stroke:"currentColor"})]}),"arrow-up-wide-narrow":e(t,{children:[r("path",{d:"m3 8 4-4 4 4",stroke:"currentColor"}),r("path",{d:"M7 4v16",stroke:"currentColor"}),r("path",{d:"M11 12h10",stroke:"currentColor"}),r("path",{d:"M11 16h7",stroke:"currentColor"}),r("path",{d:"M11 20h4",stroke:"currentColor"})]}),bell:e(t,{children:[r("path",{d:"M10.268 21a2 2 0 0 0 3.464 0",stroke:"currentColor"}),r("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",stroke:"currentColor"})]}),"bell-ring":e(t,{children:[r("path",{d:"M10.268 21a2 2 0 0 0 3.464 0",stroke:"currentColor"}),r("path",{d:"M22 8c0-2.3-.8-4.3-2-6",stroke:"currentColor"}),r("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",stroke:"currentColor"}),r("path",{d:"M4 2C2.8 3.7 2 5.7 2 8",stroke:"currentColor"})]}),bold:r("path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",stroke:"currentColor"}),building:e(t,{children:[r("path",{d:"M10 12h4",stroke:"currentColor"}),r("path",{d:"M10 8h4",stroke:"currentColor"}),r("path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",stroke:"currentColor"}),r("path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",stroke:"currentColor"}),r("path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",stroke:"currentColor"})]}),calendar:e(t,{children:[r("path",{d:"M8 2v4",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"M8 14h.01",stroke:"currentColor"}),r("path",{d:"M12 14h.01",stroke:"currentColor"}),r("path",{d:"M16 14h.01",stroke:"currentColor"}),r("path",{d:"M8 18h.01",stroke:"currentColor"}),r("path",{d:"M12 18h.01",stroke:"currentColor"}),r("path",{d:"M16 18h.01",stroke:"currentColor"})]}),"calendar-check":e(t,{children:[r("path",{d:"M8 2v4",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"m9 16 2 2 4-4",stroke:"currentColor"})]}),"calendar-clock":e(t,{children:[r("path",{d:"M16 14v2.2l1.6 1",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",stroke:"currentColor"}),r("path",{d:"M3 10h5",stroke:"currentColor"}),r("path",{d:"M8 2v4",stroke:"currentColor"}),r("circle",{cx:"16",cy:"16",r:"6",stroke:"currentColor"})]}),"calendar-cog":e(t,{children:[r("path",{d:"m15.228 16.852-.923-.383",stroke:"currentColor"}),r("path",{d:"m15.228 19.148-.923.383",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("path",{d:"m16.47 14.305.382.923",stroke:"currentColor"}),r("path",{d:"m16.852 20.772-.383.924",stroke:"currentColor"}),r("path",{d:"m19.148 15.228.383-.923",stroke:"currentColor"}),r("path",{d:"m19.53 21.696-.382-.924",stroke:"currentColor"}),r("path",{d:"m20.772 16.852.924-.383",stroke:"currentColor"}),r("path",{d:"m20.772 19.148.924.383",stroke:"currentColor"}),r("path",{d:"M21 10.592V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"M8 2v4",stroke:"currentColor"}),r("circle",{cx:"18",cy:"18",r:"3",stroke:"currentColor"})]}),"calendar-plus":e(t,{children:[r("path",{d:"M8 2v4",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"M10 16h4",stroke:"currentColor"}),r("path",{d:"M12 14v4",stroke:"currentColor"})]}),"calendar-sync":e(t,{children:[r("path",{d:"M11 10v4h4",stroke:"currentColor"}),r("path",{d:"m11 14 1.535-1.605a5 5 0 0 1 8 1.5",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("path",{d:"m21 18-1.535 1.605a5 5 0 0 1-8-1.5",stroke:"currentColor"}),r("path",{d:"M21 22v-4h-4",stroke:"currentColor"}),r("path",{d:"M21 8.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4.3",stroke:"currentColor"}),r("path",{d:"M3 10h4",stroke:"currentColor"}),r("path",{d:"M8 2v4",stroke:"currentColor"})]}),camera:e(t,{children:[r("path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",stroke:"currentColor"}),r("circle",{cx:"12",cy:"13",r:"3",stroke:"currentColor"})]}),check:r("path",{d:"M20 6 9 17l-5-5",stroke:"currentColor"}),"chevron-down":r("path",{d:"m6 9 6 6 6-6",stroke:"currentColor"}),"chevron-left":r("path",{d:"m15 18-6-6 6-6",stroke:"currentColor"}),"chevron-right":r("path",{d:"m9 18 6-6-6-6",stroke:"currentColor"}),"chevron-up":r("path",{d:"m18 15-6-6-6 6",stroke:"currentColor"}),"chevrons-x":e(t,{children:[r("path",{d:"m9 7-5 5 5 5",stroke:"currentColor"}),r("path",{d:"m15 7 5 5-5 5",stroke:"currentColor"})]}),"chevrons-y":e(t,{children:[r("path",{d:"m7 15 5 5 5-5",stroke:"currentColor"}),r("path",{d:"m7 9 5-5 5 5",stroke:"currentColor"})]}),clock:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor"}),r("path",{d:"M12 6v6l4 2",stroke:"currentColor"})]}),"clock-alert":e(t,{children:[r("path",{d:"M12 6v6l4 2",stroke:"currentColor"}),r("path",{d:"M20 12v5",stroke:"currentColor"}),r("path",{d:"M20 21h.01",stroke:"currentColor"}),r("path",{d:"M21.25 8.2A10 10 0 1 0 16 21.16",stroke:"currentColor"})]}),close:e(t,{children:[r("path",{d:"M18 6 6 18",stroke:"currentColor"}),r("path",{d:"m6 6 12 12",stroke:"currentColor"})]}),coffee:e(t,{children:[r("path",{d:"M10 2v2",stroke:"currentColor"}),r("path",{d:"M14 2v2",stroke:"currentColor"}),r("path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",stroke:"currentColor"}),r("path",{d:"M6 2v2",stroke:"currentColor"})]}),comment:e(t,{children:[r("path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",stroke:"currentColor"}),r("path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",stroke:"currentColor"}),r("path",{d:"M8 14a2 2 0 0 0 2-2V8H8",stroke:"currentColor"})]}),"compact-view":e(t,{children:[r("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",stroke:"currentColor"}),r("path",{d:"M21 9H3",stroke:"currentColor"}),r("path",{d:"M21 15H3",stroke:"currentColor"})]}),copy:e(t,{children:[r("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",stroke:"currentColor"}),r("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",stroke:"currentColor"})]}),cut:e(t,{children:[r("circle",{cx:"6",cy:"6",r:"3",stroke:"currentColor"}),r("path",{d:"M8.12 8.12 12 12",stroke:"currentColor"}),r("path",{d:"M20 4 8.12 15.88",stroke:"currentColor"}),r("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor"}),r("path",{d:"M14.8 14.8 20 20",stroke:"currentColor"})]}),dashboard:e(t,{children:[r("rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",stroke:"currentColor"})]}),"dots-horizontal":e(t,{children:[r("circle",{cx:"12",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"19",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"5",cy:"12",r:"1",stroke:"currentColor"})]}),"dots-vertical":e(t,{children:[r("circle",{cx:"12",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"12",cy:"5",r:"1",stroke:"currentColor"}),r("circle",{cx:"12",cy:"19",r:"1",stroke:"currentColor"})]}),"double-chevron-left":e(t,{children:[r("path",{d:"m11 17-5-5 5-5",stroke:"currentColor"}),r("path",{d:"m18 17-5-5 5-5",stroke:"currentColor"})]}),"double-chevron-right":e(t,{children:[r("path",{d:"m6 17 5-5-5-5",stroke:"currentColor"}),r("path",{d:"m13 17 5-5-5-5",stroke:"currentColor"})]}),download:e(t,{children:[r("path",{d:"M12 15V3",stroke:"currentColor"}),r("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",stroke:"currentColor"}),r("path",{d:"m7 10 5 5 5-5",stroke:"currentColor"})]}),"drag-handle":e(t,{children:[r("circle",{cx:"9",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"9",cy:"5",r:"1",stroke:"currentColor"}),r("circle",{cx:"9",cy:"19",r:"1",stroke:"currentColor"}),r("circle",{cx:"15",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"15",cy:"5",r:"1",stroke:"currentColor"}),r("circle",{cx:"15",cy:"19",r:"1",stroke:"currentColor"})]}),edit:e(t,{children:[r("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",stroke:"currentColor"}),r("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",stroke:"currentColor"})]}),envelope:e(t,{children:[r("path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",stroke:"currentColor"}),r("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",stroke:"currentColor"})]}),"external-link":e(t,{children:[r("path",{d:"M15 3h6v6",stroke:"currentColor"}),r("path",{d:"M10 14 21 3",stroke:"currentColor"}),r("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",stroke:"currentColor"})]}),eye:e(t,{children:[r("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",stroke:"currentColor"}),r("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor"})]}),"eye-off":e(t,{children:[r("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",stroke:"currentColor"}),r("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",stroke:"currentColor"}),r("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",stroke:"currentColor"}),r("path",{d:"m2 2 20 20",stroke:"currentColor"})]}),file:e(t,{children:[r("path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",stroke:"currentColor"}),r("path",{d:"M14 2v5a1 1 0 0 0 1 1h5",stroke:"currentColor"})]}),"file-code":e(t,{children:[r("path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",stroke:"currentColor"}),r("path",{d:"M14 2v5a1 1 0 0 0 1 1h5",stroke:"currentColor"}),r("path",{d:"m5 16-3 3 3 3",stroke:"currentColor"}),r("path",{d:"m9 22 3-3-3-3",stroke:"currentColor"})]}),filter:e(t,{children:[r("path",{d:"M2 5h20",stroke:"currentColor"}),r("path",{d:"M6 12h12",stroke:"currentColor"}),r("path",{d:"M9 19h6",stroke:"currentColor"})]}),"filter-plus":e(t,{children:[r("path",{d:"M12 5H2",stroke:"currentColor"}),r("path",{d:"M6 12h12",stroke:"currentColor"}),r("path",{d:"M9 19h6",stroke:"currentColor"}),r("path",{d:"M16 5h6",stroke:"currentColor"}),r("path",{d:"M19 8V2",stroke:"currentColor"})]}),flag:r("path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",stroke:"currentColor"}),forbidden:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor"}),r("path",{d:"M4.929 4.929 19.07 19.071",stroke:"currentColor"})]}),grid:e(t,{children:[r("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",stroke:"currentColor"})]}),hint:e(t,{children:[r("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",stroke:"currentColor"}),r("path",{d:"M9 18h6",stroke:"currentColor"}),r("path",{d:"M10 22h4",stroke:"currentColor"})]}),hospital:e(t,{children:[r("path",{d:"M12 7v4",stroke:"currentColor"}),r("path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",stroke:"currentColor"}),r("path",{d:"M14 9h-4",stroke:"currentColor"}),r("path",{d:"M18 11h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2",stroke:"currentColor"}),r("path",{d:"M18 21V5a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16",stroke:"currentColor"})]}),home:e(t,{children:[r("path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",stroke:"currentColor"}),r("path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",stroke:"currentColor"})]}),image:e(t,{children:[r("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",stroke:"currentColor"}),r("circle",{cx:"9",cy:"9",r:"2",stroke:"currentColor"}),r("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",stroke:"currentColor"})]}),inbox:e(t,{children:[r("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",stroke:"currentColor"}),r("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",stroke:"currentColor"})]}),info:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor"}),r("path",{d:"M12 16v-4",stroke:"currentColor"}),r("path",{d:"M12 8h.01",stroke:"currentColor"})]}),italic:e(t,{children:[r("line",{x1:"19",x2:"10",y1:"4",y2:"4",stroke:"currentColor"}),r("line",{x1:"14",x2:"5",y1:"20",y2:"20",stroke:"currentColor"}),r("line",{x1:"15",x2:"9",y1:"4",y2:"20",stroke:"currentColor"})]}),layout:e(t,{children:[r("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"3",rx:"7",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"3",y:"14",rx:"7",stroke:"currentColor"})]}),library:e(t,{children:[r("path",{d:"m16 6 4 14",stroke:"currentColor"}),r("path",{d:"M12 6v14",stroke:"currentColor"}),r("path",{d:"M8 8v12",stroke:"currentColor"}),r("path",{d:"M4 4v16",stroke:"currentColor"})]}),link:e(t,{children:[r("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",stroke:"currentColor"}),r("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor"})]}),list:e(t,{children:[r("path",{d:"M3 5h.01",stroke:"currentColor"}),r("path",{d:"M3 12h.01",stroke:"currentColor"}),r("path",{d:"M3 19h.01",stroke:"currentColor"}),r("path",{d:"M8 5h13",stroke:"currentColor"}),r("path",{d:"M8 12h13",stroke:"currentColor"}),r("path",{d:"M8 19h13",stroke:"currentColor"})]}),"list-ol":e(t,{children:[r("path",{d:"M11 5h10",stroke:"currentColor"}),r("path",{d:"M11 12h10",stroke:"currentColor"}),r("path",{d:"M11 19h10",stroke:"currentColor"}),r("path",{d:"M4 4h1v5",stroke:"currentColor"}),r("path",{d:"M4 9h2",stroke:"currentColor"}),r("path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",stroke:"currentColor"})]}),"list-ul":e(t,{children:[r("path",{d:"M3 5h18",stroke:"currentColor"}),r("path",{d:"M3 12h18",stroke:"currentColor"}),r("path",{d:"M3 19h18",stroke:"currentColor"})]}),"log-in":e(t,{children:[r("path",{d:"m10 17 5-5-5-5",stroke:"currentColor"}),r("path",{d:"M15 12H3",stroke:"currentColor"}),r("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",stroke:"currentColor"})]}),"log-out":e(t,{children:[r("path",{d:"m16 17 5-5-5-5",stroke:"currentColor"}),r("path",{d:"M21 12H9",stroke:"currentColor"}),r("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",stroke:"currentColor"})]}),maximize:e(t,{children:[r("path",{d:"M15 3h6v6",stroke:"currentColor"}),r("path",{d:"m21 3-7 7",stroke:"currentColor"}),r("path",{d:"m3 21 7-7",stroke:"currentColor"}),r("path",{d:"M9 21H3v-6",stroke:"currentColor"})]}),message:r("path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",stroke:"currentColor"}),minimize:e(t,{children:[r("path",{d:"m14 10 7-7",stroke:"currentColor"}),r("path",{d:"M20 10h-6V4",stroke:"currentColor"}),r("path",{d:"m3 21 7-7",stroke:"currentColor"}),r("path",{d:"M4 14h6v6",stroke:"currentColor"})]}),minus:r("path",{d:"M5 12h14",stroke:"currentColor"}),note:e(t,{children:[r("path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",stroke:"currentColor"}),r("path",{d:"M15 3v5a1 1 0 0 0 1 1h5",stroke:"currentColor"})]}),paste:e(t,{children:[r("path",{d:"M11 14h10",stroke:"currentColor"}),r("path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",stroke:"currentColor"}),r("path",{d:"m17 18 4-4-4-4",stroke:"currentColor"}),r("path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",stroke:"currentColor"}),r("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",stroke:"currentColor"})]}),phone:r("path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",stroke:"currentColor"}),plus:e(t,{children:[r("path",{d:"M5 12h14",stroke:"currentColor"}),r("path",{d:"M12 5v14",stroke:"currentColor"})]}),quote:e(t,{children:[r("path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",stroke:"currentColor"}),r("path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",stroke:"currentColor"})]}),redo:e(t,{children:[r("path",{d:"M21 7v6h-6",stroke:"currentColor"}),r("path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",stroke:"currentColor"})]}),refresh:e(t,{children:[r("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",stroke:"currentColor"}),r("path",{d:"M21 3v5h-5",stroke:"currentColor"}),r("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",stroke:"currentColor"}),r("path",{d:"M8 16H3v5",stroke:"currentColor"})]}),"relaxed-view":e(t,{children:[r("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 12h18",stroke:"currentColor"})]}),search:e(t,{children:[r("path",{d:"m21 21-4.34-4.34",stroke:"currentColor"}),r("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor"})]}),send:e(t,{children:[r("path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",stroke:"currentColor"}),r("path",{d:"M6 12h16",stroke:"currentColor"})]}),settings:e(t,{children:[r("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",stroke:"currentColor"}),r("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor"})]}),shuffle:e(t,{children:[r("path",{d:"m18 14 4 4-4 4",stroke:"currentColor"}),r("path",{d:"m18 2 4 4-4 4",stroke:"currentColor"}),r("path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",stroke:"currentColor"}),r("path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",stroke:"currentColor"}),r("path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",stroke:"currentColor"})]}),stats:e(t,{children:[r("path",{d:"M3 3v16a2 2 0 0 0 2 2h16",stroke:"currentColor"}),r("path",{d:"M18 17V9",stroke:"currentColor"}),r("path",{d:"M13 17V5",stroke:"currentColor"}),r("path",{d:"M8 17v-3",stroke:"currentColor"})]}),strikethrough:e(t,{children:[r("path",{d:"M16 4H9a3 3 0 0 0-2.83 4",stroke:"currentColor"}),r("path",{d:"M14 12a4 4 0 0 1 0 8H6",stroke:"currentColor"}),r("line",{x1:"4",x2:"20",y1:"12",y2:"12",stroke:"currentColor"})]}),swap:e(t,{children:[r("path",{d:"M8 3 4 7l4 4",stroke:"currentColor"}),r("path",{d:"M4 7h16",stroke:"currentColor"}),r("path",{d:"m16 21 4-4-4-4",stroke:"currentColor"}),r("path",{d:"M20 17H4",stroke:"currentColor"})]}),"swap-vertical":e(t,{children:[r("path",{d:"m3 16 4 4 4-4",stroke:"currentColor"}),r("path",{d:"M7 20V4",stroke:"currentColor"}),r("path",{d:"m21 8-4-4-4 4",stroke:"currentColor"}),r("path",{d:"M17 4v16",stroke:"currentColor"})]}),trash:e(t,{children:[r("path",{d:"M10 11v6",stroke:"currentColor"}),r("path",{d:"M14 11v6",stroke:"currentColor"}),r("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",stroke:"currentColor"}),r("path",{d:"M3 6h18",stroke:"currentColor"}),r("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",stroke:"currentColor"})]}),underline:e(t,{children:[r("path",{d:"M6 4v6a6 6 0 0 0 12 0V4",stroke:"currentColor"}),r("line",{x1:"4",x2:"20",y1:"20",y2:"20",stroke:"currentColor"})]}),undo:e(t,{children:[r("path",{d:"M3 7v6h6",stroke:"currentColor"}),r("path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",stroke:"currentColor"})]}),upload:e(t,{children:[r("path",{d:"M12 3v12",stroke:"currentColor"}),r("path",{d:"m17 8-5-5-5 5",stroke:"currentColor"}),r("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",stroke:"currentColor"})]}),user:e(t,{children:[r("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",stroke:"currentColor"}),r("circle",{cx:"12",cy:"7",r:"4",stroke:"currentColor"})]}),"user-check":e(t,{children:[r("path",{d:"m16 11 2 2 4-4",stroke:"currentColor"}),r("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",stroke:"currentColor"}),r("circle",{cx:"9",cy:"7",r:"4",stroke:"currentColor"})]}),users:e(t,{children:[r("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",stroke:"currentColor"}),r("path",{d:"M16 3.128a4 4 0 0 1 0 7.744",stroke:"currentColor"}),r("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",stroke:"currentColor"}),r("circle",{cx:"9",cy:"7",r:"4",stroke:"currentColor"})]}),wand:e(t,{children:[r("path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",stroke:"currentColor"}),r("path",{d:"m14 7 3 3",stroke:"currentColor"}),r("path",{d:"M5 6v4",stroke:"currentColor"}),r("path",{d:"M19 14v4",stroke:"currentColor"}),r("path",{d:"M10 2v2",stroke:"currentColor"}),r("path",{d:"M7 8H3",stroke:"currentColor"}),r("path",{d:"M21 16h-4",stroke:"currentColor"}),r("path",{d:"M11 3H9",stroke:"currentColor"})]}),"zoom-in":e(t,{children:[r("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor"}),r("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",stroke:"currentColor"}),r("line",{x1:"11",x2:"11",y1:"8",y2:"14",stroke:"currentColor"}),r("line",{x1:"8",x2:"14",y1:"11",y2:"11",stroke:"currentColor"})]}),"zoom-out":e(t,{children:[r("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor"}),r("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",stroke:"currentColor"}),r("line",{x1:"8",x2:"14",y1:"11",y2:"11",stroke:"currentColor"})]}),sort:e(t,{children:[r("path",{d:"M3 5h8",stroke:"currentColor"}),r("path",{d:"M3 12h8",stroke:"currentColor"}),r("path",{d:"M3 19h8",stroke:"currentColor"}),r("path",{d:"m15 8 3-3 3 3",stroke:"currentColor"}),r("path",{d:"m15 16 3 3 3-3",stroke:"currentColor"})]}),sun:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor"}),r("path",{d:"M12 2v2",stroke:"currentColor"}),r("path",{d:"M12 20v2",stroke:"currentColor"}),r("path",{d:"m4.93 4.93 1.41 1.41",stroke:"currentColor"}),r("path",{d:"m17.66 17.66 1.41 1.41",stroke:"currentColor"}),r("path",{d:"M2 12h2",stroke:"currentColor"}),r("path",{d:"M20 12h2",stroke:"currentColor"}),r("path",{d:"m6.34 17.66-1.41 1.41",stroke:"currentColor"}),r("path",{d:"m19.07 4.93-1.41 1.41",stroke:"currentColor"})]}),moon:r("path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",stroke:"currentColor"}),tool:r("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",stroke:"currentColor"}),hook:e(t,{children:[r("path",{d:"m17.586 11.414-5.93 5.93a1 1 0 0 1-8-8l3.137-3.137a.707.707 0 0 1 1.207.5V10",stroke:"currentColor"}),r("path",{d:"M20.414 8.586 22 7",stroke:"currentColor"}),r("circle",{cx:"19",cy:"10",r:"2",stroke:"currentColor"})]}),component:e(t,{children:[r("rect",{width:"18",height:"12",x:"3",y:"8",rx:"1",stroke:"currentColor"}),r("path",{d:"M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3",stroke:"currentColor"}),r("path",{d:"M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3",stroke:"currentColor"})]}),"arrow-up-right":e(t,{children:[r("path",{d:"M7 7h10v10",stroke:"currentColor"}),r("path",{d:"M7 17 17 7",stroke:"currentColor"})]}),chart:e(t,{children:[r("path",{d:"M3 3v16a2 2 0 0 0 2 2h16",stroke:"currentColor"}),r("path",{d:"m19 9-5 5-4-4-3 3",stroke:"currentColor"})]}),star:r("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",stroke:"currentColor"}),sparkles:e(t,{children:[r("path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",stroke:"currentColor"}),r("path",{d:"M20 2v4",stroke:"currentColor"}),r("path",{d:"M22 4h-4",stroke:"currentColor"}),r("circle",{cx:"4",cy:"20",r:"2",stroke:"currentColor"})]}),terminal:e(t,{children:[r("path",{d:"M12 19h8",stroke:"currentColor"}),r("path",{d:"m4 17 6-6-6-6",stroke:"currentColor"})]}),shield:r("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",stroke:"currentColor"}),code:e(t,{children:[r("path",{d:"m18 16 4-4-4-4",stroke:"currentColor"}),r("path",{d:"m6 8-4 4 4 4",stroke:"currentColor"}),r("path",{d:"m14.5 4-5 16",stroke:"currentColor"})]})},Q=e=>{var t,{icon:o,size:a=24,tooltip:l,tooltipPosition:n="top",tooltipVariant:c="dark",strokeWidth:i=2}=e,s=A(e,["icon","size","tooltip","tooltipPosition","tooltipVariant","strokeWidth"]);const d=null!==(t=J[o])&&void 0!==t?t:null,h=r("svg",Object.assign({height:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round"},s,{children:d}));if(null!=l){const e="string"==typeof l?{text:l}:{content:l};return r(Y,Object.assign({},e,{position:n,variant:c,children:h}))}return h},rr=r=>{if(Number.isInteger(r))return String(r);return(Math.abs(r)<1?r.toFixed(3):r.toFixed(2)).replace(/\.?0+$/,"")},er=r=>`${r>=0?"+":"−"}${Math.abs(r).toFixed(2).replace(/\.?0+$/,"")}`,tr=({active:t,payload:o,colors:a})=>{if(!t||!(null==o?void 0:o.length))return null;const l=o[0].payload,n=l.contribution>=0;return e("div",{style:Object.assign(Object.assign({},z),{width:220,whiteSpace:"normal",overflowWrap:"break-word"}),children:[r("div",{style:{fontWeight:600},children:l.feature}),void 0!==l.value&&e("div",{style:{fontSize:"0.75rem",opacity:.8},children:["value: ",String(l.value)]}),r("div",{style:{color:n?a.positive:a.negative},children:er(l.contribution)})]})},or=({x:t=0,y:o=0,width:a=0,height:l=0,payload:n,index:c=0,colors:i,onBarClick:s})=>{if(!n)return null;const d=n.contribution>=0,h=d?i.positive:i.negative,u=!!s,p=s?r=>s({feature:n.feature,code:n.code,value:n.value,contribution:n.contribution},c,r):void 0,k=Math.max(0,Math.min(5,a,l/2)),v=o+l/2,m=(d?[[t,o],[t+a-k,o],[t+a,v],[t+a-k,o+l],[t,o+l]]:[[t+a,o],[t+k,o],[t,v],[t+k,o+l],[t+a,o+l]]).map((r=>r.join(","))).join(" "),C=er(n.contribution),y=a>7*C.length+14,g=y?t+a/2:d?t+a+5:t-5;return e("g",{onClick:p,style:u?{cursor:"pointer"}:void 0,children:[r("polygon",{points:m,fill:h}),r("text",{x:g,y:v,dy:4,textAnchor:y?"middle":d?"start":"end",fontSize:12,fontWeight:y?600:400,fill:y?"hsl(var(--primary-foreground))":h,children:C})]})},ar=({x:t,y:o,payload:a,labelWidth:l})=>{const n=String(a.value),c=n.indexOf("␟"),i=c>=0?n.slice(0,c):"",s=c>=0?n.slice(c+1):n;return r("g",{transform:`translate(${t},${o})`,children:r("foreignObject",{x:-l-4,y:-16,width:l,height:32,children:e("div",{title:i?`${i} = ${s}`:s,className:"waterfall-chart-y-label",children:[i&&e("span",{className:"waterfall-chart-y-value",children:[i," = "]}),r("span",{className:"waterfall-chart-y-feature",children:s})]})})})},lr=({x:e,y:t,payload:o})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"hsl(var(--muted-200))",fontSize:12,children:rr(Number(o.value))})}),nr=({data:t,baseValue:o,prediction:l,maxFeatures:n,colors:c,compact:i,height:p=400,className:v,probSuffix:C="_prob",valueSuffix:M="_value",onBarClick:f})=>{var x,b;const w={positive:null!==(x=null==c?void 0:c.positive)&&void 0!==x?x:"hsl(var(--destructive))",negative:null!==(b=null==c?void 0:c.negative)&&void 0!==b?b:"hsl(var(--primary))"},N=(r=>{const[e,t]=a(!1);return s((()=>{if("undefined"==typeof window)return;const o=window.matchMedia(r);o.matches!==e&&t(o.matches);const a=()=>{t(o.matches)};return o.addEventListener("change",a),()=>o.removeEventListener("change",a)}),[e,r]),e})("(max-width: 640px)"),S=null!=i?i:N,{rows:A,base:z,finalPrediction:H,domain:O,legend:j}=d((()=>{var r,e;const a=(r=>Array.isArray(r))(t)?{features:t,base:void 0,prediction:void 0}:((r,e,t)=>{const o=[];let a,l;for(const[n,c]of Object.entries(r))if("E(f(x))"!==n)if("f(x)"!==n){if(n.endsWith(e)){const a=n.slice(0,-e.length),l=a+t;o.push({feature:a,value:l in r?r[l]:void 0,contribution:Number(c)})}}else l=Number(c);else a=Number(c);return{features:o,base:a,prediction:l}})(t,C,M),c=null!==(r=null!=o?o:a.base)&&void 0!==r?r:0,i=[...a.features].sort(((r,e)=>Math.abs(e.contribution)-Math.abs(r.contribution)));let s=i,d=null;if(void 0!==n&&n>0&&i.length>n){s=i.slice(0,n);const r=i.slice(n),e=r.reduce(((r,e)=>r+e.contribution),0);d={feature:`${r.length} other feature${1===r.length?"":"s"}`,contribution:e}}const h=d?[...s,d]:s;let u=c,p=c,k=c;const v=h.map(((r,e)=>{const t=u,o=u+r.contribution;u=o,p=Math.min(p,t,o),k=Math.max(k,t,o);const a=void 0===r.value?"":"number"==typeof r.value?rr(r.value):String(r.value),l=(r=>{let e=r,t="";do{t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26)-1}while(e>=0);return t})(e);return{label:`${a}␟${S?l:r.feature}`,feature:r.feature,code:l,value:r.value,contribution:r.contribution,offset:Math.min(t,o),span:Math.abs(r.contribution)}})),m=S?v.map((r=>({code:r.code,feature:r.feature}))):[],y=null!=l?l:a.features.length?u:null!==(e=a.prediction)&&void 0!==e?e:c;p=Math.min(p,y),k=Math.max(k,y);const g=.12*(k-p||1);return{rows:v,base:c,finalPrediction:y,domain:[p-g,k+g],legend:m}}),[t,o,l,n,C,M,S]),V=S?56:200;return e("div",{className:"waterfall-chart-container"+(v?` ${v}`:""),children:[r(h,{width:"100%",height:p,children:e(u,{data:A,layout:"vertical",barCategoryGap:"28%",margin:{top:24,right:40,left:10,bottom:24},children:[r(y,{type:"number",domain:O,allowDataOverflow:!0,axisLine:{stroke:"hsl(var(--muted-200))"},tickLine:{stroke:"hsl(var(--muted-200))"},tick:e=>r(lr,Object.assign({},e))}),r(g,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:e=>r(ar,Object.assign({},e,{labelWidth:V})),width:V+8,interval:0}),r(k,{cursor:{fill:"hsl(var(--muted) / 0.35)"},content:r(tr,{colors:w}),wrapperStyle:L,isAnimationActive:!1}),r($,{x:z,stroke:"hsl(var(--muted-200))",strokeDasharray:"4 4",label:{value:`E[f(x)] = ${rr(z)}`,position:"bottom",fill:"hsl(var(--muted-200))",fontSize:12,fontWeight:600}}),r($,{x:H,stroke:"hsl(var(--foreground))",strokeDasharray:"4 4",label:{value:`f(x) = ${rr(H)}`,position:"top",fill:"hsl(var(--foreground))",fontSize:12,fontWeight:600}}),r(m,{dataKey:"offset",stackId:"w",fill:"transparent",isAnimationActive:!1}),r(m,{dataKey:"span",stackId:"w",isAnimationActive:!1,shape:e=>r(or,Object.assign({},e,{colors:w,onBarClick:f}))})]})}),j.length>0&&e("details",{className:"waterfall-chart-legend",children:[e("summary",{className:"waterfall-chart-legend-summary",children:[r("span",{className:"waterfall-chart-legend-title",children:"Feature legend"}),r(Q,{icon:"chevron-down",className:"waterfall-chart-legend-icon"})]}),r("dl",{className:"waterfall-chart-legend-list",children:j.map((t=>e("div",{className:"waterfall-chart-legend-item",children:[r("dt",{className:"waterfall-chart-legend-code",children:t.code}),r("dd",{className:"waterfall-chart-legend-name",children:t.feature})]},t.code)))})]})]})},cr=r=>{if(!r)return"";return r.split(/(?=[A-Z])|[_-]/g).map((r=>r.trim())).filter((r=>r.length>0)).map(((r,e)=>0===e?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase())).join(" ")},ir=["hsl(var(--primary))","hsl(var(--primary-200))","hsl(var(--primary-400))"],sr=["hsl(var(--primary))","hsl(var(--primary-400))"],dr=["hsl(225, 91%, 59%)","hsl(280, 91%, 59%)","hsl(330, 91%, 59%)","hsl(30, 91%, 59%)","hsl(150, 91%, 59%)","hsl(190, 91%, 59%)"],hr=t=>{var{type:o,title:a,info:l,description:n,kpis:c,data:i,height:s=400,className:d}=t,h=A(t,["type","title","info","description","kpis","data","height","className"]);return e("div",{className:"chart-container"+(d?` ${d}`:""),children:[e("div",{className:"chart-header",children:[e("div",{className:"chart-header-content",children:[(a||l)&&e("div",{className:"chart-title-container",children:[a&&r("h3",{className:"chart-title",children:a}),l&&r(Y,{text:l,position:"top",children:r(Q,{icon:"info",size:16,className:"chart-info-icon"})})]}),n&&r("p",{className:"chart-description",children:n})]}),e("div",{className:"chart-metadata",children:[(null==c?void 0:c.length)?r("div",{className:"chart-kpis",children:c.map(((t,o)=>e("div",{className:"chart-kpi",children:[r("div",{className:"chart-kpi-label",children:t.label}),r("div",{className:"chart-kpi-value",children:t.value})]},o)))}):null,"pie"!==o&&"heatmap"!==o&&r(B,{items:(()=>{var r,e,t,a;switch(o){case"bar":case"line":{const r=i[0];if(!r)return[];const e="line"===o?sr:ir;return Object.keys(r).filter((r=>"x"!==r)).map(((r,t)=>({label:cr(r),color:e[t%e.length],style:"line"===o?"line":"rectangle"})))}case"pie":return i.map(((r,e)=>{var t;return{label:cr(r.label),color:null!==(t=r.color)&&void 0!==t?t:dr[e%dr.length],style:"circle"}}));case"waterfall":{const o=h;return[{label:"Pushes higher",color:null!==(e=null===(r=o.colors)||void 0===r?void 0:r.positive)&&void 0!==e?e:"hsl(var(--destructive))",style:"rectangle"},{label:"Pushes lower",color:null!==(a=null===(t=o.colors)||void 0===t?void 0:t.negative)&&void 0!==a?a:"hsl(var(--primary))",style:"rectangle"}]}default:return[]}})(),className:"chart-legend"})]})]}),(()=>{switch(o){case"bar":{const e=i,t=h,o=e.length>0?Object.keys(e[0]).filter((r=>"x"!==r)).map(((r,e)=>({key:r,color:ir[e%ir.length],label:r}))):[];return r(T,{data:e,height:s,bars:o,layout:t.layout,orientation:t.orientation,showGrid:!0,showLegend:!1})}case"line":{const e=i,t=e.length>0?Object.keys(e[0]).filter((r=>"x"!==r)).map(((r,e)=>({key:r,color:sr[e%sr.length],label:r}))):[];return r(W,{data:e,height:s,lines:t,showGrid:!0,showLegend:!1,showGradient:!0,showTooltipLabel:!0})}case"pie":{const e=i.map(((r,e)=>{var t;return Object.assign(Object.assign({},r),{color:null!==(t=r.color)&&void 0!==t?t:dr[e%dr.length]})}));return r(U,{data:e,height:s,showLegend:!0,showLabels:!0})}case"heatmap":return r(Z,{data:i,height:s,showValue:!0,showPercentage:!0});case"waterfall":{const e=h;return r(nr,Object.assign({data:i,height:s},e))}default:return null}})()]})};const ur=({data:t,headerHeight:o})=>e("div",{className:"stat-chart-difference-col",children:[r("p",{className:"stat-chart-difference-title",style:{height:o},children:"Difference"}),t.map(((t,o)=>{const a=t.value2-t.value1,l=0===t.value1?a>0?100:0:a/t.value1*100,n=a>=0,c=n?"stat-chart-difference-positive":"stat-chart-difference-negative",i=n?"arrow-up":"arrow-down";return e("div",{className:"stat-chart-difference-row",children:[e("span",{className:c,children:[r(Q,{icon:i,size:14}),Math.abs(a).toLocaleString()]}),e("span",{className:c,children:[r(Q,{icon:i,size:14}),Math.abs(Math.round(l)),"%"]})]},o)}))]}),pr=({label:t,labelWidth:o,value:a,rowMax:l,fillColor:n,trackColor:c,showTrack:i,reversed:s=!1,tooltipText:d})=>{const h=l>0?Math.min(a/l*100,100):0,u=r("div",{style:Object.assign({position:"absolute",top:0,bottom:0,width:`${h}%`,backgroundColor:n},s?{right:0}:{left:0})}),p=r(Y,{text:d,position:"top",className:"stat-chart-bar-tooltip",children:r("div",{className:"stat-chart-bar-track",style:{backgroundColor:i?c:"hsl(var(--muted-50))"},children:u})});return e("div",{style:{display:"flex",alignItems:"center",gap:"0.625rem",height:48,flexDirection:s?"row-reverse":"row"},children:[!s&&void 0!==t&&r("span",{style:{width:o,flexShrink:0,fontSize:"0.8125rem",color:"hsl(var(--muted-200))",textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:t,children:t}),p]})},kr=({data:t,compareData:o,primaryColor:a="hsl(var(--primary))",primaryLabel:l,compareColor:n="hsl(225, 65%, 62%)",compareLabel:c,trackColor:i="hsl(var(--primary-muted))",compareTrackColor:s,unit:d,showDifference:h=!1,height:u,className:p})=>{const k=null!=s?s:"hsl(225, 65%, 88%)",v=r=>`${r.toLocaleString()}${d?` ${d}`:""}`;if(!o){const e=t.some((r=>void 0!==r.total)),o=Math.max(...t.map((r=>r.value))),l=function(r){const e=r.reduce(((r,e)=>Math.max(r,e.length)),0),t=Math.ceil(7*e)+8;return Math.min(Math.max(t,48),200)}(t.map((r=>r.label)));return r("div",{className:"stat-chart-container"+(p?` ${p}`:""),style:{height:u},children:t.map((t=>{var n;const c=e?null!==(n=t.total)&&void 0!==n?n:t.value:o;return r(pr,{label:t.label,labelWidth:l,value:t.value,rowMax:c,fillColor:a,trackColor:i,showTrack:e&&void 0!==t.total,tooltipText:v(t.value)},t.label)}))})}const m=t.map((r=>{const e=o.find((e=>e.label===r.label));return e?{label:r.label,current:r,previous:e}:null})).filter((r=>null!==r));if(!m.length)return null;const C=t.some((r=>void 0!==r.total)),y=C?void 0:Math.max(...t.map((r=>r.value)),...o.map((r=>r.value))),g=c||l?32:0,M=m.map((({previous:r,current:e})=>({value1:r.value,value2:e.value})));return e("div",{className:"stat-chart-compare-wrapper"+(p?` ${p}`:""),style:{height:u},children:[e("div",{className:"stat-chart-compare-section",children:[c&&r("div",{className:"stat-chart-compare-label",style:{height:g},children:c}),m.map((({label:e,previous:t})=>{var o;const a=C?null!==(o=t.total)&&void 0!==o?o:t.value:y;return r(pr,{value:t.value,rowMax:a,fillColor:n,trackColor:k,showTrack:C&&void 0!==t.total,reversed:!0,tooltipText:v(t.value)},e)}))]}),r("div",{className:"stat-chart-compare-center",style:{paddingTop:g},children:m.map((({label:e})=>r("div",{className:"stat-chart-compare-center-label",style:{height:48,display:"flex",alignItems:"center",justifyContent:"center"},children:e},e)))}),e("div",{className:"stat-chart-compare-section",children:[l&&r("div",{className:"stat-chart-compare-label",style:{height:g},children:l}),m.map((({label:e,current:t})=>{var o;const l=C?null!==(o=t.total)&&void 0!==o?o:t.value:y;return r(pr,{value:t.value,rowMax:l,fillColor:a,trackColor:i,showTrack:C&&void 0!==t.total,tooltipText:v(t.value)},e)}))]}),h&&r(ur,{data:M,headerHeight:g})]})},vr=11;function mr({item:r}){const o=r.rangeEnd-r.rangeStart,a=Math.max(r.barStart,r.rangeStart),l=Math.min(r.barEnd,r.rangeEnd),n=Math.max(0,l-a),c=Math.max(0,r.barEnd-r.rangeEnd),i=r.barEnd-r.barStart,s=o>0?(n/o).toFixed(2):"0.00",d=Math.round(60*c),h=i>0?(c/i).toFixed(2):"0.00";return e("div",{className:"gantt-tooltip-content",children:[e("div",{children:["Range Utilization: ",s]}),c>0&&e(t,{children:[e("div",{children:["Overflow Time: ",d," min"]}),e("div",{children:["Overflow Utilization: ",h]})]})]})}const Cr=({data:t,minTime:o=0,maxTime:a=24,tickInterval:n=2,rangeColor:c="hsl(225, 91%, 80%)",barColor:i="hsl(225, 91%, 50%)",overflowColor:s="hsl(350, 80%, 68%)",rangeLabel:d="Range",barLabel:h="Bar",showLegend:u=!0,labelWidth:p,className:k,onRowClick:v})=>{const m=null!=p?p:90,C=a-o,y=l((r=>(r-o)/C*100),[o,C]),g=r=>{const e=Math.floor(r);return`${e}:${Math.round(60*(r-e)).toString().padStart(2,"0")}`},M=[];for(let r=o;r<=a;r+=n)M.push(r);return e("div",{className:"gantt-chart-container"+(k?` ${k}`:""),children:[u&&r(B,{direction:"horizontal",itemStyle:"line",items:[{label:d,color:c},{label:h,color:i}],className:"gantt-chart-legend"}),e("div",{style:{display:"flex",flexDirection:"row"},children:[e("div",{style:{width:m,flexShrink:0},children:[t.map((e=>r("div",{style:{height:44,display:"flex",alignItems:"center",paddingRight:"0.75rem",fontSize:"0.8125rem",color:"hsl(var(--muted-200))"},children:e.label},e.label))),r("div",{style:{height:32,display:"flex",alignItems:"flex-start",paddingTop:10,fontSize:"0.75rem",color:"hsl(var(--muted-200))"},children:"Time"})]}),e("div",{style:{flex:1,minWidth:0,position:"relative"},children:[M.map((e=>r("div",{style:{position:"absolute",left:`${y(e)}%`,top:0,bottom:32,width:1,backgroundColor:"hsl(var(--muted-50))",pointerEvents:"none"}},e))),t.map((t=>{const o=y(t.rangeStart),a=y(t.rangeEnd)-o,l=y(t.barStart),n=Math.min(t.barEnd,t.rangeEnd),d=y(n)-l,h=t.barEnd>t.rangeEnd,u=y(t.rangeEnd),p=y(t.barEnd)-u,k=16.5,m=y(t.barStart),C=y(t.barEnd),g=Math.max(0,C-m),M=g>0;return e("div",{style:{height:44,position:"relative",cursor:v?"pointer":"default"},onClick:v?r=>v(t,r):void 0,onKeyDown:v?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),v(t,r))}:void 0,role:v?"button":void 0,tabIndex:v?0:void 0,children:[r("div",{style:{position:"absolute",left:`${o}%`,width:`${Math.max(a,0)}%`,height:16,top:14,backgroundColor:c,borderRadius:8}}),d>0&&r("div",{style:{position:"absolute",left:`${l}%`,width:`${Math.max(d,0)}%`,height:vr,top:k,backgroundColor:i,borderRadius:h?"5.5px 0 0 5.5px":5.5,zIndex:1}}),h&&p>0&&r("div",{style:{position:"absolute",left:`${u}%`,width:`${Math.max(p,0)}%`,height:vr,top:k,background:`linear-gradient(to right, ${i}, ${s})`,borderRadius:"0 5.5px 5.5px 0",zIndex:1}}),M&&r("div",{style:{position:"absolute",left:`${m}%`,width:`${g}%`,top:k,height:vr,zIndex:2},children:r(Y,{content:r(mr,{item:t}),position:"top",className:"gantt-bar-tooltip",maxWidth:280,children:r("div",{className:"gantt-bar-tooltip-hit"})})})]},t.label)})),r("div",{style:{height:32,position:"relative",borderTop:"1px solid hsl(var(--muted-50))"},children:M.map((e=>r("div",{style:{position:"absolute",left:`${y(e)}%`,top:8,transform:"translateX(-50%)",fontSize:11,color:"hsl(var(--muted-200))",whiteSpace:"nowrap"},children:g(e)},e)))})]})]})]})};export{T as BarChart,hr as Chart,Cr as GanttChart,Z as HeatmapChart,B as Legend,W as LineChart,U as PieChart,kr as StatChart,nr as WaterfallChart};
1
+ import{jsx as r,jsxs as e,Fragment as t}from"react/jsx-runtime";import o,{useState as l,useCallback as a,useLayoutEffect as n,useRef as i,useId as c,useEffect as s,useMemo as h}from"react";import{ResponsiveContainer as d,BarChart as u,CartesianGrid as p,Tooltip as k,Legend as v,Bar as m,Cell as C,XAxis as y,YAxis as g,ComposedChart as f,Area as M,Line as x,PieChart as b,Pie as w,Sector as N,ReferenceLine as $}from"recharts";import{createPortal as S}from"react-dom";function A(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(o=Object.getOwnPropertySymbols(r);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(r,o[l])&&(t[o[l]]=r[o[l]])}return t}"function"==typeof SuppressedError&&SuppressedError;const z={backgroundColor:"hsl(var(--tooltip-dark-bg))",color:"hsl(var(--tooltip-dark-fg))",padding:"0.5rem 0.75rem",borderRadius:"6px",fontSize:"0.8125rem",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",whiteSpace:"nowrap",lineHeight:1.5},L={background:"none",border:"none",padding:0,boxShadow:"none",outline:"none"};Object.assign(Object.assign({},z),{position:"fixed",pointerEvents:"none",zIndex:9999,transform:"translate(-50%, calc(-100% - 10px))"});const H=({active:t,payload:o,label:l,bars:a,hoveredBar:n})=>{var i,c,s;if(!t||!(null==o?void 0:o.length)||!n)return null;const h=o.find((r=>r.dataKey===n.dataKey));if(!h)return null;const d=a.find((r=>r.key===n.dataKey)),u=null!==(i=null==d?void 0:d.unit)&&void 0!==i?i:"",p=null!==(s=null!==(c=null==d?void 0:d.label)&&void 0!==c?c:h.name)&&void 0!==s?s:"";return e("div",{style:z,children:[r("div",{style:{fontSize:"0.75rem",opacity:.8},children:l}),r("div",{children:`${p}: ${h.value}${u?` ${u}`:""}`})]})},O=({x:e,y:t,payload:o,onClick:l})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"hsl(var(--muted-200))",fontSize:12,style:{cursor:l?"pointer":"default"},onClick:l?r=>l(o.value,r):void 0,children:o.value})}),j=({x:e,y:t,payload:o,onClick:l})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:4,textAnchor:"end",fill:"hsl(var(--muted-200))",fontSize:12,style:{cursor:l?"pointer":"default"},onClick:l?r=>l(o.value,r):void 0,children:o.value})}),V=({x:e,y:t,payload:o,maxWidth:l,onClick:a})=>r("g",{transform:`translate(${e},${t})`,children:r("foreignObject",{x:-l/2,y:2,width:l,height:22,children:r("div",{title:String(o.value),style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"center",fontSize:12,color:"hsl(var(--muted-200))",padding:"4px 4px 0",cursor:a?"pointer":"default"},onClick:a?r=>a(o.value,r):void 0,onKeyDown:a?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),a(o.value,r))}:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,children:String(o.value)})})}),E=({x:e,y:t,payload:o,onClick:l})=>{const a=String(o.value);return r("g",{transform:`translate(${e},${t})`,children:r("foreignObject",{x:-144,y:-16,width:140,height:32,children:r("div",{title:a,className:"bar-chart-y-label",style:{cursor:l?"pointer":"default"},onClick:l?r=>l(o.value,r):void 0,onKeyDown:l?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),l(o.value,r))}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:a})})})},T=({x:e=0,y:t=0,width:o=0,height:l=0,index:a=0,data:n,labelKey:i,color:c,orientation:s})=>{var h;const d=null===(h=n[a])||void 0===h?void 0:h[i];if(null==d||""===d)return null;const u=Math.abs(o),p=Math.abs(l);if(u<=1||p<=1)return null;const k=String(d);let v,m,C,y,g,f;if("vertical"===s){const r=Math.min(t,t+l);C=u,y=34,v=Math.min(e,e+o),m=r-34,g="flex-end",f="center"}else{C=68,y=p,v=Math.max(e,e+o)+2,m=Math.min(t,t+l),g="center",f="flex-start"}const M=Math.max(1,Math.floor((y-2)/13));return r("foreignObject",{x:v,y:m,width:C,height:y,style:{overflow:"hidden",pointerEvents:"none"},children:r("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:g,justifyContent:f,padding:"vertical"===s?"0 2px 2px":"0 4px",boxSizing:"border-box"},children:r("span",{title:k,style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:M,overflow:"hidden",textAlign:"vertical"===s?"center":"left",wordBreak:"break-word",fontSize:11,lineHeight:"13px",fontWeight:600,color:c},children:k})})})},K=({data:t,bars:o,layout:n="single",orientation:i="vertical",showGrid:c=!0,showLegend:s=!1,height:h=400,className:f,onXAxisTickClick:M,onYAxisTickClick:x,onBarClick:b})=>{const[w,N]=l(null),[$,S]=l(null),[A,z]=l(0),K=a((r=>z(r)),[]),I=o.some((r=>r.labelKey)),D=(()=>{const r=(()=>{if("stacked"===n)return Math.max(...t.map((r=>o.reduce(((e,t)=>e+(Number(r[t.key])||0)),0))));if("grouped-stacked"===n){const r=[...new Set(o.filter((r=>r.stackId)).map((r=>r.stackId)))];return r.length?Math.max(...t.map((e=>Math.max(...r.map((r=>o.filter((e=>e.stackId===r)).reduce(((r,t)=>r+(Number(e[t.key])||0)),0))))))):Math.max(...t.map((r=>Math.max(...o.map((e=>Number(r[e.key])||0))))))}return Math.max(...t.map((r=>Math.max(...o.map((e=>Number(r[e.key])||0))))))})();if(0===r)return 5;const e=1.2*r,l=Math.floor(Math.log10(e)),a=Math.pow(10,l),i=e/a;let c;return c=i<=1?1:i<=1.2?1.2:i<=1.5?1.5:i<=2?2:i<=2.5?2.5:i<=3?3:i<=4?4:i<=5?5:i<=6?6:i<=8?8:10,c*a})(),W=()=>{S(null),N(null)},R=r=>"stacked"===n?"a":"grouped-stacked"===n?r.stackId:void 0;return r("div",{className:"bar-chart-container"+(f?` ${f}`:""),children:r(d,{width:"100%",height:h,onResize:K,children:e(u,{data:t,layout:"vertical"===i?"horizontal":"vertical",barGap:"grouped"===n||"grouped-stacked"===n?0:4,margin:{top:I&&"vertical"===i?40:5,right:I&&"horizontal"===i?88:20,left:10,bottom:5},children:[c&&r(p,{stroke:"hsl(var(--muted))",vertical:"horizontal"===i,horizontal:"vertical"===i}),(()=>{if("vertical"===i){const e=Math.max(20,(A-80)/t.length);return r(y,{dataKey:"x",axisLine:!1,tickLine:!1,tick:t=>r(V,Object.assign({},t,{maxWidth:e,onClick:M})),interval:0})}return r(y,{type:"number",axisLine:!1,tickLine:!1,domain:[0,D],tick:e=>r(O,Object.assign({},e,{onClick:M}))})})(),r(g,"vertical"===i?{axisLine:!1,tickLine:!1,tick:e=>r(j,Object.assign({},e,{onClick:x})),domain:[0,D]}:{type:"category",dataKey:"x",axisLine:!1,tickLine:!1,tick:e=>r(E,Object.assign({},e,{onClick:x})),width:148,tickMargin:5,interval:0}),r(k,{cursor:!1,content:r(H,{bars:o,hoveredBar:$}),wrapperStyle:L,position:null!=w?w:void 0,isAnimationActive:!1}),s&&r(v,{}),o.map((e=>{var o;return r(m,{dataKey:e.key,fill:e.color,name:null!==(o=e.label)&&void 0!==o?o:e.key,stackId:R(e),label:e.labelKey?o=>{var l;return r(T,Object.assign({},o,{data:t,labelKey:e.labelKey,color:null!==(l=e.labelColor)&&void 0!==l?l:"hsl(var(--foreground))",orientation:i}))}:void 0,onMouseLeave:W,onClick:b?(r,t,o)=>b(r,t,e.key,o):void 0,style:{cursor:b?"pointer":void 0},children:t.map(((t,o)=>r(C,{onMouseEnter:r=>{const t=r.currentTarget.getBoundingClientRect(),l=r.currentTarget.closest(".recharts-wrapper");if(l){const r=l.getBoundingClientRect();((r,e,t,o,l,a)=>{S({dataKey:r,index:e}),N("vertical"===i?{x:t+l/2,y:o}:{x:t+l,y:o+a/2})})(e.key,o,t.left-r.left,t.top-r.top,t.width,t.height)}}},`cell-${o}`)))},e.key)}))]})})})},I=({cx:e,cy:t,stroke:o,setTooltipPosition:l})=>(n((()=>{void 0!==e&&void 0!==t&&l({x:e,y:t})}),[e,t,l]),r("circle",{cx:e,cy:t,r:6,stroke:"hsl(var(--background))",strokeWidth:2,fill:o})),D=({active:t,payload:o,label:l,lines:a,hoveredDataKey:n,showTooltipLabel:i})=>{var c,s,h;if(!t||!(null==o?void 0:o.length)||!n)return null;const d=o.find((r=>r.dataKey===n));if(!d)return null;const u=a.find((r=>r.key===d.dataKey)),p=null!==(c=null==u?void 0:u.unit)&&void 0!==c?c:"",k=null!==(h=null!==(s=null==u?void 0:u.label)&&void 0!==s?s:d.name)&&void 0!==h?h:"";return e("div",{style:z,children:[i&&r("div",{style:{fontSize:"0.75rem",opacity:.8},children:l}),r("div",{children:`${k}: ${d.value}${p?` ${p}`:""}`})]})},W=({x:e,y:t,payload:o,onClick:l})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:4,textAnchor:"end",fill:"hsl(var(--muted-200))",fontSize:12,style:{cursor:l?"pointer":"default"},onClick:l?r=>l(o.value,r):void 0,children:o.value})}),R=({x:e,y:t,payload:o,maxWidth:l,onClick:a})=>r("g",{transform:`translate(${e},${t})`,children:r("foreignObject",{x:-l/2,y:2,width:l,height:22,children:r("div",{title:String(o.value),style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"center",fontSize:12,color:"hsl(var(--muted-200))",padding:"4px 4px 0",cursor:a?"pointer":"default"},onClick:a?r=>a(o.value,r):void 0,onKeyDown:a?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),a(o.value,r))}:void 0,role:a?"button":void 0,tabIndex:a?0:void 0,children:String(o.value)})})}),F=({data:t,lines:o,showGrid:n=!0,showLegend:i=!1,showGradient:c=!0,height:s=400,showTooltipLabel:h=!1,className:u,onXAxisTickClick:m,onYAxisTickClick:C,onDataPointClick:b})=>{const[w,N]=l(null),[$,S]=l(null),[A,z]=l(0),H=a((r=>z(r)),[]),O=(()=>{const r=(()=>{let r=0;return t.forEach((e=>{o.forEach((t=>{const o=e[t.key];"number"==typeof o&&o>r&&(r=o)}))})),r})();if(0===r)return 5;const e=1.2*r,l=Math.floor(Math.log10(e)),a=Math.pow(10,l),n=e/a;let i;return i=n<=1?1:n<=1.2?1.2:n<=1.5?1.5:n<=2?2:n<=2.5?2.5:n<=3?3:n<=4?4:n<=5?5:n<=6?6:n<=8?8:10,i*a})();return r("div",{className:"line-chart-container"+(u?` ${u}`:""),children:r(d,{width:"100%",height:s,onResize:H,children:e(f,{data:t,onMouseLeave:()=>{N(null),S(null)},children:[n&&r(p,{stroke:"hsl(var(--muted))",vertical:!1}),r(y,{dataKey:"x",axisLine:!1,tickLine:!1,tick:e=>r(R,Object.assign({},e,{maxWidth:Math.max(20,(A-60)/t.length),onClick:m})),interval:0}),r(g,{axisLine:!1,tickLine:!1,tick:e=>r(W,Object.assign({},e,{onClick:C})),domain:[0,O]}),r(k,{cursor:!1,content:r(D,{lines:o,hoveredDataKey:w,showTooltipLabel:h}),wrapperStyle:L,offset:10,position:null!=$?$:void 0,isAnimationActive:!1}),i&&r(v,{}),c&&r("defs",{children:o.map((t=>e("linearGradient",{id:`colorGradient_${t.key.replace(/\s/g,"")}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[r("stop",{offset:"5%",stopColor:t.color,stopOpacity:.4}),r("stop",{offset:"95%",stopColor:t.color,stopOpacity:0})]},`${t.key}-gradient`)))}),o.map((e=>r(M,{type:"monotone",dataKey:e.key,stroke:"none",fill:c?`url(#colorGradient_${e.key.replace(/\s/g,"")})`:"none",fillOpacity:1,isAnimationActive:!1,connectNulls:!0,activeDot:!1},`${e.key}-fill`))),o.map((e=>{var t;return r(x,{type:"monotone",dataKey:e.key,stroke:e.color,strokeWidth:null!==(t=e.lineWidth)&&void 0!==t?t:2,strokeDasharray:e.dashed?"5 5":"0",dot:!1,activeDot:w===e.key?r(I,{setTooltipPosition:S}):void 0,isAnimationActive:!1,connectNulls:!0},`${e.key}-line`)})),o.map((e=>r(x,{type:"monotone",dataKey:e.key,stroke:"transparent",strokeWidth:20,onMouseOver:()=>N(e.key),dot:!!b&&(t=>r("circle",{cx:t.cx,cy:t.cy,r:10,fill:"transparent",style:{cursor:"pointer"},onClick:r=>{r.stopPropagation(),b(t.payload,t.index,e.key,r)}},`${e.key}-hit-${t.index}`)),activeDot:!1,isAnimationActive:!1,connectNulls:!0},`${e.key}-hover`)))]})})})};function P(r){var e,t,o="";if("string"==typeof r||"number"==typeof r)o+=r;else if("object"==typeof r)if(Array.isArray(r)){var l=r.length;for(e=0;e<l;e++)r[e]&&(t=P(r[e]))&&(o&&(o+=" "),o+=t)}else for(t in r)r[t]&&(o&&(o+=" "),o+=t);return o}function B(){for(var r,e,t=0,o="",l=arguments.length;t<l;t++)(r=arguments[t])&&(e=P(r))&&(o&&(o+=" "),o+=e);return o}const G=({items:t,itemStyle:o="rectangle",direction:l="horizontal",ariaLabel:a,className:n,itemClassName:i,labelClassName:c,colorClassName:s})=>{const h=(e,t)=>{const o={line:{backgroundColor:e},"dashed-line":{borderColor:e},circle:{backgroundColor:e},rectangle:{backgroundColor:e}};return r("div",{className:B("legend-swatch",`legend-swatch--${t}`,s),style:o[t]})};return r("div",{className:B("legend","vertical"===l&&"legend--vertical",n),"aria-label":a,role:a?"region":void 0,children:t.map((t=>{var l;return e("div",{className:B("legend-item",t.onClick&&"legend-item--clickable",i),onClick:t.onClick,role:t.onClick?"button":void 0,tabIndex:t.onClick?0:void 0,onKeyDown:t.onClick?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),t.onClick())}:void 0,children:[h(t.color,null!==(l=t.style)&&void 0!==l?l:o),r("span",{className:B("legend-label",c),children:t.label})]},t.label)}))})},U=["hsl(225, 91%, 59%)","hsl(280, 91%, 59%)","hsl(330, 91%, 59%)","hsl(30, 91%, 59%)","hsl(150, 91%, 59%)","hsl(190, 91%, 59%)"],X=e=>{var t,o,l,a,n;const i=Math.PI/180,{startAngle:c,endAngle:s,fill:h}=e,d=Number(null!==(t=e.cx)&&void 0!==t?t:0),u=Number(null!==(o=e.cy)&&void 0!==o?o:0),p=Number(null!==(l=e.innerRadius)&&void 0!==l?l:0),k=Number(null!==(a=e.outerRadius)&&void 0!==a?a:0),v=Number(null!==(n=e.midAngle)&&void 0!==n?n:0),m=d+8*Math.cos(-v*i),C=u+8*Math.sin(-v*i);return r(N,{cx:m,cy:C,innerRadius:p,outerRadius:k+4,startAngle:c,endAngle:s,fill:h})},_=({data:t,variant:o="pie",showLegend:a=!1,height:n=400,showLabels:i=!1,showPercentageInTooltip:c=!1,className:s,onSliceClick:h})=>{const[u,p]=l(void 0),[v,m]=l(null),y=t.map(((r,e)=>{var t;return Object.assign(Object.assign({},r),{color:null!==(t=r.color)&&void 0!==t?t:U[e%U.length]})})),g=y.reduce(((r,e)=>r+e.value),0),f=Math.PI/180;return e("div",{className:`pie-chart-container${h?" pie-chart-clickable":""}${s?` ${s}`:""}`,children:[a&&r(G,{itemStyle:"circle",items:y.map((r=>({label:r.label,color:r.color}))),className:"pie-chart-legend"}),r(d,{width:"100%",height:n,style:{cursor:h?"pointer":void 0},children:e(b,{children:[r(k,{content:({active:t,payload:o})=>{var l;if(!t||!(null==o?void 0:o.length)||void 0===u)return null;const a=o[0].payload,n=null!==(l=a.unit)&&void 0!==l?l:"",i=g>0?(a.value/g*100).toFixed(1):"0";return e("div",{style:z,children:[r("div",{style:{fontSize:"0.75rem",opacity:.8},children:a.label}),r("div",{children:`${a.value}${n?` ${n}`:""}${c?` (${i}%)`:""}`})]})},wrapperStyle:L,position:null!=v?v:void 0,isAnimationActive:!1}),r(w,{data:y,dataKey:"value",nameKey:"label",cx:"50%",cy:"50%",outerRadius:"80%",innerRadius:"donut"===o?"40%":"0%",activeIndex:u,activeShape:X,onMouseEnter:(r,e)=>{var t,o,l,a,n;p(e);const i=Number(null!==(t=r.cx)&&void 0!==t?t:0),c=Number(null!==(o=r.cy)&&void 0!==o?o:0),s=Number(null!==(l=r.midAngle)&&void 0!==l?l:0),h=Number(null!==(a=r.innerRadius)&&void 0!==a?a:0),d=h+(Number(null!==(n=r.outerRadius)&&void 0!==n?n:0)-h)/2,u=i+d*Math.cos(-s*f),k=c+d*Math.sin(-s*f);m({x:u,y:k})},onMouseLeave:()=>{p(void 0),m(null)},style:{cursor:h?"pointer":void 0},onClick:h?(r,e,t)=>h(r,e,t):void 0,labelLine:!1,label:!!i&&(e=>{const{cx:t,cy:o,midAngle:l,innerRadius:a,outerRadius:n,percent:i}=e,c=a+.5*(n-a),s=t+c*Math.cos(-l*f),h=o+c*Math.sin(-l*f);return r("text",{x:s,y:h,fill:"hsl(var(--background))",textAnchor:"middle",dominantBaseline:"central",fontSize:12,children:`${(100*(null!=i?i:0)).toFixed(0)}%`})}),children:y.map(((e,t)=>r(C,{fill:e.color,stroke:"none"},`cell-${t}`)))})]})})]})},q=new Set,Y=()=>{q.forEach((r=>r()))},Z=({text:o,position:n="top",className:h="",contentClassName:d="",children:u,content:p,variant:k="dark",delay:v=0,maxWidth:m})=>{const[C,y]=l(!1),[g,f]=l({}),[M,x]=l(!1),b=i(null),w=i(null),N=i(),$=c(),A=p||o;s((()=>{x(!0)}),[]);const z=a((()=>{clearTimeout(N.current),y(!1)}),[]),L=a((()=>{v>0?N.current=setTimeout((()=>y(!0)),v):y(!0)}),[v]),H=a((()=>{if(!b.current||!w.current)return;const r=b.current.getBoundingClientRect(),e=w.current.getBoundingClientRect();let t=0,o=0;switch(n){case"top":t=r.top-e.height-8,o=r.left+r.width/2-e.width/2;break;case"bottom":t=r.bottom+8,o=r.left+r.width/2-e.width/2;break;case"left":t=r.top+r.height/2-e.height/2,o=r.left-e.width-8;break;case"right":t=r.top+r.height/2-e.height/2,o=r.right+8}f({top:`${t}px`,left:`${o}px`})}),[n]);s((()=>{if(C)return H(),r=z,0===q.size&&"undefined"!=typeof window&&window.addEventListener("scroll",Y,{capture:!0,passive:!0}),q.add(r),()=>(r=>{q.delete(r),0===q.size&&"undefined"!=typeof window&&window.removeEventListener("scroll",Y,{capture:!0})})(z);var r}),[C,H,z]),s((()=>()=>clearTimeout(N.current)),[]);const O=void 0!==m?"number"==typeof m?`${m}px`:m:void 0,j=r("div",{id:$,ref:w,role:"tooltip",className:`tooltip-box tooltip-box--${k}${C?" tooltip-visible":""} ${d}`,"data-position":n,style:Object.assign(Object.assign({},g),O?{maxWidth:O}:{}),children:A});return e(t,{children:[r("div",{ref:b,className:`tooltip-container ${h}`,"aria-describedby":C?$:void 0,onMouseEnter:L,onMouseLeave:z,onFocus:L,onBlur:z,children:u}),M&&S(j,document.body)]})},J=r=>"number"==typeof r,Q=({data:t,showValue:l=!0,showPercentage:a=!1,height:n,className:i,onRowClick:c,onColumnClick:s,onCellClick:h})=>{const{rows:d,columns:u,matrix:p}=t,k=p.flat().filter(J),v=Math.max(...k,0),m={backgroundColor:"hsl(var(--muted))"},C={color:"hsl(var(--muted-200))"},y=r=>{if(!J(r))return m;return{backgroundColor:`hsl(var(--heatmap-hue, 225), var(--heatmap-saturation, 92%), ${(95-50*(v>0?r/v:0)).toFixed(1)}%)`}},g=r=>{if(!J(r))return C;const e=v>0?r/v:0;if(95-50*e<65)return{color:"hsl(0, 0%, 100%)"};return{color:`hsl(var(--heatmap-hue, 225), var(--heatmap-saturation, 92%), ${(60-30*e).toFixed(1)}%)`}},f=r=>J(r)?r.toString().includes(".")?r.toFixed(2):String(r):r;return r("div",{className:"heatmap-container"+(i?` ${i}`:""),style:{height:n},children:e("div",{className:"heatmap-grid",style:{gridTemplateColumns:`repeat(${u.length+1}, 1fr)`,gridTemplateRows:`auto repeat(${d.length}, 1fr)`},children:[r("div",{className:"heatmap-col-header"}),u.map((e=>r("div",{className:"heatmap-col-tooltip",children:r(Z,{text:e,position:"top",className:"heatmap-col-tooltip",children:r("div",{className:"heatmap-col-header heatmap-header-label",style:{cursor:s?"pointer":"default"},onClick:s?r=>s(e,r):void 0,role:s?"button":void 0,tabIndex:s?0:void 0,onKeyDown:s?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),s(e,r))}:void 0,children:e})})},e))),d.map(((t,n)=>e(o.Fragment,{children:[r("div",{className:"heatmap-row-tooltip",children:r(Z,{text:t,position:"top",className:"heatmap-row-tooltip",children:r("div",{className:"heatmap-row-header heatmap-header-label",style:{cursor:c?"pointer":"default"},onClick:c?r=>c(t,r):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),c(t,r))}:void 0,children:t})})}),p[n].map(((t,i)=>{const c=d[n],s=u[i],p=J(t)&&v>0?(t/v*100).toFixed(0):"0",k=e("div",{className:"heatmap-cell",style:Object.assign(Object.assign({},y(t)),{cursor:h?"pointer":void 0}),onClick:h?r=>h(c,s,t,r):void 0,onKeyDown:h?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),h(c,s,t,r))}:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,children:[l&&r("div",{className:"heatmap-cell-content heatmap-cell-value-container",style:g(t),children:r("span",{children:f(t)})}),a&&r("div",{className:"heatmap-cell-content heatmap-cell-percentage-container",style:g(t),children:r("span",{children:J(t)?`${p}%`:f(t)})})]});return l||a?r(o.Fragment,{children:k},`${n}-${i}`):r(Z,{content:e("div",{className:"heatmap-cell-tooltip-content",children:[e("div",{children:["Value: ",f(t)]}),r("div",{children:J(t)?v>0?`${(t/v*100).toFixed(0)}% of max`:"0% of max":"No data"})]}),position:"top",children:k},`${n}-${i}`)}))]},t)))]})})},rr={alert:e(t,{children:[r("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",stroke:"currentColor"}),r("path",{d:"M12 9v4",stroke:"currentColor"}),r("path",{d:"M12 17h.01",stroke:"currentColor"})]}),"align-center":e(t,{children:[r("path",{d:"M21 5H3",stroke:"currentColor"}),r("path",{d:"M17 12H7",stroke:"currentColor"}),r("path",{d:"M19 19H5",stroke:"currentColor"})]}),"align-left":e(t,{children:[r("path",{d:"M21 5H3",stroke:"currentColor"}),r("path",{d:"M15 12H3",stroke:"currentColor"}),r("path",{d:"M17 19H3",stroke:"currentColor"})]}),"align-right":e(t,{children:[r("path",{d:"M21 5H3",stroke:"currentColor"}),r("path",{d:"M21 12H9",stroke:"currentColor"}),r("path",{d:"M21 19H7",stroke:"currentColor"})]}),"arrow-down":e(t,{children:[r("path",{d:"M12 5v14",stroke:"currentColor"}),r("path",{d:"m19 12-7 7-7-7",stroke:"currentColor"})]}),"arrow-down-narrow-wide":e(t,{children:[r("path",{d:"m3 16 4 4 4-4",stroke:"currentColor"}),r("path",{d:"M7 20V4",stroke:"currentColor"}),r("path",{d:"M11 4h4",stroke:"currentColor"}),r("path",{d:"M11 8h7",stroke:"currentColor"}),r("path",{d:"M11 12h10",stroke:"currentColor"})]}),"arrow-down-wide-narrow":e(t,{children:[r("path",{d:"m3 16 4 4 4-4",stroke:"currentColor"}),r("path",{d:"M7 20V4",stroke:"currentColor"}),r("path",{d:"M11 4h10",stroke:"currentColor"}),r("path",{d:"M11 8h7",stroke:"currentColor"}),r("path",{d:"M11 12h4",stroke:"currentColor"})]}),"arrow-left":e(t,{children:[r("path",{d:"m12 19-7-7 7-7",stroke:"currentColor"}),r("path",{d:"M19 12H5",stroke:"currentColor"})]}),"arrow-right":e(t,{children:[r("path",{d:"M5 12h14",stroke:"currentColor"}),r("path",{d:"m12 5 7 7-7 7",stroke:"currentColor"})]}),"arrow-up":e(t,{children:[r("path",{d:"m5 12 7-7 7 7",stroke:"currentColor"}),r("path",{d:"M12 19V5",stroke:"currentColor"})]}),"arrow-up-narrow-wide":e(t,{children:[r("path",{d:"m3 8 4-4 4 4",stroke:"currentColor"}),r("path",{d:"M7 4v16",stroke:"currentColor"}),r("path",{d:"M11 12h4",stroke:"currentColor"}),r("path",{d:"M11 16h7",stroke:"currentColor"}),r("path",{d:"M11 20h10",stroke:"currentColor"})]}),"arrow-up-wide-narrow":e(t,{children:[r("path",{d:"m3 8 4-4 4 4",stroke:"currentColor"}),r("path",{d:"M7 4v16",stroke:"currentColor"}),r("path",{d:"M11 12h10",stroke:"currentColor"}),r("path",{d:"M11 16h7",stroke:"currentColor"}),r("path",{d:"M11 20h4",stroke:"currentColor"})]}),bell:e(t,{children:[r("path",{d:"M10.268 21a2 2 0 0 0 3.464 0",stroke:"currentColor"}),r("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",stroke:"currentColor"})]}),"bell-ring":e(t,{children:[r("path",{d:"M10.268 21a2 2 0 0 0 3.464 0",stroke:"currentColor"}),r("path",{d:"M22 8c0-2.3-.8-4.3-2-6",stroke:"currentColor"}),r("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",stroke:"currentColor"}),r("path",{d:"M4 2C2.8 3.7 2 5.7 2 8",stroke:"currentColor"})]}),bold:r("path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",stroke:"currentColor"}),building:e(t,{children:[r("path",{d:"M10 12h4",stroke:"currentColor"}),r("path",{d:"M10 8h4",stroke:"currentColor"}),r("path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",stroke:"currentColor"}),r("path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",stroke:"currentColor"}),r("path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",stroke:"currentColor"})]}),calendar:e(t,{children:[r("path",{d:"M8 2v4",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"M8 14h.01",stroke:"currentColor"}),r("path",{d:"M12 14h.01",stroke:"currentColor"}),r("path",{d:"M16 14h.01",stroke:"currentColor"}),r("path",{d:"M8 18h.01",stroke:"currentColor"}),r("path",{d:"M12 18h.01",stroke:"currentColor"}),r("path",{d:"M16 18h.01",stroke:"currentColor"})]}),"calendar-check":e(t,{children:[r("path",{d:"M8 2v4",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"m9 16 2 2 4-4",stroke:"currentColor"})]}),"calendar-clock":e(t,{children:[r("path",{d:"M16 14v2.2l1.6 1",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",stroke:"currentColor"}),r("path",{d:"M3 10h5",stroke:"currentColor"}),r("path",{d:"M8 2v4",stroke:"currentColor"}),r("circle",{cx:"16",cy:"16",r:"6",stroke:"currentColor"})]}),"calendar-cog":e(t,{children:[r("path",{d:"m15.228 16.852-.923-.383",stroke:"currentColor"}),r("path",{d:"m15.228 19.148-.923.383",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("path",{d:"m16.47 14.305.382.923",stroke:"currentColor"}),r("path",{d:"m16.852 20.772-.383.924",stroke:"currentColor"}),r("path",{d:"m19.148 15.228.383-.923",stroke:"currentColor"}),r("path",{d:"m19.53 21.696-.382-.924",stroke:"currentColor"}),r("path",{d:"m20.772 16.852.924-.383",stroke:"currentColor"}),r("path",{d:"m20.772 19.148.924.383",stroke:"currentColor"}),r("path",{d:"M21 10.592V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"M8 2v4",stroke:"currentColor"}),r("circle",{cx:"18",cy:"18",r:"3",stroke:"currentColor"})]}),"calendar-plus":e(t,{children:[r("path",{d:"M8 2v4",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 10h18",stroke:"currentColor"}),r("path",{d:"M10 16h4",stroke:"currentColor"}),r("path",{d:"M12 14v4",stroke:"currentColor"})]}),"calendar-sync":e(t,{children:[r("path",{d:"M11 10v4h4",stroke:"currentColor"}),r("path",{d:"m11 14 1.535-1.605a5 5 0 0 1 8 1.5",stroke:"currentColor"}),r("path",{d:"M16 2v4",stroke:"currentColor"}),r("path",{d:"m21 18-1.535 1.605a5 5 0 0 1-8-1.5",stroke:"currentColor"}),r("path",{d:"M21 22v-4h-4",stroke:"currentColor"}),r("path",{d:"M21 8.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4.3",stroke:"currentColor"}),r("path",{d:"M3 10h4",stroke:"currentColor"}),r("path",{d:"M8 2v4",stroke:"currentColor"})]}),camera:e(t,{children:[r("path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",stroke:"currentColor"}),r("circle",{cx:"12",cy:"13",r:"3",stroke:"currentColor"})]}),check:r("path",{d:"M20 6 9 17l-5-5",stroke:"currentColor"}),"chevron-down":r("path",{d:"m6 9 6 6 6-6",stroke:"currentColor"}),"chevron-left":r("path",{d:"m15 18-6-6 6-6",stroke:"currentColor"}),"chevron-right":r("path",{d:"m9 18 6-6-6-6",stroke:"currentColor"}),"chevron-up":r("path",{d:"m18 15-6-6-6 6",stroke:"currentColor"}),"chevrons-x":e(t,{children:[r("path",{d:"m9 7-5 5 5 5",stroke:"currentColor"}),r("path",{d:"m15 7 5 5-5 5",stroke:"currentColor"})]}),"chevrons-y":e(t,{children:[r("path",{d:"m7 15 5 5 5-5",stroke:"currentColor"}),r("path",{d:"m7 9 5-5 5 5",stroke:"currentColor"})]}),clock:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor"}),r("path",{d:"M12 6v6l4 2",stroke:"currentColor"})]}),"clock-alert":e(t,{children:[r("path",{d:"M12 6v6l4 2",stroke:"currentColor"}),r("path",{d:"M20 12v5",stroke:"currentColor"}),r("path",{d:"M20 21h.01",stroke:"currentColor"}),r("path",{d:"M21.25 8.2A10 10 0 1 0 16 21.16",stroke:"currentColor"})]}),close:e(t,{children:[r("path",{d:"M18 6 6 18",stroke:"currentColor"}),r("path",{d:"m6 6 12 12",stroke:"currentColor"})]}),coffee:e(t,{children:[r("path",{d:"M10 2v2",stroke:"currentColor"}),r("path",{d:"M14 2v2",stroke:"currentColor"}),r("path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",stroke:"currentColor"}),r("path",{d:"M6 2v2",stroke:"currentColor"})]}),comment:e(t,{children:[r("path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",stroke:"currentColor"}),r("path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",stroke:"currentColor"}),r("path",{d:"M8 14a2 2 0 0 0 2-2V8H8",stroke:"currentColor"})]}),"compact-view":e(t,{children:[r("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",stroke:"currentColor"}),r("path",{d:"M21 9H3",stroke:"currentColor"}),r("path",{d:"M21 15H3",stroke:"currentColor"})]}),copy:e(t,{children:[r("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",stroke:"currentColor"}),r("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",stroke:"currentColor"})]}),cut:e(t,{children:[r("circle",{cx:"6",cy:"6",r:"3",stroke:"currentColor"}),r("path",{d:"M8.12 8.12 12 12",stroke:"currentColor"}),r("path",{d:"M20 4 8.12 15.88",stroke:"currentColor"}),r("circle",{cx:"6",cy:"18",r:"3",stroke:"currentColor"}),r("path",{d:"M14.8 14.8 20 20",stroke:"currentColor"})]}),dashboard:e(t,{children:[r("rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",stroke:"currentColor"})]}),"dots-horizontal":e(t,{children:[r("circle",{cx:"12",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"19",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"5",cy:"12",r:"1",stroke:"currentColor"})]}),"dots-vertical":e(t,{children:[r("circle",{cx:"12",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"12",cy:"5",r:"1",stroke:"currentColor"}),r("circle",{cx:"12",cy:"19",r:"1",stroke:"currentColor"})]}),"double-chevron-left":e(t,{children:[r("path",{d:"m11 17-5-5 5-5",stroke:"currentColor"}),r("path",{d:"m18 17-5-5 5-5",stroke:"currentColor"})]}),"double-chevron-right":e(t,{children:[r("path",{d:"m6 17 5-5-5-5",stroke:"currentColor"}),r("path",{d:"m13 17 5-5-5-5",stroke:"currentColor"})]}),download:e(t,{children:[r("path",{d:"M12 15V3",stroke:"currentColor"}),r("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",stroke:"currentColor"}),r("path",{d:"m7 10 5 5 5-5",stroke:"currentColor"})]}),"drag-handle":e(t,{children:[r("circle",{cx:"9",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"9",cy:"5",r:"1",stroke:"currentColor"}),r("circle",{cx:"9",cy:"19",r:"1",stroke:"currentColor"}),r("circle",{cx:"15",cy:"12",r:"1",stroke:"currentColor"}),r("circle",{cx:"15",cy:"5",r:"1",stroke:"currentColor"}),r("circle",{cx:"15",cy:"19",r:"1",stroke:"currentColor"})]}),edit:e(t,{children:[r("path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",stroke:"currentColor"}),r("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",stroke:"currentColor"})]}),envelope:e(t,{children:[r("path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",stroke:"currentColor"}),r("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",stroke:"currentColor"})]}),"external-link":e(t,{children:[r("path",{d:"M15 3h6v6",stroke:"currentColor"}),r("path",{d:"M10 14 21 3",stroke:"currentColor"}),r("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",stroke:"currentColor"})]}),eye:e(t,{children:[r("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",stroke:"currentColor"}),r("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor"})]}),"eye-off":e(t,{children:[r("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",stroke:"currentColor"}),r("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",stroke:"currentColor"}),r("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",stroke:"currentColor"}),r("path",{d:"m2 2 20 20",stroke:"currentColor"})]}),file:e(t,{children:[r("path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",stroke:"currentColor"}),r("path",{d:"M14 2v5a1 1 0 0 0 1 1h5",stroke:"currentColor"})]}),"file-code":e(t,{children:[r("path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",stroke:"currentColor"}),r("path",{d:"M14 2v5a1 1 0 0 0 1 1h5",stroke:"currentColor"}),r("path",{d:"m5 16-3 3 3 3",stroke:"currentColor"}),r("path",{d:"m9 22 3-3-3-3",stroke:"currentColor"})]}),filter:e(t,{children:[r("path",{d:"M2 5h20",stroke:"currentColor"}),r("path",{d:"M6 12h12",stroke:"currentColor"}),r("path",{d:"M9 19h6",stroke:"currentColor"})]}),"filter-plus":e(t,{children:[r("path",{d:"M12 5H2",stroke:"currentColor"}),r("path",{d:"M6 12h12",stroke:"currentColor"}),r("path",{d:"M9 19h6",stroke:"currentColor"}),r("path",{d:"M16 5h6",stroke:"currentColor"}),r("path",{d:"M19 8V2",stroke:"currentColor"})]}),flag:r("path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",stroke:"currentColor"}),forbidden:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor"}),r("path",{d:"M4.929 4.929 19.07 19.071",stroke:"currentColor"})]}),grid:e(t,{children:[r("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",stroke:"currentColor"})]}),hint:e(t,{children:[r("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",stroke:"currentColor"}),r("path",{d:"M9 18h6",stroke:"currentColor"}),r("path",{d:"M10 22h4",stroke:"currentColor"})]}),hospital:e(t,{children:[r("path",{d:"M12 7v4",stroke:"currentColor"}),r("path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",stroke:"currentColor"}),r("path",{d:"M14 9h-4",stroke:"currentColor"}),r("path",{d:"M18 11h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2",stroke:"currentColor"}),r("path",{d:"M18 21V5a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16",stroke:"currentColor"})]}),home:e(t,{children:[r("path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",stroke:"currentColor"}),r("path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",stroke:"currentColor"})]}),image:e(t,{children:[r("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",stroke:"currentColor"}),r("circle",{cx:"9",cy:"9",r:"2",stroke:"currentColor"}),r("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",stroke:"currentColor"})]}),inbox:e(t,{children:[r("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",stroke:"currentColor"}),r("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",stroke:"currentColor"})]}),info:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor"}),r("path",{d:"M12 16v-4",stroke:"currentColor"}),r("path",{d:"M12 8h.01",stroke:"currentColor"})]}),italic:e(t,{children:[r("line",{x1:"19",x2:"10",y1:"4",y2:"4",stroke:"currentColor"}),r("line",{x1:"14",x2:"5",y1:"20",y2:"20",stroke:"currentColor"}),r("line",{x1:"15",x2:"9",y1:"4",y2:"20",stroke:"currentColor"})]}),layout:e(t,{children:[r("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"3",rx:"7",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",stroke:"currentColor"}),r("rect",{width:"7",height:"7",x:"3",y:"14",rx:"7",stroke:"currentColor"})]}),library:e(t,{children:[r("path",{d:"m16 6 4 14",stroke:"currentColor"}),r("path",{d:"M12 6v14",stroke:"currentColor"}),r("path",{d:"M8 8v12",stroke:"currentColor"}),r("path",{d:"M4 4v16",stroke:"currentColor"})]}),link:e(t,{children:[r("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",stroke:"currentColor"}),r("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor"})]}),list:e(t,{children:[r("path",{d:"M3 5h.01",stroke:"currentColor"}),r("path",{d:"M3 12h.01",stroke:"currentColor"}),r("path",{d:"M3 19h.01",stroke:"currentColor"}),r("path",{d:"M8 5h13",stroke:"currentColor"}),r("path",{d:"M8 12h13",stroke:"currentColor"}),r("path",{d:"M8 19h13",stroke:"currentColor"})]}),"list-ol":e(t,{children:[r("path",{d:"M11 5h10",stroke:"currentColor"}),r("path",{d:"M11 12h10",stroke:"currentColor"}),r("path",{d:"M11 19h10",stroke:"currentColor"}),r("path",{d:"M4 4h1v5",stroke:"currentColor"}),r("path",{d:"M4 9h2",stroke:"currentColor"}),r("path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",stroke:"currentColor"})]}),"list-ul":e(t,{children:[r("path",{d:"M3 5h18",stroke:"currentColor"}),r("path",{d:"M3 12h18",stroke:"currentColor"}),r("path",{d:"M3 19h18",stroke:"currentColor"})]}),"log-in":e(t,{children:[r("path",{d:"m10 17 5-5-5-5",stroke:"currentColor"}),r("path",{d:"M15 12H3",stroke:"currentColor"}),r("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",stroke:"currentColor"})]}),"log-out":e(t,{children:[r("path",{d:"m16 17 5-5-5-5",stroke:"currentColor"}),r("path",{d:"M21 12H9",stroke:"currentColor"}),r("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",stroke:"currentColor"})]}),maximize:e(t,{children:[r("path",{d:"M15 3h6v6",stroke:"currentColor"}),r("path",{d:"m21 3-7 7",stroke:"currentColor"}),r("path",{d:"m3 21 7-7",stroke:"currentColor"}),r("path",{d:"M9 21H3v-6",stroke:"currentColor"})]}),message:r("path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",stroke:"currentColor"}),minimize:e(t,{children:[r("path",{d:"m14 10 7-7",stroke:"currentColor"}),r("path",{d:"M20 10h-6V4",stroke:"currentColor"}),r("path",{d:"m3 21 7-7",stroke:"currentColor"}),r("path",{d:"M4 14h6v6",stroke:"currentColor"})]}),minus:r("path",{d:"M5 12h14",stroke:"currentColor"}),note:e(t,{children:[r("path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",stroke:"currentColor"}),r("path",{d:"M15 3v5a1 1 0 0 0 1 1h5",stroke:"currentColor"})]}),paste:e(t,{children:[r("path",{d:"M11 14h10",stroke:"currentColor"}),r("path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",stroke:"currentColor"}),r("path",{d:"m17 18 4-4-4-4",stroke:"currentColor"}),r("path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",stroke:"currentColor"}),r("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",stroke:"currentColor"})]}),phone:r("path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",stroke:"currentColor"}),plus:e(t,{children:[r("path",{d:"M5 12h14",stroke:"currentColor"}),r("path",{d:"M12 5v14",stroke:"currentColor"})]}),quote:e(t,{children:[r("path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",stroke:"currentColor"}),r("path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",stroke:"currentColor"})]}),redo:e(t,{children:[r("path",{d:"M21 7v6h-6",stroke:"currentColor"}),r("path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",stroke:"currentColor"})]}),refresh:e(t,{children:[r("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",stroke:"currentColor"}),r("path",{d:"M21 3v5h-5",stroke:"currentColor"}),r("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",stroke:"currentColor"}),r("path",{d:"M8 16H3v5",stroke:"currentColor"})]}),"relaxed-view":e(t,{children:[r("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",stroke:"currentColor"}),r("path",{d:"M3 12h18",stroke:"currentColor"})]}),search:e(t,{children:[r("path",{d:"m21 21-4.34-4.34",stroke:"currentColor"}),r("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor"})]}),send:e(t,{children:[r("path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",stroke:"currentColor"}),r("path",{d:"M6 12h16",stroke:"currentColor"})]}),settings:e(t,{children:[r("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",stroke:"currentColor"}),r("circle",{cx:"12",cy:"12",r:"3",stroke:"currentColor"})]}),shuffle:e(t,{children:[r("path",{d:"m18 14 4 4-4 4",stroke:"currentColor"}),r("path",{d:"m18 2 4 4-4 4",stroke:"currentColor"}),r("path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",stroke:"currentColor"}),r("path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",stroke:"currentColor"}),r("path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",stroke:"currentColor"})]}),stats:e(t,{children:[r("path",{d:"M3 3v16a2 2 0 0 0 2 2h16",stroke:"currentColor"}),r("path",{d:"M18 17V9",stroke:"currentColor"}),r("path",{d:"M13 17V5",stroke:"currentColor"}),r("path",{d:"M8 17v-3",stroke:"currentColor"})]}),strikethrough:e(t,{children:[r("path",{d:"M16 4H9a3 3 0 0 0-2.83 4",stroke:"currentColor"}),r("path",{d:"M14 12a4 4 0 0 1 0 8H6",stroke:"currentColor"}),r("line",{x1:"4",x2:"20",y1:"12",y2:"12",stroke:"currentColor"})]}),swap:e(t,{children:[r("path",{d:"M8 3 4 7l4 4",stroke:"currentColor"}),r("path",{d:"M4 7h16",stroke:"currentColor"}),r("path",{d:"m16 21 4-4-4-4",stroke:"currentColor"}),r("path",{d:"M20 17H4",stroke:"currentColor"})]}),"swap-vertical":e(t,{children:[r("path",{d:"m3 16 4 4 4-4",stroke:"currentColor"}),r("path",{d:"M7 20V4",stroke:"currentColor"}),r("path",{d:"m21 8-4-4-4 4",stroke:"currentColor"}),r("path",{d:"M17 4v16",stroke:"currentColor"})]}),trash:e(t,{children:[r("path",{d:"M10 11v6",stroke:"currentColor"}),r("path",{d:"M14 11v6",stroke:"currentColor"}),r("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",stroke:"currentColor"}),r("path",{d:"M3 6h18",stroke:"currentColor"}),r("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",stroke:"currentColor"})]}),underline:e(t,{children:[r("path",{d:"M6 4v6a6 6 0 0 0 12 0V4",stroke:"currentColor"}),r("line",{x1:"4",x2:"20",y1:"20",y2:"20",stroke:"currentColor"})]}),undo:e(t,{children:[r("path",{d:"M3 7v6h6",stroke:"currentColor"}),r("path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",stroke:"currentColor"})]}),upload:e(t,{children:[r("path",{d:"M12 3v12",stroke:"currentColor"}),r("path",{d:"m17 8-5-5-5 5",stroke:"currentColor"}),r("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",stroke:"currentColor"})]}),user:e(t,{children:[r("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",stroke:"currentColor"}),r("circle",{cx:"12",cy:"7",r:"4",stroke:"currentColor"})]}),"user-check":e(t,{children:[r("path",{d:"m16 11 2 2 4-4",stroke:"currentColor"}),r("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",stroke:"currentColor"}),r("circle",{cx:"9",cy:"7",r:"4",stroke:"currentColor"})]}),users:e(t,{children:[r("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",stroke:"currentColor"}),r("path",{d:"M16 3.128a4 4 0 0 1 0 7.744",stroke:"currentColor"}),r("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",stroke:"currentColor"}),r("circle",{cx:"9",cy:"7",r:"4",stroke:"currentColor"})]}),wand:e(t,{children:[r("path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",stroke:"currentColor"}),r("path",{d:"m14 7 3 3",stroke:"currentColor"}),r("path",{d:"M5 6v4",stroke:"currentColor"}),r("path",{d:"M19 14v4",stroke:"currentColor"}),r("path",{d:"M10 2v2",stroke:"currentColor"}),r("path",{d:"M7 8H3",stroke:"currentColor"}),r("path",{d:"M21 16h-4",stroke:"currentColor"}),r("path",{d:"M11 3H9",stroke:"currentColor"})]}),"zoom-in":e(t,{children:[r("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor"}),r("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",stroke:"currentColor"}),r("line",{x1:"11",x2:"11",y1:"8",y2:"14",stroke:"currentColor"}),r("line",{x1:"8",x2:"14",y1:"11",y2:"11",stroke:"currentColor"})]}),"zoom-out":e(t,{children:[r("circle",{cx:"11",cy:"11",r:"8",stroke:"currentColor"}),r("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",stroke:"currentColor"}),r("line",{x1:"8",x2:"14",y1:"11",y2:"11",stroke:"currentColor"})]}),sort:e(t,{children:[r("path",{d:"M3 5h8",stroke:"currentColor"}),r("path",{d:"M3 12h8",stroke:"currentColor"}),r("path",{d:"M3 19h8",stroke:"currentColor"}),r("path",{d:"m15 8 3-3 3 3",stroke:"currentColor"}),r("path",{d:"m15 16 3 3 3-3",stroke:"currentColor"})]}),sun:e(t,{children:[r("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor"}),r("path",{d:"M12 2v2",stroke:"currentColor"}),r("path",{d:"M12 20v2",stroke:"currentColor"}),r("path",{d:"m4.93 4.93 1.41 1.41",stroke:"currentColor"}),r("path",{d:"m17.66 17.66 1.41 1.41",stroke:"currentColor"}),r("path",{d:"M2 12h2",stroke:"currentColor"}),r("path",{d:"M20 12h2",stroke:"currentColor"}),r("path",{d:"m6.34 17.66-1.41 1.41",stroke:"currentColor"}),r("path",{d:"m19.07 4.93-1.41 1.41",stroke:"currentColor"})]}),moon:r("path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",stroke:"currentColor"}),tool:r("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",stroke:"currentColor"}),hook:e(t,{children:[r("path",{d:"m17.586 11.414-5.93 5.93a1 1 0 0 1-8-8l3.137-3.137a.707.707 0 0 1 1.207.5V10",stroke:"currentColor"}),r("path",{d:"M20.414 8.586 22 7",stroke:"currentColor"}),r("circle",{cx:"19",cy:"10",r:"2",stroke:"currentColor"})]}),component:e(t,{children:[r("rect",{width:"18",height:"12",x:"3",y:"8",rx:"1",stroke:"currentColor"}),r("path",{d:"M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3",stroke:"currentColor"}),r("path",{d:"M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3",stroke:"currentColor"})]}),"arrow-up-right":e(t,{children:[r("path",{d:"M7 7h10v10",stroke:"currentColor"}),r("path",{d:"M7 17 17 7",stroke:"currentColor"})]}),chart:e(t,{children:[r("path",{d:"M3 3v16a2 2 0 0 0 2 2h16",stroke:"currentColor"}),r("path",{d:"m19 9-5 5-4-4-3 3",stroke:"currentColor"})]}),star:r("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",stroke:"currentColor"}),sparkles:e(t,{children:[r("path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",stroke:"currentColor"}),r("path",{d:"M20 2v4",stroke:"currentColor"}),r("path",{d:"M22 4h-4",stroke:"currentColor"}),r("circle",{cx:"4",cy:"20",r:"2",stroke:"currentColor"})]}),terminal:e(t,{children:[r("path",{d:"M12 19h8",stroke:"currentColor"}),r("path",{d:"m4 17 6-6-6-6",stroke:"currentColor"})]}),shield:r("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",stroke:"currentColor"}),code:e(t,{children:[r("path",{d:"m18 16 4-4-4-4",stroke:"currentColor"}),r("path",{d:"m6 8-4 4 4 4",stroke:"currentColor"}),r("path",{d:"m14.5 4-5 16",stroke:"currentColor"})]})},er=e=>{var t,{icon:o,size:l=24,tooltip:a,tooltipPosition:n="top",tooltipVariant:i="dark",strokeWidth:c=2}=e,s=A(e,["icon","size","tooltip","tooltipPosition","tooltipVariant","strokeWidth"]);const h=null!==(t=rr[o])&&void 0!==t?t:null,d=r("svg",Object.assign({height:l,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",strokeWidth:c,strokeLinecap:"round",strokeLinejoin:"round"},s,{children:h}));if(null!=a){const e="string"==typeof a?{text:a}:{content:a};return r(Z,Object.assign({},e,{position:n,variant:i,children:d}))}return d},tr=r=>{let e=r,t="";do{t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26)-1}while(e>=0);return t},or=r=>{if(Number.isInteger(r))return String(r);return(Math.abs(r)<1?r.toFixed(3):r.toFixed(2)).replace(/\.?0+$/,"")},lr=r=>`${r>=0?"+":"−"}${Math.abs(r).toFixed(2).replace(/\.?0+$/,"")}`,ar=({active:t,payload:o,colors:l})=>{if(!t||!(null==o?void 0:o.length))return null;const a=o[0].payload,n=a.contribution>=0;return e("div",{style:Object.assign(Object.assign({},z),{width:220,whiteSpace:"normal",overflowWrap:"break-word"}),children:[r("div",{style:{fontWeight:600},children:a.feature}),void 0!==a.value&&e("div",{style:{fontSize:"0.75rem",opacity:.8},children:["value: ",String(a.value)]}),r("div",{style:{color:n?l.positive:l.negative},children:lr(a.contribution)})]})},nr=({x:t=0,y:o=0,width:l=0,height:a=0,payload:n,index:i=0,colors:c,onBarClick:s})=>{if(!n)return null;const h=n.contribution>=0,d=h?c.positive:c.negative,u=!!s,p=s?r=>s({feature:n.feature,code:n.code,value:n.value,contribution:n.contribution},i,r):void 0,k=Math.max(0,Math.min(5,l,a/2)),v=o+a/2,m=(h?[[t,o],[t+l-k,o],[t+l,v],[t+l-k,o+a],[t,o+a]]:[[t+l,o],[t+k,o],[t,v],[t+k,o+a],[t+l,o+a]]).map((r=>r.join(","))).join(" "),C=lr(n.contribution),y=l>7*C.length+14,g=y?t+l/2:h?t+l+5:t-5;return e("g",{onClick:p,style:u?{cursor:"pointer"}:void 0,children:[r("polygon",{points:m,fill:d}),r("text",{x:g,y:v,dy:4,textAnchor:y?"middle":h?"start":"end",fontSize:12,fontWeight:y?600:400,fill:y?"hsl(var(--primary-foreground))":d,children:C})]})},ir=({x:t,y:o,payload:l,labelWidth:a})=>{const n=String(l.value),i=n.indexOf("␟"),c=i>=0?n.slice(0,i):"",s=i>=0?n.slice(i+1):n;return r("g",{transform:`translate(${t},${o})`,children:r("foreignObject",{x:-a-4,y:-16,width:a,height:32,children:e("div",{title:c?`${c} = ${s}`:s,className:"waterfall-chart-y-label",children:[c&&e("span",{className:"waterfall-chart-y-value",children:[c," = "]}),r("span",{className:"waterfall-chart-y-feature",children:s})]})})})},cr=({x:e,y:t,payload:o})=>r("g",{transform:`translate(${e},${t})`,children:r("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"hsl(var(--muted-200))",fontSize:12,children:or(Number(o.value))})}),sr=({data:t,maxFeatures:o,colors:a,compact:n,height:i=400,className:c,onBarClick:p})=>{var v,C;const f={positive:null!==(v=null==a?void 0:a.positive)&&void 0!==v?v:"hsl(var(--primary))",negative:null!==(C=null==a?void 0:a.negative)&&void 0!==C?C:"hsl(var(--destructive))"},M=(r=>{const[e,t]=l(!1);return s((()=>{if("undefined"==typeof window)return;const o=window.matchMedia(r);o.matches!==e&&t(o.matches);const l=()=>{t(o.matches)};return o.addEventListener("change",l),()=>o.removeEventListener("change",l)}),[e,r]),e})("(max-width: 640px)"),x=null!=n?n:M,{rows:b,base:w,finalPrediction:N,domain:S,ticks:A,legend:z}=h((()=>{const r=(r=>{const e=r.features.map((r=>({feature:r.name,value:r.value,contribution:r.prob})));return void 0!==r.otherFactorsProb&&null!==r.otherFactorsProb&&e.push({feature:null!=r.otherFactorsValue?`${r.otherFactorsValue} other features`:"other features",contribution:r.otherFactorsProb}),{features:e,base:r.efx,prediction:r.fx}})(t),e=r.base,l=[...r.features].sort(((r,e)=>Math.abs(e.contribution)-Math.abs(r.contribution))),a=l.findIndex((r=>/\bother\s+(features?|factors?)\b/i.test(r.feature))),n=a>=0?l.splice(a,1)[0]:null;let i=l,c=null;if(void 0!==o&&o>0&&l.length>o){i=l.slice(0,o);const r=l.slice(o),e=r.reduce(((r,e)=>r+e.contribution),0);c={feature:`${r.length} other feature${1===r.length?"":"s"}`,contribution:e}}const s=c&&n?{feature:c.feature,contribution:c.contribution+n.contribution}:null!=c?c:n,h=s?[...i,s]:i;let d=e,u=e,p=e;const k=new Array(h.length);for(let r=h.length-1;r>=0;r--){const e=h[r],t=d,o=d+e.contribution;d=o,u=Math.min(u,t,o),p=Math.max(p,t,o);const l=void 0===e.value?"":"number"==typeof e.value?or(e.value):String(e.value),a=tr(r);k[r]={label:`${l}␟${x?a:e.feature}`,feature:e.feature,code:a,value:e.value,contribution:e.contribution,offset:Math.min(t,o),span:Math.abs(e.contribution)}}const v=x?k.map((r=>({code:r.code,feature:r.feature}))):[],m=r.features.length?d:r.prediction;u=Math.min(u,m),p=Math.max(p,m);const C=.12*(p-u||1),y=u-C,g=p+C,f=(r=>{if(!(r>0))return 1;const e=Math.pow(10,Math.floor(Math.log10(r))),t=r/e;return(t<=1?1:t<=2?2:t<=5?5:10)*e})((g-y)/4),M=[];for(let r=Math.ceil(y/f-1e-9)*f;r<=g+1e-9;r+=f)M.push(Number(r.toFixed(6)));return{rows:k,base:e,finalPrediction:m,domain:[y,g],ticks:M,legend:v}}),[t,o,x]),H=x?56:200;return e("div",{className:"waterfall-chart-container"+(c?` ${c}`:""),children:[r(d,{width:"100%",height:i,children:e(u,{data:b,layout:"vertical",barCategoryGap:"16%",margin:{top:24,right:40,left:10,bottom:24},children:[r(y,{type:"number",domain:S,ticks:A,allowDataOverflow:!0,axisLine:{stroke:"hsl(var(--muted-200))"},tickLine:{stroke:"hsl(var(--muted-200))"},tick:e=>r(cr,Object.assign({},e))}),r(g,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:e=>r(ir,Object.assign({},e,{labelWidth:H})),width:H+8,interval:0}),r(k,{cursor:{fill:"hsl(var(--muted) / 0.35)"},content:r(ar,{colors:f}),wrapperStyle:L,isAnimationActive:!1}),r($,{x:w,stroke:"hsl(var(--muted-200))",strokeDasharray:"4 4",label:{value:`E[f(x)] = ${or(w)}`,position:"bottom",fill:"hsl(var(--muted-200))",fontSize:12,fontWeight:600}}),r($,{x:N,stroke:"hsl(var(--foreground))",strokeDasharray:"4 4",label:{value:`f(x) = ${or(N)}`,position:"top",fill:"hsl(var(--foreground))",fontSize:12,fontWeight:600}}),r(m,{dataKey:"offset",stackId:"w",fill:"transparent",isAnimationActive:!1}),r(m,{dataKey:"span",stackId:"w",isAnimationActive:!1,shape:e=>r(nr,Object.assign({},e,{colors:f,onBarClick:p}))})]})}),z.length>0&&e("details",{className:"waterfall-chart-legend",children:[e("summary",{className:"waterfall-chart-legend-summary",children:[r("span",{className:"waterfall-chart-legend-title",children:"Feature legend"}),r(er,{icon:"chevron-down",className:"waterfall-chart-legend-icon"})]}),r("dl",{className:"waterfall-chart-legend-list",children:z.map((t=>e("div",{className:"waterfall-chart-legend-item",children:[r("dt",{className:"waterfall-chart-legend-code",children:t.code}),r("dd",{className:"waterfall-chart-legend-name",children:t.feature})]},t.code)))})]})]})},hr=r=>{if(!r)return"";return r.split(/(?=[A-Z])|[_-]/g).map((r=>r.trim())).filter((r=>r.length>0)).map(((r,e)=>0===e?r.charAt(0).toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase())).join(" ")},dr=["hsl(var(--primary))","hsl(var(--primary-200))","hsl(var(--primary-400))"],ur=["hsl(var(--primary))","hsl(var(--primary-400))"],pr=["hsl(225, 91%, 59%)","hsl(280, 91%, 59%)","hsl(330, 91%, 59%)","hsl(30, 91%, 59%)","hsl(150, 91%, 59%)","hsl(190, 91%, 59%)"],kr=t=>{var{type:o,title:l,info:a,description:n,kpis:i,data:c,height:s=400,className:h}=t,d=A(t,["type","title","info","description","kpis","data","height","className"]);return e("div",{className:"chart-container"+(h?` ${h}`:""),children:[e("div",{className:"chart-header",children:[e("div",{className:"chart-header-content",children:[(l||a)&&e("div",{className:"chart-title-container",children:[l&&r("h3",{className:"chart-title",children:l}),a&&r(Z,{text:a,position:"top",children:r(er,{icon:"info",size:16,className:"chart-info-icon"})})]}),n&&r("p",{className:"chart-description",children:n})]}),e("div",{className:"chart-metadata",children:[(null==i?void 0:i.length)?r("div",{className:"chart-kpis",children:i.map(((t,o)=>e("div",{className:"chart-kpi",children:[r("div",{className:"chart-kpi-label",children:t.label}),r("div",{className:"chart-kpi-value",children:t.value})]},o)))}):null,"pie"!==o&&"heatmap"!==o&&r(G,{items:(()=>{var r,e,t,l;switch(o){case"bar":case"line":{const r=c[0];if(!r)return[];const e="line"===o?ur:dr;return Object.keys(r).filter((r=>"x"!==r)).map(((r,t)=>({label:hr(r),color:e[t%e.length],style:"line"===o?"line":"rectangle"})))}case"pie":return c.map(((r,e)=>{var t;return{label:hr(r.label),color:null!==(t=r.color)&&void 0!==t?t:pr[e%pr.length],style:"circle"}}));case"waterfall":{const o=d;return[{label:"Pushes higher",color:null!==(e=null===(r=o.colors)||void 0===r?void 0:r.positive)&&void 0!==e?e:"hsl(var(--primary))",style:"rectangle"},{label:"Pushes lower",color:null!==(l=null===(t=o.colors)||void 0===t?void 0:t.negative)&&void 0!==l?l:"hsl(var(--destructive))",style:"rectangle"}]}default:return[]}})(),className:"chart-legend"})]})]}),(()=>{switch(o){case"bar":{const e=c,t=d,o=e.length>0?Object.keys(e[0]).filter((r=>"x"!==r)).map(((r,e)=>({key:r,color:dr[e%dr.length],label:r}))):[];return r(K,{data:e,height:s,bars:o,layout:t.layout,orientation:t.orientation,showGrid:!0,showLegend:!1})}case"line":{const e=c,t=e.length>0?Object.keys(e[0]).filter((r=>"x"!==r)).map(((r,e)=>({key:r,color:ur[e%ur.length],label:r}))):[];return r(F,{data:e,height:s,lines:t,showGrid:!0,showLegend:!1,showGradient:!0,showTooltipLabel:!0})}case"pie":{const e=c.map(((r,e)=>{var t;return Object.assign(Object.assign({},r),{color:null!==(t=r.color)&&void 0!==t?t:pr[e%pr.length]})}));return r(_,{data:e,height:s,showLegend:!0,showLabels:!0})}case"heatmap":return r(Q,{data:c,height:s,showValue:!0,showPercentage:!0});case"waterfall":{const e=d;return r(sr,Object.assign({data:c,height:s},e))}default:return null}})()]})};const vr=({data:t,headerHeight:o})=>e("div",{className:"stat-chart-difference-col",children:[r("p",{className:"stat-chart-difference-title",style:{height:o},children:"Difference"}),t.map(((t,o)=>{const l=t.value2-t.value1,a=0===t.value1?l>0?100:0:l/t.value1*100,n=l>=0,i=n?"stat-chart-difference-positive":"stat-chart-difference-negative",c=n?"arrow-up":"arrow-down";return e("div",{className:"stat-chart-difference-row",children:[e("span",{className:i,children:[r(er,{icon:c,size:14}),Math.abs(l).toLocaleString()]}),e("span",{className:i,children:[r(er,{icon:c,size:14}),Math.abs(Math.round(a)),"%"]})]},o)}))]}),mr=({label:t,labelWidth:o,value:l,rowMax:a,fillColor:n,trackColor:i,showTrack:c,reversed:s=!1,tooltipText:h})=>{const d=a>0?Math.min(l/a*100,100):0,u=r("div",{style:Object.assign({position:"absolute",top:0,bottom:0,width:`${d}%`,backgroundColor:n},s?{right:0}:{left:0})}),p=r(Z,{text:h,position:"top",className:"stat-chart-bar-tooltip",children:r("div",{className:"stat-chart-bar-track",style:{backgroundColor:c?i:"hsl(var(--muted-50))"},children:u})});return e("div",{style:{display:"flex",alignItems:"center",gap:"0.625rem",height:48,flexDirection:s?"row-reverse":"row"},children:[!s&&void 0!==t&&r("span",{style:{width:o,flexShrink:0,fontSize:"0.8125rem",color:"hsl(var(--muted-200))",textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:t,children:t}),p]})},Cr=({data:t,compareData:o,primaryColor:l="hsl(var(--primary))",primaryLabel:a,compareColor:n="hsl(225, 65%, 62%)",compareLabel:i,trackColor:c="hsl(var(--primary-muted))",compareTrackColor:s,unit:h,showDifference:d=!1,height:u,className:p})=>{const k=null!=s?s:"hsl(225, 65%, 88%)",v=r=>`${r.toLocaleString()}${h?` ${h}`:""}`;if(!o){const e=t.some((r=>void 0!==r.total)),o=Math.max(...t.map((r=>r.value))),a=function(r){const e=r.reduce(((r,e)=>Math.max(r,e.length)),0),t=Math.ceil(7*e)+8;return Math.min(Math.max(t,48),200)}(t.map((r=>r.label)));return r("div",{className:"stat-chart-container"+(p?` ${p}`:""),style:{height:u},children:t.map((t=>{var n;const i=e?null!==(n=t.total)&&void 0!==n?n:t.value:o;return r(mr,{label:t.label,labelWidth:a,value:t.value,rowMax:i,fillColor:l,trackColor:c,showTrack:e&&void 0!==t.total,tooltipText:v(t.value)},t.label)}))})}const m=t.map((r=>{const e=o.find((e=>e.label===r.label));return e?{label:r.label,current:r,previous:e}:null})).filter((r=>null!==r));if(!m.length)return null;const C=t.some((r=>void 0!==r.total)),y=C?void 0:Math.max(...t.map((r=>r.value)),...o.map((r=>r.value))),g=i||a?32:0,f=m.map((({previous:r,current:e})=>({value1:r.value,value2:e.value})));return e("div",{className:"stat-chart-compare-wrapper"+(p?` ${p}`:""),style:{height:u},children:[e("div",{className:"stat-chart-compare-section",children:[i&&r("div",{className:"stat-chart-compare-label",style:{height:g},children:i}),m.map((({label:e,previous:t})=>{var o;const l=C?null!==(o=t.total)&&void 0!==o?o:t.value:y;return r(mr,{value:t.value,rowMax:l,fillColor:n,trackColor:k,showTrack:C&&void 0!==t.total,reversed:!0,tooltipText:v(t.value)},e)}))]}),r("div",{className:"stat-chart-compare-center",style:{paddingTop:g},children:m.map((({label:e})=>r("div",{className:"stat-chart-compare-center-label",style:{height:48,display:"flex",alignItems:"center",justifyContent:"center"},children:e},e)))}),e("div",{className:"stat-chart-compare-section",children:[a&&r("div",{className:"stat-chart-compare-label",style:{height:g},children:a}),m.map((({label:e,current:t})=>{var o;const a=C?null!==(o=t.total)&&void 0!==o?o:t.value:y;return r(mr,{value:t.value,rowMax:a,fillColor:l,trackColor:c,showTrack:C&&void 0!==t.total,tooltipText:v(t.value)},e)}))]}),d&&r(vr,{data:f,headerHeight:g})]})},yr=11;function gr({item:r}){const o=r.rangeEnd-r.rangeStart,l=Math.max(r.barStart,r.rangeStart),a=Math.min(r.barEnd,r.rangeEnd),n=Math.max(0,a-l),i=Math.max(0,r.barEnd-r.rangeEnd),c=r.barEnd-r.barStart,s=o>0?(n/o).toFixed(2):"0.00",h=Math.round(60*i),d=c>0?(i/c).toFixed(2):"0.00";return e("div",{className:"gantt-tooltip-content",children:[e("div",{children:["Range Utilization: ",s]}),i>0&&e(t,{children:[e("div",{children:["Overflow Time: ",h," min"]}),e("div",{children:["Overflow Utilization: ",d]})]})]})}const fr=({data:t,minTime:o=0,maxTime:l=24,tickInterval:n=2,rangeColor:i="hsl(225, 91%, 80%)",barColor:c="hsl(225, 91%, 50%)",overflowColor:s="hsl(350, 80%, 68%)",rangeLabel:h="Range",barLabel:d="Bar",showLegend:u=!0,labelWidth:p,className:k,onRowClick:v})=>{const m=null!=p?p:90,C=l-o,y=a((r=>(r-o)/C*100),[o,C]),g=r=>{const e=Math.floor(r);return`${e}:${Math.round(60*(r-e)).toString().padStart(2,"0")}`},f=[];for(let r=o;r<=l;r+=n)f.push(r);return e("div",{className:"gantt-chart-container"+(k?` ${k}`:""),children:[u&&r(G,{direction:"horizontal",itemStyle:"line",items:[{label:h,color:i},{label:d,color:c}],className:"gantt-chart-legend"}),e("div",{style:{display:"flex",flexDirection:"row"},children:[e("div",{style:{width:m,flexShrink:0},children:[t.map((e=>r("div",{style:{height:44,display:"flex",alignItems:"center",paddingRight:"0.75rem",fontSize:"0.8125rem",color:"hsl(var(--muted-200))"},children:e.label},e.label))),r("div",{style:{height:32,display:"flex",alignItems:"flex-start",paddingTop:10,fontSize:"0.75rem",color:"hsl(var(--muted-200))"},children:"Time"})]}),e("div",{style:{flex:1,minWidth:0,position:"relative"},children:[f.map((e=>r("div",{style:{position:"absolute",left:`${y(e)}%`,top:0,bottom:32,width:1,backgroundColor:"hsl(var(--muted-50))",pointerEvents:"none"}},e))),t.map((t=>{const o=y(t.rangeStart),l=y(t.rangeEnd)-o,a=y(t.barStart),n=Math.min(t.barEnd,t.rangeEnd),h=y(n)-a,d=t.barEnd>t.rangeEnd,u=y(t.rangeEnd),p=y(t.barEnd)-u,k=16.5,m=y(t.barStart),C=y(t.barEnd),g=Math.max(0,C-m),f=g>0;return e("div",{style:{height:44,position:"relative",cursor:v?"pointer":"default"},onClick:v?r=>v(t,r):void 0,onKeyDown:v?r=>{"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),v(t,r))}:void 0,role:v?"button":void 0,tabIndex:v?0:void 0,children:[r("div",{style:{position:"absolute",left:`${o}%`,width:`${Math.max(l,0)}%`,height:16,top:14,backgroundColor:i,borderRadius:8}}),h>0&&r("div",{style:{position:"absolute",left:`${a}%`,width:`${Math.max(h,0)}%`,height:yr,top:k,backgroundColor:c,borderRadius:d?"5.5px 0 0 5.5px":5.5,zIndex:1}}),d&&p>0&&r("div",{style:{position:"absolute",left:`${u}%`,width:`${Math.max(p,0)}%`,height:yr,top:k,background:`linear-gradient(to right, ${c}, ${s})`,borderRadius:"0 5.5px 5.5px 0",zIndex:1}}),f&&r("div",{style:{position:"absolute",left:`${m}%`,width:`${g}%`,top:k,height:yr,zIndex:2},children:r(Z,{content:r(gr,{item:t}),position:"top",className:"gantt-bar-tooltip",maxWidth:280,children:r("div",{className:"gantt-bar-tooltip-hit"})})})]},t.label)})),r("div",{style:{height:32,position:"relative",borderTop:"1px solid hsl(var(--muted-50))"},children:f.map((e=>r("div",{style:{position:"absolute",left:`${y(e)}%`,top:8,transform:"translateX(-50%)",fontSize:11,color:"hsl(var(--muted-200))",whiteSpace:"nowrap"},children:g(e)},e)))})]})]})]})};export{K as BarChart,kr as Chart,fr as GanttChart,Q as HeatmapChart,G as Legend,F as LineChart,_ as PieChart,Cr as StatChart,sr as WaterfallChart};
2
2
  //# sourceMappingURL=index.js.map
@@ -10,6 +10,8 @@ export interface BarSeriesConfig {
10
10
  color: string;
11
11
  unit?: string;
12
12
  stackId?: string;
13
+ labelKey?: string;
14
+ labelColor?: string;
13
15
  }
14
16
  export interface BarChartProps {
15
17
  data: BarChartDataPoint[];
@@ -29,7 +29,7 @@ type BarChartSpecificProps = {
29
29
  layout?: "single" | "grouped" | "stacked" | "grouped-stacked";
30
30
  orientation?: "vertical" | "horizontal";
31
31
  };
32
- type WaterfallSpecificProps = Pick<WaterfallChartProps, "baseValue" | "prediction" | "maxFeatures" | "colors" | "compact" | "probSuffix" | "valueSuffix" | "onBarClick">;
32
+ type WaterfallSpecificProps = Pick<WaterfallChartProps, "maxFeatures" | "colors" | "compact" | "onBarClick">;
33
33
  type ChartTypeSpecificProps<T extends ChartType> = T extends "bar" ? BarChartSpecificProps : T extends "waterfall" ? WaterfallSpecificProps : Record<string, never>;
34
34
  export type ChartProps<T extends ChartType> = BaseChartProps & {
35
35
  data: BaseChartData[T];
@@ -1,9 +1,16 @@
1
1
  import React from "react";
2
2
  import "../../charts.css";
3
+ /**
4
+ * A cell value. A `number` is colored by intensity as usual. A `string` is a
5
+ * final, non-numeric result straight from the backend (e.g. "N/A" for a
6
+ * percentage whose denominator is 0) — it is shown verbatim in a neutral,
7
+ * grayed-out cell and excluded from the color scale.
8
+ */
9
+ export type HeatmapCell = number | string;
3
10
  export interface HeatmapData {
4
11
  rows: string[];
5
12
  columns: string[];
6
- matrix: number[][];
13
+ matrix: HeatmapCell[][];
7
14
  }
8
15
  export interface HeatmapChartProps {
9
16
  data: HeatmapData;
@@ -13,6 +20,6 @@ export interface HeatmapChartProps {
13
20
  className?: string;
14
21
  onRowClick?: (row: string, event: React.MouseEvent<HTMLDivElement>) => void;
15
22
  onColumnClick?: (column: string, event: React.MouseEvent<HTMLDivElement>) => void;
16
- onCellClick?: (row: string, column: string, value: number, event: React.MouseEvent<HTMLDivElement>) => void;
23
+ onCellClick?: (row: string, column: string, value: HeatmapCell, event: React.MouseEvent<HTMLDivElement>) => void;
17
24
  }
18
25
  export declare const HeatmapChart: ({ data, showValue, showPercentage, height, className, onRowClick, onColumnClick, onCellClick, }: HeatmapChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -12,7 +12,27 @@ export interface WaterfallFeature {
12
12
  value?: number | string;
13
13
  contribution: number;
14
14
  }
15
- export type ShapRecord = Record<string, number | string>;
15
+ /** One feature entry inside a {@link ShapExplanation}. */
16
+ export interface ShapFeature {
17
+ name: string;
18
+ prob: number;
19
+ value?: number | string;
20
+ }
21
+ /**
22
+ * The structured SHAP explanation object. Passed straight to
23
+ * {@link WaterfallChartProps.data} with no transform.
24
+ */
25
+ export interface ShapExplanation {
26
+ recordId?: number;
27
+ losRecordId?: number;
28
+ probabilityDischargeNext2Days?: number;
29
+ fx: number;
30
+ efx: number;
31
+ otherFactorsProb?: number;
32
+ otherFactorsValue?: number;
33
+ text?: string;
34
+ features: ShapFeature[];
35
+ }
16
36
  export interface WaterfallColors {
17
37
  positive?: string;
18
38
  negative?: string;
@@ -25,16 +45,12 @@ export interface WaterfallBarDatum {
25
45
  contribution: number;
26
46
  }
27
47
  export interface WaterfallChartProps {
28
- data: WaterfallFeature[] | ShapRecord;
29
- baseValue?: number;
30
- prediction?: number;
48
+ data: ShapExplanation;
31
49
  maxFeatures?: number;
32
50
  colors?: WaterfallColors;
33
51
  compact?: boolean;
34
52
  height?: number;
35
53
  className?: string;
36
- probSuffix?: string;
37
- valueSuffix?: string;
38
54
  onBarClick?: (datum: WaterfallBarDatum, index: number, event: React.MouseEvent<SVGElement>) => void;
39
55
  }
40
- export declare const WaterfallChart: ({ data, baseValue, prediction, maxFeatures, colors, compact, height, className, probSuffix, valueSuffix, onBarClick, }: WaterfallChartProps) => import("react/jsx-runtime").JSX.Element;
56
+ export declare const WaterfallChart: ({ data, maxFeatures, colors, compact, height, className, onBarClick, }: WaterfallChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,8 @@ export interface BarSeriesConfig {
10
10
  color: string;
11
11
  unit?: string;
12
12
  stackId?: string;
13
+ labelKey?: string;
14
+ labelColor?: string;
13
15
  }
14
16
  export interface BarChartProps {
15
17
  data: BarChartDataPoint[];
@@ -29,7 +29,7 @@ type BarChartSpecificProps = {
29
29
  layout?: "single" | "grouped" | "stacked" | "grouped-stacked";
30
30
  orientation?: "vertical" | "horizontal";
31
31
  };
32
- type WaterfallSpecificProps = Pick<WaterfallChartProps, "baseValue" | "prediction" | "maxFeatures" | "colors" | "compact" | "probSuffix" | "valueSuffix" | "onBarClick">;
32
+ type WaterfallSpecificProps = Pick<WaterfallChartProps, "maxFeatures" | "colors" | "compact" | "onBarClick">;
33
33
  type ChartTypeSpecificProps<T extends ChartType> = T extends "bar" ? BarChartSpecificProps : T extends "waterfall" ? WaterfallSpecificProps : Record<string, never>;
34
34
  export type ChartProps<T extends ChartType> = BaseChartProps & {
35
35
  data: BaseChartData[T];
@@ -1,9 +1,16 @@
1
1
  import React from "react";
2
2
  import "../../charts.css";
3
+ /**
4
+ * A cell value. A `number` is colored by intensity as usual. A `string` is a
5
+ * final, non-numeric result straight from the backend (e.g. "N/A" for a
6
+ * percentage whose denominator is 0) — it is shown verbatim in a neutral,
7
+ * grayed-out cell and excluded from the color scale.
8
+ */
9
+ export type HeatmapCell = number | string;
3
10
  export interface HeatmapData {
4
11
  rows: string[];
5
12
  columns: string[];
6
- matrix: number[][];
13
+ matrix: HeatmapCell[][];
7
14
  }
8
15
  export interface HeatmapChartProps {
9
16
  data: HeatmapData;
@@ -13,6 +20,6 @@ export interface HeatmapChartProps {
13
20
  className?: string;
14
21
  onRowClick?: (row: string, event: React.MouseEvent<HTMLDivElement>) => void;
15
22
  onColumnClick?: (column: string, event: React.MouseEvent<HTMLDivElement>) => void;
16
- onCellClick?: (row: string, column: string, value: number, event: React.MouseEvent<HTMLDivElement>) => void;
23
+ onCellClick?: (row: string, column: string, value: HeatmapCell, event: React.MouseEvent<HTMLDivElement>) => void;
17
24
  }
18
25
  export declare const HeatmapChart: ({ data, showValue, showPercentage, height, className, onRowClick, onColumnClick, onCellClick, }: HeatmapChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -12,7 +12,27 @@ export interface WaterfallFeature {
12
12
  value?: number | string;
13
13
  contribution: number;
14
14
  }
15
- export type ShapRecord = Record<string, number | string>;
15
+ /** One feature entry inside a {@link ShapExplanation}. */
16
+ export interface ShapFeature {
17
+ name: string;
18
+ prob: number;
19
+ value?: number | string;
20
+ }
21
+ /**
22
+ * The structured SHAP explanation object. Passed straight to
23
+ * {@link WaterfallChartProps.data} with no transform.
24
+ */
25
+ export interface ShapExplanation {
26
+ recordId?: number;
27
+ losRecordId?: number;
28
+ probabilityDischargeNext2Days?: number;
29
+ fx: number;
30
+ efx: number;
31
+ otherFactorsProb?: number;
32
+ otherFactorsValue?: number;
33
+ text?: string;
34
+ features: ShapFeature[];
35
+ }
16
36
  export interface WaterfallColors {
17
37
  positive?: string;
18
38
  negative?: string;
@@ -25,16 +45,12 @@ export interface WaterfallBarDatum {
25
45
  contribution: number;
26
46
  }
27
47
  export interface WaterfallChartProps {
28
- data: WaterfallFeature[] | ShapRecord;
29
- baseValue?: number;
30
- prediction?: number;
48
+ data: ShapExplanation;
31
49
  maxFeatures?: number;
32
50
  colors?: WaterfallColors;
33
51
  compact?: boolean;
34
52
  height?: number;
35
53
  className?: string;
36
- probSuffix?: string;
37
- valueSuffix?: string;
38
54
  onBarClick?: (datum: WaterfallBarDatum, index: number, event: React.MouseEvent<SVGElement>) => void;
39
55
  }
40
- export declare const WaterfallChart: ({ data, baseValue, prediction, maxFeatures, colors, compact, height, className, probSuffix, valueSuffix, onBarClick, }: WaterfallChartProps) => import("react/jsx-runtime").JSX.Element;
56
+ export declare const WaterfallChart: ({ data, maxFeatures, colors, compact, height, className, onBarClick, }: WaterfallChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,8 @@ export interface BarSeriesConfig {
10
10
  color: string;
11
11
  unit?: string;
12
12
  stackId?: string;
13
+ labelKey?: string;
14
+ labelColor?: string;
13
15
  }
14
16
  export interface BarChartProps {
15
17
  data: BarChartDataPoint[];
@@ -29,7 +29,7 @@ type BarChartSpecificProps = {
29
29
  layout?: "single" | "grouped" | "stacked" | "grouped-stacked";
30
30
  orientation?: "vertical" | "horizontal";
31
31
  };
32
- type WaterfallSpecificProps = Pick<WaterfallChartProps, "baseValue" | "prediction" | "maxFeatures" | "colors" | "compact" | "probSuffix" | "valueSuffix" | "onBarClick">;
32
+ type WaterfallSpecificProps = Pick<WaterfallChartProps, "maxFeatures" | "colors" | "compact" | "onBarClick">;
33
33
  type ChartTypeSpecificProps<T extends ChartType> = T extends "bar" ? BarChartSpecificProps : T extends "waterfall" ? WaterfallSpecificProps : Record<string, never>;
34
34
  export type ChartProps<T extends ChartType> = BaseChartProps & {
35
35
  data: BaseChartData[T];