@tsiky/components-r19 1.6.51 → 1.6.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chart.cjs.js CHANGED
@@ -974,7 +974,7 @@ Valid keys: `+JSON.stringify(Object.keys(O),null," "));var G=se(V,J,$,ie,D+"."+
974
974
  </div>
975
975
  `}},xaxis:{type:"category",categories:g,tickPlacement:"on",tickAmount:Math.min(12,g.length)},yaxis:{min:0,tickAmount:6,labels:{formatter:D=>D==null?"0":D.toFixed(0)}},dataLabels:{enabled:!1},legend:{show:!n,position:"top",onItemClick:{toggleDataSeries:!n},onItemHover:{highlightDataSeries:!n}},grid:{borderColor:"var(--color-border)"},responsive:u.responsive?[]:void 0};return N.jsx("div",{style:{position:"relative",width:"100%",height:t},children:a&&!c?N.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:N.jsx(S.Move,{size:48,strokeWidth:1.5,style:{opacity:.8}})}):N.jsx(gi,{options:ie,series:x,type:"line",height:t},o)})},Oh=["#e24b33","#e2b23a","#6feff0","#2f5be8"],Th=({categories:s,series:e,height:t=350,title:i="Admissions",draggable:a=!1})=>{const r=Math.max(...s.map((c,h)=>e.reduce((d,u)=>d+(u.data[h]??0),0))),n=Math.max(100,Math.ceil(r/50)*50),o={chart:{foreColor:"var(--color-text)",type:"area",stacked:!0,stackType:"normal",toolbar:{show:!1},zoom:{enabled:!1},animations:{enabled:!0},fontFamily:"Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial"},title:{text:i,align:"center",style:{fontSize:"36px",fontWeight:700,color:"#555"}},colors:Oh,dataLabels:{enabled:!1},stroke:{curve:"smooth",width:1.5},fill:{type:"solid",opacity:.95},markers:{size:0},legend:{show:!0,position:"top",horizontalAlign:"center",itemMargin:{horizontal:8,vertical:0}},xaxis:{categories:s,labels:{rotate:-45,rotateAlways:!0,style:{fontSize:"12px"}},tickPlacement:"on"},yaxis:{min:0,max:n,tickAmount:7,labels:{formatter:c=>String(Math.round(Number(c)))}},grid:{borderColor:"#e9e9e9",strokeDashArray:0},tooltip:{shared:!0,intersect:!1,y:{formatter:c=>String(c)}},responsive:[{breakpoint:768,options:{chart:{height:Math.max(240,Math.round(t*.7))},legend:{position:"top"},xaxis:{labels:{rotate:-45}}}}]},l=e.map(c=>({name:c.name,type:"area",data:c.data}));return N.jsxs("div",{style:{position:"relative",height:t,width:"100%",overflow:"hidden"},children:[N.jsx("div",{style:{opacity:a?0:1,transition:"opacity 0.2s ease-in-out"},children:N.jsx(gi,{options:o,series:l,type:"area",height:t,width:"100%"})}),a&&N.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.6)",borderRadius:12,backdropFilter:"blur(3px)",pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},children:N.jsx(S.Move,{size:38,strokeWidth:1.5,style:{opacity:.85}})})]})},Rr={color:"#4f9db5",sort:"desc",height:520,showGrid:!0,showLegend:!1},Rh=({data:s,config:e=Rr,draggable:t=!1})=>{const i={...Rr,...e},a=s.labels??[],r=s.values??[],n=Math.min(a.length,r.length),o=[];for(let u=0;u<n;u++)o.push({label:a[u],value:r[u]});i.sort==="desc"?o.sort((u,g)=>g.value-u.value):i.sort==="asc"&&o.sort((u,g)=>u.value-g.value);const l=o.map(u=>u.label),h=[{name:"Valeur",data:o.map(u=>u.value)}],d={chart:{foreColor:"var(--color-text)",type:"bar",toolbar:{show:!1},height:i.height},plotOptions:{bar:{horizontal:!0,barHeight:"60%",distributed:!1,borderRadius:6,borderRadiusApplication:"end"}},dataLabels:{enabled:!1,formatter:u=>String(u),style:{fontSize:"12px"},offsetX:0},yaxis:{labels:{style:{fontSize:"12px"}}},grid:{show:!!i.showGrid,borderColor:"#e6e6e6"},tooltip:{shared:!1,y:{formatter:u=>String(u)}},legend:{show:!!i.showLegend},colors:[i.color],xaxis:{min:0,tickAmount:5,categories:l,labels:{formatter:u=>String(u)}},responsive:[]};return N.jsxs("div",{style:{position:"relative",height:i.height,width:"100%",overflow:"hidden"},children:[N.jsx("div",{style:{opacity:t?0:1,transition:"opacity 0.15s ease-in-out"},children:N.jsx(gi,{options:d,series:h,type:"bar",height:i.height,width:"100%"})}),t&&N.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.5)",borderRadius:12,backdropFilter:"blur(3px)",pointerEvents:"none",transition:"opacity 0.15s ease-in-out"},children:N.jsx(S.Move,{size:36,strokeWidth:1.5,style:{opacity:.85}})})]})},zr={colorUpper:"#2db85bff",colorLower:"#b3761bff",showOutliers:!0,tooltipFormatter:s=>String(s),height:420,responsive:!0,fontSize:"12px",fontWeight:"400",columnWidth:"70%"},zh=({data:s,config:e=zr})=>{const t={...zr,...e},a=[{name:"Distribution",data:(Array.isArray(s?.series)?s.series:[]).map(n=>({x:n.x,y:n.y}))}],r={chart:{foreColor:"var(--color-text)",type:"boxPlot",toolbar:{show:!1},height:t.height},yaxis:{tickAmount:10,labels:{formatter:function(n){return n.toFixed(0)}}},plotOptions:{boxPlot:{columnWidth:t.columnWidth,colors:{upper:t.colorUpper,lower:t.colorLower}}},xaxis:{labels:{rotate:-45,rotateAlways:!0,style:{fontSize:t.fontSize,fontWeight:t.fontWeight}}},stroke:{show:!0,width:1,colors:[t.colorStroke??"var(--color-secondary)"]},markers:{size:0},tooltip:{shared:!1,theme:"dark",custom:function({seriesIndex:n,dataPointIndex:o,w:l}){const c=l.globals.initialSeries[n].data[o].y;return!c||c.length!==5?"":['<div style="padding:10px 14px;font-family:sans-serif;font-size:13px;line-height:1.9;">',`<div>max : <b>${c[4]}</b></div>`,`<div>q1 : <b>${c[3]}</b></div>`,`<div>median : <b>${c[2]}</b></div>`,`<div>q3 : <b>${c[1]}</b></div>`,`<div>min : <b>${c[0]}</b></div>`,"</div>"].join("")}},grid:{borderColor:"#e6e6e6"},dataLabels:{enabled:!1},legend:{show:!1,fontSize:t.fontSize,fontWeight:t.fontWeight},responsive:t.responsive?[]:void 0};return N.jsx(gi,{options:r,series:a,type:"boxPlot",height:t.height})},Dh=({active:s,payload:e,label:t,realColor:i="#D9D9D9",predictionColor:a="#22D3EE",lowerAnomalyColor:r="#C497FF80",upperAnomalyColor:n="#A27DD5",texts:o={max:"Max",min:"Min",predictions:"Prédictions",anomaly:"Anomalie",real:"Réel"}})=>{if(!s||!e||!e.length)return null;const l=e[0].payload;return l?N.jsxs("div",{style:{backgroundColor:"#0B1220",color:"#FFFFFF",padding:"10px 12px",borderRadius:8,fontSize:12,lineHeight:1.4,minWidth:150,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[N.jsx("div",{style:{fontWeight:600,marginBottom:6},children:t}),N.jsxs("div",{children:[o.max," : ",l.max]}),N.jsxs("div",{children:[o.min," : ",l.min]}),N.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:6},children:[N.jsx("span",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:a,marginRight:6}}),N.jsxs("span",{children:[o.predictions," : ",l.pred]})]}),l.anomaly&&N.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:4},children:[N.jsx("span",{style:{width:10,height:10,transform:"rotate(45deg)",backgroundColor:l.anomaly==="Haute"?n:r,marginRight:6}}),N.jsx("span",{children:o.anomaly})]}),l.reel!==void 0&&N.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:4},children:[N.jsx("span",{style:{width:10,height:10,backgroundColor:i,marginRight:6}}),N.jsxs("span",{children:[o.real," : ",l.isPrediction?0:l.reel]})]})]}):null},Xh=({onGoingColor:s,realColor:e,upperAnomalyColor:t,lowerAnomalyColor:i,predictionColor:a,textColor:r="#9CA3AF",fontSize:n="12px",fontWeight:o="400",legendTexts:l={onGoing:"En cours",real:"Réel",predictions:"Prédictions Correctes",upperAnomaly:"Anomalie Haute",lowerAnomaly:"Anomalie Basse"}})=>N.jsxs("div",{style:{display:"flex",justifyContent:"center",flexWrap:"wrap",gap:"20px",marginBottom:"15px",color:r,fontSize:n,fontWeight:o},children:[N.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[N.jsx("span",{style:{width:15,height:10,backgroundColor:s,marginRight:"5px"}}),l.onGoing]}),N.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[N.jsx("span",{style:{width:15,height:10,backgroundColor:e,marginRight:"5px"}}),l.real]}),N.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[N.jsx("span",{style:{width:10,height:10,borderRadius:"50%",backgroundColor:a,marginRight:"5px"}}),l.predictions]}),N.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[N.jsx("span",{style:{width:10,height:10,transform:"rotate(45deg)",backgroundColor:t,marginRight:"5px"}}),l.upperAnomaly]}),N.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[N.jsx("span",{style:{width:10,height:10,transform:"rotate(45deg)",backgroundColor:i,marginRight:"5px"}}),l.lowerAnomaly]})]}),Fh=({data:s,config:e,height:t=220,useOnGoing:i,draggable:a=!1,tooltipEnabled:r=!0,disableLegendFilter:n=!1,backgroundColor:o="#ffffff",lowerAnomalyColor:l="#D8B4FE",lowerAnomalyScatterColor:c="#C497FF",upperAnomalyColor:h="#A855F7",upperAnomalyScatterColor:d="#7C46C3",realColor:u="#D9D9D9",onGoingColor:g="#727688",predictionColor:p="#22D3EE",predictionBarColor:f="#22D3EE",textColor:x="#9CA3AF",fontSize:m="8px",fontWeight:v="400",lineColor:w="#F4F4F4",predictionWindow:y=0,legendTexts:b,tooltipTexts:A,yAxisWidth:k=20,tickCount:C=7,padding:P})=>{const I=ne.useRef(null),[L,E]=ne.useState(50);if(ne.useLayoutEffect(()=>{const O=()=>{if(I.current){const X=I.current.getBoundingClientRect().width,W=s.labels?.length||1,D=(X-k-30-W*2)/W;E(Math.max(D,14))}};return O(),window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[s.labels,k]),e?.displayCondition&&!e.displayCondition(s))return N.jsx("div",{style:{padding:12},children:"Chart hidden by displayCondition"});const R=s.labels||[];if(!R.length)return N.jsx("div",{style:{padding:12},children:"Pas de labels fournis"});const F=s[e?.histogramKey??"histogram"],Y=R.map((O,X)=>{const W=s.main[X]??0,K=s.upper[X]??W,$=s.lower[X]??W,ie=i&&typeof s.onGoingIndex=="number"&&X>s.onGoingIndex&&X<s.onGoingIndex+y,D=ie?W:F?.[X]??void 0,V=K,Z=$;let Q;!ie&&D!==void 0&&D!==null&&(D>K?Q="Haute":D<$&&(Q="Basse"));let J=0,se=0;return y>0&&i&&typeof s.onGoingIndex=="number"&&X===s.onGoingIndex&&D!==void 0&&W!==void 0?D<=W?(J=D,se=W-D):(J=W,se=D-W):(J=D??0,se=0),{time:O,reel:D,pred:W,realPart:J,predPart:se,range:[$,K],max:V,min:Z,anomaly:Q,isPrediction:ie}});function _(O,X){return i&&s.onGoingIndex==X?g:i&&typeof s.onGoingIndex=="number"&&X>s.onGoingIndex&&X<s.onGoingIndex+y?f:O.anomaly?O.anomaly==="Haute"?h:l:u}const B=typeof t=="string",q=N.jsxs(as,{data:Y,margin:{top:20,right:30,left:0,bottom:0},barGap:0,children:[N.jsx(S.CartesianGrid,{strokeDasharray:"0",vertical:!1,stroke:w}),N.jsx(S.XAxis,{dataKey:"time",stroke:x,axisLine:!1,tickLine:!1,tick:{fontSize:m,fontWeight:v}}),N.jsx(S.YAxis,{stroke:x,axisLine:!1,tickLine:!1,tickCount:C,tick:{fontSize:m,fontWeight:v},width:k}),r&&N.jsx(S.Tooltip,{content:N.jsx(Dh,{realColor:u,predictionColor:p,upperAnomalyColor:d,lowerAnomalyColor:c,texts:A}),cursor:{fill:"transparent"}}),N.jsx(ya,{type:"monotone",dataKey:"range",fill:"rgba(0, 143, 187, 1)",stroke:"none",fillOpacity:"16%",zIndex:999}),N.jsx(S.Bar,{dataKey:"realPart",stackId:"a",barSize:L,radius:2,children:Y.map((O,X)=>{let W;return i&&typeof s.onGoingIndex=="number"&&X===s.onGoingIndex&&O.reel!==void 0&&O.pred!==void 0?O.reel<=O.pred?W=_(O,X):W=f:W=_(O,X),N.jsx(S.Cell,{fill:W},`cell-${X}`)})}),N.jsx(S.Bar,{dataKey:"predPart",stackId:"a",barSize:L,radius:2,children:Y.map((O,X)=>{if(!(y>0&&X===s.onGoingIndex))return N.jsx(S.Cell,{fill:"none"},`cell-pred-${X}`);let W;return O.reel!==void 0&&O.pred!==void 0?O.reel<=O.pred?W=f:W=_(O,X):W=f,N.jsx(S.Cell,{fill:W},`cell-pred-${X}`)})}),N.jsx(jr,{type:"monotone",dataKey:"pred",stroke:p,strokeDasharray:"5 5",strokeWidth:2,dot:!1}),N.jsx(Ji,{dataKey:"reel",shape:O=>{const{cx:X,cy:W,payload:K}=O;return X===void 0||W===void 0?N.jsx("g",{}):K?.reel===void 0||K?.reel===0?N.jsx("g",{}):K?.anomaly?N.jsx("g",{}):N.jsx("circle",{cx:X-.5,cy:W,r:4,fill:p,stroke:"#fff",strokeWidth:"2"})}}),N.jsx(Ji,{dataKey:"reel",shape:O=>{const{cx:X,cy:W,payload:K}=O;if(i&&typeof s.onGoingIndex=="number"&&K&&s.labels.indexOf(K.time)===s.onGoingIndex)return N.jsx("g",{});if(!K?.anomaly||X===void 0||W===void 0)return N.jsx("g",{});if(K?.reel===0)return N.jsx("g",{});const $=K.anomaly==="Haute"?d:c;return N.jsx("svg",{x:X-5.5,y:W-5,width:10,height:10,viewBox:"0 0 100 100",children:N.jsx("path",{d:"M50 0 L100 50 L50 100 L0 50 Z",fill:$,stroke:"#fff",strokeWidth:"9"})})}})]});return N.jsxs("div",{ref:I,style:{width:"100%",padding:P,backgroundColor:o,borderRadius:"12px"},children:[B?N.jsx("div",{style:{height:t},children:N.jsx(S.ResponsiveContainer,{width:"100%",height:"100%",children:q})}):N.jsx(S.ResponsiveContainer,{width:"100%",height:t,children:q}),!n&&N.jsx(Xh,{onGoingColor:g,realColor:u,upperAnomalyColor:d,lowerAnomalyColor:c,predictionColor:p,textColor:x,fontSize:m,fontWeight:v,legendTexts:b})]})},Yh=s=>{const{x:e,y:t,payload:i,fontSize:a,fontWeight:r}=s,{value:n}=i;if(n&&n.includes(`
976
976
  `)){const o=n.split(`
977
- `);return N.jsx("g",{transform:`translate(${e},${t})`,children:N.jsxs("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:[N.jsx("tspan",{x:0,dy:"0em",children:o[0]}),N.jsx("tspan",{x:0,dy:"1.2em",children:o[1]})]})})}return N.jsx("text",{x:e,y:t,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:n})},_h=({data:s,height:e=320,tooltipEnabled:t=!0,legendEnabled:i=!0,backgroundColor:a="#ffffff",stacked:r=!0,fontSize:n="12px",fontWeight:o="400"})=>{const l=s.labels.map((u,g)=>{const p={label:u};return s.series.forEach(f=>{p[f.key]=f.data[g]??0}),p}),c=new Map(s.series.map((u,g)=>[u.key,g])),h=u=>{const g=(u.payload??[]).map(p=>({...p}));return g.sort((p,f)=>{const x=c.get(p.dataKey)??999,m=c.get(f.dataKey)??999;return x-m}),N.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:8,gap:16,flexWrap:"wrap"},children:g.map(p=>N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[N.jsx("div",{style:{width:12,height:12,backgroundColor:p.color,borderRadius:2}}),N.jsx("span",{style:{fontSize:n,fontWeight:o,color:"#374151"},children:p.value})]},p.value))})},d=ne.useMemo(()=>{const u=s.labels.length;if(u<=0)return[];if(u<=12)return s.labels;const g=5,p=(u-1)/(g-1),f=[];for(let x=0;x<g;x++)f.push(s.labels[Math.round(x*p)]);return Array.from(new Set(f))},[s.labels]);return N.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:a},children:N.jsx(S.ResponsiveContainer,{width:"100%",height:e,children:N.jsxs(as,{data:l,margin:{left:20,right:45,top:10,bottom:20},children:[N.jsx(S.CartesianGrid,{stroke:"#E5E7EB",vertical:!1}),N.jsx(S.XAxis,{fontSize:n,fontWeight:o,dataKey:"label",axisLine:!1,tickLine:!1,tickMargin:10,interval:0,ticks:d,scale:"point",height:45,tick:N.jsx(Yh,{fontSize:n,fontWeight:o})}),N.jsx(S.YAxis,{fontSize:n,fontWeight:o,axisLine:!1,tickLine:!1,width:30}),t&&N.jsx(S.Tooltip,{itemSorter:u=>c.get(u.dataKey)??999}),i&&N.jsx(va,{content:h}),s.series.map(u=>N.jsx(ya,{type:"monotone",dataKey:u.key,stackId:r?"1":void 0,fill:u.color,stroke:"none",fillOpacity:1,name:u.label},u.key))]})})})},Nh=s=>{const{x:e,y:t,width:i,height:a,index:r,payload:n}=s;if(isNaN(e)||isNaN(t))return null;const o=e<200,c=(d=>{if(d.length<16)return[d];const u=d.lastIndexOf(" (");if(u!==-1&&u>8)return[d.substring(0,u),d.substring(u+1)];const g=d.indexOf(" ",12);return g!==-1?[d.substring(0,g),d.substring(g+1)]:[d]})(n.name),h=14;return N.jsxs(S.Layer,{children:[N.jsx(S.Rectangle,{x:e,y:t,width:i,height:a,fill:n.fill}),c.map((d,u)=>N.jsx("text",{x:o?e-8:e+i+8,y:t+a/2+(u-(c.length-1)/2)*h,textAnchor:o?"end":"start",dominantBaseline:"middle",fontSize:11,fill:"#94a3b8",style:{pointerEvents:"none"},children:d},u))]},`node-${r}`)},Hh=s=>{const{sourceX:e,sourceY:t,targetX:i,targetY:a,linkWidth:r,index:n,payload:o,uid:l}=s;if(e==null||t==null||i==null||a==null||r==null)return null;const c=`
977
+ `);return N.jsx("g",{transform:`translate(${e},${t})`,children:N.jsxs("text",{x:0,y:0,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:[N.jsx("tspan",{x:0,dy:"0em",children:o[0]}),N.jsx("tspan",{x:0,dy:"1.2em",children:o[1]})]})})}return N.jsx("text",{x:e,y:t,dy:16,textAnchor:"middle",fill:"#6B7281",fontSize:a,fontWeight:r,children:n})},_h=({data:s,height:e=320,tooltipEnabled:t=!0,legendEnabled:i=!0,backgroundColor:a="#ffffff",stacked:r=!0,fontSize:n="12px",fontWeight:o="400"})=>{const l=s.labels.map((u,g)=>{const p={label:u};return s.series.forEach(f=>{p[f.key]=f.data[g]??0}),p}),c=new Map(s.series.map((u,g)=>[u.key,g])),h=u=>{const g=(u.payload??[]).map(p=>({...p}));return g.sort((p,f)=>{const x=c.get(p.dataKey)??999,m=c.get(f.dataKey)??999;return x-m}),N.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:8,gap:16,flexWrap:"wrap"},children:g.map(p=>N.jsxs("div",{style:{display:"flex",alignItems:"center",gap:4},children:[N.jsx("div",{style:{width:12,height:12,backgroundColor:p.color,borderRadius:2}}),N.jsx("span",{style:{fontSize:n,fontWeight:o,color:"#374151"},children:p.value})]},p.value))})},d=ne.useMemo(()=>{const u=s.labels.length;if(u<=0)return[];if(u<=12)return s.labels;const g=5,p=(u-1)/(g-1),f=[];for(let x=0;x<g;x++)f.push(s.labels[Math.round(x*p)]);return Array.from(new Set(f))},[s.labels]);return N.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:a},children:N.jsx(S.ResponsiveContainer,{width:"100%",height:e,children:N.jsxs(as,{data:l,margin:{left:20,right:45,top:10,bottom:20},children:[N.jsx(S.CartesianGrid,{stroke:"#E5E7EB",vertical:!1}),N.jsx(S.XAxis,{fontSize:n,fontWeight:o,dataKey:"label",axisLine:!1,tickLine:!1,tickMargin:10,interval:0,ticks:d,scale:"point",height:45,tick:N.jsx(Yh,{fontSize:n,fontWeight:o})}),N.jsx(S.YAxis,{fontSize:n,fontWeight:o,axisLine:!1,tickLine:!1,width:30}),t&&N.jsx(S.Tooltip,{itemSorter:u=>c.get(u.dataKey)??999}),i&&N.jsx(va,{content:h}),s.series.map(u=>N.jsx(ya,{type:"monotone",dataKey:u.key,stackId:r?"1":void 0,fill:u.color,stroke:"none",fillOpacity:1,name:u.label},u.key))]})})})},Nh=s=>{const{x:e,y:t,width:i,height:a,index:r,payload:n,fontSize:o,fontWeight:l}=s;if(isNaN(e)||isNaN(t))return null;const c=e<200,h=95;return N.jsxs(S.Layer,{children:[N.jsx(S.Rectangle,{x:e,y:t,width:i,height:a,fill:n.fill}),N.jsx("foreignObject",{x:c?e-h-8:e+i+8,y:t+a/2-25,width:h,height:50,style:{overflow:"visible"},children:N.jsx("div",{style:{fontSize:o||"11px",fontWeight:l||"400",color:"#94a3b8",lineHeight:"1.2",wordBreak:"break-word",display:"flex",alignItems:"center",justifyContent:c?"flex-end":"flex-start",textAlign:c?"right":"left",height:"100%",pointerEvents:"none"},children:n.name})})]},`node-${r}`)},Hh=s=>{const{sourceX:e,sourceY:t,targetX:i,targetY:a,linkWidth:r,index:n,payload:o,uid:l}=s;if(e==null||t==null||i==null||a==null||r==null)return null;const c=`
978
978
  M${e},${t}
979
979
  C${(e+i)/2},${t}
980
980
  ${(e+i)/2},${a}