@tsiky/components-r19 8.1.8 → 8.1.9

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/index.cjs.js CHANGED
@@ -8333,27 +8333,28 @@
8333
8333
  &:hover:not(:disabled) {
8334
8334
  background-color: ${e=>e.$active?"var(--color-primary)":"var(--color-background, #f3f4f6)"};
8335
8335
  }
8336
- `,mme="_mpRoot_31595_1",fme="_mpHeader_31595_22",gme="_mpTitle_31595_31",vme="_mpList_31595_35",xme="_mpVertical_31595_41",Mme="_mpHorizontal_31595_46",_me="_mpItem_31595_55",Lme="_mpClickable_31595_95",Ime="_mpLeft_31595_117",bme="_mpIcon_31595_125",wme="_mpMeta_31595_140",Cme="_mpLabel_31595_145",Nme="_mpDate_31595_154",Sme="_mpRight_31595_160",jme="_mpValue_31595_168",$me="_mpHint_31595_176",qme="_mpBadge_31595_180",Ame="_mpBadgeTop_31595_199",zme="_mpBadgeSub_31595_206",Vme="_mpBadgeSmall_31595_213",Pme="_mpPill_31595_229",Tme="_mpRounded_31595_232",Hme="_mpCompact_31595_236",Dme="_compactItemWrapper_31595_252",Bme="_mpSummaryRoot_31595_265",Rme="_mpSummaryInner_31595_269",Fme="_mpSummaryFlex_31595_284",Eme="_mpSummaryCardWrapperHorizontal_31595_292",Ome="_mpSummaryCardWrapper_31595_292",Ume="_mpSummaryCardHorizontal_31595_303",Wme="_mpSummaryCard_31595_292",Gme="_mpSummaryValue_31595_321",Kme="_mpSummaryLabel_31595_327",Zme="_mpSummaryBadge_31595_338",Xme="_mpSummaryBadgeSub_31595_357",Yme="_mpEmpty_31595_365",Jme="_mpSummaryVertical_31595_372",Qme="_mpIconSquare_31595_380",ee={mpRoot:mme,mpHeader:fme,mpTitle:gme,mpList:vme,mpVertical:xme,mpHorizontal:Mme,mpItem:_me,mpClickable:Lme,mpLeft:Ime,mpIcon:bme,mpMeta:wme,mpLabel:Cme,mpDate:Nme,mpRight:Sme,mpValue:jme,mpHint:$me,mpBadge:qme,mpBadgeTop:Ame,mpBadgeSub:zme,mpBadgeSmall:Vme,mpPill:Pme,mpRounded:Tme,mpCompact:Hme,compactItemWrapper:Dme,mpSummaryRoot:Bme,mpSummaryInner:Rme,mpSummaryFlex:Fme,mpSummaryCardWrapperHorizontal:Eme,mpSummaryCardWrapper:Ome,mpSummaryCardHorizontal:Ume,mpSummaryCard:Wme,mpSummaryValue:Gme,mpSummaryLabel:Kme,mpSummaryBadge:Zme,mpSummaryBadgeSub:Xme,mpEmpty:Yme,mpSummaryVertical:Jme,mpIconSquare:Qme},Tt=(e,t=1)=>{if(!e||typeof e!="string")return`rgba(124, 58, 237, ${t})`;const n=e.trim();if(n.toLowerCase()==="transparent")return"rgba(0,0,0,0)";if(/^rgba?\(/i.test(n))return/^rgba\(/i.test(n)?n.replace(/rgba\(([^)]+),\s*([0-9.]+)\s*\)$/,(d,l)=>`rgba(${l.split(",").map(u=>u.trim()).slice(0,3).join(", ")}, ${t})`):n;let c=n.replace("#","").toLowerCase();if(c.length===3&&(c=c.split("").map(d=>d+d).join("")),!/^[0-9a-f]{6}$/i.test(c))return`rgba(124, 58, 237, ${t})`;const i=parseInt(c.slice(0,2),16),r=parseInt(c.slice(2,4),16),s=parseInt(c.slice(4,6),16);return`rgba(${i}, ${r}, ${s}, ${t})`},e3e=({item:e,shape:t,onItemClick:n,color:c,renderItem:i})=>{const r=k.useCallback(()=>{n?.(e)},[n,e]),s=[ee.mpItem,t==="pill"?ee.mpPill:ee.mpRounded,n?ee.mpClickable:""].filter(Boolean).join(" ");if(i)return o.jsx("div",{className:s,role:n?"button":"group",tabIndex:n?0:-1,onClick:r,onKeyDown:y=>{n&&(y.key==="Enter"||y.key===" ")&&(n(e),y.preventDefault())},"aria-label":n?`Voir les détails de ${e.label}`:void 0,children:i(e)});const d=n?"button":"div",l=n?{onClick:r,className:s,type:"button","aria-label":`Voir les détails de ${e.label}`}:{className:s,role:"group"},h=e.iconComponent,u=e.iconSquareBg,p=e.iconColor;return o.jsxs(d,{...l,children:[o.jsxs("div",{className:ee.mpLeft,children:[h?o.jsx("div",{className:ee.mpIconSquare,style:{background:u??Tt(p??c??"#7c3aed",1),border:`1px solid ${Tt(p??c??"#7c3aed",.18)}`,color:p??"#ffffff"},children:k.createElement(h,{size:20,color:p??"#fff",strokeWidth:1.8})}):e.icon?o.jsx("div",{className:ee.mpIcon,children:e.icon}):null,o.jsxs("div",{className:ee.mpMeta,children:[o.jsx("div",{className:ee.mpLabel,children:e.label}),e.subLabel&&o.jsx("div",{className:ee.mpDate,children:e.subLabel}),e.date&&o.jsx("div",{className:ee.mpDate,children:e.date})]})]}),o.jsxs("div",{className:ee.mpRight,children:[o.jsx("div",{className:ee.mpValue,style:{color:e.valueColor??c??void 0},children:e.value}),e.badge?o.jsxs("div",{className:[ee.mpBadge,e.badge.small?ee.mpBadgeSmall:""].join(" "),style:{backgroundColor:e.badge.bg??Tt(e.badge.color||c||"#7c3aed",.12),borderColor:e.badge.bg?"transparent":Tt(e.badge.color||c||"#7c3aed",.18),color:e.badge.color??e.badge.textColor??"#0f172a",fontWeight:600},children:[o.jsx("div",{className:ee.mpBadgeTop,children:e.badge.text}),e.badge.subText&&o.jsx("div",{className:ee.mpBadgeSub,children:e.badge.subText})]}):e.hint?o.jsx("div",{className:ee.mpHint,children:e.hint}):null]})]})},t3e=k.memo(e3e),qj=({title:e,right:t})=>!e&&!t?null:o.jsxs("div",{className:ee.mpHeader,children:[o.jsx("div",{className:ee.mpTitle,children:e}),o.jsx("div",{children:t})]}),Aj=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},a3e=({item:e})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:14,borderRadius:12,minHeight:88,boxSizing:"border-box",background:e.bgColor??"transparent",border:`1px solid ${e.borderColor??"transparent"}`,boxShadow:"0 4px 10px rgba(15,23,42,0.03)"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[o.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#475569"},children:e.label}),o.jsx("div",{style:{fontSize:26,fontWeight:900,color:"#0f172a",lineHeight:1},children:e.value})]}),o.jsx("div",{title:String(e.label),style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:10,background:e.iconSquareBg??Aj("#7c3aed",.12),border:`1px solid ${Aj(e.iconColor??"#7c3aed",.12)}`,boxShadow:"none"},children:e.iconComponent?k.createElement(e.iconComponent,{size:18,color:e.iconColor??"#7c3aed",strokeWidth:1.6}):null})]}),n3e=({item:e,bg:t,onClick:n,width:c,height:i,extraStyle:r})=>o.jsxs("div",{className:ee.mpSummaryCard,style:{background:t,width:c??void 0,height:i??void 0,...r??{}},role:n?"button":"group",tabIndex:n?0:-1,onClick:()=>n?.(e),children:[o.jsx("div",{className:ee.mpSummaryLabel,children:e.label}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:e.valueColor??"#2a24deff"},children:e.value}),e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]})]}),zj=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},Vj=e=>o.jsxs("div",{style:{display:"grid",gridTemplateRows:"auto 1fr",width:"100%",gap:8,alignItems:"center",boxSizing:"border-box",minWidth:0},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between-left",alignItems:"baseline",gap:10,width:"100%"},children:[o.jsx("div",{style:{fontWeight:700,fontSize:"clamp(14px, 1.2vw, 16px)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:e.label}),e.subLabel?o.jsx("div",{style:{fontSize:"clamp(13px, 1.1vw, 15px)",fontWeight:600,whiteSpace:"nowrap"},children:e.subLabel}):null]}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:15,width:"100%"},children:[o.jsx("div",{style:{fontWeight:900,fontSize:"clamp(16px, 1.6vw, 20px)",color:e.valueColor,lineHeight:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.value}),e.badge?o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"8px 12px",borderRadius:10,backgroundColor:e.badge.bg?e.badge.bg:zj("#7c3aed",.08),border:`1px solid ${e.badge.bg?e.badge.bg:zj("#7c3aed",.12)}`,color:e.badge.textColor||"#0f172a",fontWeight:700,fontSize:"clamp(12px, 1.2vw, 14px)",width:"120px",height:"52px",textAlign:"center",boxSizing:"border-box",overflow:"hidden",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",lineHeight:1.2,flexShrink:0},children:[o.jsx("div",{style:{fontSize:14,fontWeight:800,lineHeight:1.2,letterSpacing:"0.02em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.text}),e.badge.subText?o.jsx("div",{style:{fontSize:13,marginTop:4,fontWeight:700,letterSpacing:"0.01em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.subText}):null]}):null]})]}),Pj=(e,t)=>{try{if(typeof e=="function"){const n=e(t);if(n!==void 0)return n}}catch{}try{return k.createElement(e,{item:t})}catch(n){return console.warn("chooseDefaultRender: impossible de rendre CompactRenderer",n),null}},o3e=e=>{switch(e){case"image":return t=>k.createElement(a3e,{item:t});case"pertinence":return t=>k.createElement(n3e,{item:t});case"alternateHorizontal":return t=>Pj(Vj,t);case"compact":return t=>Pj(Vj,t);case"summary":return;case"default":default:return}},NA=({item:e,orientation:t,bg:n,border:c,valueColor:i,onClick:r,width:s,height:d,extraStyle:l})=>{const u=t==="horizontal"?ee.mpSummaryCardHorizontal:ee.mpSummaryCard;return o.jsxs("div",{className:u,style:{background:n,border:`1px solid ${c}`,width:s??void 0,height:d??void 0,...l??{}},role:r?"button":"group",tabIndex:r?0:-1,onClick:()=>r?.(e),children:[e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:i},children:e.value}),o.jsx("div",{className:ee.mpSummaryLabel,children:e.label})]})},c3e=["transparent","transparent","transparent","transparent"],i3e=["transparent","transparent","transparent","transparent"],r3e=["#059669","#2563eb","#b45309","#7c3aed"],s3e=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},SA=e=>{const{items:t=[],layout:n="vertical",orientation:c="auto",shape:i="rounded",color:r="#7c3aed",compact:s=!1,title:d,onItemClick:l,className:h="",loading:u=!1,emptyMessage:p="Aucun élément",renderItem:y,summary:f=!1,summaryBgColors:g=c3e,summaryBorderColors:m=i3e,summaryValueColors:x=r3e,preset:M,background:v}=e,{itemsContainerStyle:I,itemsContainerClassName:b,summaryGridColumns:w,compactItemWidth:C,compactItemHeight:_,compactItemStyle:L,summaryCardWidth:j,summaryCardHeight:N,summaryCardStyle:S}=e,z=n==="vertical",A={"--mp-accent":r,"--mp-accent-soft":s3e(r,.08),"--mp-bg-primary":v},H=[ee.mpRoot,z?ee.mpVertical:ee.mpHorizontal,s?ee.mpCompact:"",f?ee.mpSummaryRoot:"",c!=="auto"?c==="vertical"?ee.mpOrientationVertical:ee.mpOrientationHorizontal:"",h].filter(Boolean).join(" "),P=k.useMemo(()=>y||(o3e(M)??void 0),[y,M]);if(f){const V=c==="horizontal"?ee.mpSummaryFlex:ee.mpSummaryVertical,q={...(w?{display:"grid",gridTemplateColumns:`repeat(${w}, 1fr)`,gap:18,alignItems:"stretch",width:"100%"}:void 0)??{},...I??{}};return o.jsxs("div",{className:H,style:A,"aria-busy":u,children:[d&&o.jsx(qj,{title:d}),o.jsx("div",{className:ee.mpSummaryInner,children:o.jsx("div",{className:`${V} ${b??""}`,style:q,children:t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map((R,T)=>{const O=R.bgColor??g[T%g.length],J=R.borderColor??m[T%m.length],E=R.valueColor??x[T%x.length];return P?o.jsx("div",{className:c==="horizontal"?ee.mpSummaryCardWrapperHorizontal:ee.mpSummaryCardWrapper,style:{width:j??void 0,height:N??void 0,...S??{}},children:P(R,T)},R.id):o.jsx(NA,{item:R,orientation:c==="horizontal"?"horizontal":"vertical",bg:O,border:J,valueColor:E,onClick:l,width:j??void 0,height:N??void 0,extraStyle:S},R.id)})})})]})}return o.jsxs("div",{className:H,style:A,"aria-busy":u,children:[d&&o.jsx(qj,{title:d}),o.jsx("div",{className:ee.mpList,style:I,children:u?o.jsx("div",{className:ee.mpEmpty,children:"Chargement…"}):t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map(V=>{const $=s?{width:C??void 0,height:_??void 0,boxSizing:"border-box",...L??{}}:void 0;return o.jsx("div",{className:s?ee.compactItemWrapper:void 0,style:$,children:o.jsx(t3e,{item:V,shape:i,onItemClick:l,color:r,renderItem:P?q=>P(q,t.indexOf(q)):void 0})},V.id)})})]})};k.memo(SA);const d3e=({a11yConfig:e,width:t,height:n,colors:c={text:"#0b1220",background:"#fff",contentBackground:"#efeff0"},titles:i={},placeholder:r="Loading Chart",style:s,className:d="",children:l,padding:h="1rem",variant:u="default",showBorder:p=!1,titleKey:y,leftTitleKey:f})=>{const g=t?typeof t=="number"?`${t}px`:t:void 0,m=n?typeof n=="number"?`${n}px`:n:void 0,x=r&&typeof r=="object"&&!k.isValidElement(r)&&("text"in r||"subtext"in r||"icon"in r||"background"in r||"iconSize"in r),M=x?r:void 0,v=M?.icon?_t[M.icon]:void 0,I=28,b=M?.iconSize??I,w=["chart-container",`variant-${u}`,p?"with-border":"",d].filter(Boolean).join(" "),C=c.contentBackground??void 0,_=typeof h=="number"?`${h}px`:h;return o.jsxs("div",{className:w,style:{width:g,height:m,color:c.text,background:c.background,display:"flex",flexDirection:"column",boxSizing:"border-box",padding:_,...s},children:[o.jsxs("div",{className:"chart-header",children:[o.jsxs("div",{title:Y(e,f||y),className:"chart-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.left,i.leftSubtitle&&o.jsx("div",{className:"chart-subtitle-left",children:i.leftSubtitle})]}),o.jsx("div",{className:"chart-title-right",children:i.right})]}),o.jsx("div",{className:"chart-content",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:C},children:l||(x&&M?o.jsxs("div",{className:"placeholder",role:"status","aria-live":"polite",children:[v&&o.jsx("div",{className:"placeholder-icon",style:{width:b,height:b},children:o.jsx(v,{color:M.iconColor??"currentColor",size:typeof b=="number"?b:parseInt(String(b),10)||I})}),M.text&&o.jsx("div",{className:"placeholder-text",children:M.text}),M.subtext&&o.jsx("div",{className:"placeholder-subtext",children:M.subtext})]}):o.jsx("div",{className:"placeholder-node",role:"status","aria-live":"polite",children:r}))})]})},dC=({id:e,size:t="100%",background:n,icon:c,text:i,subtext:r,onClose:s,onClick:d,style:l,className:h="",colorTextPrimary:u,colorTextSub:p,model:y,fontSize:f,fontWeight:g,a11yConfig:m,titleKey:x})=>{const M=c||y?.icon,v=typeof M=="string",I=v?_t[M]:null,b=v?null:M;return o.jsxs("div",{id:e,className:`alert ${h}`,style:{width:typeof t=="number"?`${t}px`:t,background:n||y?.background,pointerEvents:"auto",cursor:d?"pointer":"default",...l},role:"alert",onClick:d,title:Y(m,x),children:[I&&o.jsx(I,{className:"alert-icon",size:20,color:u||y?.colorTextPrimary}),b!=null&&o.jsx("span",{className:"alert-icon",style:{display:"flex",alignItems:"center",color:u||y?.colorTextPrimary,flexShrink:0},children:b}),o.jsxs("div",{className:"alert-content",children:[o.jsx("span",{className:"alert-text",style:{color:u||y?.colorTextPrimary,fontSize:f,fontWeight:g},children:i}),r&&o.jsx("span",{className:"alert-subtext",style:{color:p||y?.colorTextSub},children:r})]}),s&&o.jsx("button",{className:"alert-close",onClick:s,"aria-label":"Fermer",children:"✕"})]})},jA=k.createContext(null),l3e=(e="alert")=>`${e}_${Math.random().toString(36).slice(2,9)}`,h3e=({children:e,defaultDuration:t=4e3,maxAlerts:n,containerClassName:c,containerStyle:i})=>{const[r,s]=k.useState([]),d=k.useRef(new Map),l=k.useRef(null),[h,u]=k.useState(null),[p,y]=k.useState(void 0),f=k.useRef(n),g=k.useRef(r),m=k.useRef(t);k.useEffect(()=>{g.current=r},[r]),k.useEffect(()=>{m.current=t},[t]),k.useEffect(()=>{const A=d.current;return()=>{A.forEach(H=>window.clearTimeout(H)),A.clear()}},[]);const x=k.useCallback(A=>{const H=d.current.get(A);H&&(window.clearTimeout(H),d.current.delete(A))},[]),M=k.useCallback(A=>{x(A),s(H=>H.filter(P=>P.id!==A))},[x]),v=k.useCallback((A,H)=>{const P=H===void 0||H===0?m.current:H;if(P===-1)return;const V=window.setTimeout(()=>{M(A)},P);d.current.set(A,V)},[M]),I=k.useCallback(A=>{const H=l3e(),P={...A,id:H,createdAt:Date.now()};return s(V=>{const $=[P,...V],q=f.current;return typeof q=="number"&&q>=0&&$.length>q?($.slice(q).forEach(T=>x(T.id)),$.slice(0,q)):$}),v(H,A.duration),H},[x,v]),b=k.useCallback((A,H)=>{s(P=>P.map(V=>V.id===A?{...V,...H}:V))},[]),w=k.useCallback(()=>{d.current.forEach(A=>window.clearTimeout(A)),d.current.clear(),s([])},[]),C=k.useCallback((A,H)=>{A&&window.getComputedStyle(A).position==="static"&&(A.style.position="relative"),u(P=>P===A?P:A),y(H)},[]),_=k.useCallback(()=>g.current.slice(),[]),L=k.useMemo(()=>({showAlert:I,dismissAlert:M,updateAlert:b,clearAlerts:w,setContainerRef:C,getAlertsSnapshot:_}),[I,M,b,w,C,_]),j=h,N=j?!!p:!1,S=o.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",zIndex:10001,padding:"8px 4px",...N?{top:"auto",left:"auto",right:"auto",alignItems:"flex-end"}:null,...j?p:null},children:o.jsx(Ele,{mode:"popLayout",children:r.map(A=>o.jsx(oC.div,{initial:{opacity:0,y:-10,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.98},transition:{type:"spring",damping:25,stiffness:300},style:{width:N?"auto":"100%",pointerEvents:"auto",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.12)",borderRadius:"8px",marginBottom:"6px",backgroundColor:A.background||A.model?.background||"var(--color-background, #fff)",border:"1px solid rgba(0, 0, 0, 0.08)",overflow:"hidden"},children:o.jsx(dC,{id:A.id,text:A.text,subtext:A.subtext,icon:A.icon,background:"transparent",colorTextPrimary:A.colorTextPrimary,colorTextSub:A.colorTextSub,model:A.model,onClose:()=>M(A.id),size:N?"auto":"100%",style:{boxShadow:"none",...N?{whiteSpace:"nowrap"}:null}})},A.id))})}),z=o.jsx("div",{ref:A=>{h||(l.current=A)},className:c,style:{width:"100%",position:"relative",...i},"aria-live":"polite",children:S});return o.jsxs(jA.Provider,{value:L,children:[j?Iw.createPortal(S,j):z,e]})},u3e=()=>{const e=k.useContext(jA);if(!e)throw new Error("useAlerts must be used inside an AlertsProvider");return e},p3e={default:{background:"#f3f4f6",icon:"Info",colorTextPrimary:"#111827",colorTextSub:"#4b5563"},info:{background:"#dbeafe",icon:"Info",colorTextPrimary:"#1e40af",colorTextSub:"#3b82f6"},success:{background:"#dcfce7",icon:"CheckCircle2",colorTextPrimary:"#166534",colorTextSub:"#22c55e"},warning:{background:"#fef3c7",icon:"AlertTriangle",colorTextPrimary:"#92400e",colorTextSub:"#f59e0b"},error:{background:"#fee2e2",icon:"XCircle",colorTextPrimary:"#991b1b",colorTextSub:"#ef4444"}},y3e="_container_18zbo_1",k3e="_icon_18zbo_9",m3e="_selectWrapper_18zbo_23",Wb={container:y3e,icon:k3e,selectWrapper:m3e},f3e=({options:e,defaultValue:t,onChange:n,label:c})=>{const[i,r]=k.useState(t||e[0]?.value||""),s=d=>{r(d),n?.(d)};return o.jsxs("div",{className:Wb.container,children:[o.jsxs("div",{className:Wb.icon,children:[o.jsx(C1,{size:18}),o.jsx("p",{children:c})]}),o.jsx("div",{className:Wb.selectWrapper,children:o.jsx(cC,{field:{name:"periode",label:"",options:e},value:i,onChange:s,onBlur:()=>{}})})]})},g3e=250,v3e=k.forwardRef(({title:e,subtitle:t,size:n="420px",beforeOpen:c,afterOpen:i,beforeClose:r,afterClose:s,style:d,className:l="",children:h,closeOnOverlayClick:u=!0,showCloseButton:p=!0},y)=>{const[f,g]=k.useState(!1),[m,x]=k.useState(!1),M=k.useRef(null),v=k.useRef(null),I=k.useRef(null),b=k.useRef(null);k.useEffect(()=>{const _=M.current;if(!_)return;const L=_.parentElement;return L?(window.getComputedStyle(L).position==="static"&&(L.setAttribute("data-scp-prev-position",L.style.position??""),L.style.position="relative",L.setAttribute("data-scp-position-changed","true")),()=>{if(L.getAttribute("data-scp-position-changed")==="true"){const N=L.getAttribute("data-scp-prev-position")??"";L.style.position=N,L.removeAttribute("data-scp-position-changed"),L.removeAttribute("data-scp-prev-position")}}):void 0},[]),k.useImperativeHandle(y,()=>({open:()=>{f||(c?.(),x(!1),g(!0))},close:()=>{f&&(r?.(),x(!1),g(!1))},toggle:()=>{f?(r?.(),x(!1),g(!1)):(c?.(),x(!1),g(!0))}}),[f,c,r]),k.useEffect(()=>{const _=v.current;b.current&&(window.clearTimeout(b.current),b.current=null);const L=j=>{if(j.target===_&&!(j.propertyName!=="transform"&&j.propertyName!=="opacity"))if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}};return _&&(_.addEventListener("transitionend",L),b.current=window.setTimeout(()=>{if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}},g3e+60)),f&&(I.current=document.activeElement),()=>{_&&_.removeEventListener("transitionend",L),b.current&&(window.clearTimeout(b.current),b.current=null)}},[f,i,s]),k.useEffect(()=>{const _=L=>{L.key==="Escape"&&f&&(r?.(),x(!1),g(!1))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[f,r]);const w=()=>{u&&(r?.(),x(!1),g(!1))},C=typeof n=="number"?`${n}px`:n;return o.jsxs("div",{ref:M,className:`scp-inline-root ${f?"open":""}`,"aria-hidden":!f,children:[o.jsx("div",{className:`scp-overlay ${f?"visible":""}`,onMouseDown:w,role:"presentation"}),o.jsxs("aside",{className:`scp-panel ${f?"in":"out"} ${m?"interactive":""} ${l}`,style:{width:C,...d},ref:v,tabIndex:-1,role:"dialog","aria-label":e,children:[o.jsxs("div",{className:"scp-header",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"scp-title",children:e}),t&&o.jsx("div",{className:"scp-subtitle",children:t})]}),p&&o.jsx("button",{className:"scp-close","aria-label":"Close",onClick:()=>{r?.(),x(!1),g(!1)},children:o.jsx(at,{size:18})})]}),o.jsx("div",{className:"scp-body",children:h})]})]})});function x3e(e){const t=k.useRef("");k.useEffect(()=>{if(e){t.current=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=t.current||""},[e])}const M3e="_container_1pfsp_1",_3e="_title_1pfsp_8",Tj={container:M3e,title:_3e},L3e=({title:e,fontSize:t,barColor:n,className:c="",style:i={}})=>{const r={...i,"--title-font-size":t,"--bar-color":n};return o.jsx("div",{className:`${Tj.container} ${c}`,style:r,children:o.jsx("h2",{className:Tj.title,children:e})})},I3e="_modalOverlay_1878x_1",b3e="_modalContainer_1878x_16",w3e="_modalTitle_1878x_29",C3e="_modalInput_1878x_38",N3e="_modalTextarea_1878x_39",S3e="_modalActions_1878x_70",j3e="_cancelBtn_1878x_77",$3e="_saveBtn_1878x_99",q3e="_inputError_1878x_141",A3e="_inlineAlert_1878x_146",ct={modalOverlay:I3e,modalContainer:b3e,modalTitle:w3e,modalInput:C3e,modalTextarea:N3e,modalActions:S3e,cancelBtn:j3e,saveBtn:$3e,inputError:q3e,inlineAlert:A3e},Dc=({isOpen:e,onClose:t,onSave:n,title:c="Ajouter un élément",fields:i,initialValues:r={},errorMessage:s="",disableSave:d,onFieldChange:l,confirmText:h="Valider",cancelText:u="Annuler"})=>{const[p,y]=k.useState({}),f=k.useRef(null),[g,m]=k.useState(!1),[x,M]=k.useState(!1),v=k.useRef(null);if(k.useEffect(()=>{if(!e)return;const _={};for(const L of i)_[L.name]=Object.prototype.hasOwnProperty.call(r,L.name)?r[L.name]:"";return y(_),requestAnimationFrame(()=>{f.current?.focus();const L=f.current;if(L&&typeof L.selectionStart=="number"){const j=String(L.value??"").length;L.setSelectionRange(j,j)}}),()=>{v.current&&(window.clearTimeout(v.current),v.current=null)}},[e]),k.useEffect(()=>{s&&e?(M(!0),v.current&&(window.clearTimeout(v.current),v.current=null),v.current=window.setTimeout(()=>{M(!1),v.current=null},3e3)):(M(!1),v.current&&(window.clearTimeout(v.current),v.current=null))},[s,e]),!e)return null;const I=(_,L)=>{y(j=>({...j,[_]:L})),l&&l(_,L)},b=async()=>{if(!Object.values(p).some(_=>_===""||_===void 0))try{m(!0);const _=await n(p);if(typeof _=="string"&&_==="duplicate-same"){m(!1);return}y({}),m(!1),t()}catch(_){console.error("AddItemModal onSave error:",_),m(!1),t()}},w=_=>{_.target===_.currentTarget&&t()},C=_=>_.stopPropagation();return o.jsx("div",{className:ct.modalOverlay,onMouseDown:w,role:"dialog","aria-modal":"true",children:o.jsxs("div",{className:ct.modalContainer,onMouseDown:C,onClick:C,children:[o.jsx("h2",{className:ct.modalTitle,children:c}),i.map((_,L)=>{const j=p[_.name]??"",N=L===0&&!!s,S={name:_.name,placeholder:_.placeholder||_.label,value:String(j),onChange:z=>I(_.name,z.target.value),className:_.type==="textarea"?`${ct.modalTextarea} ${N?ct.inputError:""}`:`${ct.modalInput} ${N?ct.inputError:""}`,tabIndex:0,disabled:g};return L===0&&(S.ref=z=>{f.current=z}),o.jsxs("div",{style:{marginBottom:8},children:[_.type==="textarea"?o.jsx("textarea",{rows:_.rows||4,...S}):o.jsx("input",{type:_.type||"text",...S}),L===0&&x&&s&&o.jsx("div",{style:{marginTop:8},children:o.jsx(dC,{text:s,background:"#fff5f5",colorTextPrimary:"#ef4444",onClose:()=>M(!1),className:ct.inlineAlert})})]},_.name)}),o.jsxs("div",{className:ct.modalActions,children:[o.jsx("button",{className:ct.cancelBtn,onClick:t,type:"button",disabled:g,children:u}),o.jsx("button",{className:ct.saveBtn,onClick:b,type:"button",disabled:g||!!d,children:g?"En cours...":h})]})]})})},z3e=({title:e,keyCount:t,onAddKey:n,a11yConfig:c})=>{const[i,r]=k.useState(!1),s=d=>{const l=d.key;n&&l&&n(l)};return o.jsxs("div",{className:"header-container",children:[o.jsxs("div",{className:"header-info",children:[o.jsx("h1",{title:Y(c,e),children:e}),o.jsxs("p",{children:[t," clés"]})]}),o.jsxs("button",{onClick:()=>r(!0),className:"add-key-button",children:[o.jsx(zc,{className:"add-key-icon"}),"Clé"]}),o.jsx(Dc,{isOpen:i,title:"Ajouter une clé",onClose:()=>r(!1),onSave:s,fields:[{name:"key",label:"Nouvelle clé",placeholder:"Entrer une nouvelle clé"}]})]})},V3e=({modules:e,onEdit:t,onDelete:n,onAddModule:c,onSelectModule:i,addModalFields:r,addModalTitle:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(null),[p,y]=k.useState(null),[f,g]=k.useState(!1),m=()=>l(!0),x=()=>l(!1),M=_=>{if(c){const L=_.code?.trim()||_.id?.trim(),j=_.title?.trim(),N=L||j||String(Date.now()),S=j||L||`Module ${N}`;c({id:N,title:S,subtitle:"",translations:{}})}x()},v=(_,L)=>{_.stopPropagation(),u(L)},I=()=>u(null),b=_=>{if(!h){I();return}const L={...h,title:_.title||h.title,subtitle:""};t&&t(L),I()},w=(_,L)=>{_.stopPropagation(),n&&n(L)},C=_=>{y(_.id),i&&i(_)};return f?o.jsx("div",{className:"module-sidebar collapsed",children:o.jsx(n1,{size:20,className:"menu-toggle",onClick:()=>g(!1)})}):o.jsxs("div",{className:"module-sidebar",children:[o.jsxs("div",{className:"sidebar-header",children:[o.jsxs("span",{className:"header-text",children:["Modules (",e.length,")"]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(Ac,{size:18,className:"header-folder",onClick:m}),o.jsx(n1,{size:18,className:"header-menu",onClick:()=>g(!0)})]})]}),o.jsx("hr",{className:"divider"}),o.jsx("div",{className:"module-list",children:e.map(_=>{const L=Object.keys(_.translations||{}).length,j=L>0||_.id===p;return o.jsxs("div",{className:`module-item ${_.id===p?"selected":""}`,onClick:()=>C(_),role:"button",tabIndex:0,onKeyDown:N=>{N.key==="Enter"&&C(_)},children:[o.jsxs("div",{className:"module-left",children:[o.jsx(q1,{size:16,className:"item-folder"}),o.jsxs("div",{className:"module-info",children:[o.jsxs("div",{className:"module-title",children:[_.title,j&&o.jsxs("span",{className:"count",children:[" ",L," "]})]}),_.subtitle?o.jsx("div",{className:"module-subtitle",children:_.subtitle}):null]})]}),o.jsxs("div",{className:"module-actions",children:[t&&o.jsx(o1,{onClick:N=>v(N,_),color:"#777",size:16}),n&&o.jsx(kt,{onClick:N=>w(N,_.id),color:"#777",size:16})]})]},_.id)})}),o.jsx(Dc,{isOpen:d,onClose:x,onSave:M,title:s||"Ajouter un module",fields:r&&r.length?r.map(_=>({name:_.name,label:_.label,type:_.type,placeholder:_.placeholder,rows:_.rows})):[{name:"title",label:"Titre",placeholder:"Titre du module"}]}),h&&o.jsx(Dc,{isOpen:!!h,onClose:I,onSave:b,title:"Éditer le module",initialValues:{title:h.title},fields:[{name:"title",label:"Titre",placeholder:"Titre du module"}]})]})},$A=({placeholder:e="Rechercher une clé ou traduction...",value:t="",onChange:n,iconPosition:c="left",iconColor:i="#9ca3af",a11yConfig:r,className:s})=>o.jsxs("div",{className:`search-container icon-${c}`,title:Y(r,e),children:[o.jsx("div",{className:"search-icon-wrapper",children:o.jsx(V1,{className:"search-icon",color:i})}),o.jsx("input",{type:"text",placeholder:e,value:t,onChange:d=>n?.(d.target.value),className:`search-input ${s}`})]}),P3e=({keyName:e,translations:t,availableLanguages:n,onDeleteKey:c,onEditKey:i,onEditTranslation:r,onDeleteTranslation:s,onAddTranslation:d,draggable:l=!1,checkDuplicateLocal:h})=>{const[u,p]=k.useState(!1),[y,f]=k.useState(""),[g,m]=k.useState(null),[x,M]=k.useState(""),[v,I]=k.useState(""),[b,w]=k.useState(!1),[C,_]=k.useState(!1),[L,j]=k.useState(null),[N,S]=k.useState(!1),z=t.map(T=>T.language),A=n.filter(T=>!z.includes(T.code)),H=()=>{y&&v.trim()&&(d?.(e,y,v.trim()),f(""),I(""),p(!1))},P=(T,O)=>{m(T),M(O)},V=T=>{r?.(e,T,x),m(null),M("")},$=()=>{m(null),M("")},q=async T=>{const O=T.name?.trim();if(O){if(j(null),S(!1),O===e||!i)return w(!1),"ok";try{const J=await i(e,O);if(typeof J=="string"&&J==="ok")w(!1),j(null);else{if(typeof J=="string"&&J==="duplicate-same")return j("Une clé existe déjà dans ce module."),S(!0),"duplicate-same";if(typeof J=="string"&&J==="duplicate-other")return w(!1),j(null),"duplicate-other";w(!1)}}catch(J){console.error("Erreur handleRenameSave:",J),j("Erreur lors du renommage.")}}},R=(T,O)=>{if(T!=="name")return;const J=O.trim();j(null),S(!1),J&&typeof h=="function"&&(h(J,e)?(j("Une clé existe déjà dans ce module."),S(!0)):(j(null),S(!1)))};return o.jsxs("div",{className:`translation-key ${C?"collapsed":"expanded"} ${l?"draggable":""}`,children:[o.jsxs("div",{className:"card-header",children:[o.jsxs("div",{className:"header-left",children:[o.jsx("button",{className:"collapse-button",onClick:()=>_(!C),title:C?"Déplier":"Replier",children:C?o.jsx(S1,{className:"collapse-icon"}):o.jsx(Ht,{className:"collapse-icon"})}),o.jsx("h3",{className:"card-title",title:e,children:e})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx("button",{className:"action-button",onClick:T=>{T.stopPropagation(),w(!0)},title:"Renommer la clé",children:o.jsx(vt,{className:"action-icon"})}),o.jsx("button",{onClick:T=>{T.stopPropagation(),c?.(e)},className:"action-button delete",title:"Supprimer la clé",children:o.jsx(kt,{className:"action-icon"})})]})]}),o.jsx("div",{className:`translations-container ${C?"":"expanded"}`,children:!l&&o.jsxs(o.Fragment,{children:[t.map(T=>o.jsxs("div",{className:"translation-row",children:[o.jsx("div",{className:"language-code",children:T.language}),o.jsx("div",{className:"translation-content",children:g===T.language?o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",value:x,onChange:O=>M(O.target.value),className:"edit-input",autoFocus:!0,onKeyDown:O=>{O.key==="Enter"&&V(T.language),O.key==="Escape"&&$()}}),o.jsx("button",{onClick:()=>V(T.language),className:"save-button",disabled:!x.trim(),children:"Enregistrer"}),o.jsx("button",{onClick:$,className:"cancel-button",children:o.jsx(at,{className:"action-icon"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"translation-text",title:T.value,children:T.value}),o.jsx("button",{onClick:()=>P(T.language,T.value),className:"edit-button",title:"Éditer la traduction",children:o.jsx(vt,{className:"action-icon"})}),o.jsx("button",{onClick:()=>s?.(e,T.language),className:"delete-translation-button",title:"Supprimer la traduction",children:o.jsx(at,{className:"action-icon"})})]})})]},T.language)),u?o.jsxs("div",{className:"add-language-row",children:[o.jsx("div",{className:"language-code",children:"+"}),o.jsxs("div",{className:"add-language-content",children:[o.jsx("div",{className:"language-select-container",children:o.jsxs("select",{value:y,onChange:T=>f(T.target.value),className:"language-select",children:[o.jsx("option",{value:"",children:"Sélectionnez la langue"}),A.map(T=>o.jsxs("option",{value:T.code,children:[T.name," (",T.code,")"]},T.code))]})}),y&&o.jsx("input",{type:"text",value:v,onChange:T=>I(T.target.value),placeholder:"Entrez la traduction...",className:"translation-input",onKeyDown:T=>{T.key==="Enter"&&H(),T.key==="Escape"&&(p(!1),f(""),I(""))}}),o.jsx("button",{onClick:H,disabled:!y||!v.trim(),className:"save-button",children:"Ajouter"}),o.jsx("button",{onClick:()=>{p(!1),f(""),I("")},className:"cancel-button",children:o.jsx(at,{className:"action-icon"})})]})]}):o.jsxs("button",{onClick:()=>p(!0),className:"show-add-button",disabled:A.length===0,children:[o.jsx("span",{className:"plus-icon",children:"+"}),"Ajouter une langue"]})]})}),l&&o.jsxs("div",{className:"drag-overlay",children:[o.jsx(a.Move,{size:24,strokeWidth:1.5}),o.jsx("span",{children:"Glisser pour réorganiser"})]}),o.jsx(Dc,{isOpen:b,onClose:()=>{w(!1),j(null),S(!1)},onSave:q,onFieldChange:R,title:"Renommer la clé",initialValues:{name:e},fields:[{name:"name",label:"Nom de la clé",placeholder:"Nom de la clé"}],errorMessage:L||"",disableSave:N})]})},T3e="_wrapper_1wvht_1",H3e="_leftGroup_1wvht_12",D3e="_filterButton_1wvht_21",B3e="_open_1wvht_42",R3e="_filterIcon_1wvht_42",F3e="_infoText_1wvht_58",E3e="_pickerContainer_1wvht_66",O3e="_srOnly_1wvht_79",U3e="_pickerLabel_1wvht_91",W3e="_datetime_1wvht_98",G3e="_rightGroup_1wvht_107",K3e="_searchInputWrap_1wvht_116",Z3e="_searchInput_1wvht_116",X3e="_searchIcon_1wvht_152",Ee={wrapper:T3e,leftGroup:H3e,filterButton:D3e,open:B3e,filterIcon:R3e,infoText:F3e,pickerContainer:E3e,srOnly:O3e,pickerLabel:U3e,datetime:W3e,rightGroup:G3e,searchInputWrap:K3e,searchInput:Z3e,searchIcon:X3e};function Y3e({onDateChange:e,onSearch:t,initialDate:n}){const[c,i]=k.useState(!1),[r,s]=k.useState(n??""),d=k.useRef(null);k.useEffect(()=>{function p(y){const f=y.target;d.current&&f&&!d.current.contains(f)&&i(!1)}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),k.useEffect(()=>{n&&s(n)},[n]);const l=()=>i(p=>!p),h=p=>{const y=p.target.value;s(y),e?.(y)},u=p=>{t?.(p.target.value)};return o.jsxs("div",{className:Ee.wrapper,ref:d,children:[o.jsxs("div",{className:Ee.leftGroup,children:[o.jsxs("button",{type:"button",className:`${Ee.filterButton} ${c?Ee.open:""}`,onClick:l,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":"entry-datetime",children:[o.jsx("span",{children:"Entry time"}),o.jsx("svg",{className:Ee.filterIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M10 18h4v-2h-4v2zm-7-8v2h18V10H3zm3-6v2h12V4H6z"})})]}),o.jsx("div",{className:Ee.infoText,children:"Confidence interval: step ± 15' / exit ± 30'"}),c&&o.jsxs("div",{className:Ee.pickerContainer,role:"dialog","aria-label":"Choisir la date et l’heure",children:[o.jsx("label",{className:Ee.pickerLabel,htmlFor:"entry-datetime",children:o.jsx("span",{className:Ee.srOnly,children:"Choisir la date et l’heure"})}),o.jsx("input",{id:"entry-datetime",className:Ee.datetime,type:"datetime-local",value:r,onChange:h,"aria-label":"Date et heure d’entrée"})]})]}),o.jsx("div",{className:Ee.rightGroup,children:o.jsxs("div",{className:Ee.searchInputWrap,children:[o.jsx("input",{className:Ee.searchInput,placeholder:"Search...",onChange:u,"aria-label":"Search"}),o.jsx("svg",{className:Ee.searchIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16a6.471 6.471 0 004.23-1.57l.27.28v.79L20 20.49 21.49 19l-5.99-5zM10 15.5A5.5 5.5 0 1115.5 10 5.5 5.5 0 0110 15.5z"})})]})})]})}const J3e=({className:e="",style:t={},title:n,titleClassName:c="",titleStyle:i,data:r,lineClasses:s={},renderCell:d,bg:l,titleBg:h,titleColor:u,itemBg:p,emptyContent:y,colGap:f="1rem"})=>{const g=Array.isArray(r)?r:[],m=g.length===0,x=g.every(b=>typeof b=="string"),M=g.some(b=>Array.isArray(b)),v=(b,w,C)=>d?d(b,w,C):o.jsx("span",{className:"slb-cell-text",children:b}),I=f?{"--col-gap":f}:void 0;return m?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{...i,background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-empty",children:y??null})]}):x&&!M?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("ul",{className:"slb-list",children:g.map((b,w)=>o.jsx("li",{className:`slb-item ${s[w]||""}`,style:{background:p??void 0},children:v(b,w,0)},w))})]}):o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-grid",style:I,children:g.map((b,w)=>{const C=s[w]||"";if(Array.isArray(b)){const[_,L]=b;return o.jsxs("div",{className:`slb-row ${C}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(_,w,0)}),o.jsx("div",{className:"slb-grid-right",children:v(L,w,1)})]},w)}return o.jsxs("div",{className:`slb-row ${C}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(b,w,0)}),o.jsx("div",{className:"slb-grid-right slb-empty-cell","aria-hidden":"true"})]},w)})})]})},Q3e=({className:e="",style:t={},title:n,titleColor:c,data:i=[],badgeColor:r="#0ea5e9",badgeColors:s={},badgePadding:d="8px 16px",badgeWidth:l,itemBg:h,lineClasses:u={},colGap:p="1rem"})=>{const y=i.some(g=>Array.isArray(g)),f=p?{"--col-gap":p}:void 0;return o.jsxs("div",{className:`clb-root ${e}`,style:{...t},children:[n&&o.jsx("div",{className:"clb-title",style:c?{color:c}:void 0,children:n}),o.jsx("div",{className:"clb-grid",style:f,children:i.map((g,m)=>{const x=u[m]||"";if(Array.isArray(g)){const[M,v]=g,I=s[m]||r;return o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col",children:o.jsx("div",{className:"counter-badge",style:{background:I,padding:d,width:l,minWidth:l},children:M})}),o.jsx("div",{className:"clb-text",children:v})]},m)}return y?o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col clb-empty-badge"}),o.jsx("div",{className:"clb-text",children:g})]},m):o.jsx("div",{className:`clb-fullrow ${x}`,style:{background:h??void 0},children:o.jsx("span",{children:g})},m)})})]})},efe=({className:e="",style:t={},title:n,items:c=[],titleBg:i,titleColor:r,itemBg:s,lineClasses:d={},renderTrendIcon:l,colGap:h="1rem"})=>{const u=h?{"--col-gap":h}:void 0;return o.jsxs("div",{className:`tlb-root ${e}`,style:{...t,background:s??void 0},children:[n&&o.jsx("div",{className:"tlb-title",style:{background:i??void 0,color:r??void 0},children:n}),o.jsx("div",{className:"tlb-grid",style:u,children:c.map((p,y)=>{const f=d[y]||"";return o.jsxs("div",{className:`tlb-row ${f}`,style:{background:s??void 0},children:[o.jsx("div",{className:"tlb-label",children:p.label}),o.jsxs("div",{className:"tlb-value-group",children:[o.jsx("div",{className:"tlb-icon-col",children:l?l(p):p.icon??null}),o.jsxs("div",{className:"tlb-value-wrap",children:[o.jsx("div",{className:"tlb-value",children:p.value}),typeof p.delta<"u"&&o.jsx("div",{className:`tlb-delta ${p.delta>0?"positive":p.delta<0?"negative":"neutral"}`,children:p.deltaLabel??String(p.delta)})]})]})]},y)})})]})},tfe=({className:e="",style:t={},children:n,gap:c="1rem"})=>o.jsx("div",{className:`frc-root ${e}`,style:{...t,"--frc-gap":c},children:k.Children.map(n,i=>o.jsx("div",{className:"frc-item",children:i}))}),afe=({className:e="",style:t={},children:n,gap:c="1rem",background:i="#D9EEF5"})=>o.jsx("div",{className:`lcc-root ${e}`,style:{background:i,...t,"--lcc-gap":c},children:k.Children.map(n,r=>o.jsx("div",{className:"lcc-cell",children:r}))}),nfe="_overlay_3x4or_2",ofe="_fadeIn_3x4or_1",cfe="_popup_3x4or_17",ife="_slideUp_3x4or_1",rfe="_header_3x4or_28",sfe="_body_3x4or_40",dfe="_footer_3x4or_51",lfe="_cancelButton_3x4or_59",hfe="_confirmButton_3x4or_77",ufe="_warning_3x4or_97",pfe="_danger_3x4or_106",yfe="_info_3x4or_115",St={overlay:nfe,fadeIn:ofe,popup:cfe,slideUp:ife,header:rfe,body:sfe,footer:dfe,cancelButton:lfe,confirmButton:hfe,warning:ufe,danger:pfe,info:yfe},kfe=({isOpen:e,title:t,message:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",type:d="warning"})=>{if(!e)return null;const l=u=>{u.target===u.currentTarget&&i()},h=u=>{u.key==="Escape"&&i(),u.key==="Enter"&&u.ctrlKey&&c()};return o.jsx("div",{className:St.overlay,onClick:l,onKeyDown:h,role:"dialog","aria-labelledby":"confirmation-title","aria-describedby":"confirmation-message",children:o.jsxs("div",{className:`${St.popup} ${St[d]}`,children:[o.jsx("div",{className:St.header,children:o.jsx("h3",{id:"confirmation-title",children:t})}),o.jsx("div",{className:St.body,children:o.jsx("p",{id:"confirmation-message",children:n})}),o.jsxs("div",{className:St.footer,children:[o.jsx("button",{className:St.cancelButton,onClick:i,type:"button",children:s}),o.jsx("button",{className:St.confirmButton,onClick:c,type:"button",autoFocus:!0,children:r})]})]})})},mfe=()=>{const[e,t]=k.useState({isOpen:!1,title:"",message:"",onConfirm:null}),n=k.useCallback((r,s,d)=>{t({isOpen:!0,title:r,message:s,onConfirm:d})},[]),c=k.useCallback(()=>{t(r=>({...r,isOpen:!1,onConfirm:null}))},[]),i=k.useCallback(()=>{e.onConfirm?.(),c()},[e.onConfirm,c]);return{isOpen:e.isOpen,title:e.title,message:e.message,showConfirmation:n,hideConfirmation:c,handleConfirm:i}},ffe="_container_q8nv4_1",gfe="_selectButton_q8nv4_7",vfe="_disabled_q8nv4_23",xfe="_error_q8nv4_40",Mfe="_outline_q8nv4_53",_fe="_filled_q8nv4_59",Lfe="_sm_q8nv4_68",Ife="_md_q8nv4_74",bfe="_lg_q8nv4_80",wfe="_buttonContent_q8nv4_86",Cfe="_label_q8nv4_94",Nfe="_placeholder_q8nv4_104",Sfe="_iconsContainer_q8nv4_109",jfe="_loadingSpinner_q8nv4_116",$fe="_spin_q8nv4_1",qfe="_arrowIcon_q8nv4_135",Afe="_arrowIconOpen_q8nv4_143",zfe="_dropdown_q8nv4_148",Vfe="_dropdownIn_q8nv4_1",Pfe="_searchContainer_q8nv4_176",Tfe="_searchInputWrapper_q8nv4_182",Hfe="_searchIcon_q8nv4_188",Dfe="_searchInput_q8nv4_182",Bfe="_optionsList_q8nv4_213",Rfe="_noResults_q8nv4_238",Ffe="_option_q8nv4_213",Efe="_optionHighlighted_q8nv4_268",Ofe="_optionSelected_q8nv4_273",Ufe="_optionDisabled_q8nv4_284",Wfe="_optionLabel_q8nv4_290",Gfe="_checkIcon_q8nv4_298",Kfe="_widthFull_q8nv4_306",Zfe="_width64_q8nv4_310",Xfe="_width80_q8nv4_314",Yfe="_width96_q8nv4_318",he={container:ffe,selectButton:gfe,disabled:vfe,error:xfe,default:"_default_q8nv4_49",outline:Mfe,filled:_fe,sm:Lfe,md:Ife,lg:bfe,buttonContent:wfe,label:Cfe,placeholder:Nfe,iconsContainer:Sfe,loadingSpinner:jfe,spin:$fe,arrowIcon:qfe,arrowIconOpen:Afe,dropdown:zfe,dropdownIn:Vfe,searchContainer:Pfe,searchInputWrapper:Tfe,searchIcon:Hfe,searchInput:Dfe,optionsList:Bfe,noResults:Rfe,option:Ffe,optionHighlighted:Efe,optionSelected:Ofe,optionDisabled:Ufe,optionLabel:Wfe,checkIcon:Gfe,widthFull:Kfe,width64:Zfe,width80:Xfe,width96:Yfe},hi=4,Hj=8,Jfe=({options:e,value:t,onChange:n,placeholder:c="Sélectionner une option...",disabled:i=!1,loading:r=!1,error:s=!1,className:d="",size:l="md",variant:h="default",width:u="w-full",dropdownPosition:p="auto"})=>{const[y,f]=k.useState(!1),[g,m]=k.useState(""),[x,M]=k.useState(0),[v,I]=k.useState({top:0,left:0,width:0}),[b,w]=k.useState("bottom"),[C,_]=k.useState(null),L=k.useRef(null),j=k.useRef(null),N=k.useRef(null),S=k.useMemo(()=>g?e.filter(E=>E.label.toLowerCase().includes(g.toLowerCase())):e,[e,g]),z=e.find(E=>E.value===t),A=k.useCallback(()=>{if(L.current){const E=L.current.getBoundingClientRect();I({top:E.top,left:E.left,width:E.width})}},[]),H=k.useCallback(()=>{if(!L.current)return;const E=L.current.getBoundingClientRect(),U=E.top-hi-Hj,ie=window.innerHeight-E.bottom-hi-Hj;let ce;p!=="auto"?ce=p:ce=(j.current?.scrollHeight??0)<=ie?"bottom":U>ie?"top":"bottom",w(Me=>Me===ce?Me:ce),_(Math.max(ce==="bottom"?ie:U,0))},[p]),P=k.useCallback(()=>{A(),H()},[A,H]);k.useEffect(()=>(y&&(P(),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P)),()=>{window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)}),[y,P]),k.useLayoutEffect(()=>{y&&H()},[y,H]),k.useEffect(()=>{const E=U=>{L.current&&!L.current.contains(U.target)&&j.current&&!j.current.contains(U.target)&&(f(!1),m(""))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]),k.useEffect(()=>{M(0)},[S]);const V=E=>{E.disabled||(n?.(E.value,E),f(!1),m(""))},$=E=>{m(E.target.value),y||f(!0)},q=E=>{if(!y){(E.key==="ArrowDown"||E.key==="Enter")&&f(!0);return}switch(E.key){case"ArrowDown":E.preventDefault(),M(U=>U<S.length-1?U+1:U);break;case"ArrowUp":E.preventDefault(),M(U=>U>0?U-1:U);break;case"Enter":E.preventDefault(),S[x]&&V(S[x]);break;case"Escape":f(!1),m("");break}},R=()=>[he.selectButton,he[l],he[h],i?he.disabled:"",s?he.error:"",d].filter(Boolean).join(" "),T=()=>{switch(u){case"w-64":return he.width64;case"w-80":return he.width80;case"w-96":return he.width96;default:return he.widthFull}},O=(E,U)=>[he.option,U===x?he.optionHighlighted:"",E.value===t?he.optionSelected:"",E.disabled?he.optionDisabled:""].filter(Boolean).join(" "),J={position:"fixed",top:b==="bottom"?v.top+(L.current?.offsetHeight||0)+hi:"auto",bottom:b==="top"?window.innerHeight-v.top+hi:"auto",left:v.left,width:v.width,maxHeight:C!=null?`${C}px`:void 0,zIndex:9999};return o.jsxs("div",{className:`${he.container} ${T()}`,children:[o.jsx("button",{ref:L,className:R(),onClick:()=>!i&&f(!y),onKeyDown:q,tabIndex:i?-1:0,type:"button","aria-haspopup":"listbox","aria-expanded":y,disabled:i,children:o.jsxs("div",{className:he.buttonContent,children:[o.jsx("span",{className:`${he.label} ${z?"":he.placeholder}`,children:z?z.label:c}),o.jsxs("div",{className:he.iconsContainer,children:[r&&o.jsx("div",{className:he.loadingSpinner}),o.jsx("svg",{className:`${he.arrowIcon} ${y?he.arrowIconOpen:""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),y&&Iw.createPortal(o.jsxs("div",{className:`${he.dropdown} ${T()}`,style:J,ref:j,children:[o.jsx("div",{className:he.searchContainer,children:o.jsxs("div",{className:he.searchInputWrapper,children:[o.jsx("svg",{className:he.searchIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),o.jsx("input",{ref:N,type:"text",value:g,onChange:$,placeholder:"Rechercher...",className:he.searchInput,autoFocus:!0})]})}),o.jsx("div",{className:he.optionsList,children:S.length===0?o.jsx("div",{className:he.noResults,children:"Aucun résultat trouvé"}):o.jsx("ul",{role:"listbox",children:S.map((E,U)=>o.jsx("li",{className:O(E,U),onClick:()=>V(E),onMouseEnter:()=>M(U),role:"option","aria-selected":E.value===t,"aria-disabled":E.disabled,children:o.jsxs("div",{className:he.buttonContent,children:[o.jsx("span",{className:he.optionLabel,title:E.label,children:E.label}),E.value===t&&o.jsx("svg",{className:he.checkIcon,fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})},E.value))})})]}),document.body)]})},Qfe="_container_uq7pt_1",e6e="_item_uq7pt_7",t6e="_mainValue_uq7pt_13",a6e="_label_uq7pt_17",n6e="_subValue_uq7pt_22",o6e="_subValueWrapper_uq7pt_27",c6e="_subSeparator_uq7pt_32",Je={container:Qfe,item:e6e,mainValue:t6e,label:a6e,subValue:n6e,subValueWrapper:o6e,subSeparator:c6e},i6e=({dms:e,stats:t=[],itemWidth:n="120px",valueFontSize:c="28px",valueFontWeight:i=700,subFontSize:r="16px",subFontWeight:s=600,backgroundColor:d="#ffffff",labelColor:l="#6b7280",valueColor:h="#000000"})=>{const u=(p,y,f)=>{const[g,m]=p.split("/").map(x=>x.trim());return o.jsxs("span",{className:Je.subValueWrapper,children:[o.jsx("span",{className:Je.subLeft,style:{color:y},children:g}),o.jsx("span",{className:Je.subSeparator,children:" / "}),o.jsx("span",{className:Je.subRight,style:{color:f},children:m})]})};return o.jsxs("div",{className:Je.container,style:{backgroundColor:d},children:[e&&o.jsxs("div",{className:Je.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Je.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:e}),o.jsx("div",{className:Je.label,style:{color:l},children:"DMS"})]}),t.map((p,y)=>o.jsxs("div",{className:Je.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Je.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:p.value}),o.jsx("div",{className:Je.label,style:{color:l},children:p.label}),o.jsx("div",{className:Je.subValue,style:{fontSize:r,fontWeight:s},children:p.subValue&&u(p.subValue,p.subLeftColor,p.subRightColor)})]},y))]})},r6e="_encours_16ist_1",s6e="_header_16ist_19",d6e="_iconWrap_16ist_27",l6e="_title_16ist_36",h6e="_items_16ist_47",u6e="_spaceEvenly_16ist_56",p6e="_item_16ist_47",y6e="_valueContainer_16ist_86",k6e="_value_16ist_86",m6e="_label_16ist_108",lt={encours:r6e,header:s6e,iconWrap:d6e,title:l6e,items:h6e,spaceEvenly:u6e,item:p6e,valueContainer:y6e,value:k6e,label:m6e},$c=e=>typeof e=="number"?`${e}px`:typeof e=="string"?e:void 0;function f6e(e,t){const n={},c={};return e.valueColor&&(n.color=e.valueColor),e.valueFontSize!==void 0?n.fontSize=$c(e.valueFontSize):t.defaultValueFontSize!==void 0&&(n.fontSize=$c(t.defaultValueFontSize)),e.valueFontWeight!==void 0?n.fontWeight=e.valueFontWeight:t.defaultValueFontWeight!==void 0&&(n.fontWeight=t.defaultValueFontWeight),e.labelColor&&(c.color=e.labelColor),e.labelFontSize!==void 0?c.fontSize=$c(e.labelFontSize):t.defaultLabelFontSize!==void 0&&(c.fontSize=$c(t.defaultLabelFontSize)),e.labelFontWeight!==void 0?c.fontWeight=e.labelFontWeight:t.defaultLabelFontWeight!==void 0&&(c.fontWeight=t.defaultLabelFontWeight),{valueStyle:n,labelStyle:c}}function g6e(){return o.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.4"}),o.jsx("path",{d:"M8 12h8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function v6e(e){const{title:t,titleColor:n,titleFontSize:c,titleFontWeight:i,icon:r,iconSize:s=18,iconColor:d,defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p,data:y,style:f,bg:g="#ffffff",width:m,gap:x,className:M,ariaLabel:v}=e,I=r?_t[r]:void 0,b={background:g,width:$c(m),...f},w={};n&&(w.color=n),c!==void 0&&(w.fontSize=$c(c)),i!==void 0&&(w.fontWeight=i);const C={};return d&&(C.color=d),o.jsxs("section",{className:`${lt.encours} ${M??""}`,style:b,"aria-label":v??t,children:[o.jsxs("div",{className:lt.header,children:[o.jsx("div",{className:lt.iconWrap,"aria-hidden":!0,style:C,children:I?o.jsx(I,{size:typeof s=="number"?s:void 0}):o.jsx(g6e,{})}),o.jsx("div",{className:lt.title,style:w,children:t})]}),o.jsx("div",{className:`${lt.items} ${x===void 0?lt.spaceEvenly:""}`,role:"list",style:x!==void 0?{gap:`${x}px`}:{},children:y.map((_,L)=>{const{valueStyle:j,labelStyle:N}=f6e(_,{defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p});return o.jsx("div",{className:lt.item,role:"listitem",style:{..._.background?{background:_.background}:{},..._.width?{width:$c(_.width)}:{}},children:o.jsxs("div",{className:lt.valueContainer,children:[o.jsx("div",{className:lt.value,style:j,children:_.value}),_.label&&o.jsx("div",{className:lt.label,style:N,children:_.label})]})},`${String(_.label??_.value)}-${L}`)})})]})}const x6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-360 280-559h400z"})),qA=k.memo(x6e),M6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m280-400 200-201 200 201z"})),_6e=k.memo(M6e),L6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#0087BD",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm3.983-3.55q.1 0 .192-.033a.36.36 0 0 0 .158-.117l4.117-4.133q.15-.15.15-.35a.54.54 0 0 0-.15-.367.52.52 0 0 0-.358-.133.5.5 0 0 0-.359.15l-3.75 3.75L5.35 7.583a.48.48 0 0 0-.7 0q-.15.15-.15.367 0 .216.15.35l1.983 2a.48.48 0 0 0 .35.15"})),I6e=k.memo(L6e),b6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#1E2122",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm0-1h10V3H3z"})),w6e=k.memo(b6e),C6e=({items:e,onSave:t,loading:n,disabled:c,saveLabel:i,savingLabel:r,buttonTitle:s,size:d=16,colors:l={bg:"#DADADA",activeBg:"var(--color-primary)",circle:"#FFFFFF",icon:"#1C1B1F",icon2:"#FFFFFF"},style:h,a11yConfig:u})=>{const[p,y]=k.useState(!1),[f,g]=k.useState(e),[m,x]=k.useState(!1);if(k.useEffect(()=>{x(!0)},[]),k.useEffect(()=>{g(e)},[e]),!m)return null;const M=(b,w)=>{w<4||g(C=>C.map(_=>_.component_key===b?{..._,visible:!_.visible}:_))},v=()=>{t(f),y(!1)},I=Y(u,s);return o.jsxs("div",{style:{position:"relative",display:"inline-block",...h},children:[o.jsxs("div",{onClick:()=>{c||y(!p)},style:{display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",borderRadius:4,transition:"background 0.2s"},title:I,children:[o.jsx(u$,{width:d,height:d,fill:l?.icon||"currentColor",style:{transition:"color 0.2s"}}),p?o.jsx(_6e,{width:d,height:d,fill:l?.icon||"currentColor"}):o.jsx(qA,{width:d,height:d,fill:l?.icon||"currentColor"})]}),p&&o.jsxs("div",{style:{position:"absolute",top:"120%",right:0,minWidth:260,background:"#fff",borderRadius:"0.25rem",boxShadow:"0px 3px 7px 0px rgba(17, 20, 21, 0.05),0px 14px 14px 0px rgba(17, 20, 21, 0.04),0px 30px 18px 0px rgba(17, 20, 21, 0.03), 0px 54px 22px 0px rgba(17, 20, 21, 0.01),0px 85px 24px 0px rgba(17, 20, 21, 0)",zIndex:235465456,padding:"0 0 0.5rem 0"},children:[o.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:f.map((b,w)=>o.jsxs(k.Fragment,{children:[o.jsxs("li",{onClick:()=>M(b.component_key,w),style:{display:"flex",alignItems:"center",padding:"0.5rem",cursor:w<4?"not-allowed":"pointer",transition:"background 0.2s"},onMouseEnter:C=>{w>=4&&(C.currentTarget.style.background="#F9FAFB")},onMouseLeave:C=>{w>=4&&(C.currentTarget.style.background="transparent")},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:b.visible?o.jsx(I6e,{width:20,height:20,fill:l?.activeBg||"var(--color-primary, #008FBB)"}):o.jsx(w6e,{width:20,height:20,fill:"#D1D5DB"})}),o.jsx("span",{style:{fontSize:"14px",color:"#111827",fontWeight:400,userSelect:"none"},children:b.label})]}),w===3&&o.jsx("div",{style:{height:1,background:"#E5E7EB",margin:"4px 0"}})]},b.component_key))}),o.jsx("div",{style:{padding:"12px 16px 0 16px",display:"flex",justifyContent:"flex-end"},children:o.jsx("button",{type:"button",onClick:v,disabled:n,style:{padding:"6px 16px",borderRadius:4,border:"none",background:"var(--color-primary, #008FBB)",color:"#fff",fontSize:"14px",fontWeight:500,cursor:n?"not-allowed":"pointer",transition:"opacity 0.2s",opacity:n?.7:1},children:n?r:i})})]})]})},N6e="_container_zhny9_1",S6e="_card_zhny9_15",j6e="_footer_zhny9_33",$6e="_noPaddingMobile_zhny9_51",ui={container:N6e,card:S6e,footer:j6e,noPaddingMobile:$6e},q6e="_board_95t8m_1",A6e="_clickable_95t8m_21",z6e="_sideBar_95t8m_26",V6e="_boardContent_95t8m_32",P6e="_orange_95t8m_40",T6e="_red_95t8m_44",H6e="_green_95t8m_48",D6e="_grey_95t8m_52",B6e="_lightGrey_95t8m_56",R6e="_big_95t8m_61",F6e="_medium_95t8m_66",E6e="_headerRow_95t8m_70",O6e="_iconWrapper_95t8m_75",U6e="_headerTitle_95t8m_80",W6e="_valueArea_95t8m_89",G6e="_titleWhite_95t8m_99",K6e="_titleBlack_95t8m_103",Z6e="_valueWhite_95t8m_108",X6e="_valueBlack_95t8m_112",Y6e="_valueBlue_95t8m_116",J6e="_bars_95t8m_121",Q6e="_bar_95t8m_121",e8e="_barDark_95t8m_135",t8e="_barDim_95t8m_139",a8e="_predictionSection_95t8m_143",n8e="_predictionHeader_95t8m_155",o8e="_predictionBody_95t8m_162",c8e="_hasPrediction_95t8m_170",Te={board:q6e,clickable:A6e,sideBar:z6e,boardContent:V6e,orange:P6e,red:T6e,green:H6e,grey:D6e,lightGrey:B6e,big:R6e,medium:F6e,headerRow:E6e,iconWrapper:O6e,headerTitle:U6e,valueArea:W6e,titleWhite:G6e,titleBlack:K6e,valueWhite:Z6e,valueBlack:X6e,valueBlue:Y6e,bars:J6e,bar:Q6e,barDark:e8e,barDim:t8e,predictionSection:a8e,predictionHeader:n8e,predictionBody:o8e,hasPrediction:c8e},i8e=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${Te.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${Te.bar} ${r<c?"":e?Te.barDark:Te.barDim}`},r))})},Mt=({a11yConfig:e,iconName:t,label:n,value:c,backgroundColor:i="green",bars:r,lightBars:s=5,size:d="big",valueScale:l,width:h,height:u,className:p="",style:y,titleColor:f="white",valueColor:g="white",titleFontSize:m,titleFontWeight:x,valueFontSize:M,valueFontWeight:v,barColor:I,justifyContent:b="space-between",alignItems:w="flex-start",cardGap:C="",onClick:_,iconColor:L,titleKey:j,predictionValue:N,predictionLabel:S})=>{const z=r!=="none",A=r==="endingDark",{padding:H,...P}=y||{},V=h===void 0&&u===void 0&&i===void 0&&Object.keys(P).length===0?void 0:{...h!==void 0?{width:h}:{},...u!==void 0?{height:u}:{},...i!==void 0?{backgroundColor:i}:{},...P},$=`${Te.board} ${Te[d]} ${N!==void 0?Te.hasPrediction:""} ${p}`;return o.jsxs("div",{className:$,onClick:_,style:l!==void 0?{...V,"--ds-value-scale":l}:V,children:[I&&o.jsx("div",{className:Te.sideBar,style:{backgroundColor:I}}),o.jsxs("div",{className:Te.boardContent,style:{padding:H,gap:C},children:[o.jsxs("div",{className:Te.headerRow,style:{justifyContent:b,alignItems:w},children:[t&&o.jsx("div",{className:Te.iconWrapper,style:{color:L},children:t}),o.jsx("div",{className:`${Te.headerTitle} header-title-data-board`,children:o.jsx("span",{title:Y(e,j),"aria-label":e?.description,style:{color:f,...m?{fontSize:m}:{},...x?{fontWeight:x}:{}},children:n})}),z?o.jsx(i8e,{endingDark:A,lightCount:s}):null]}),o.jsx("div",{className:Te.valueArea,style:{color:g,...M?{fontSize:M}:{},...v?{fontWeight:v}:{}},children:c})]}),N!==void 0&&o.jsxs("div",{className:Te.predictionSection,children:[o.jsx("div",{className:Te.predictionHeader,children:S??"PRED."}),o.jsx("div",{className:Te.predictionBody,children:N})]})]})},r8e="_wrapper_1ydle_10",s8e="_hosp_1ydle_19",d8e="_headerRow_1ydle_54",l8e="_iconWrapper_1ydle_61",h8e="_headerTitle_1ydle_67",u8e="_hospValue_1ydle_76",p8e="_side_1ydle_88",y8e="_mini_1ydle_100",k8e="_miniLabel_1ydle_131",m8e="_miniValue_1ydle_140",f8e="_miniBars_1ydle_150",g8e="_bars_1ydle_155",v8e="_bar_1ydle_155",x8e="_barDark_1ydle_169",M8e="_barDim_1ydle_173",De={wrapper:r8e,hosp:s8e,headerRow:d8e,iconWrapper:l8e,headerTitle:h8e,hospValue:u8e,side:p8e,mini:y8e,miniLabel:k8e,miniValue:m8e,miniBars:f8e,bars:g8e,bar:v8e,barDark:x8e,barDim:M8e},_8e=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${De.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${De.bar} ${r<c?"":e?De.barDark:De.barDim}`},r))})},AA=({left:e,right:t,className:n="",style:c,miniTilesCount:i=3})=>{const r=e.bars??"endingDark",s=r!=="none",d=r==="endingDark",l={...c,"--mini-tiles-count":i};return o.jsxs("div",{className:`${De.wrapper} ${n} data-four-boards`,style:l,children:[o.jsxs("div",{className:`${De.hosp} ${e.className||""}`,onClick:e.onClick,style:{...e.width?{width:e.width}:{},...e.height?{height:e.height}:{},...e.backgroundColor?{backgroundColor:e.backgroundColor}:{},...e.style||{}},title:Y(e.a11yConfig,e.titleKey),children:[o.jsxs("div",{className:De.headerRow,children:[o.jsxs("div",{className:`${De.iconWrapper} icon-wrapper-data-four-boards`,children:[e.iconName&&o.jsx("span",{style:{color:e.iconColor},children:e.iconName}),o.jsx("span",{className:De.headerTitle,style:{color:e.titleColor||"white",...e.titleFontSize?{fontSize:e.titleFontSize}:{},...e.titleFontWeight?{fontWeight:e.titleFontWeight}:{}},title:Y(e.a11yConfig,e.titleKey),children:e.label})]}),s?o.jsx(_8e,{endingDark:d,lightCount:e.lightBars??5}):null]}),o.jsx("div",{className:De.hospValue,style:{color:e.valueColor||"white",...e.valueScale!==void 0?{"--ds-value-scale":e.valueScale}:{},...e.valueFontSize?{fontSize:e.valueFontSize}:{},...e.valueFontWeight?{fontWeight:e.valueFontWeight}:{}},children:e.value})]}),o.jsx("div",{className:De.side,children:t.map((h,u)=>o.jsxs("div",{className:`${De.mini} ${h.className||""} icon-wrapper-data-four-boards`,onClick:h.onClick,style:{...h.width?{width:h.width}:{},...h.height?{height:h.height}:{},...h.backgroundColor?{backgroundColor:h.backgroundColor}:{},...h.style||{}},title:Y(h.a11yConfig,h.titleKey),children:[o.jsxs("span",{className:De.miniLabel,style:{color:h.titleColor||"white",textAlign:"right",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...h.titleFontSize?{fontSize:h.titleFontSize}:{},...h.titleFontWeight?{fontWeight:h.titleFontWeight}:{}},title:Y(h.a11yConfig,h.titleKey),children:[h.iconName&&o.jsx("span",{style:{color:h.iconColor},children:h.iconName}),h.label]}),o.jsx("span",{className:`${De.miniValue} mini-value-data-four-boards`,style:{color:h.valueColor||"white",textAlign:"right",...h.valueScale!==void 0?{"--ds-value-scale":h.valueScale}:{},...h.valueFontSize?{fontSize:h.valueFontSize}:{},...h.valueFontWeight?{fontWeight:h.valueFontWeight}:{}},children:h.value}),o.jsx("div",{className:De.miniBars})]},h.id??`${h.label}-${u}`))})]})},L8e=({items:e,footerLabel:t,width:n,height:c,size:i=320,style:r,className:s="",backgroundColor:d,titleFontSize:l,titleFontWeight:h,valueFontSize:u,valueFontWeight:p,noPaddingLeftRight:y=!1,onItemClick:f})=>{const g={width:n??i,height:c,backgroundColor:d??"var(--ds-navy)",...r},m=e[0],x=e[1],M=e.slice(2,5);return o.jsxs("div",{style:g,className:`${ui.container} ${y?ui.noPaddingMobile:""} ${s}`,children:[o.jsxs("div",{className:ui.card,children:[m?o.jsx(Mt,{a11yConfig:m.a11yConfig,label:m.label,value:m.value,backgroundColor:m.backgroundColor,bars:m.bars,lightBars:m.lightBars,size:m.size??"big",valueScale:m.valueScale,width:m.width,height:m.height,titleColor:"white",valueColor:"white",titleFontSize:m.titleFontSize??l,titleFontWeight:m.titleFontWeight??h,valueFontSize:m.valueFontSize??u,valueFontWeight:m.valueFontWeight??p,titleKey:m.titleKey,onClick:v=>f?.(0,v)}):null,x&&M.length>0?o.jsx(AA,{left:{a11yConfig:x.a11yConfig,id:x.id,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,valueScale:x.valueScale,width:x.width,height:x.height,titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,titleKey:x.titleKey,onClick:v=>f?.(1,v)},right:M.map((v,I)=>({a11yConfig:v.a11yConfig,id:v.id,label:v.label,value:v.value,backgroundColor:v.backgroundColor,bars:v.bars,lightBars:v.lightBars,valueScale:v.valueScale,width:v.width,height:v.height,titleFontSize:v.titleFontSize??l,titleFontWeight:v.titleFontWeight??h,valueFontSize:v.valueFontSize??u,valueFontWeight:v.valueFontWeight??p,titleKey:v.titleKey,onClick:b=>f?.(2+I,b)}))}):x&&M.length===0?o.jsx(Mt,{a11yConfig:x.a11yConfig,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,size:x.size??"big",valueScale:x.valueScale,width:x.width,height:x.height,titleColor:"white",valueColor:"white",titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,onClick:v=>f?.(1,v)}):null]}),t&&o.jsx("div",{className:ui.footer,children:t})]})},I8e=({x:e,y:t,width:n,payload:c,fontSize:i,fontWeight:r,stroke:s})=>o.jsx("g",{transform:`translate(${e},${t})`,children:o.jsx("foreignObject",{x:-n,y:-35,width:n,height:70,style:{overflow:"visible"},children:o.jsx("div",{style:{fontSize:i,fontWeight:r,color:s,lineHeight:"1.2",display:"flex",justifyContent:"flex-end",textAlign:"right",alignItems:"center",height:"100%",width:"100%",paddingRight:"8px",boxSizing:"border-box"},children:o.jsx("span",{style:{overflowWrap:"break-word",whiteSpace:"normal",display:"block",maxWidth:"100%"},children:c.value})})})}),b8e=({data:e,height:t=360,barColor:n="#0284C7",tooltipEnabled:c=!0,backgroundColor:i="transparent",legendTextColor:r="var(--color-text)",barHeight:s=40,yAxisWidth:d=120,fontSize:l="12px",fontWeight:h="400",domain:u,xAxisLabel:p,margin:y={top:20,right:60,bottom:40,left:0},valueFormatter:f,tickFormatter:g,labelDataKey:m="percentage",isAnimationActive:x=!0})=>{const M=(y.top??20)+(y.bottom??40)+e.length*(s+20),v=Math.max(M,t),I=k.useMemo(()=>{if(!e||e.length===0)return d;const L=(parseFloat(l)||12)*.7,N=Math.max(...e.map(S=>(S.label||"").length))*L+16;return Math.min(Math.max(N,40),d)},[e,l,d]),b=_=>g?g(_):_?.toString()||"",w=_=>f&&m==="value"?f(_):_==null||_===""?"":m==="percentage"?`${_}%`:_.toString(),C=(_,L,j)=>{if(typeof _!="number")return _;const N=f?f(_):_.toString(),S=j?.payload?.percentage;return typeof S=="number"&&Number.isFinite(S)&&m==="percentage"?`${N} (${S.toFixed(1)}%)`:N};return o.jsx("div",{style:{backgroundColor:i,width:"100%"},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:v,children:o.jsxs(a.BarChart,{data:e,layout:"vertical",margin:y,children:[o.jsx(a.CartesianGrid,{opacity:.4,stroke:"#E5E7EB",vertical:!1,horizontal:!0}),o.jsx(a.XAxis,{type:"number",domain:u||[0,"auto"],axisLine:!1,tickLine:!1,fontSize:l,fontWeight:h,stroke:r,tickFormatter:b,label:p?{value:p,position:"insideBottom",offset:-10,style:{textAnchor:"middle",fill:r,fontSize:12,fontWeight:"500"}}:void 0}),o.jsx(a.YAxis,{type:"category",dataKey:"label",stroke:r,axisLine:!1,tickLine:!1,width:I,interval:0,fontSize:l,fontWeight:h,tick:o.jsx(I8e,{fontSize:l,fontWeight:h,stroke:r})}),c&&o.jsx(a.Tooltip,{formatter:C,labelStyle:{color:"var(--color-text)"}}),o.jsx(a.Bar,{dataKey:"value",fill:n,radius:0,barSize:s,isAnimationActive:x,children:o.jsx(a.LabelList,{dataKey:m,position:"right",offset:10,formatter:w,fill:r,fontSize:l,fontWeight:h})})]})})})},w8e="_menu_10i6j_1",C8e="_menuRow_10i6j_18",N8e="_separator_10i6j_33",S8e="_rowLabel_10i6j_39",j8e="_rowLeadingIcon_10i6j_47",$8e="_rowIcon_10i6j_54",Gc={menu:w8e,menuRow:C8e,separator:N8e,rowLabel:S8e,rowLeadingIcon:j8e,rowIcon:$8e},q8e=k.forwardRef(function({isVisible:t,onClose:n,items:c,style:i,position:r,bg:s},d){const l=k.useRef(null),h=d||l;if(k.useEffect(()=>{if(!t)return;const y=f=>{h.current&&!h.current.contains(f.target)&&n?.()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,n]),!t)return null;const p={...{top:r?.top,left:r?.left,right:r?.right,bottom:r?.bottom},...s&&{backgroundColor:s},...i};return o.jsx("div",{ref:h,role:"menu",className:Gc.menu,style:p,children:c.map(y=>{if(y.type==="separator")return o.jsx("hr",{className:Gc.separator},y.id);const f=y,g=f.color?{color:f.color}:{},m=f.closeOnClick!==!1;return o.jsxs("button",{role:"menuitem",className:Gc.menuRow,style:g,onClick:()=>{f.onClick?.(),m&&n?.()},children:[o.jsxs("span",{className:Gc.rowLabel,children:[f.leadingIcon&&o.jsx("span",{className:Gc.rowLeadingIcon,children:f.leadingIcon}),o.jsx("span",{children:f.label})]}),f.icon&&o.jsx("span",{className:Gc.rowIcon,children:f.icon})]},f.id)})})}),zA=({user:e,logoutHref:t,logoutTarget:n="_self",onLogout:c,profileHref:i,profileLinkTarget:r="_self",backgroundColor:s="transparent",textColor:d="inherit",roleColor:l="#888",avatarSize:h="32px",padding:u="10px",gap:p="12px",emailFontSize:y="14px",emailFontWeight:f=600,roleFontSize:g="12px",roleFontWeight:m,avatarColor:x="#5b8fb9",backgroundColorAvatar:M="#f1f4f5",dropdownMenuItems:v,dropdownMenuStyle:I,dropdownMenuOffset:b,statusDotColor:w,a11yConfig:C,style:_,className:L=""})=>{const{user:j}=ft(),N=e||j,{currentTheme:S,switchTheme:z}=CL(),A=k.useRef(null),H=k.useRef(null),[P,V]=k.useState(!1),[$,q]=k.useState({}),R=k.useMemo(()=>{const ae=[],ne=({variant:pe})=>pe==="sun"?o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("circle",{cx:"12",cy:"12",r:"4"})}):o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});i&&(ae.push({id:"profile",type:"action",label:"Mon profil",onClick:()=>{typeof window>"u"||(r==="_blank"?window.open(i,"_blank","noopener,noreferrer"):window.location.assign(i))}}),ae.push({id:"sep-profile",type:"separator"}));const le=S==="dark";return ae.push({id:"theme",type:"action",label:le?"Mode clair":"Mode sombre",icon:o.jsx(ne,{variant:le?"sun":"moon"}),onClick:()=>{z(le?"light":"dark")}}),(t||c)&&(ae.push({id:"sep-theme",type:"separator"}),ae.push({id:"logout",type:"action",label:"Se déconnecter",danger:!0,onClick:()=>{if(t){if(typeof window>"u")return;n==="_blank"?window.open(t,"_blank","noopener,noreferrer"):window.location.assign(t);return}c?.()}})),ae},[S,t,n,c,i,r,z]),T=v??R,O=()=>{if(!A.current){V(ae=>!ae);return}if(!P){const ae=A.current.getBoundingClientRect(),ne=window.innerWidth,le=window.innerHeight,pe=200,me=200,W=4,X=b?.x??0,se=b?.y??0,Re=ne-ae.right>=pe+W;q(Re?{top:ae.bottom-me+se,left:ae.right+W+X}:{bottom:le-ae.top+se,left:ae.left+X})}V(ae=>!ae)};if(k.useEffect(()=>{if(!P||!A.current)return;const ae=()=>{const ne=A.current.getBoundingClientRect(),le=window.innerWidth,pe=window.innerHeight,me=200,W=200,X=4,se=b?.x??0,$e=b?.y??0,ve=le-ne.right>=me+X;q(ve?{top:ne.bottom-W+$e,left:ne.right+X+se}:{bottom:pe-ne.top+$e,left:ne.left+se})};return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),()=>{window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae)}},[P,b]),k.useEffect(()=>{if(!P||!A.current||!H.current)return;const ae=()=>{const le=A.current.getBoundingClientRect(),pe=H.current.getBoundingClientRect(),me=b?.x??0,W=b?.y??0;q(X=>X.left!==void 0&&X.top!==void 0&&X.left>=le.right-1?{top:le.bottom-pe.height+W,left:X.left+me}:X)},ne=requestAnimationFrame(()=>{setTimeout(ae,0)});return()=>cancelAnimationFrame(ne)},[P,b]),!N)return null;const J=N,E=parseInt(h,10)||40,U=`${E*.375}px`,ie=`${E*1.375}px`,ce=`${E*.2}px`,Me=`${E*.6}px`,re=()=>{const ae=parseInt(h,10)||40,ne=Math.max(8,ae*.34375),le=Math.max(2,ae*.05);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{position:"relative",flexShrink:0,userSelect:"none"},children:[J.image?o.jsx("img",{src:J.image,alt:`${J.prenom} ${J.nom}`,style:{width:h,height:h,borderRadius:"50%",objectFit:"cover",userSelect:"none"}}):o.jsxs("div",{style:{width:h,height:h,position:"relative",borderRadius:"50%",backgroundColor:M,overflow:"hidden",userSelect:"none"},children:[o.jsx("div",{style:{width:U,height:U,borderRadius:"50%",backgroundColor:x,position:"absolute",top:ce,left:"50%",transform:"translateX(-50%)",zIndex:2,userSelect:"none"}}),o.jsx("div",{style:{width:ie,height:ie,borderRadius:"50%",backgroundColor:x,position:"absolute",top:Me,left:"50%",transform:"translateX(-50%)",zIndex:1,userSelect:"none"}})]}),w&&o.jsx("div",{style:{position:"absolute",bottom:le,right:le,width:`${ne}px`,height:`${ne}px`,borderRadius:"50%",backgroundColor:w,border:"2px solid white",zIndex:10}})]}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",minWidth:0,flex:1},children:[o.jsx("span",{style:{fontWeight:f,fontSize:y,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.email,children:J.email}),o.jsx("span",{style:{color:l,fontSize:g,fontWeight:m,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.role,children:J.role})]})]})};return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:A,className:`user-info ${L}`,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,backgroundColor:s,gap:p,color:d,width:"100%",boxSizing:"border-box",cursor:"pointer",userSelect:"none",..._},onClick:O,title:Y(C,J.role),role:"button",tabIndex:0,children:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:p,flex:1,minWidth:0},children:o.jsx(re,{})})}),o.jsx(q8e,{ref:H,isVisible:P,onClose:()=>V(!1),items:T,style:I,position:$})]})},A8e="_navItem_16uqf_1",z8e="_label_16uqf_14",V8e="_icon_16uqf_26",f1={navItem:A8e,label:z8e,icon:V8e},lC=({label:e,labelKey:t,onClick:n,href:c,isActive:i,icon:r,style:s,className:d="",highlightColor:l="#00aec7",color:h="#333",activeColor:u="#00aec7",highlightBackgroundColor:p="rgba(0, 0, 0, 0.05)",fontSize:y="15px",fontWeight:f="500",sidebarCollapsed:g=!1,padding:m="10px 16px",borderWidth:x="4px",iconGap:M="12px",disabled:v=!1,disabledColor:I,a11yConfig:b})=>{const w=()=>{v||n?.()},C=o.jsxs(o.Fragment,{children:[r&&o.jsx("span",{className:f1.icon,style:{marginRight:g?0:M},children:r}),!g&&o.jsx("span",{className:f1.label,children:e})]}),_=()=>{if(!i)return"transparent";const j=N=>{const S=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return S?{r:parseInt(S[1],16),g:parseInt(S[2],16),b:parseInt(S[3],16)}:null};if(l.startsWith("#")){const N=j(l);if(N)return`rgba(${N.r}, ${N.g}, ${N.b}, 0.08)`}else if(l.startsWith("rgb")){const N=l.match(/\d+/g);if(N&&N.length>=3)return`rgba(${N[0]}, ${N[1]}, ${N[2]}, 0.08)`}return p},L={onClick:w,className:`${f1.navItem} ${i?f1.active:""} ${d} ${v?f1.disabled:""}`,style:{padding:m,color:i?u:v?I||"#999":h,borderLeft:i?`${x} solid ${l}`:`${x} solid transparent`,backgroundColor:_(),fontSize:y,fontWeight:f,cursor:v?"not-allowed":"pointer",textDecoration:"none",...s},"aria-disabled":v};return c&&!n&&!v?o.jsx("a",{href:c,...L,title:Y(b,t),children:C}):o.jsx("div",{...L,role:n?"button":void 0,tabIndex:n&&!v?0:void 0,title:Y(b,t),children:C})},P8e="_navbar_y5tex_1",T8e="_topSection_y5tex_9",H8e="_logoContainer_y5tex_14",D8e="_collapseToggle_y5tex_20",B8e="_collapsedRail_y5tex_37",R8e="_collapsedToggle_y5tex_44",F8e="_sectionsContainer_y5tex_67",E8e="_sectionTitle_y5tex_73",O8e="_sectionItems_y5tex_78",U8e="_bottomSection_y5tex_83",W8e="_versionContainer_y5tex_102",Qe={navbar:P8e,topSection:T8e,logoContainer:H8e,collapseToggle:D8e,collapsedRail:B8e,collapsedToggle:R8e,sectionsContainer:F8e,sectionTitle:E8e,sectionItems:O8e,bottomSection:U8e,versionContainer:W8e},G8e=({logoProps:e,logoSpacing:t,navItems:n,padding:c="24px 16px",sectionSpacing:i="32px",itemSpacing:r="4px",backgroundColor:s="#fff",highlightColor:d="#00aec7",highlightBackgroundColor:l="rgba(0, 0, 0, 0.05)",version:h,navSectionStyle:u,navLinkStyle:p,navItemPadding:y="10px 16px",navItemBorderWidth:f="4px",navItemIconGap:g="12px",navItemFontSize:m="15px",navItemFontWeight:x="500",navItemColor:M,sectionTitlePadding:v="16px",sectionTitleFontSize:I="11px",sectionTitleColor:b="#999",sectionTitleWeight:w="500",versionFontSize:C="12px",versionFontWeight:_="400",versionColor:L="#999",userInfoProps:j,style:N,className:S="",width:z="280px",showLogo:A=!0,versionA11yConfig:H,displayNone:P=!1,showCollapseToggle:V=!1,collapsed:$=!1,onCollapseToggle:q,collapseToggleLabel:R="Toggle sidebar",collapseToggleIconPath:T="/icon/dock_to_left.svg"})=>{const O=ft(),J=O.activeNav,E=O.setActiveNav,U=O.user,ie=j.user||U;return V&&$?o.jsx("div",{className:`${Qe.collapsedRail} ${S}`,style:{display:P?"none":"flex"},children:o.jsx("button",{type:"button",className:Qe.collapsedToggle,onClick:q,"aria-label":R,children:o.jsx(Mw,{path:T,width:18,height:18})})}):o.jsxs("div",{className:`${Qe.navbar} ${S}`,style:{width:z,backgroundColor:s,padding:c,display:P?"none":"flex",...N},children:[o.jsxs("div",{className:Qe.topSection,style:{gap:t},children:[A&&o.jsxs("div",{className:Qe.logoContainer,children:[o.jsx(wL,{...e}),V&&o.jsx("button",{type:"button",className:Qe.collapseToggle,onClick:q,"aria-label":R,children:o.jsx(Mw,{path:T,width:20,height:20})})]}),o.jsx("div",{className:Qe.sectionsContainer,style:{gap:i},children:n.map((ce,Me)=>o.jsxs("div",{className:Qe.section,children:[ce.title&&o.jsx("div",{className:Qe.sectionTitle,title:Y(ce.a11yConfig,ce.titleKey),style:{fontSize:I,color:b,padding:v,fontWeight:w,border:"4px solid transparent",...u},children:ce.title}),o.jsx("div",{className:Qe.sectionItems,style:{gap:r},children:ce.items.map(re=>o.jsx(lC,{...re,isActive:re.isActive===null?re.isActive:J===re.id,onClick:()=>{re.onClick&&re.onClick(),re.isActive==null&&E(re.id)},highlightColor:d,activeColor:d,highlightBackgroundColor:l,padding:y,borderWidth:f,iconGap:g,fontSize:m,fontWeight:x,color:M,style:p},re.id))})]},Me))})]}),o.jsxs("div",{className:Qe.bottomSection,style:{gap:t},children:[o.jsx(zA,{...j,user:ie}),h&&o.jsx("div",{className:Qe.versionContainer,title:Y(H,h),style:{fontSize:C,fontWeight:_,color:L},children:h})]})]})},K8e="_container_4qege_1",Z8e="_titleContainer_4qege_10",X8e="_title_4qege_10",Y8e="_inlineToggleContainer_4qege_24",J8e="_rightContentContainer_4qege_30",g1={container:K8e,titleContainer:Z8e,title:X8e,inlineToggleContainer:Y8e,rightContentContainer:J8e},Q8e=({className:e="",style:t,fontSize:n="20px",fontWeight:c="bold",color:i="#000",padding:r="0",margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,navItems:y,allNavItems:f,formatTitle:g=M=>M,rightContent:m,inlineToggle:x})=>{const{activeNav:M}=ft(),v=y.find(b=>b.id===M)||f?.find(b=>b.id===M),I=v?g(v.label):M||"";return I?o.jsxs("div",{className:`${g1.container} ${e}`,style:{padding:r,margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,...t},children:[o.jsxs("div",{className:g1.titleContainer,children:[o.jsx("div",{className:g1.title,style:{fontSize:n,fontWeight:c,color:i},children:I}),x&&o.jsx("div",{className:g1.inlineToggleContainer,children:x})]}),m&&o.jsx("div",{className:g1.rightContentContainer,children:m})]}):null},ege="_navItem_1hg26_1",tge="_navItemIcon_1hg26_21",age="_navItemLabel_1hg26_29",nge="_navItemCount_1hg26_36",oge="_navItemIndicator_1hg26_49",v1={navItem:ege,navItemIcon:tge,navItemLabel:age,navItemCount:nge,navItemIndicator:oge},VA=({a11yConfig:e,label:t,isActive:n,onClick:c,href:i,labelKey:r,icon:s,count:d,activeColor:l="#00aec7",inactiveColor:h="#666",activeBackgroundColor:u="transparent",countBackgroundColor:p,countColor:y="#fff",countBorderRadius:f="10px",countPadding:g="2px 6px",countFontSize:m="12px",countFontWeight:x="500",indicatorColor:M="#00aec7",indicatorHeight:v="3px",padding:I="8px 4px",fontSize:b="14px",fontWeight:w="500",gap:C="8px",style:_,className:L="",disabled:j=!1,onNavigate:N})=>{const S=()=>{j||(c?.(),i&&(N?N(i):window.location.href=i))};return o.jsxs("div",{className:`${v1.navItem} ${L}`,onClick:S,title:Y(e,r),style:{gap:C,padding:I,color:n?l:h,backgroundColor:n?u:"transparent",fontSize:b,fontWeight:w,..._},children:[s&&o.jsx("span",{className:v1.navItemIcon,children:s}),o.jsx("span",{className:v1.navItemLabel,children:t}),d!==void 0&&o.jsx("span",{className:v1.navItemCount,style:{backgroundColor:p,color:y,borderRadius:f,padding:g,fontSize:m,fontWeight:x},children:d}),n&&!j&&o.jsx("div",{className:v1.navItemIndicator,style:{height:v,backgroundColor:M}})]})},cge="_container_13hsa_1",ige="_groupHeader_13hsa_8",rge="_groupHeaderLeft_13hsa_18",sge="_groupIcon_13hsa_23",dge="_dropdown_13hsa_29",lge="_item_13hsa_42",hge="_itemIcon_13hsa_65",uge="_chevron_13hsa_72",pge="_chevronOpen_13hsa_79",gt={container:cge,groupHeader:ige,groupHeaderLeft:rge,groupIcon:sge,dropdown:dge,item:lge,itemIcon:hge,chevron:uge,chevronOpen:pge},yge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-344 240-584l43-43 197 197 197-197 43 43z"})),F1=k.memo(yge),PA=({groups:e,activeItemId:t,onItemClick:n,style:c,className:i,bgColor:r="transparent",color:s="var(--color-text)",headerBgColor:d="var(--color-indicator)",headerColor:l="var(--color-text)",headerBorderBottomColor:h="var(--color-border)",dropdownBgColor:u="var(--color-background)",itemBgColor:p="transparent",itemHoverBgColor:y="rgba(0,0,0,0.05)",itemColor:f="var(--color-text)",itemActiveColor:g="var(--color-primary)",itemActiveBorderColor:m="var(--color-primary)",itemDividerColor:x="var(--color-border)",iconColor:M="#555555",activeIconColor:v="var(--color-primary)",headerIconColor:I="var(--color-text)",chevronColor:b="var(--color-text)",iconSize:w=22,headerPadding:C="14px 20px",itemPadding:_="14px 20px",iconGap:L=14,borderRadius:j=0})=>{const[N,S]=k.useState(""),z=k.useRef(null);k.useEffect(()=>{const H=P=>{z.current&&!z.current.contains(P.target)&&S("")};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);const A={backgroundColor:r,color:s,borderRadius:j,...c};return o.jsx("nav",{ref:z,className:[gt.container,i].filter(Boolean).join(" "),style:A,children:e.map(H=>{const P=N===H.id,V={backgroundColor:d,color:l,padding:C,borderBottom:`1px solid ${h}`,gap:L},$={backgroundColor:u};return o.jsxs("div",{children:[o.jsxs("div",{className:gt.groupHeader,style:V,onClick:()=>S(P?"":H.id),role:"button","aria-expanded":P,children:[o.jsxs("div",{className:gt.groupHeaderLeft,style:{gap:L},children:[H.icon&&o.jsx("span",{className:gt.groupIcon,style:{color:I,width:w,height:w},children:H.icon}),o.jsx("span",{children:H.label})]}),o.jsx("span",{className:[gt.chevron,P?gt.chevronOpen:""].join(" "),style:{color:b},children:o.jsx(F1,{width:18,height:18})})]}),P&&o.jsx("div",{className:gt.dropdown,style:$,children:H.items.map(q=>{const R=q.id===t,T={padding:_,gap:L,color:R?g:f,backgroundColor:p,"--item-border-width":R?"4px":"1px","--item-border-color":R?m:x};return o.jsxs("div",{className:gt.item,style:T,onClick:()=>{n?.(H.id,q.id),S("")},role:"menuitem",onMouseEnter:O=>{R||(O.currentTarget.style.backgroundColor=y)},children:[q.icon&&o.jsx("span",{className:gt.itemIcon,style:{color:R?v:M,width:w,height:w},children:q.icon}),o.jsx("span",{children:q.label})]},q.id)})})]},H.id)})})},kge="_subheaderContent_1glo8_1",mge="_navContainer_1glo8_11",fge="_rightContent_1glo8_45",Gb={subheaderContent:kge,navContainer:mge,rightContent:fge},gge=({subNavItems:e,backgroundColor:t="transparent",padding:n="0",margin:c,width:i,height:r="auto",border:s,borderBottom:d="none",itemGap:l="24px",actionsGap:h="16px",itemPadding:u="12px 0",itemFontSize:p="14px",itemFontWeight:y="500",activeItemColor:f="#00aec7",inactiveItemColor:g="#5c6975",indicatorHeight:m="3px",showDraggable:x=!1,showLegend:M=!1,showData:v=!1,className:I="",style:b,countBackgroundColor:w,countColor:C,countBorderRadius:_,countPadding:L,countFontSize:j,countFontWeight:N,navContainerClassName:S,navContainerStyle:z,rightContentClassName:A,rightContentStyle:H,rightActions:P,activeSwitcherColor:V,inactiveSwitcherColor:$,isMobile:q=!1,onNavigate:R})=>{const{activeSubNav:T,setActiveSubNav:O,navCounts:J,activeNav:E}=ft();if(q){const U=e.find(ce=>ce.id===T)||e[0],ie=[{id:"current-group",label:U?.label||E?.toUpperCase()||"MENU",icon:U?.icon,items:e.map(ce=>({id:ce.id,label:ce.label,icon:ce.icon}))}];return o.jsx("div",{className:I,style:b,children:o.jsx(PA,{groups:ie,activeItemId:T,onItemClick:(ce,Me)=>{const re=e.find(ae=>ae.id===Me);re&&(re.onClick&&re.onClick(),re.href&&(R?R(re.href):re.onNavigate?re.onNavigate(re.href):window.location.href=re.href),O(Me))},headerBgColor:t})})}return o.jsxs("div",{className:`${Gb.subheaderContent} ${I}`,style:{backgroundColor:t,padding:n,margin:c,width:i,height:r,border:s,borderBottom:d,...b},children:[o.jsx("div",{className:`${Gb.navContainer} ${S||""}`,style:{gap:l,...z},children:e.map(U=>{const ie=U.count!==void 0?U.count:J[U.id],ce=T===U.id||U.isActive;return o.jsx(VA,{...U,onNavigate:R||U.onNavigate,count:ie,isActive:ce,onClick:()=>{U.onClick&&U.onClick(),O(U.id)},activeColor:f,inactiveColor:g,countBackgroundColor:w,countColor:C,countBorderRadius:_,countPadding:L,countFontSize:j,countFontWeight:N,indicatorColor:f,indicatorHeight:m,padding:u,fontSize:p,fontWeight:y,gap:"8px",style:U.style},U.id)})}),o.jsxs("div",{className:`${Gb.rightContent} ${A||""}`,style:{gap:h,...H},children:[x&&o.jsx(kL,{size:20,colors:{bg:V,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),M&&o.jsx(mL,{size:20,colors:{bg:V,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),v&&o.jsx(fL,{size:20,colors:{bg:V,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),P]})]})},vge=({onSwitch:e,size:t="20px",lightIconColor:n="#666",darkIconColor:c="#fff",backgroundColor:i="transparent",padding:r="8px",borderRadius:s="50%",style:d,className:l=""})=>{const[h,u]=k.useState(!1),{currentTheme:p,switchTheme:y}=CL(),f=p!="dark",g=()=>{y(f?"dark":"light"),e?.()};return k.useEffect(()=>{u(!0)},[]),!h||!p?o.jsx(o.Fragment,{}):o.jsx("div",{className:`theme-switcher ${l}`,onClick:g,style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i,padding:r,borderRadius:s,transition:"all 0.3s ease",...d},children:f?o.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):o.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"5"}),o.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),o.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),o.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),o.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),o.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),o.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),o.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),o.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})})},xge=({initialSortBy:e=null,initialSortOrder:t="asc",onSortChange:n})=>{const[c,i]=k.useState({sortBy:e,sortOrder:t,filters:{}}),r=k.useCallback(s=>{let d="asc";c.sortBy===s&&(d=c.sortOrder==="asc"?"desc":"asc");const l={...c,sortBy:s,sortOrder:d};i(l),n(s,d)},[c,n]);return{tableState:c,handleSort:r}},Mge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487z"})),_ge=k.memo(Mge),Lge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487z"})),Ige=k.memo(Lge),bge=({columns:e,sortBy:t,sortOrder:n,onSort:c,removeLabelSpan:i=!1})=>o.jsx("thead",{children:o.jsx("tr",{children:e.map((r,s)=>{const d=t===r.key,l=!!r.sortable;return o.jsx("th",{className:`${r.className||""}${l?" sortable":""}`,style:{width:r.width,textAlign:r.align||"left"},onClick:()=>l&&c(String(r.key)),title:Y(r.a11yConfig,r.titleKey),children:o.jsxs("div",{className:`th-content ${r.align?`align-${r.align}`:""}`,children:[i?r.label:o.jsx("span",{children:r.label}),l&&o.jsx("span",{className:"sort-icon-container",style:{display:"inline-flex",alignItems:"center"},children:d&&n==="asc"?o.jsx(Ige,{width:16,height:16,style:{fill:"currentColor",transition:"all 0.2s ease"}}):o.jsx(_ge,{width:16,height:16,style:{fill:"currentColor",opacity:d?1:.5,transition:"all 0.2s ease"}})})]})},String(r.key)||s)})})}),wge=({data:e,columns:t,rowKey:n,onRowClick:c,isLoading:i,text:r,rowStyle:s,rowClassName:d,renderSeparator:l})=>!e.length&&!i?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:t.length,style:{textAlign:"center",padding:"32px"},children:o.jsx("span",{style:{color:"var(--table-text-muted)"},children:r?.noData||"Aucune donnée disponible"})})})}):o.jsx("tbody",{children:e.map((h,u)=>{const p=h[n],y=typeof p=="string"||typeof p=="number"?p:u,f=l?l(h):null;return o.jsx("tr",{onClick:()=>c&&c(h),style:{cursor:c?"pointer":"default",...s?s(h):{}},className:d?d(h,u):"",children:f?o.jsx("td",{colSpan:t.length,children:f}):t.map((g,m)=>o.jsx("td",{style:{width:g.width,textAlign:g.align||"left"},className:g.className,children:g.render?g.render(h):h[g.key]},`${String(g.key)}-${m}`))},y)})}),Cge=({state:e,onPaginationChange:t,onLoadMore:n,infiniteScroll:c,hasMore:i,text:r,isLoading:s,pageSizeOptions:d})=>{const{page:l,pageSize:h,total:u}=e,p=h===-1?u:h,y=Math.ceil(u/p)||1,f=Math.min(Math.max(1,l),y),g=u===0?0:(f-1)*p+1,m=Math.min(f*p,u),x=b=>{t({page:b})},M=k.useMemo(()=>{if(y<=6)return Array.from({length:y},(z,A)=>A+1);const C=Math.max(f-1,1),_=Math.min(f+1,y),L=C>2,j=_<y-2,N=1,S=y;if(!L&&j)return[...Array.from({length:5},(H,P)=>P+1),"...",y];if(L&&!j){const A=Array.from({length:5},(H,P)=>y-5+P+1);return[N,"...",...A]}if(L&&j){const z=Array.from({length:_-C+1},(A,H)=>C+H);return[N,"...",...z,"...",S]}return[]},[f,y]),v=!!(d&&d.length>0),I=!c&&h!==-1&&y>1&&o.jsxs("div",{className:"pagination-controls",children:[o.jsx("button",{className:"pagination-btn",onClick:()=>x(1),disabled:f===1,title:r?.first||"Premier",children:"<<"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f-1),disabled:f===1,title:r?.previous||"Précédent",children:"<"}),(M||[]).map((b,w)=>b==="..."?o.jsx("span",{style:{padding:"0 4px",color:"var(--table-text-muted)"},children:"..."},w):o.jsx("button",{className:`pagination-btn ${b===f?"active":""}`,onClick:()=>x(b),children:b},w)),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f+1),disabled:f===y,title:r?.next||"Suivant",children:">"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(y),disabled:f===y,title:r?.last||"Dernier",children:">>"})]});return o.jsxs("div",{className:"table-pagination",children:[o.jsx("div",{className:"pagination-summary",children:u>0?o.jsx("span",{children:r?.itemsRange?r.itemsRange(g,m,u):o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[g,"–",m]})," ",r?.of||"sur"," ",o.jsx("b",{children:u.toLocaleString()})," ",r?.items||"éléments"]})}):o.jsx("span",{children:r?.noResults||"0 résultats"})}),v?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-center",children:I}),o.jsxs("div",{className:"pagination-pagesize",children:[o.jsx("label",{htmlFor:"table-pagination-pagesize",children:r?.perPage||"Par page"}),o.jsx("select",{id:"table-pagination-pagesize",value:h,onChange:b=>t({pageSize:Number(b.target.value),page:1}),children:(d||[]).map(b=>o.jsx("option",{value:b,children:b},b))})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-spacer"}),I]}),!c&&n&&i&&o.jsx("div",{className:"pagination-load-more",children:o.jsx("button",{className:"btn-load-more",onClick:n,disabled:s,style:{padding:"8px 16px",backgroundColor:"white",border:"1px solid #ddd",borderRadius:"6px",cursor:s?"wait":"pointer",color:"#555",fontWeight:600},children:s?r?.loading||"Chargement...":r?.loadMore||"Charger plus"})})]})},hC=({data:e,columns:t,isLoading:n,pagination:c,onPaginationChange:i,onSortChange:r,rowKey:s,loaderSize:d=40,stickyHeader:l=!0,height:h,minHeight:u="200px",text:p,onLoadMore:y,infiniteScroll:f,hasMore:g,tableState:m,className:x,style:M,rowStyle:v,onRowClick:I,rowClassName:b,titleKey:w,removeLabelSpan:C=!1,a11yConfig:_,renderSeparator:L,pageSizeOptions:j})=>{const N=k.useMemo(()=>({...p}),[p]),S=k.useRef(null);k.useEffect(()=>{if(!f||!y||!g||n)return;const $=new IntersectionObserver(q=>{q[0].isIntersecting&&y()},{threshold:.1});return S.current&&$.observe(S.current),()=>$.disconnect()},[f,y,g,n]);const{tableState:z,handleSort:A}=xge({initialSortBy:null,onSortChange:r}),H=(m?.sortBy!==void 0?m.sortBy:z.sortBy)??void 0,P=m?.sortOrder!==void 0?m.sortOrder:z.sortOrder,V=$=>{const q=H,R=P;let T="asc";q===$&&(T=R==="asc"?"desc":"asc"),m?.sortBy!==void 0?r($,T):A($)};return o.jsxs("div",{className:`table-container ${x||""}`,style:M,title:Y(_,w),children:[o.jsxs("div",{className:"table-frame",style:{height:h??void 0,minHeight:u??void 0},children:[n&&o.jsx("div",{className:"table-loader-overlay",children:o.jsx("div",{className:"spinner",style:{width:d,height:d,borderTopColor:"var(--table-primary)"}})}),o.jsxs("div",{className:`table-wrapper ${l?"sticky-header":""}`,children:[o.jsxs("table",{className:"data-table",children:[o.jsx(bge,{columns:t,sortBy:H,sortOrder:P,onSort:V,removeLabelSpan:C}),o.jsx(wge,{data:e,columns:t.map($=>({...$,render:$.render?q=>$.render(q,{}):void 0})),rowKey:s,onRowClick:I,isLoading:n,text:N,rowStyle:typeof v=="function"?v:v?()=>v:void 0,rowClassName:b,renderSeparator:L})]}),f&&o.jsx("div",{ref:S,style:{height:20,margin:10}})]})]}),o.jsx(Cge,{state:c,onPaginationChange:i,text:N,onLoadMore:y,infiniteScroll:f,hasMore:g,isLoading:n,pageSizeOptions:j})]})};function TA(e,t,n,c,i,r,s){e.forEach(d=>{const l=d[n],h=d[t]??[],u=h.length>0,p=c.has(l);r.set(l,{level:i,hasChildren:u,isExpanded:p}),s.push(d),u&&p&&TA(h,t,n,c,i+1,r,s)})}const Nge=({data:e,columns:t,rowKey:n,childrenKey:c="children",treeColumnKey:i,defaultExpandedKeys:r,expandedKeys:s,onExpandedKeysChange:d,indent:l=20,showFooter:h=!0,pagination:u,onPaginationChange:p,colors:y,rowClassName:f,...g})=>{const[m,x]=k.useState(()=>new Set(r)),M=s!==void 0,v=k.useMemo(()=>M?new Set(s):m,[M,s,m]),I=N=>{const S=new Set(v);S.has(N)?S.delete(N):S.add(N),M?d?.(Array.from(S)):x(S)},b=k.useMemo(()=>{if(!u||u.pageSize===-1)return e;const N=(u.page-1)*u.pageSize;return e.slice(N,N+u.pageSize)},[e,u]),{rows:w,meta:C}=k.useMemo(()=>{const N=new Map,S=[];return TA(b,c,n,v,0,N,S),{rows:S,meta:N}},[b,c,n,v]),_=k.useMemo(()=>t.reduce((N,S)=>{const z=S.width?parseInt(S.width,10):NaN;return N+(Number.isFinite(z)?z:140)},0),[t]),L=k.useMemo(()=>t.map(N=>N.key!==i?N:{...N,render:S=>{const z=S[n],{level:A,hasChildren:H,isExpanded:P}=C.get(z)??{level:0,hasChildren:!1,isExpanded:!1},V=N.render?N.render(S):S[N.key];return o.jsxs("span",{className:"htl-cell",style:{paddingLeft:A*l},children:[H?o.jsx("button",{type:"button",className:"htl-toggle",onClick:$=>{$.stopPropagation(),I(z)},children:o.jsx(qA,{width:16,height:16,style:{fill:"currentColor",transform:P?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.15s ease"}})}):o.jsx("span",{className:"htl-toggle-spacer"}),V]})}}),[t,i,C,l,n]),j=(N,S)=>{const z=N[n],{level:A,hasChildren:H,isExpanded:P}=C.get(z)??{level:0,hasChildren:!1,isExpanded:!1},V=["htl-row"];return A===0?(V.push("htl-root"),H&&P&&V.push("htl-root-expanded")):H&&V.push("htl-group"),f&&V.push(f(N,S,A)),V.join(" ")};return o.jsx("div",{className:`htl-wrapper ${h?"":"htl-no-footer"}`,style:{"--htl-active-bg":y?.activeRowBackground,"--htl-nested-bg":y?.groupRowBackground,"--htl-toggle-color":y?.toggleIconColor,"--htl-root-color":y?.rootTextColor,"--htl-table-min-width":`${_}px`},children:o.jsx(hC,{...g,data:w,columns:L,rowKey:n,rowClassName:j,pagination:u??{page:1,pageSize:w.length||1,total:w.length},onPaginationChange:p??(()=>{})})})},Sge="_datePickerContainer_1gx2l_3",jge="_label_1gx2l_16",$ge="_displayNode_1gx2l_23",qge="_datePickerButton_1gx2l_30",Age="_datePickerButtonDisabled_1gx2l_50",zge="_datePickerButtonOpen_1gx2l_59",Vge="_datePickerLabel_1gx2l_68",Pge="_placeholder_1gx2l_79",Tge="_trailingIcons_1gx2l_83",Hge="_chevron_1gx2l_89",Dge="_clearButton_1gx2l_97",Bge="_errorMessage_1gx2l_114",Rge="_dropdown_1gx2l_119",Fge="_calendarHeader_1gx2l_143",Ege="_navButton_1gx2l_152",Oge="_headerSelectors_1gx2l_171",Uge="_monthSelector_1gx2l_179",Wge="_yearSelector_1gx2l_180",Gge="_selectorButton_1gx2l_184",Kge="_selectorChevron_1gx2l_201",Zge="_selectorChevronOpen_1gx2l_206",Xge="_monthDropdown_1gx2l_210",Yge="_yearDropdown_1gx2l_211",Jge="_monthItem_1gx2l_231",Qge="_yearItem_1gx2l_232",e7e="_monthItemSelected_1gx2l_254",t7e="_yearItemSelected_1gx2l_255",a7e="_weekdays_1gx2l_259",n7e="_weekday_1gx2l_259",o7e="_calendarGrid_1gx2l_275",c7e="_dateCell_1gx2l_284",i7e="_dateCellSelected_1gx2l_307",r7e="_dateCellOtherMonth_1gx2l_311",s7e="_dateCellOtherMonthSelected_1gx2l_315",d7e="_calendarFooter_1gx2l_319",l7e="_cancelButton_1gx2l_327",h7e="_applyButton_1gx2l_328",u7e="_timePickerContainer_1gx2l_372",p7e="_timeGroup_1gx2l_381",y7e="_timeLabel_1gx2l_388",k7e="_timeInputWrapper_1gx2l_394",m7e="_timeInput_1gx2l_394",f7e="_timeSeparator_1gx2l_422",Z={datePickerContainer:Sge,label:jge,displayNode:$ge,datePickerButton:qge,datePickerButtonDisabled:Age,datePickerButtonOpen:zge,datePickerLabel:Vge,placeholder:Pge,trailingIcons:Tge,chevron:Hge,clearButton:Dge,errorMessage:Bge,dropdown:Rge,calendarHeader:Fge,navButton:Ege,headerSelectors:Oge,monthSelector:Uge,yearSelector:Wge,selectorButton:Gge,selectorChevron:Kge,selectorChevronOpen:Zge,monthDropdown:Xge,yearDropdown:Yge,monthItem:Jge,yearItem:Qge,monthItemSelected:e7e,yearItemSelected:t7e,weekdays:a7e,weekday:n7e,calendarGrid:o7e,dateCell:c7e,dateCellSelected:i7e,dateCellOtherMonth:r7e,dateCellOtherMonthSelected:s7e,calendarFooter:d7e,cancelButton:l7e,applyButton:h7e,timePickerContainer:u7e,timeGroup:p7e,timeLabel:y7e,timeInputWrapper:k7e,timeInput:m7e,timeSeparator:f7e},g7e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144zM480-80q-83 0-156-31.5T197-197t-85.5-127T80-480t31.5-156T197-763t127-85.5T480-880t156 31.5T763-763t85.5 127T880-480t-31.5 156T763-197t-127 85.5T480-80m0-80q134 0 227-93t93-227-93-227-227-93-227 93-93 227 93 227 227 93m0-320"})),v7e=k.memo(g7e),Dj=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],x7e=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],Lw=({value:e,onChange:t,label:n,placeholder:c="Sélectionner une date...",className:i="",fullWidth:r=!0,disabled:s=!1,error:d,buttonHeight:l="2.75rem",buttonPadding:h="0.75rem 1rem 0.75rem 1rem",dropdownMaxHeight:u="auto",fontSize:p="0.875rem",iconSize:y="1.5rem",labelMarginBottom:f="0.5rem",errorMarginTop:g="0.25rem",dropdownMarginTop:m="0.25rem",itemPadding:x="0.5rem 0.75rem",fontWeight:M="400",buttonBgColor:v,buttonBorderColor:I,buttonTextColor:b,dropdownBgColor:w="#ffffff",itemHoverColor:C,selectedItemBgColor:_,iconColor:L,errorColor:j,labelColor:N,placeholderColor:S,borderRadius:z="var(--radius-content)",borderWidth:A="0.0625rem",boxShadow:H="0 0.25rem 0.75rem rgba(0, 0, 0, 0.1)",transitionDuration:P="0.2s",transitionTiming:V="ease",dateCellSize:$="2.5rem",headerTextColor:q="#6c757d",weekdayTextColor:R="#6c757d",currentMonthDateColor:T="#212529",otherMonthDateColor:O="#adb5bd",selectedDateBgColor:J="#00A6D9",selectedDateTextColor:E="#ffffff",cancelButtonBgColor:U="#e9ecef",cancelButtonTextColor:ie="#212529",applyButtonBgColor:ce="#00A6D9",applyButtonTextColor:Me="#ffffff",actionButtonPadding:re,actionButtonFontSize:ae,width:ne,displayNode:le=void 0,displayMode:pe="auto",displayNodeAriaLabel:me,dropdownPosition:W="auto",dropdownAlignment:X="right",dropdownWidth:se,withBorder:$e=!1,icon:Re,precision:ve="day",horizontalTimePicker:je=!1,hoursLabel:Bc="Heures",minutesLabel:u1="Minutes",lowerLimit:oe=null,upperLimit:we=null,strictTimeLimits:BL=!1,outOfLimitsMessage:Ie="La date/heure choisie est hors des limites autorisées",months:Ct,weekdays:ZA,cancelText:XA="Annuler",applyText:YA="Appliquer",prevMonthAriaLabel:JA="Mois précédent",nextMonthAriaLabel:QA="Mois suivant",calendarAriaLabel:ez="Sélecteur de date",openedAriaLabel:tz="Ouvrir le sélecteur de date",selectedDateAriaLabel:az="Date sélectionnée: ",rotateIcon:nz=!0,clearable:oz=!1,clearAriaLabel:cz="Effacer la date"})=>{const Nt=D=>{if(D instanceof Date)return isNaN(D.getTime())?null:D;if(typeof D=="string"&&D){const K=new Date(D);return isNaN(K.getTime())?null:K}return null},[Ke,Ft]=k.useState(!1),[p1,iz]=k.useState({top:0,left:0,width:0}),[uC,rz]=k.useState("bottom"),[pC,sz]=k.useState(null),[ue,y1]=k.useState(Nt(e)||new Date),[k1,RL]=k.useState(Nt(e)),[ei,FL]=k.useState(Nt(e)?.getHours()??0),[ti,EL]=k.useState(Nt(e)?.getMinutes()??0),[OL,Rc]=k.useState(!1),[UL,Fc]=k.useState(!1),WL=k.useRef(null),Ec=k.useRef(null),yC=k.useRef(null),GL=k.useRef(null),KL=k.useRef(null),kC=k.useRef(Nt(e)?.getTime());k.useEffect(()=>{const D=Nt(e),K=D?.getTime();K!==kC.current&&(kC.current=K,RL(D),D&&(y1(D),FL(D.getHours()),EL(D.getMinutes())))},[e]);const mC=k.useCallback(()=>{if(Ec.current){const D=Ec.current.getBoundingClientRect();iz({top:D.top,left:D.left,width:D.width})}},[]),fC=8,ai=k.useCallback(()=>{if(!Ec.current)return;const D=Ec.current.getBoundingClientRect(),K=(parseFloat(m.replace("rem",""))||0)*16,_e=D.top-K-fC,He=window.innerHeight-D.bottom-K-fC;let Ve;if(W!=="auto")Ve=W;else{const Fe=yC.current?.scrollHeight??0;Ve=Fe<=He?"bottom":Fe<=_e||_e>He?"top":"bottom"}rz(Fe=>Fe===Ve?Fe:Ve),sz(Math.max(Ve==="bottom"?He:_e,0))},[W,m]),Oc=k.useCallback(()=>{mC(),ai()},[mC,ai]);k.useEffect(()=>(Ke&&(Oc(),window.addEventListener("scroll",Oc,!0),window.addEventListener("resize",Oc)),()=>{window.removeEventListener("scroll",Oc,!0),window.removeEventListener("resize",Oc)}),[Ke,Oc]),k.useLayoutEffect(()=>{Ke&&ai()},[Ke,ai]),k.useEffect(()=>{const D=K=>{if(WL.current&&!WL.current.contains(K.target)){const _e=document.getElementById("datepicker-dropdown");if(_e&&_e.contains(K.target))return;Ft(!1),Rc(!1),Fc(!1)}GL.current&&!GL.current.contains(K.target)&&Rc(!1),KL.current&&!KL.current.contains(K.target)&&Fc(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const gC=D=>new Date(D.getFullYear(),D.getMonth()+1,0).getDate(),dz=D=>{const K=new Date(D.getFullYear(),D.getMonth(),1).getDay();return K===0?6:K-1},lz=()=>{const D=[],K=dz(ue),_e=gC(ue),He=new Date(ue.getFullYear(),ue.getMonth()-1,1),Ve=gC(He);for(let Ne=K-1;Ne>=0;Ne--)D.push(new Date(ue.getFullYear(),ue.getMonth()-1,Ve-Ne));for(let Ne=1;Ne<=_e;Ne++)D.push(new Date(ue.getFullYear(),ue.getMonth(),Ne));const Fe=42-D.length;for(let Ne=1;Ne<=Fe;Ne++)D.push(new Date(ue.getFullYear(),ue.getMonth()+1,Ne));return D},hz=(D,K)=>!D||!K?!1:D.getDate()===K.getDate()&&D.getMonth()===K.getMonth()&&D.getFullYear()===K.getFullYear(),uz=D=>D.getMonth()===ue.getMonth()&&D.getFullYear()===ue.getFullYear(),ni=BL?D=>Math.floor(D.getTime()/6e4)*6e4:D=>new Date(D.getFullYear(),D.getMonth(),D.getDate()).getTime(),vC=D=>!(oe&&ni(D)<ni(oe)||we&&ni(D)>ni(we)),xC=k1?(()=>{const D=new Date(k1);return D.setHours(ei),D.setMinutes(ti),D})():null,Uc=xC?!vC(xC):!1,oi=new Date(ue.getFullYear(),ue.getMonth()-1,1),ci=new Date(ue.getFullYear(),ue.getMonth()+1,1),ZL=!!(oe&&(oi.getFullYear()<oe.getFullYear()||oi.getFullYear()===oe.getFullYear()&&oi.getMonth()<oe.getMonth())),XL=!!(we&&(ci.getFullYear()>we.getFullYear()||ci.getFullYear()===we.getFullYear()&&ci.getMonth()>we.getMonth())),pz=()=>{ZL||y1(oi)},yz=()=>{XL||y1(ci)},kz=D=>{if(!s){const K=new Date(D);K.setHours(ei),K.setMinutes(ti),RL(K)}},mz=()=>{if(!s){if(k1){const D=new Date(k1);if(D.setHours(ei),D.setMinutes(ti),!vC(D))return;t(D)}else t(null);Ft(!1)}},fz=()=>{const D=Nt(e);RL(D),D&&(FL(D.getHours()),EL(D.getMinutes())),Ft(!1)},gz=D=>{y1(new Date(ue.getFullYear(),D,1)),Rc(!1)},vz=D=>{y1(new Date(D,ue.getMonth(),1)),Fc(!1)},xz=()=>{const D=ue.getFullYear(),K=oe?oe.getFullYear():D-10,_e=we?we.getFullYear():D+10,He=[];for(let Ve=K;Ve<=_e;Ve++)He.push(Ve);return He},Mz=D=>{const K=ue.getFullYear();return!!(oe&&(K<oe.getFullYear()||K===oe.getFullYear()&&D<oe.getMonth())||we&&(K>we.getFullYear()||K===we.getFullYear()&&D>we.getMonth()))},_z=D=>{if(!s)switch(D.key){case"Enter":case" ":D.preventDefault(),Ft(!Ke);break;case"Escape":Ft(!1),Rc(!1),Fc(!1);break;case"Tab":Ke&&(Ft(!1),Rc(!1),Fc(!1));break}},Lz={width:ne||(r?"100%":"auto"),fontSize:p,fontWeight:M},Iz={height:l,padding:h,backgroundColor:v||"#ffffff",border:$e?void 0:"none",borderColor:d?j||"#dc3545":I||"#dee2e6",color:b||"#212529",borderRadius:z,borderWidth:A,fontWeight:M,transition:`all ${P} ${V}`},bz=je?{flexDirection:"column",borderTop:"none",borderLeft:"1px solid #eee"}:{},wz=je?{flex:1,minWidth:0}:void 0,Cz=je?{display:"flex",flexDirection:"row",alignItems:"stretch"}:void 0,Nz={backgroundColor:w||"#ffffff",maxHeight:u==="auto"?pC!=null?`${pC}px`:void 0:u,overflowY:"auto",borderRadius:z,borderWidth:A,boxShadow:H,transition:`opacity ${P} ${V}, transform ${P} ${V}`,position:"fixed",top:uC==="bottom"?p1.top+(Ec.current?.offsetHeight||0)+parseFloat(m.replace("rem",""))*16:"auto",bottom:uC==="top"?window.innerHeight-p1.top+parseFloat(m.replace("rem",""))*16:"auto",left:X==="left"?p1.left:"auto",right:X==="right"?window.innerWidth-(p1.left+p1.width):"auto",width:se||"30vw",minWidth:se?void 0:0,zIndex:10001},MC={width:y,height:y,color:L||"#6c757d","--icon-rotation":nz&&Ke?"rotate(180deg)":"rotate(0deg)"},Sz={color:N||"#212529",marginBottom:f,fontWeight:M},jz={color:S||"#6c757d"},$z={color:j||"#dc3545",marginTop:g},qz=lz(),ot=Nt(e),_C=D=>`${D.getDate().toString().padStart(2,"0")}/${(D.getMonth()+1).toString().padStart(2,"0")}/${D.getFullYear()}`,LC=ot?ve==="minutes"?`${_C(ot)} ${ot.getHours().toString().padStart(2,"0")}:${ot.getMinutes().toString().padStart(2,"0")}`:_C(ot):"",IC=!!le&&(pe==="icon"||pe==="auto"&&!ot),Az=oz&&!IC&&!!ot&&!s,zz={width:"0.875rem",height:"0.875rem",color:L||"#6c757d"},Vz=me||(ot?`${az}${LC}`:tz);return o.jsxs("div",{className:`${Z.datePickerContainer} ${i}`,ref:WL,style:Lz,"data-fullwidth":r,"data-disabled":s,"data-error":!!d,children:[n&&o.jsx("label",{className:Z.label,style:Sz,children:n}),o.jsxs("button",{ref:Ec,type:"button",onClick:()=>!s&&Ft(!Ke),onKeyDown:_z,className:`
8336
+ `,mme="_mpRoot_31595_1",fme="_mpHeader_31595_22",gme="_mpTitle_31595_31",vme="_mpList_31595_35",xme="_mpVertical_31595_41",Mme="_mpHorizontal_31595_46",_me="_mpItem_31595_55",Lme="_mpClickable_31595_95",Ime="_mpLeft_31595_117",bme="_mpIcon_31595_125",wme="_mpMeta_31595_140",Cme="_mpLabel_31595_145",Nme="_mpDate_31595_154",Sme="_mpRight_31595_160",jme="_mpValue_31595_168",$me="_mpHint_31595_176",qme="_mpBadge_31595_180",Ame="_mpBadgeTop_31595_199",zme="_mpBadgeSub_31595_206",Vme="_mpBadgeSmall_31595_213",Pme="_mpPill_31595_229",Tme="_mpRounded_31595_232",Hme="_mpCompact_31595_236",Dme="_compactItemWrapper_31595_252",Bme="_mpSummaryRoot_31595_265",Rme="_mpSummaryInner_31595_269",Fme="_mpSummaryFlex_31595_284",Eme="_mpSummaryCardWrapperHorizontal_31595_292",Ome="_mpSummaryCardWrapper_31595_292",Ume="_mpSummaryCardHorizontal_31595_303",Wme="_mpSummaryCard_31595_292",Gme="_mpSummaryValue_31595_321",Kme="_mpSummaryLabel_31595_327",Zme="_mpSummaryBadge_31595_338",Xme="_mpSummaryBadgeSub_31595_357",Yme="_mpEmpty_31595_365",Jme="_mpSummaryVertical_31595_372",Qme="_mpIconSquare_31595_380",ee={mpRoot:mme,mpHeader:fme,mpTitle:gme,mpList:vme,mpVertical:xme,mpHorizontal:Mme,mpItem:_me,mpClickable:Lme,mpLeft:Ime,mpIcon:bme,mpMeta:wme,mpLabel:Cme,mpDate:Nme,mpRight:Sme,mpValue:jme,mpHint:$me,mpBadge:qme,mpBadgeTop:Ame,mpBadgeSub:zme,mpBadgeSmall:Vme,mpPill:Pme,mpRounded:Tme,mpCompact:Hme,compactItemWrapper:Dme,mpSummaryRoot:Bme,mpSummaryInner:Rme,mpSummaryFlex:Fme,mpSummaryCardWrapperHorizontal:Eme,mpSummaryCardWrapper:Ome,mpSummaryCardHorizontal:Ume,mpSummaryCard:Wme,mpSummaryValue:Gme,mpSummaryLabel:Kme,mpSummaryBadge:Zme,mpSummaryBadgeSub:Xme,mpEmpty:Yme,mpSummaryVertical:Jme,mpIconSquare:Qme},Tt=(e,t=1)=>{if(!e||typeof e!="string")return`rgba(124, 58, 237, ${t})`;const n=e.trim();if(n.toLowerCase()==="transparent")return"rgba(0,0,0,0)";if(/^rgba?\(/i.test(n))return/^rgba\(/i.test(n)?n.replace(/rgba\(([^)]+),\s*([0-9.]+)\s*\)$/,(d,l)=>`rgba(${l.split(",").map(u=>u.trim()).slice(0,3).join(", ")}, ${t})`):n;let c=n.replace("#","").toLowerCase();if(c.length===3&&(c=c.split("").map(d=>d+d).join("")),!/^[0-9a-f]{6}$/i.test(c))return`rgba(124, 58, 237, ${t})`;const i=parseInt(c.slice(0,2),16),r=parseInt(c.slice(2,4),16),s=parseInt(c.slice(4,6),16);return`rgba(${i}, ${r}, ${s}, ${t})`},e3e=({item:e,shape:t,onItemClick:n,color:c,renderItem:i})=>{const r=k.useCallback(()=>{n?.(e)},[n,e]),s=[ee.mpItem,t==="pill"?ee.mpPill:ee.mpRounded,n?ee.mpClickable:""].filter(Boolean).join(" ");if(i)return o.jsx("div",{className:s,role:n?"button":"group",tabIndex:n?0:-1,onClick:r,onKeyDown:y=>{n&&(y.key==="Enter"||y.key===" ")&&(n(e),y.preventDefault())},"aria-label":n?`Voir les détails de ${e.label}`:void 0,children:i(e)});const d=n?"button":"div",l=n?{onClick:r,className:s,type:"button","aria-label":`Voir les détails de ${e.label}`}:{className:s,role:"group"},h=e.iconComponent,u=e.iconSquareBg,p=e.iconColor;return o.jsxs(d,{...l,children:[o.jsxs("div",{className:ee.mpLeft,children:[h?o.jsx("div",{className:ee.mpIconSquare,style:{background:u??Tt(p??c??"#7c3aed",1),border:`1px solid ${Tt(p??c??"#7c3aed",.18)}`,color:p??"#ffffff"},children:k.createElement(h,{size:20,color:p??"#fff",strokeWidth:1.8})}):e.icon?o.jsx("div",{className:ee.mpIcon,children:e.icon}):null,o.jsxs("div",{className:ee.mpMeta,children:[o.jsx("div",{className:ee.mpLabel,children:e.label}),e.subLabel&&o.jsx("div",{className:ee.mpDate,children:e.subLabel}),e.date&&o.jsx("div",{className:ee.mpDate,children:e.date})]})]}),o.jsxs("div",{className:ee.mpRight,children:[o.jsx("div",{className:ee.mpValue,style:{color:e.valueColor??c??void 0},children:e.value}),e.badge?o.jsxs("div",{className:[ee.mpBadge,e.badge.small?ee.mpBadgeSmall:""].join(" "),style:{backgroundColor:e.badge.bg??Tt(e.badge.color||c||"#7c3aed",.12),borderColor:e.badge.bg?"transparent":Tt(e.badge.color||c||"#7c3aed",.18),color:e.badge.color??e.badge.textColor??"#0f172a",fontWeight:600},children:[o.jsx("div",{className:ee.mpBadgeTop,children:e.badge.text}),e.badge.subText&&o.jsx("div",{className:ee.mpBadgeSub,children:e.badge.subText})]}):e.hint?o.jsx("div",{className:ee.mpHint,children:e.hint}):null]})]})},t3e=k.memo(e3e),qj=({title:e,right:t})=>!e&&!t?null:o.jsxs("div",{className:ee.mpHeader,children:[o.jsx("div",{className:ee.mpTitle,children:e}),o.jsx("div",{children:t})]}),Aj=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},a3e=({item:e})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:14,borderRadius:12,minHeight:88,boxSizing:"border-box",background:e.bgColor??"transparent",border:`1px solid ${e.borderColor??"transparent"}`,boxShadow:"0 4px 10px rgba(15,23,42,0.03)"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[o.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#475569"},children:e.label}),o.jsx("div",{style:{fontSize:26,fontWeight:900,color:"#0f172a",lineHeight:1},children:e.value})]}),o.jsx("div",{title:String(e.label),style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:10,background:e.iconSquareBg??Aj("#7c3aed",.12),border:`1px solid ${Aj(e.iconColor??"#7c3aed",.12)}`,boxShadow:"none"},children:e.iconComponent?k.createElement(e.iconComponent,{size:18,color:e.iconColor??"#7c3aed",strokeWidth:1.6}):null})]}),n3e=({item:e,bg:t,onClick:n,width:c,height:i,extraStyle:r})=>o.jsxs("div",{className:ee.mpSummaryCard,style:{background:t,width:c??void 0,height:i??void 0,...r??{}},role:n?"button":"group",tabIndex:n?0:-1,onClick:()=>n?.(e),children:[o.jsx("div",{className:ee.mpSummaryLabel,children:e.label}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:e.valueColor??"#2a24deff"},children:e.value}),e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]})]}),zj=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},Vj=e=>o.jsxs("div",{style:{display:"grid",gridTemplateRows:"auto 1fr",width:"100%",gap:8,alignItems:"center",boxSizing:"border-box",minWidth:0},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between-left",alignItems:"baseline",gap:10,width:"100%"},children:[o.jsx("div",{style:{fontWeight:700,fontSize:"clamp(14px, 1.2vw, 16px)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:e.label}),e.subLabel?o.jsx("div",{style:{fontSize:"clamp(13px, 1.1vw, 15px)",fontWeight:600,whiteSpace:"nowrap"},children:e.subLabel}):null]}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:15,width:"100%"},children:[o.jsx("div",{style:{fontWeight:900,fontSize:"clamp(16px, 1.6vw, 20px)",color:e.valueColor,lineHeight:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.value}),e.badge?o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"8px 12px",borderRadius:10,backgroundColor:e.badge.bg?e.badge.bg:zj("#7c3aed",.08),border:`1px solid ${e.badge.bg?e.badge.bg:zj("#7c3aed",.12)}`,color:e.badge.textColor||"#0f172a",fontWeight:700,fontSize:"clamp(12px, 1.2vw, 14px)",width:"120px",height:"52px",textAlign:"center",boxSizing:"border-box",overflow:"hidden",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",lineHeight:1.2,flexShrink:0},children:[o.jsx("div",{style:{fontSize:14,fontWeight:800,lineHeight:1.2,letterSpacing:"0.02em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.text}),e.badge.subText?o.jsx("div",{style:{fontSize:13,marginTop:4,fontWeight:700,letterSpacing:"0.01em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.subText}):null]}):null]})]}),Pj=(e,t)=>{try{if(typeof e=="function"){const n=e(t);if(n!==void 0)return n}}catch{}try{return k.createElement(e,{item:t})}catch(n){return console.warn("chooseDefaultRender: impossible de rendre CompactRenderer",n),null}},o3e=e=>{switch(e){case"image":return t=>k.createElement(a3e,{item:t});case"pertinence":return t=>k.createElement(n3e,{item:t});case"alternateHorizontal":return t=>Pj(Vj,t);case"compact":return t=>Pj(Vj,t);case"summary":return;case"default":default:return}},NA=({item:e,orientation:t,bg:n,border:c,valueColor:i,onClick:r,width:s,height:d,extraStyle:l})=>{const u=t==="horizontal"?ee.mpSummaryCardHorizontal:ee.mpSummaryCard;return o.jsxs("div",{className:u,style:{background:n,border:`1px solid ${c}`,width:s??void 0,height:d??void 0,...l??{}},role:r?"button":"group",tabIndex:r?0:-1,onClick:()=>r?.(e),children:[e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:i},children:e.value}),o.jsx("div",{className:ee.mpSummaryLabel,children:e.label})]})},c3e=["transparent","transparent","transparent","transparent"],i3e=["transparent","transparent","transparent","transparent"],r3e=["#059669","#2563eb","#b45309","#7c3aed"],s3e=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},SA=e=>{const{items:t=[],layout:n="vertical",orientation:c="auto",shape:i="rounded",color:r="#7c3aed",compact:s=!1,title:d,onItemClick:l,className:h="",loading:u=!1,emptyMessage:p="Aucun élément",renderItem:y,summary:f=!1,summaryBgColors:g=c3e,summaryBorderColors:m=i3e,summaryValueColors:x=r3e,preset:M,background:v}=e,{itemsContainerStyle:I,itemsContainerClassName:b,summaryGridColumns:w,compactItemWidth:C,compactItemHeight:_,compactItemStyle:L,summaryCardWidth:j,summaryCardHeight:N,summaryCardStyle:S}=e,z=n==="vertical",A={"--mp-accent":r,"--mp-accent-soft":s3e(r,.08),"--mp-bg-primary":v},H=[ee.mpRoot,z?ee.mpVertical:ee.mpHorizontal,s?ee.mpCompact:"",f?ee.mpSummaryRoot:"",c!=="auto"?c==="vertical"?ee.mpOrientationVertical:ee.mpOrientationHorizontal:"",h].filter(Boolean).join(" "),P=k.useMemo(()=>y||(o3e(M)??void 0),[y,M]);if(f){const V=c==="horizontal"?ee.mpSummaryFlex:ee.mpSummaryVertical,q={...(w?{display:"grid",gridTemplateColumns:`repeat(${w}, 1fr)`,gap:18,alignItems:"stretch",width:"100%"}:void 0)??{},...I??{}};return o.jsxs("div",{className:H,style:A,"aria-busy":u,children:[d&&o.jsx(qj,{title:d}),o.jsx("div",{className:ee.mpSummaryInner,children:o.jsx("div",{className:`${V} ${b??""}`,style:q,children:t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map((R,T)=>{const O=R.bgColor??g[T%g.length],J=R.borderColor??m[T%m.length],E=R.valueColor??x[T%x.length];return P?o.jsx("div",{className:c==="horizontal"?ee.mpSummaryCardWrapperHorizontal:ee.mpSummaryCardWrapper,style:{width:j??void 0,height:N??void 0,...S??{}},children:P(R,T)},R.id):o.jsx(NA,{item:R,orientation:c==="horizontal"?"horizontal":"vertical",bg:O,border:J,valueColor:E,onClick:l,width:j??void 0,height:N??void 0,extraStyle:S},R.id)})})})]})}return o.jsxs("div",{className:H,style:A,"aria-busy":u,children:[d&&o.jsx(qj,{title:d}),o.jsx("div",{className:ee.mpList,style:I,children:u?o.jsx("div",{className:ee.mpEmpty,children:"Chargement…"}):t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map(V=>{const $=s?{width:C??void 0,height:_??void 0,boxSizing:"border-box",...L??{}}:void 0;return o.jsx("div",{className:s?ee.compactItemWrapper:void 0,style:$,children:o.jsx(t3e,{item:V,shape:i,onItemClick:l,color:r,renderItem:P?q=>P(q,t.indexOf(q)):void 0})},V.id)})})]})};k.memo(SA);const d3e=({a11yConfig:e,width:t,height:n,colors:c={text:"#0b1220",background:"#fff",contentBackground:"#efeff0"},titles:i={},placeholder:r="Loading Chart",style:s,className:d="",children:l,padding:h="1rem",variant:u="default",showBorder:p=!1,titleKey:y,leftTitleKey:f})=>{const g=t?typeof t=="number"?`${t}px`:t:void 0,m=n?typeof n=="number"?`${n}px`:n:void 0,x=r&&typeof r=="object"&&!k.isValidElement(r)&&("text"in r||"subtext"in r||"icon"in r||"background"in r||"iconSize"in r),M=x?r:void 0,v=M?.icon?_t[M.icon]:void 0,I=28,b=M?.iconSize??I,w=["chart-container",`variant-${u}`,p?"with-border":"",d].filter(Boolean).join(" "),C=c.contentBackground??void 0,_=typeof h=="number"?`${h}px`:h;return o.jsxs("div",{className:w,style:{width:g,height:m,color:c.text,background:c.background,display:"flex",flexDirection:"column",boxSizing:"border-box",padding:_,...s},children:[o.jsxs("div",{className:"chart-header",children:[o.jsxs("div",{title:Y(e,f||y),className:"chart-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.left,i.leftSubtitle&&o.jsx("div",{className:"chart-subtitle-left",children:i.leftSubtitle})]}),o.jsx("div",{className:"chart-title-right",children:i.right})]}),o.jsx("div",{className:"chart-content",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:C},children:l||(x&&M?o.jsxs("div",{className:"placeholder",role:"status","aria-live":"polite",children:[v&&o.jsx("div",{className:"placeholder-icon",style:{width:b,height:b},children:o.jsx(v,{color:M.iconColor??"currentColor",size:typeof b=="number"?b:parseInt(String(b),10)||I})}),M.text&&o.jsx("div",{className:"placeholder-text",children:M.text}),M.subtext&&o.jsx("div",{className:"placeholder-subtext",children:M.subtext})]}):o.jsx("div",{className:"placeholder-node",role:"status","aria-live":"polite",children:r}))})]})},dC=({id:e,size:t="100%",background:n,icon:c,text:i,subtext:r,onClose:s,onClick:d,style:l,className:h="",colorTextPrimary:u,colorTextSub:p,model:y,fontSize:f,fontWeight:g,a11yConfig:m,titleKey:x})=>{const M=c||y?.icon,v=typeof M=="string",I=v?_t[M]:null,b=v?null:M;return o.jsxs("div",{id:e,className:`alert ${h}`,style:{width:typeof t=="number"?`${t}px`:t,background:n||y?.background,pointerEvents:"auto",cursor:d?"pointer":"default",...l},role:"alert",onClick:d,title:Y(m,x),children:[I&&o.jsx(I,{className:"alert-icon",size:20,color:u||y?.colorTextPrimary}),b!=null&&o.jsx("span",{className:"alert-icon",style:{display:"flex",alignItems:"center",color:u||y?.colorTextPrimary,flexShrink:0},children:b}),o.jsxs("div",{className:"alert-content",children:[o.jsx("span",{className:"alert-text",style:{color:u||y?.colorTextPrimary,fontSize:f,fontWeight:g},children:i}),r&&o.jsx("span",{className:"alert-subtext",style:{color:p||y?.colorTextSub},children:r})]}),s&&o.jsx("button",{className:"alert-close",onClick:s,"aria-label":"Fermer",children:"✕"})]})},jA=k.createContext(null),l3e=(e="alert")=>`${e}_${Math.random().toString(36).slice(2,9)}`,h3e=({children:e,defaultDuration:t=4e3,maxAlerts:n,containerClassName:c,containerStyle:i})=>{const[r,s]=k.useState([]),d=k.useRef(new Map),l=k.useRef(null),[h,u]=k.useState(null),[p,y]=k.useState(void 0),f=k.useRef(n),g=k.useRef(r),m=k.useRef(t);k.useEffect(()=>{g.current=r},[r]),k.useEffect(()=>{m.current=t},[t]),k.useEffect(()=>{const A=d.current;return()=>{A.forEach(H=>window.clearTimeout(H)),A.clear()}},[]);const x=k.useCallback(A=>{const H=d.current.get(A);H&&(window.clearTimeout(H),d.current.delete(A))},[]),M=k.useCallback(A=>{x(A),s(H=>H.filter(P=>P.id!==A))},[x]),v=k.useCallback((A,H)=>{const P=H===void 0||H===0?m.current:H;if(P===-1)return;const V=window.setTimeout(()=>{M(A)},P);d.current.set(A,V)},[M]),I=k.useCallback(A=>{const H=l3e(),P={...A,id:H,createdAt:Date.now()};return s(V=>{const $=[P,...V],q=f.current;return typeof q=="number"&&q>=0&&$.length>q?($.slice(q).forEach(T=>x(T.id)),$.slice(0,q)):$}),v(H,A.duration),H},[x,v]),b=k.useCallback((A,H)=>{s(P=>P.map(V=>V.id===A?{...V,...H}:V))},[]),w=k.useCallback(()=>{d.current.forEach(A=>window.clearTimeout(A)),d.current.clear(),s([])},[]),C=k.useCallback((A,H)=>{A&&window.getComputedStyle(A).position==="static"&&(A.style.position="relative"),u(P=>P===A?P:A),y(H)},[]),_=k.useCallback(()=>g.current.slice(),[]),L=k.useMemo(()=>({showAlert:I,dismissAlert:M,updateAlert:b,clearAlerts:w,setContainerRef:C,getAlertsSnapshot:_}),[I,M,b,w,C,_]),j=h,N=j?!!p:!1,S=o.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",zIndex:10001,padding:"8px 4px",...N?{top:"auto",left:"auto",right:"auto",alignItems:"flex-end"}:null,...j?p:null},children:o.jsx(Ele,{mode:"popLayout",children:r.map(A=>o.jsx(oC.div,{initial:{opacity:0,y:-10,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.98},transition:{type:"spring",damping:25,stiffness:300},style:{width:N?"auto":"100%",pointerEvents:"auto",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.12)",borderRadius:"8px",marginBottom:"6px",backgroundColor:A.background||A.model?.background||"var(--color-background, #fff)",border:"1px solid rgba(0, 0, 0, 0.08)",overflow:"hidden"},children:o.jsx(dC,{id:A.id,text:A.text,subtext:A.subtext,icon:A.icon,background:"transparent",colorTextPrimary:A.colorTextPrimary,colorTextSub:A.colorTextSub,model:A.model,onClose:()=>M(A.id),size:N?"auto":"100%",style:{boxShadow:"none",...N?{whiteSpace:"nowrap"}:null}})},A.id))})}),z=o.jsx("div",{ref:A=>{h||(l.current=A)},className:c,style:{width:"100%",position:"relative",...i},"aria-live":"polite",children:S});return o.jsxs(jA.Provider,{value:L,children:[j?Iw.createPortal(S,j):z,e]})},u3e=()=>{const e=k.useContext(jA);if(!e)throw new Error("useAlerts must be used inside an AlertsProvider");return e},p3e={default:{background:"#f3f4f6",icon:"Info",colorTextPrimary:"#111827",colorTextSub:"#4b5563"},info:{background:"#dbeafe",icon:"Info",colorTextPrimary:"#1e40af",colorTextSub:"#3b82f6"},success:{background:"#dcfce7",icon:"CheckCircle2",colorTextPrimary:"#166534",colorTextSub:"#22c55e"},warning:{background:"#fef3c7",icon:"AlertTriangle",colorTextPrimary:"#92400e",colorTextSub:"#f59e0b"},error:{background:"#fee2e2",icon:"XCircle",colorTextPrimary:"#991b1b",colorTextSub:"#ef4444"}},y3e="_container_18zbo_1",k3e="_icon_18zbo_9",m3e="_selectWrapper_18zbo_23",Wb={container:y3e,icon:k3e,selectWrapper:m3e},f3e=({options:e,defaultValue:t,onChange:n,label:c})=>{const[i,r]=k.useState(t||e[0]?.value||""),s=d=>{r(d),n?.(d)};return o.jsxs("div",{className:Wb.container,children:[o.jsxs("div",{className:Wb.icon,children:[o.jsx(C1,{size:18}),o.jsx("p",{children:c})]}),o.jsx("div",{className:Wb.selectWrapper,children:o.jsx(cC,{field:{name:"periode",label:"",options:e},value:i,onChange:s,onBlur:()=>{}})})]})},g3e=250,v3e=k.forwardRef(({title:e,subtitle:t,size:n="420px",beforeOpen:c,afterOpen:i,beforeClose:r,afterClose:s,style:d,className:l="",children:h,closeOnOverlayClick:u=!0,showCloseButton:p=!0},y)=>{const[f,g]=k.useState(!1),[m,x]=k.useState(!1),M=k.useRef(null),v=k.useRef(null),I=k.useRef(null),b=k.useRef(null);k.useEffect(()=>{const _=M.current;if(!_)return;const L=_.parentElement;return L?(window.getComputedStyle(L).position==="static"&&(L.setAttribute("data-scp-prev-position",L.style.position??""),L.style.position="relative",L.setAttribute("data-scp-position-changed","true")),()=>{if(L.getAttribute("data-scp-position-changed")==="true"){const N=L.getAttribute("data-scp-prev-position")??"";L.style.position=N,L.removeAttribute("data-scp-position-changed"),L.removeAttribute("data-scp-prev-position")}}):void 0},[]),k.useImperativeHandle(y,()=>({open:()=>{f||(c?.(),x(!1),g(!0))},close:()=>{f&&(r?.(),x(!1),g(!1))},toggle:()=>{f?(r?.(),x(!1),g(!1)):(c?.(),x(!1),g(!0))}}),[f,c,r]),k.useEffect(()=>{const _=v.current;b.current&&(window.clearTimeout(b.current),b.current=null);const L=j=>{if(j.target===_&&!(j.propertyName!=="transform"&&j.propertyName!=="opacity"))if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}};return _&&(_.addEventListener("transitionend",L),b.current=window.setTimeout(()=>{if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}},g3e+60)),f&&(I.current=document.activeElement),()=>{_&&_.removeEventListener("transitionend",L),b.current&&(window.clearTimeout(b.current),b.current=null)}},[f,i,s]),k.useEffect(()=>{const _=L=>{L.key==="Escape"&&f&&(r?.(),x(!1),g(!1))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[f,r]);const w=()=>{u&&(r?.(),x(!1),g(!1))},C=typeof n=="number"?`${n}px`:n;return o.jsxs("div",{ref:M,className:`scp-inline-root ${f?"open":""}`,"aria-hidden":!f,children:[o.jsx("div",{className:`scp-overlay ${f?"visible":""}`,onMouseDown:w,role:"presentation"}),o.jsxs("aside",{className:`scp-panel ${f?"in":"out"} ${m?"interactive":""} ${l}`,style:{width:C,...d},ref:v,tabIndex:-1,role:"dialog","aria-label":e,children:[o.jsxs("div",{className:"scp-header",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"scp-title",children:e}),t&&o.jsx("div",{className:"scp-subtitle",children:t})]}),p&&o.jsx("button",{className:"scp-close","aria-label":"Close",onClick:()=>{r?.(),x(!1),g(!1)},children:o.jsx(at,{size:18})})]}),o.jsx("div",{className:"scp-body",children:h})]})]})});function x3e(e){const t=k.useRef("");k.useEffect(()=>{if(e){t.current=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=t.current||""},[e])}const M3e="_container_1pfsp_1",_3e="_title_1pfsp_8",Tj={container:M3e,title:_3e},L3e=({title:e,fontSize:t,barColor:n,className:c="",style:i={}})=>{const r={...i,"--title-font-size":t,"--bar-color":n};return o.jsx("div",{className:`${Tj.container} ${c}`,style:r,children:o.jsx("h2",{className:Tj.title,children:e})})},I3e="_modalOverlay_1878x_1",b3e="_modalContainer_1878x_16",w3e="_modalTitle_1878x_29",C3e="_modalInput_1878x_38",N3e="_modalTextarea_1878x_39",S3e="_modalActions_1878x_70",j3e="_cancelBtn_1878x_77",$3e="_saveBtn_1878x_99",q3e="_inputError_1878x_141",A3e="_inlineAlert_1878x_146",ct={modalOverlay:I3e,modalContainer:b3e,modalTitle:w3e,modalInput:C3e,modalTextarea:N3e,modalActions:S3e,cancelBtn:j3e,saveBtn:$3e,inputError:q3e,inlineAlert:A3e},Dc=({isOpen:e,onClose:t,onSave:n,title:c="Ajouter un élément",fields:i,initialValues:r={},errorMessage:s="",disableSave:d,onFieldChange:l,confirmText:h="Valider",cancelText:u="Annuler"})=>{const[p,y]=k.useState({}),f=k.useRef(null),[g,m]=k.useState(!1),[x,M]=k.useState(!1),v=k.useRef(null);if(k.useEffect(()=>{if(!e)return;const _={};for(const L of i)_[L.name]=Object.prototype.hasOwnProperty.call(r,L.name)?r[L.name]:"";return y(_),requestAnimationFrame(()=>{f.current?.focus();const L=f.current;if(L&&typeof L.selectionStart=="number"){const j=String(L.value??"").length;L.setSelectionRange(j,j)}}),()=>{v.current&&(window.clearTimeout(v.current),v.current=null)}},[e]),k.useEffect(()=>{s&&e?(M(!0),v.current&&(window.clearTimeout(v.current),v.current=null),v.current=window.setTimeout(()=>{M(!1),v.current=null},3e3)):(M(!1),v.current&&(window.clearTimeout(v.current),v.current=null))},[s,e]),!e)return null;const I=(_,L)=>{y(j=>({...j,[_]:L})),l&&l(_,L)},b=async()=>{if(!Object.values(p).some(_=>_===""||_===void 0))try{m(!0);const _=await n(p);if(typeof _=="string"&&_==="duplicate-same"){m(!1);return}y({}),m(!1),t()}catch(_){console.error("AddItemModal onSave error:",_),m(!1),t()}},w=_=>{_.target===_.currentTarget&&t()},C=_=>_.stopPropagation();return o.jsx("div",{className:ct.modalOverlay,onMouseDown:w,role:"dialog","aria-modal":"true",children:o.jsxs("div",{className:ct.modalContainer,onMouseDown:C,onClick:C,children:[o.jsx("h2",{className:ct.modalTitle,children:c}),i.map((_,L)=>{const j=p[_.name]??"",N=L===0&&!!s,S={name:_.name,placeholder:_.placeholder||_.label,value:String(j),onChange:z=>I(_.name,z.target.value),className:_.type==="textarea"?`${ct.modalTextarea} ${N?ct.inputError:""}`:`${ct.modalInput} ${N?ct.inputError:""}`,tabIndex:0,disabled:g};return L===0&&(S.ref=z=>{f.current=z}),o.jsxs("div",{style:{marginBottom:8},children:[_.type==="textarea"?o.jsx("textarea",{rows:_.rows||4,...S}):o.jsx("input",{type:_.type||"text",...S}),L===0&&x&&s&&o.jsx("div",{style:{marginTop:8},children:o.jsx(dC,{text:s,background:"#fff5f5",colorTextPrimary:"#ef4444",onClose:()=>M(!1),className:ct.inlineAlert})})]},_.name)}),o.jsxs("div",{className:ct.modalActions,children:[o.jsx("button",{className:ct.cancelBtn,onClick:t,type:"button",disabled:g,children:u}),o.jsx("button",{className:ct.saveBtn,onClick:b,type:"button",disabled:g||!!d,children:g?"En cours...":h})]})]})})},z3e=({title:e,keyCount:t,onAddKey:n,a11yConfig:c})=>{const[i,r]=k.useState(!1),s=d=>{const l=d.key;n&&l&&n(l)};return o.jsxs("div",{className:"header-container",children:[o.jsxs("div",{className:"header-info",children:[o.jsx("h1",{title:Y(c,e),children:e}),o.jsxs("p",{children:[t," clés"]})]}),o.jsxs("button",{onClick:()=>r(!0),className:"add-key-button",children:[o.jsx(zc,{className:"add-key-icon"}),"Clé"]}),o.jsx(Dc,{isOpen:i,title:"Ajouter une clé",onClose:()=>r(!1),onSave:s,fields:[{name:"key",label:"Nouvelle clé",placeholder:"Entrer une nouvelle clé"}]})]})},V3e=({modules:e,onEdit:t,onDelete:n,onAddModule:c,onSelectModule:i,addModalFields:r,addModalTitle:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(null),[p,y]=k.useState(null),[f,g]=k.useState(!1),m=()=>l(!0),x=()=>l(!1),M=_=>{if(c){const L=_.code?.trim()||_.id?.trim(),j=_.title?.trim(),N=L||j||String(Date.now()),S=j||L||`Module ${N}`;c({id:N,title:S,subtitle:"",translations:{}})}x()},v=(_,L)=>{_.stopPropagation(),u(L)},I=()=>u(null),b=_=>{if(!h){I();return}const L={...h,title:_.title||h.title,subtitle:""};t&&t(L),I()},w=(_,L)=>{_.stopPropagation(),n&&n(L)},C=_=>{y(_.id),i&&i(_)};return f?o.jsx("div",{className:"module-sidebar collapsed",children:o.jsx(n1,{size:20,className:"menu-toggle",onClick:()=>g(!1)})}):o.jsxs("div",{className:"module-sidebar",children:[o.jsxs("div",{className:"sidebar-header",children:[o.jsxs("span",{className:"header-text",children:["Modules (",e.length,")"]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(Ac,{size:18,className:"header-folder",onClick:m}),o.jsx(n1,{size:18,className:"header-menu",onClick:()=>g(!0)})]})]}),o.jsx("hr",{className:"divider"}),o.jsx("div",{className:"module-list",children:e.map(_=>{const L=Object.keys(_.translations||{}).length,j=L>0||_.id===p;return o.jsxs("div",{className:`module-item ${_.id===p?"selected":""}`,onClick:()=>C(_),role:"button",tabIndex:0,onKeyDown:N=>{N.key==="Enter"&&C(_)},children:[o.jsxs("div",{className:"module-left",children:[o.jsx(q1,{size:16,className:"item-folder"}),o.jsxs("div",{className:"module-info",children:[o.jsxs("div",{className:"module-title",children:[_.title,j&&o.jsxs("span",{className:"count",children:[" ",L," "]})]}),_.subtitle?o.jsx("div",{className:"module-subtitle",children:_.subtitle}):null]})]}),o.jsxs("div",{className:"module-actions",children:[t&&o.jsx(o1,{onClick:N=>v(N,_),color:"#777",size:16}),n&&o.jsx(kt,{onClick:N=>w(N,_.id),color:"#777",size:16})]})]},_.id)})}),o.jsx(Dc,{isOpen:d,onClose:x,onSave:M,title:s||"Ajouter un module",fields:r&&r.length?r.map(_=>({name:_.name,label:_.label,type:_.type,placeholder:_.placeholder,rows:_.rows})):[{name:"title",label:"Titre",placeholder:"Titre du module"}]}),h&&o.jsx(Dc,{isOpen:!!h,onClose:I,onSave:b,title:"Éditer le module",initialValues:{title:h.title},fields:[{name:"title",label:"Titre",placeholder:"Titre du module"}]})]})},$A=({placeholder:e="Rechercher une clé ou traduction...",value:t="",onChange:n,iconPosition:c="left",iconColor:i="#9ca3af",a11yConfig:r,className:s})=>o.jsxs("div",{className:`search-container icon-${c}`,title:Y(r,e),children:[o.jsx("div",{className:"search-icon-wrapper",children:o.jsx(V1,{className:"search-icon",color:i})}),o.jsx("input",{type:"text",placeholder:e,value:t,onChange:d=>n?.(d.target.value),className:`search-input ${s}`})]}),P3e=({keyName:e,translations:t,availableLanguages:n,onDeleteKey:c,onEditKey:i,onEditTranslation:r,onDeleteTranslation:s,onAddTranslation:d,draggable:l=!1,checkDuplicateLocal:h})=>{const[u,p]=k.useState(!1),[y,f]=k.useState(""),[g,m]=k.useState(null),[x,M]=k.useState(""),[v,I]=k.useState(""),[b,w]=k.useState(!1),[C,_]=k.useState(!1),[L,j]=k.useState(null),[N,S]=k.useState(!1),z=t.map(T=>T.language),A=n.filter(T=>!z.includes(T.code)),H=()=>{y&&v.trim()&&(d?.(e,y,v.trim()),f(""),I(""),p(!1))},P=(T,O)=>{m(T),M(O)},V=T=>{r?.(e,T,x),m(null),M("")},$=()=>{m(null),M("")},q=async T=>{const O=T.name?.trim();if(O){if(j(null),S(!1),O===e||!i)return w(!1),"ok";try{const J=await i(e,O);if(typeof J=="string"&&J==="ok")w(!1),j(null);else{if(typeof J=="string"&&J==="duplicate-same")return j("Une clé existe déjà dans ce module."),S(!0),"duplicate-same";if(typeof J=="string"&&J==="duplicate-other")return w(!1),j(null),"duplicate-other";w(!1)}}catch(J){console.error("Erreur handleRenameSave:",J),j("Erreur lors du renommage.")}}},R=(T,O)=>{if(T!=="name")return;const J=O.trim();j(null),S(!1),J&&typeof h=="function"&&(h(J,e)?(j("Une clé existe déjà dans ce module."),S(!0)):(j(null),S(!1)))};return o.jsxs("div",{className:`translation-key ${C?"collapsed":"expanded"} ${l?"draggable":""}`,children:[o.jsxs("div",{className:"card-header",children:[o.jsxs("div",{className:"header-left",children:[o.jsx("button",{className:"collapse-button",onClick:()=>_(!C),title:C?"Déplier":"Replier",children:C?o.jsx(S1,{className:"collapse-icon"}):o.jsx(Ht,{className:"collapse-icon"})}),o.jsx("h3",{className:"card-title",title:e,children:e})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx("button",{className:"action-button",onClick:T=>{T.stopPropagation(),w(!0)},title:"Renommer la clé",children:o.jsx(vt,{className:"action-icon"})}),o.jsx("button",{onClick:T=>{T.stopPropagation(),c?.(e)},className:"action-button delete",title:"Supprimer la clé",children:o.jsx(kt,{className:"action-icon"})})]})]}),o.jsx("div",{className:`translations-container ${C?"":"expanded"}`,children:!l&&o.jsxs(o.Fragment,{children:[t.map(T=>o.jsxs("div",{className:"translation-row",children:[o.jsx("div",{className:"language-code",children:T.language}),o.jsx("div",{className:"translation-content",children:g===T.language?o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",value:x,onChange:O=>M(O.target.value),className:"edit-input",autoFocus:!0,onKeyDown:O=>{O.key==="Enter"&&V(T.language),O.key==="Escape"&&$()}}),o.jsx("button",{onClick:()=>V(T.language),className:"save-button",disabled:!x.trim(),children:"Enregistrer"}),o.jsx("button",{onClick:$,className:"cancel-button",children:o.jsx(at,{className:"action-icon"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"translation-text",title:T.value,children:T.value}),o.jsx("button",{onClick:()=>P(T.language,T.value),className:"edit-button",title:"Éditer la traduction",children:o.jsx(vt,{className:"action-icon"})}),o.jsx("button",{onClick:()=>s?.(e,T.language),className:"delete-translation-button",title:"Supprimer la traduction",children:o.jsx(at,{className:"action-icon"})})]})})]},T.language)),u?o.jsxs("div",{className:"add-language-row",children:[o.jsx("div",{className:"language-code",children:"+"}),o.jsxs("div",{className:"add-language-content",children:[o.jsx("div",{className:"language-select-container",children:o.jsxs("select",{value:y,onChange:T=>f(T.target.value),className:"language-select",children:[o.jsx("option",{value:"",children:"Sélectionnez la langue"}),A.map(T=>o.jsxs("option",{value:T.code,children:[T.name," (",T.code,")"]},T.code))]})}),y&&o.jsx("input",{type:"text",value:v,onChange:T=>I(T.target.value),placeholder:"Entrez la traduction...",className:"translation-input",onKeyDown:T=>{T.key==="Enter"&&H(),T.key==="Escape"&&(p(!1),f(""),I(""))}}),o.jsx("button",{onClick:H,disabled:!y||!v.trim(),className:"save-button",children:"Ajouter"}),o.jsx("button",{onClick:()=>{p(!1),f(""),I("")},className:"cancel-button",children:o.jsx(at,{className:"action-icon"})})]})]}):o.jsxs("button",{onClick:()=>p(!0),className:"show-add-button",disabled:A.length===0,children:[o.jsx("span",{className:"plus-icon",children:"+"}),"Ajouter une langue"]})]})}),l&&o.jsxs("div",{className:"drag-overlay",children:[o.jsx(a.Move,{size:24,strokeWidth:1.5}),o.jsx("span",{children:"Glisser pour réorganiser"})]}),o.jsx(Dc,{isOpen:b,onClose:()=>{w(!1),j(null),S(!1)},onSave:q,onFieldChange:R,title:"Renommer la clé",initialValues:{name:e},fields:[{name:"name",label:"Nom de la clé",placeholder:"Nom de la clé"}],errorMessage:L||"",disableSave:N})]})},T3e="_wrapper_1wvht_1",H3e="_leftGroup_1wvht_12",D3e="_filterButton_1wvht_21",B3e="_open_1wvht_42",R3e="_filterIcon_1wvht_42",F3e="_infoText_1wvht_58",E3e="_pickerContainer_1wvht_66",O3e="_srOnly_1wvht_79",U3e="_pickerLabel_1wvht_91",W3e="_datetime_1wvht_98",G3e="_rightGroup_1wvht_107",K3e="_searchInputWrap_1wvht_116",Z3e="_searchInput_1wvht_116",X3e="_searchIcon_1wvht_152",Ee={wrapper:T3e,leftGroup:H3e,filterButton:D3e,open:B3e,filterIcon:R3e,infoText:F3e,pickerContainer:E3e,srOnly:O3e,pickerLabel:U3e,datetime:W3e,rightGroup:G3e,searchInputWrap:K3e,searchInput:Z3e,searchIcon:X3e};function Y3e({onDateChange:e,onSearch:t,initialDate:n}){const[c,i]=k.useState(!1),[r,s]=k.useState(n??""),d=k.useRef(null);k.useEffect(()=>{function p(y){const f=y.target;d.current&&f&&!d.current.contains(f)&&i(!1)}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),k.useEffect(()=>{n&&s(n)},[n]);const l=()=>i(p=>!p),h=p=>{const y=p.target.value;s(y),e?.(y)},u=p=>{t?.(p.target.value)};return o.jsxs("div",{className:Ee.wrapper,ref:d,children:[o.jsxs("div",{className:Ee.leftGroup,children:[o.jsxs("button",{type:"button",className:`${Ee.filterButton} ${c?Ee.open:""}`,onClick:l,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":"entry-datetime",children:[o.jsx("span",{children:"Entry time"}),o.jsx("svg",{className:Ee.filterIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M10 18h4v-2h-4v2zm-7-8v2h18V10H3zm3-6v2h12V4H6z"})})]}),o.jsx("div",{className:Ee.infoText,children:"Confidence interval: step ± 15' / exit ± 30'"}),c&&o.jsxs("div",{className:Ee.pickerContainer,role:"dialog","aria-label":"Choisir la date et l’heure",children:[o.jsx("label",{className:Ee.pickerLabel,htmlFor:"entry-datetime",children:o.jsx("span",{className:Ee.srOnly,children:"Choisir la date et l’heure"})}),o.jsx("input",{id:"entry-datetime",className:Ee.datetime,type:"datetime-local",value:r,onChange:h,"aria-label":"Date et heure d’entrée"})]})]}),o.jsx("div",{className:Ee.rightGroup,children:o.jsxs("div",{className:Ee.searchInputWrap,children:[o.jsx("input",{className:Ee.searchInput,placeholder:"Search...",onChange:u,"aria-label":"Search"}),o.jsx("svg",{className:Ee.searchIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16a6.471 6.471 0 004.23-1.57l.27.28v.79L20 20.49 21.49 19l-5.99-5zM10 15.5A5.5 5.5 0 1115.5 10 5.5 5.5 0 0110 15.5z"})})]})})]})}const J3e=({className:e="",style:t={},title:n,titleClassName:c="",titleStyle:i,data:r,lineClasses:s={},renderCell:d,bg:l,titleBg:h,titleColor:u,itemBg:p,emptyContent:y,colGap:f="1rem"})=>{const g=Array.isArray(r)?r:[],m=g.length===0,x=g.every(b=>typeof b=="string"),M=g.some(b=>Array.isArray(b)),v=(b,w,C)=>d?d(b,w,C):o.jsx("span",{className:"slb-cell-text",children:b}),I=f?{"--col-gap":f}:void 0;return m?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{...i,background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-empty",children:y??null})]}):x&&!M?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("ul",{className:"slb-list",children:g.map((b,w)=>o.jsx("li",{className:`slb-item ${s[w]||""}`,style:{background:p??void 0},children:v(b,w,0)},w))})]}):o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-grid",style:I,children:g.map((b,w)=>{const C=s[w]||"";if(Array.isArray(b)){const[_,L]=b;return o.jsxs("div",{className:`slb-row ${C}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(_,w,0)}),o.jsx("div",{className:"slb-grid-right",children:v(L,w,1)})]},w)}return o.jsxs("div",{className:`slb-row ${C}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(b,w,0)}),o.jsx("div",{className:"slb-grid-right slb-empty-cell","aria-hidden":"true"})]},w)})})]})},Q3e=({className:e="",style:t={},title:n,titleColor:c,data:i=[],badgeColor:r="#0ea5e9",badgeColors:s={},badgePadding:d="8px 16px",badgeWidth:l,itemBg:h,lineClasses:u={},colGap:p="1rem"})=>{const y=i.some(g=>Array.isArray(g)),f=p?{"--col-gap":p}:void 0;return o.jsxs("div",{className:`clb-root ${e}`,style:{...t},children:[n&&o.jsx("div",{className:"clb-title",style:c?{color:c}:void 0,children:n}),o.jsx("div",{className:"clb-grid",style:f,children:i.map((g,m)=>{const x=u[m]||"";if(Array.isArray(g)){const[M,v]=g,I=s[m]||r;return o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col",children:o.jsx("div",{className:"counter-badge",style:{background:I,padding:d,width:l,minWidth:l},children:M})}),o.jsx("div",{className:"clb-text",children:v})]},m)}return y?o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col clb-empty-badge"}),o.jsx("div",{className:"clb-text",children:g})]},m):o.jsx("div",{className:`clb-fullrow ${x}`,style:{background:h??void 0},children:o.jsx("span",{children:g})},m)})})]})},efe=({className:e="",style:t={},title:n,items:c=[],titleBg:i,titleColor:r,itemBg:s,lineClasses:d={},renderTrendIcon:l,colGap:h="1rem"})=>{const u=h?{"--col-gap":h}:void 0;return o.jsxs("div",{className:`tlb-root ${e}`,style:{...t,background:s??void 0},children:[n&&o.jsx("div",{className:"tlb-title",style:{background:i??void 0,color:r??void 0},children:n}),o.jsx("div",{className:"tlb-grid",style:u,children:c.map((p,y)=>{const f=d[y]||"";return o.jsxs("div",{className:`tlb-row ${f}`,style:{background:s??void 0},children:[o.jsx("div",{className:"tlb-label",children:p.label}),o.jsxs("div",{className:"tlb-value-group",children:[o.jsx("div",{className:"tlb-icon-col",children:l?l(p):p.icon??null}),o.jsxs("div",{className:"tlb-value-wrap",children:[o.jsx("div",{className:"tlb-value",children:p.value}),typeof p.delta<"u"&&o.jsx("div",{className:`tlb-delta ${p.delta>0?"positive":p.delta<0?"negative":"neutral"}`,children:p.deltaLabel??String(p.delta)})]})]})]},y)})})]})},tfe=({className:e="",style:t={},children:n,gap:c="1rem"})=>o.jsx("div",{className:`frc-root ${e}`,style:{...t,"--frc-gap":c},children:k.Children.map(n,i=>o.jsx("div",{className:"frc-item",children:i}))}),afe=({className:e="",style:t={},children:n,gap:c="1rem",background:i="#D9EEF5"})=>o.jsx("div",{className:`lcc-root ${e}`,style:{background:i,...t,"--lcc-gap":c},children:k.Children.map(n,r=>o.jsx("div",{className:"lcc-cell",children:r}))}),nfe="_overlay_3x4or_2",ofe="_fadeIn_3x4or_1",cfe="_popup_3x4or_17",ife="_slideUp_3x4or_1",rfe="_header_3x4or_28",sfe="_body_3x4or_40",dfe="_footer_3x4or_51",lfe="_cancelButton_3x4or_59",hfe="_confirmButton_3x4or_77",ufe="_warning_3x4or_97",pfe="_danger_3x4or_106",yfe="_info_3x4or_115",St={overlay:nfe,fadeIn:ofe,popup:cfe,slideUp:ife,header:rfe,body:sfe,footer:dfe,cancelButton:lfe,confirmButton:hfe,warning:ufe,danger:pfe,info:yfe},kfe=({isOpen:e,title:t,message:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",type:d="warning"})=>{if(!e)return null;const l=u=>{u.target===u.currentTarget&&i()},h=u=>{u.key==="Escape"&&i(),u.key==="Enter"&&u.ctrlKey&&c()};return o.jsx("div",{className:St.overlay,onClick:l,onKeyDown:h,role:"dialog","aria-labelledby":"confirmation-title","aria-describedby":"confirmation-message",children:o.jsxs("div",{className:`${St.popup} ${St[d]}`,children:[o.jsx("div",{className:St.header,children:o.jsx("h3",{id:"confirmation-title",children:t})}),o.jsx("div",{className:St.body,children:o.jsx("p",{id:"confirmation-message",children:n})}),o.jsxs("div",{className:St.footer,children:[o.jsx("button",{className:St.cancelButton,onClick:i,type:"button",children:s}),o.jsx("button",{className:St.confirmButton,onClick:c,type:"button",autoFocus:!0,children:r})]})]})})},mfe=()=>{const[e,t]=k.useState({isOpen:!1,title:"",message:"",onConfirm:null}),n=k.useCallback((r,s,d)=>{t({isOpen:!0,title:r,message:s,onConfirm:d})},[]),c=k.useCallback(()=>{t(r=>({...r,isOpen:!1,onConfirm:null}))},[]),i=k.useCallback(()=>{e.onConfirm?.(),c()},[e.onConfirm,c]);return{isOpen:e.isOpen,title:e.title,message:e.message,showConfirmation:n,hideConfirmation:c,handleConfirm:i}},ffe="_container_pafmy_1",gfe="_selectButton_pafmy_7",vfe="_disabled_pafmy_23",xfe="_error_pafmy_40",Mfe="_outline_pafmy_53",_fe="_filled_pafmy_59",Lfe="_sm_pafmy_68",Ife="_md_pafmy_74",bfe="_lg_pafmy_80",wfe="_buttonContent_pafmy_86",Cfe="_label_pafmy_94",Nfe="_placeholder_pafmy_104",Sfe="_iconsContainer_pafmy_109",jfe="_loadingSpinner_pafmy_116",$fe="_spin_pafmy_1",qfe="_arrowIcon_pafmy_135",Afe="_arrowIconOpen_pafmy_143",zfe="_dropdown_pafmy_148",Vfe="_dropdownIn_pafmy_1",Pfe="_searchContainer_pafmy_176",Tfe="_searchInputWrapper_pafmy_182",Hfe="_searchIcon_pafmy_188",Dfe="_searchInput_pafmy_182",Bfe="_optionsList_pafmy_213",Rfe="_noResults_pafmy_238",Ffe="_option_pafmy_213",Efe="_optionHighlighted_pafmy_268",Ofe="_optionSelected_pafmy_273",Ufe="_optionDisabled_pafmy_284",Wfe="_optionLabel_pafmy_290",Gfe="_checkIcon_pafmy_298",Kfe="_widthFull_pafmy_306",Zfe="_width64_pafmy_310",Xfe="_width80_pafmy_314",Yfe="_width96_pafmy_318",he={container:ffe,selectButton:gfe,disabled:vfe,error:xfe,default:"_default_pafmy_49",outline:Mfe,filled:_fe,sm:Lfe,md:Ife,lg:bfe,buttonContent:wfe,label:Cfe,placeholder:Nfe,iconsContainer:Sfe,loadingSpinner:jfe,spin:$fe,arrowIcon:qfe,arrowIconOpen:Afe,dropdown:zfe,dropdownIn:Vfe,searchContainer:Pfe,searchInputWrapper:Tfe,searchIcon:Hfe,searchInput:Dfe,optionsList:Bfe,noResults:Rfe,option:Ffe,optionHighlighted:Efe,optionSelected:Ofe,optionDisabled:Ufe,optionLabel:Wfe,checkIcon:Gfe,widthFull:Kfe,width64:Zfe,width80:Xfe,width96:Yfe},hi=4,Hj=8,Jfe=({options:e,value:t,onChange:n,placeholder:c="Sélectionner une option...",disabled:i=!1,loading:r=!1,error:s=!1,className:d="",size:l="md",variant:h="default",width:u="w-full",dropdownPosition:p="auto"})=>{const[y,f]=k.useState(!1),[g,m]=k.useState(""),[x,M]=k.useState(0),[v,I]=k.useState({top:0,left:0,width:0}),[b,w]=k.useState("bottom"),[C,_]=k.useState(null),L=k.useRef(null),j=k.useRef(null),N=k.useRef(null),S=k.useMemo(()=>g?e.filter(E=>E.label.toLowerCase().includes(g.toLowerCase())):e,[e,g]),z=e.find(E=>E.value===t),A=k.useCallback(()=>{if(L.current){const E=L.current.getBoundingClientRect();I({top:E.top,left:E.left,width:E.width})}},[]),H=k.useCallback(()=>{if(!L.current)return;const E=L.current.getBoundingClientRect(),U=E.top-hi-Hj,ie=window.innerHeight-E.bottom-hi-Hj;let ce;p!=="auto"?ce=p:ce=(j.current?.scrollHeight??0)<=ie?"bottom":U>ie?"top":"bottom",w(Me=>Me===ce?Me:ce),_(Math.max(ce==="bottom"?ie:U,0))},[p]),P=k.useCallback(()=>{A(),H()},[A,H]);k.useEffect(()=>(y&&(P(),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P)),()=>{window.removeEventListener("scroll",P,!0),window.removeEventListener("resize",P)}),[y,P]),k.useLayoutEffect(()=>{y&&H()},[y,H]),k.useEffect(()=>{const E=U=>{L.current&&!L.current.contains(U.target)&&j.current&&!j.current.contains(U.target)&&(f(!1),m(""))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]),k.useEffect(()=>{M(0)},[S]);const V=E=>{E.disabled||(n?.(E.value,E),f(!1),m(""))},$=E=>{m(E.target.value),y||f(!0)},q=E=>{if(!y){(E.key==="ArrowDown"||E.key==="Enter")&&f(!0);return}switch(E.key){case"ArrowDown":E.preventDefault(),M(U=>U<S.length-1?U+1:U);break;case"ArrowUp":E.preventDefault(),M(U=>U>0?U-1:U);break;case"Enter":E.preventDefault(),S[x]&&V(S[x]);break;case"Escape":f(!1),m("");break}},R=()=>[he.selectButton,he[l],he[h],i?he.disabled:"",s?he.error:"",d].filter(Boolean).join(" "),T=()=>{switch(u){case"w-64":return he.width64;case"w-80":return he.width80;case"w-96":return he.width96;default:return he.widthFull}},O=(E,U)=>[he.option,U===x?he.optionHighlighted:"",E.value===t?he.optionSelected:"",E.disabled?he.optionDisabled:""].filter(Boolean).join(" "),J={position:"fixed",top:b==="bottom"?v.top+(L.current?.offsetHeight||0)+hi:"auto",bottom:b==="top"?window.innerHeight-v.top+hi:"auto",left:v.left,width:v.width,maxHeight:C!=null?`${C}px`:void 0,zIndex:9999};return o.jsxs("div",{className:`${he.container} ${T()}`,children:[o.jsx("button",{ref:L,className:R(),onClick:()=>!i&&f(!y),onKeyDown:q,tabIndex:i?-1:0,type:"button","aria-haspopup":"listbox","aria-expanded":y,disabled:i,children:o.jsxs("div",{className:he.buttonContent,children:[o.jsx("span",{className:`${he.label} ${z?"":he.placeholder}`,children:z?z.label:c}),o.jsxs("div",{className:he.iconsContainer,children:[r&&o.jsx("div",{className:he.loadingSpinner}),o.jsx("svg",{className:`${he.arrowIcon} ${y?he.arrowIconOpen:""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),y&&Iw.createPortal(o.jsxs("div",{className:`${he.dropdown} ${T()}`,style:J,ref:j,children:[o.jsx("div",{className:he.searchContainer,children:o.jsxs("div",{className:he.searchInputWrapper,children:[o.jsx("svg",{className:he.searchIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),o.jsx("input",{ref:N,type:"text",value:g,onChange:$,placeholder:"Rechercher...",className:he.searchInput,autoFocus:!0})]})}),o.jsx("div",{className:he.optionsList,children:S.length===0?o.jsx("div",{className:he.noResults,children:"Aucun résultat trouvé"}):o.jsx("ul",{role:"listbox",children:S.map((E,U)=>o.jsx("li",{className:O(E,U),onClick:()=>V(E),onMouseEnter:()=>M(U),role:"option","aria-selected":E.value===t,"aria-disabled":E.disabled,children:o.jsxs("div",{className:he.buttonContent,children:[o.jsx("span",{className:he.optionLabel,title:E.label,children:E.label}),E.value===t&&o.jsx("svg",{className:he.checkIcon,fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})},E.value))})})]}),document.body)]})},Qfe="_container_uq7pt_1",e6e="_item_uq7pt_7",t6e="_mainValue_uq7pt_13",a6e="_label_uq7pt_17",n6e="_subValue_uq7pt_22",o6e="_subValueWrapper_uq7pt_27",c6e="_subSeparator_uq7pt_32",Je={container:Qfe,item:e6e,mainValue:t6e,label:a6e,subValue:n6e,subValueWrapper:o6e,subSeparator:c6e},i6e=({dms:e,stats:t=[],itemWidth:n="120px",valueFontSize:c="28px",valueFontWeight:i=700,subFontSize:r="16px",subFontWeight:s=600,backgroundColor:d="#ffffff",labelColor:l="#6b7280",valueColor:h="#000000"})=>{const u=(p,y,f)=>{const[g,m]=p.split("/").map(x=>x.trim());return o.jsxs("span",{className:Je.subValueWrapper,children:[o.jsx("span",{className:Je.subLeft,style:{color:y},children:g}),o.jsx("span",{className:Je.subSeparator,children:" / "}),o.jsx("span",{className:Je.subRight,style:{color:f},children:m})]})};return o.jsxs("div",{className:Je.container,style:{backgroundColor:d},children:[e&&o.jsxs("div",{className:Je.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Je.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:e}),o.jsx("div",{className:Je.label,style:{color:l},children:"DMS"})]}),t.map((p,y)=>o.jsxs("div",{className:Je.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Je.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:p.value}),o.jsx("div",{className:Je.label,style:{color:l},children:p.label}),o.jsx("div",{className:Je.subValue,style:{fontSize:r,fontWeight:s},children:p.subValue&&u(p.subValue,p.subLeftColor,p.subRightColor)})]},y))]})},r6e="_encours_16ist_1",s6e="_header_16ist_19",d6e="_iconWrap_16ist_27",l6e="_title_16ist_36",h6e="_items_16ist_47",u6e="_spaceEvenly_16ist_56",p6e="_item_16ist_47",y6e="_valueContainer_16ist_86",k6e="_value_16ist_86",m6e="_label_16ist_108",lt={encours:r6e,header:s6e,iconWrap:d6e,title:l6e,items:h6e,spaceEvenly:u6e,item:p6e,valueContainer:y6e,value:k6e,label:m6e},$c=e=>typeof e=="number"?`${e}px`:typeof e=="string"?e:void 0;function f6e(e,t){const n={},c={};return e.valueColor&&(n.color=e.valueColor),e.valueFontSize!==void 0?n.fontSize=$c(e.valueFontSize):t.defaultValueFontSize!==void 0&&(n.fontSize=$c(t.defaultValueFontSize)),e.valueFontWeight!==void 0?n.fontWeight=e.valueFontWeight:t.defaultValueFontWeight!==void 0&&(n.fontWeight=t.defaultValueFontWeight),e.labelColor&&(c.color=e.labelColor),e.labelFontSize!==void 0?c.fontSize=$c(e.labelFontSize):t.defaultLabelFontSize!==void 0&&(c.fontSize=$c(t.defaultLabelFontSize)),e.labelFontWeight!==void 0?c.fontWeight=e.labelFontWeight:t.defaultLabelFontWeight!==void 0&&(c.fontWeight=t.defaultLabelFontWeight),{valueStyle:n,labelStyle:c}}function g6e(){return o.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.4"}),o.jsx("path",{d:"M8 12h8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function v6e(e){const{title:t,titleColor:n,titleFontSize:c,titleFontWeight:i,icon:r,iconSize:s=18,iconColor:d,defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p,data:y,style:f,bg:g="#ffffff",width:m,gap:x,className:M,ariaLabel:v}=e,I=r?_t[r]:void 0,b={background:g,width:$c(m),...f},w={};n&&(w.color=n),c!==void 0&&(w.fontSize=$c(c)),i!==void 0&&(w.fontWeight=i);const C={};return d&&(C.color=d),o.jsxs("section",{className:`${lt.encours} ${M??""}`,style:b,"aria-label":v??t,children:[o.jsxs("div",{className:lt.header,children:[o.jsx("div",{className:lt.iconWrap,"aria-hidden":!0,style:C,children:I?o.jsx(I,{size:typeof s=="number"?s:void 0}):o.jsx(g6e,{})}),o.jsx("div",{className:lt.title,style:w,children:t})]}),o.jsx("div",{className:`${lt.items} ${x===void 0?lt.spaceEvenly:""}`,role:"list",style:x!==void 0?{gap:`${x}px`}:{},children:y.map((_,L)=>{const{valueStyle:j,labelStyle:N}=f6e(_,{defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p});return o.jsx("div",{className:lt.item,role:"listitem",style:{..._.background?{background:_.background}:{},..._.width?{width:$c(_.width)}:{}},children:o.jsxs("div",{className:lt.valueContainer,children:[o.jsx("div",{className:lt.value,style:j,children:_.value}),_.label&&o.jsx("div",{className:lt.label,style:N,children:_.label})]})},`${String(_.label??_.value)}-${L}`)})})]})}const x6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-360 280-559h400z"})),qA=k.memo(x6e),M6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m280-400 200-201 200 201z"})),_6e=k.memo(M6e),L6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#0087BD",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm3.983-3.55q.1 0 .192-.033a.36.36 0 0 0 .158-.117l4.117-4.133q.15-.15.15-.35a.54.54 0 0 0-.15-.367.52.52 0 0 0-.358-.133.5.5 0 0 0-.359.15l-3.75 3.75L5.35 7.583a.48.48 0 0 0-.7 0q-.15.15-.15.367 0 .216.15.35l1.983 2a.48.48 0 0 0 .35.15"})),I6e=k.memo(L6e),b6e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#1E2122",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm0-1h10V3H3z"})),w6e=k.memo(b6e),C6e=({items:e,onSave:t,loading:n,disabled:c,saveLabel:i,savingLabel:r,buttonTitle:s,size:d=16,colors:l={bg:"#DADADA",activeBg:"var(--color-primary)",circle:"#FFFFFF",icon:"#1C1B1F",icon2:"#FFFFFF"},style:h,a11yConfig:u})=>{const[p,y]=k.useState(!1),[f,g]=k.useState(e),[m,x]=k.useState(!1);if(k.useEffect(()=>{x(!0)},[]),k.useEffect(()=>{g(e)},[e]),!m)return null;const M=(b,w)=>{w<4||g(C=>C.map(_=>_.component_key===b?{..._,visible:!_.visible}:_))},v=()=>{t(f),y(!1)},I=Y(u,s);return o.jsxs("div",{style:{position:"relative",display:"inline-block",...h},children:[o.jsxs("div",{onClick:()=>{c||y(!p)},style:{display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",borderRadius:4,transition:"background 0.2s"},title:I,children:[o.jsx(u$,{width:d,height:d,fill:l?.icon||"currentColor",style:{transition:"color 0.2s"}}),p?o.jsx(_6e,{width:d,height:d,fill:l?.icon||"currentColor"}):o.jsx(qA,{width:d,height:d,fill:l?.icon||"currentColor"})]}),p&&o.jsxs("div",{style:{position:"absolute",top:"120%",right:0,minWidth:260,background:"#fff",borderRadius:"0.25rem",boxShadow:"0px 3px 7px 0px rgba(17, 20, 21, 0.05),0px 14px 14px 0px rgba(17, 20, 21, 0.04),0px 30px 18px 0px rgba(17, 20, 21, 0.03), 0px 54px 22px 0px rgba(17, 20, 21, 0.01),0px 85px 24px 0px rgba(17, 20, 21, 0)",zIndex:235465456,padding:"0 0 0.5rem 0"},children:[o.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:f.map((b,w)=>o.jsxs(k.Fragment,{children:[o.jsxs("li",{onClick:()=>M(b.component_key,w),style:{display:"flex",alignItems:"center",padding:"0.5rem",cursor:w<4?"not-allowed":"pointer",transition:"background 0.2s"},onMouseEnter:C=>{w>=4&&(C.currentTarget.style.background="#F9FAFB")},onMouseLeave:C=>{w>=4&&(C.currentTarget.style.background="transparent")},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:b.visible?o.jsx(I6e,{width:20,height:20,fill:l?.activeBg||"var(--color-primary, #008FBB)"}):o.jsx(w6e,{width:20,height:20,fill:"#D1D5DB"})}),o.jsx("span",{style:{fontSize:"14px",color:"#111827",fontWeight:400,userSelect:"none"},children:b.label})]}),w===3&&o.jsx("div",{style:{height:1,background:"#E5E7EB",margin:"4px 0"}})]},b.component_key))}),o.jsx("div",{style:{padding:"12px 16px 0 16px",display:"flex",justifyContent:"flex-end"},children:o.jsx("button",{type:"button",onClick:v,disabled:n,style:{padding:"6px 16px",borderRadius:4,border:"none",background:"var(--color-primary, #008FBB)",color:"#fff",fontSize:"14px",fontWeight:500,cursor:n?"not-allowed":"pointer",transition:"opacity 0.2s",opacity:n?.7:1},children:n?r:i})})]})]})},N6e="_container_zhny9_1",S6e="_card_zhny9_15",j6e="_footer_zhny9_33",$6e="_noPaddingMobile_zhny9_51",ui={container:N6e,card:S6e,footer:j6e,noPaddingMobile:$6e},q6e="_board_95t8m_1",A6e="_clickable_95t8m_21",z6e="_sideBar_95t8m_26",V6e="_boardContent_95t8m_32",P6e="_orange_95t8m_40",T6e="_red_95t8m_44",H6e="_green_95t8m_48",D6e="_grey_95t8m_52",B6e="_lightGrey_95t8m_56",R6e="_big_95t8m_61",F6e="_medium_95t8m_66",E6e="_headerRow_95t8m_70",O6e="_iconWrapper_95t8m_75",U6e="_headerTitle_95t8m_80",W6e="_valueArea_95t8m_89",G6e="_titleWhite_95t8m_99",K6e="_titleBlack_95t8m_103",Z6e="_valueWhite_95t8m_108",X6e="_valueBlack_95t8m_112",Y6e="_valueBlue_95t8m_116",J6e="_bars_95t8m_121",Q6e="_bar_95t8m_121",e8e="_barDark_95t8m_135",t8e="_barDim_95t8m_139",a8e="_predictionSection_95t8m_143",n8e="_predictionHeader_95t8m_155",o8e="_predictionBody_95t8m_162",c8e="_hasPrediction_95t8m_170",Te={board:q6e,clickable:A6e,sideBar:z6e,boardContent:V6e,orange:P6e,red:T6e,green:H6e,grey:D6e,lightGrey:B6e,big:R6e,medium:F6e,headerRow:E6e,iconWrapper:O6e,headerTitle:U6e,valueArea:W6e,titleWhite:G6e,titleBlack:K6e,valueWhite:Z6e,valueBlack:X6e,valueBlue:Y6e,bars:J6e,bar:Q6e,barDark:e8e,barDim:t8e,predictionSection:a8e,predictionHeader:n8e,predictionBody:o8e,hasPrediction:c8e},i8e=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${Te.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${Te.bar} ${r<c?"":e?Te.barDark:Te.barDim}`},r))})},Mt=({a11yConfig:e,iconName:t,label:n,value:c,backgroundColor:i="green",bars:r,lightBars:s=5,size:d="big",valueScale:l,width:h,height:u,className:p="",style:y,titleColor:f="white",valueColor:g="white",titleFontSize:m,titleFontWeight:x,valueFontSize:M,valueFontWeight:v,barColor:I,justifyContent:b="space-between",alignItems:w="flex-start",cardGap:C="",onClick:_,iconColor:L,titleKey:j,predictionValue:N,predictionLabel:S})=>{const z=r!=="none",A=r==="endingDark",{padding:H,...P}=y||{},V=h===void 0&&u===void 0&&i===void 0&&Object.keys(P).length===0?void 0:{...h!==void 0?{width:h}:{},...u!==void 0?{height:u}:{},...i!==void 0?{backgroundColor:i}:{},...P},$=`${Te.board} ${Te[d]} ${N!==void 0?Te.hasPrediction:""} ${p}`;return o.jsxs("div",{className:$,onClick:_,style:l!==void 0?{...V,"--ds-value-scale":l}:V,children:[I&&o.jsx("div",{className:Te.sideBar,style:{backgroundColor:I}}),o.jsxs("div",{className:Te.boardContent,style:{padding:H,gap:C},children:[o.jsxs("div",{className:Te.headerRow,style:{justifyContent:b,alignItems:w},children:[t&&o.jsx("div",{className:Te.iconWrapper,style:{color:L},children:t}),o.jsx("div",{className:`${Te.headerTitle} header-title-data-board`,children:o.jsx("span",{title:Y(e,j),"aria-label":e?.description,style:{color:f,...m?{fontSize:m}:{},...x?{fontWeight:x}:{}},children:n})}),z?o.jsx(i8e,{endingDark:A,lightCount:s}):null]}),o.jsx("div",{className:Te.valueArea,style:{color:g,...M?{fontSize:M}:{},...v?{fontWeight:v}:{}},children:c})]}),N!==void 0&&o.jsxs("div",{className:Te.predictionSection,children:[o.jsx("div",{className:Te.predictionHeader,children:S??"PRED."}),o.jsx("div",{className:Te.predictionBody,children:N})]})]})},r8e="_wrapper_1ydle_10",s8e="_hosp_1ydle_19",d8e="_headerRow_1ydle_54",l8e="_iconWrapper_1ydle_61",h8e="_headerTitle_1ydle_67",u8e="_hospValue_1ydle_76",p8e="_side_1ydle_88",y8e="_mini_1ydle_100",k8e="_miniLabel_1ydle_131",m8e="_miniValue_1ydle_140",f8e="_miniBars_1ydle_150",g8e="_bars_1ydle_155",v8e="_bar_1ydle_155",x8e="_barDark_1ydle_169",M8e="_barDim_1ydle_173",De={wrapper:r8e,hosp:s8e,headerRow:d8e,iconWrapper:l8e,headerTitle:h8e,hospValue:u8e,side:p8e,mini:y8e,miniLabel:k8e,miniValue:m8e,miniBars:f8e,bars:g8e,bar:v8e,barDark:x8e,barDim:M8e},_8e=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${De.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${De.bar} ${r<c?"":e?De.barDark:De.barDim}`},r))})},AA=({left:e,right:t,className:n="",style:c,miniTilesCount:i=3})=>{const r=e.bars??"endingDark",s=r!=="none",d=r==="endingDark",l={...c,"--mini-tiles-count":i};return o.jsxs("div",{className:`${De.wrapper} ${n} data-four-boards`,style:l,children:[o.jsxs("div",{className:`${De.hosp} ${e.className||""}`,onClick:e.onClick,style:{...e.width?{width:e.width}:{},...e.height?{height:e.height}:{},...e.backgroundColor?{backgroundColor:e.backgroundColor}:{},...e.style||{}},title:Y(e.a11yConfig,e.titleKey),children:[o.jsxs("div",{className:De.headerRow,children:[o.jsxs("div",{className:`${De.iconWrapper} icon-wrapper-data-four-boards`,children:[e.iconName&&o.jsx("span",{style:{color:e.iconColor},children:e.iconName}),o.jsx("span",{className:De.headerTitle,style:{color:e.titleColor||"white",...e.titleFontSize?{fontSize:e.titleFontSize}:{},...e.titleFontWeight?{fontWeight:e.titleFontWeight}:{}},title:Y(e.a11yConfig,e.titleKey),children:e.label})]}),s?o.jsx(_8e,{endingDark:d,lightCount:e.lightBars??5}):null]}),o.jsx("div",{className:De.hospValue,style:{color:e.valueColor||"white",...e.valueScale!==void 0?{"--ds-value-scale":e.valueScale}:{},...e.valueFontSize?{fontSize:e.valueFontSize}:{},...e.valueFontWeight?{fontWeight:e.valueFontWeight}:{}},children:e.value})]}),o.jsx("div",{className:De.side,children:t.map((h,u)=>o.jsxs("div",{className:`${De.mini} ${h.className||""} icon-wrapper-data-four-boards`,onClick:h.onClick,style:{...h.width?{width:h.width}:{},...h.height?{height:h.height}:{},...h.backgroundColor?{backgroundColor:h.backgroundColor}:{},...h.style||{}},title:Y(h.a11yConfig,h.titleKey),children:[o.jsxs("span",{className:De.miniLabel,style:{color:h.titleColor||"white",textAlign:"right",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...h.titleFontSize?{fontSize:h.titleFontSize}:{},...h.titleFontWeight?{fontWeight:h.titleFontWeight}:{}},title:Y(h.a11yConfig,h.titleKey),children:[h.iconName&&o.jsx("span",{style:{color:h.iconColor},children:h.iconName}),h.label]}),o.jsx("span",{className:`${De.miniValue} mini-value-data-four-boards`,style:{color:h.valueColor||"white",textAlign:"right",...h.valueScale!==void 0?{"--ds-value-scale":h.valueScale}:{},...h.valueFontSize?{fontSize:h.valueFontSize}:{},...h.valueFontWeight?{fontWeight:h.valueFontWeight}:{}},children:h.value}),o.jsx("div",{className:De.miniBars})]},h.id??`${h.label}-${u}`))})]})},L8e=({items:e,footerLabel:t,width:n,height:c,size:i=320,style:r,className:s="",backgroundColor:d,titleFontSize:l,titleFontWeight:h,valueFontSize:u,valueFontWeight:p,noPaddingLeftRight:y=!1,onItemClick:f})=>{const g={width:n??i,height:c,backgroundColor:d??"var(--ds-navy)",...r},m=e[0],x=e[1],M=e.slice(2,5);return o.jsxs("div",{style:g,className:`${ui.container} ${y?ui.noPaddingMobile:""} ${s}`,children:[o.jsxs("div",{className:ui.card,children:[m?o.jsx(Mt,{a11yConfig:m.a11yConfig,label:m.label,value:m.value,backgroundColor:m.backgroundColor,bars:m.bars,lightBars:m.lightBars,size:m.size??"big",valueScale:m.valueScale,width:m.width,height:m.height,titleColor:"white",valueColor:"white",titleFontSize:m.titleFontSize??l,titleFontWeight:m.titleFontWeight??h,valueFontSize:m.valueFontSize??u,valueFontWeight:m.valueFontWeight??p,titleKey:m.titleKey,onClick:v=>f?.(0,v)}):null,x&&M.length>0?o.jsx(AA,{left:{a11yConfig:x.a11yConfig,id:x.id,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,valueScale:x.valueScale,width:x.width,height:x.height,titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,titleKey:x.titleKey,onClick:v=>f?.(1,v)},right:M.map((v,I)=>({a11yConfig:v.a11yConfig,id:v.id,label:v.label,value:v.value,backgroundColor:v.backgroundColor,bars:v.bars,lightBars:v.lightBars,valueScale:v.valueScale,width:v.width,height:v.height,titleFontSize:v.titleFontSize??l,titleFontWeight:v.titleFontWeight??h,valueFontSize:v.valueFontSize??u,valueFontWeight:v.valueFontWeight??p,titleKey:v.titleKey,onClick:b=>f?.(2+I,b)}))}):x&&M.length===0?o.jsx(Mt,{a11yConfig:x.a11yConfig,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,size:x.size??"big",valueScale:x.valueScale,width:x.width,height:x.height,titleColor:"white",valueColor:"white",titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,onClick:v=>f?.(1,v)}):null]}),t&&o.jsx("div",{className:ui.footer,children:t})]})},I8e=({x:e,y:t,width:n,payload:c,fontSize:i,fontWeight:r,stroke:s})=>o.jsx("g",{transform:`translate(${e},${t})`,children:o.jsx("foreignObject",{x:-n,y:-35,width:n,height:70,style:{overflow:"visible"},children:o.jsx("div",{style:{fontSize:i,fontWeight:r,color:s,lineHeight:"1.2",display:"flex",justifyContent:"flex-end",textAlign:"right",alignItems:"center",height:"100%",width:"100%",paddingRight:"8px",boxSizing:"border-box"},children:o.jsx("span",{style:{overflowWrap:"break-word",whiteSpace:"normal",display:"block",maxWidth:"100%"},children:c.value})})})}),b8e=({data:e,height:t=360,barColor:n="#0284C7",tooltipEnabled:c=!0,backgroundColor:i="transparent",legendTextColor:r="var(--color-text)",barHeight:s=40,yAxisWidth:d=120,fontSize:l="12px",fontWeight:h="400",domain:u,xAxisLabel:p,margin:y={top:20,right:60,bottom:40,left:0},valueFormatter:f,tickFormatter:g,labelDataKey:m="percentage",isAnimationActive:x=!0})=>{const M=(y.top??20)+(y.bottom??40)+e.length*(s+20),v=Math.max(M,t),I=k.useMemo(()=>{if(!e||e.length===0)return d;const L=(parseFloat(l)||12)*.7,N=Math.max(...e.map(S=>(S.label||"").length))*L+16;return Math.min(Math.max(N,40),d)},[e,l,d]),b=_=>g?g(_):_?.toString()||"",w=_=>f&&m==="value"?f(_):_==null||_===""?"":m==="percentage"?`${_}%`:_.toString(),C=(_,L,j)=>{if(typeof _!="number")return _;const N=f?f(_):_.toString(),S=j?.payload?.percentage;return typeof S=="number"&&Number.isFinite(S)&&m==="percentage"?`${N} (${S.toFixed(1)}%)`:N};return o.jsx("div",{style:{backgroundColor:i,width:"100%"},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:v,children:o.jsxs(a.BarChart,{data:e,layout:"vertical",margin:y,children:[o.jsx(a.CartesianGrid,{opacity:.4,stroke:"#E5E7EB",vertical:!1,horizontal:!0}),o.jsx(a.XAxis,{type:"number",domain:u||[0,"auto"],axisLine:!1,tickLine:!1,fontSize:l,fontWeight:h,stroke:r,tickFormatter:b,label:p?{value:p,position:"insideBottom",offset:-10,style:{textAnchor:"middle",fill:r,fontSize:12,fontWeight:"500"}}:void 0}),o.jsx(a.YAxis,{type:"category",dataKey:"label",stroke:r,axisLine:!1,tickLine:!1,width:I,interval:0,fontSize:l,fontWeight:h,tick:o.jsx(I8e,{fontSize:l,fontWeight:h,stroke:r})}),c&&o.jsx(a.Tooltip,{formatter:C,labelStyle:{color:"var(--color-text)"}}),o.jsx(a.Bar,{dataKey:"value",fill:n,radius:0,barSize:s,isAnimationActive:x,children:o.jsx(a.LabelList,{dataKey:m,position:"right",offset:10,formatter:w,fill:r,fontSize:l,fontWeight:h})})]})})})},w8e="_menu_9anig_1",C8e="_menuRow_9anig_18",N8e="_separator_9anig_34",S8e="_rowLabel_9anig_40",j8e="_rowLeadingIcon_9anig_48",$8e="_rowIcon_9anig_55",Gc={menu:w8e,menuRow:C8e,separator:N8e,rowLabel:S8e,rowLeadingIcon:j8e,rowIcon:$8e},q8e=k.forwardRef(function({isVisible:t,onClose:n,items:c,style:i,position:r,bg:s},d){const l=k.useRef(null),h=d||l;if(k.useEffect(()=>{if(!t)return;const y=f=>{h.current&&!h.current.contains(f.target)&&n?.()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,n]),!t)return null;const p={...{top:r?.top,left:r?.left,right:r?.right,bottom:r?.bottom},...s&&{backgroundColor:s},...i};return o.jsx("div",{ref:h,role:"menu",className:Gc.menu,style:p,children:c.map(y=>{if(y.type==="separator")return o.jsx("hr",{className:Gc.separator},y.id);const f=y,g=f.color?{color:f.color}:{},m=f.closeOnClick!==!1;return o.jsxs("button",{role:"menuitem",className:Gc.menuRow,style:g,onClick:()=>{f.onClick?.(),m&&n?.()},children:[o.jsxs("span",{className:Gc.rowLabel,children:[f.leadingIcon&&o.jsx("span",{className:Gc.rowLeadingIcon,children:f.leadingIcon}),o.jsx("span",{children:f.label})]}),f.icon&&o.jsx("span",{className:Gc.rowIcon,children:f.icon})]},f.id)})})}),zA=({user:e,logoutHref:t,logoutTarget:n="_self",onLogout:c,profileHref:i,profileLinkTarget:r="_self",backgroundColor:s="transparent",textColor:d="inherit",roleColor:l="#888",avatarSize:h="32px",padding:u="10px",gap:p="12px",emailFontSize:y="14px",emailFontWeight:f=600,roleFontSize:g="12px",roleFontWeight:m,avatarColor:x="#5b8fb9",backgroundColorAvatar:M="#f1f4f5",dropdownMenuItems:v,dropdownMenuStyle:I,dropdownMenuOffset:b,statusDotColor:w,a11yConfig:C,style:_,className:L=""})=>{const{user:j}=ft(),N=e||j,{currentTheme:S,switchTheme:z}=CL(),A=k.useRef(null),H=k.useRef(null),[P,V]=k.useState(!1),[$,q]=k.useState({}),R=k.useMemo(()=>{const ae=[],ne=({variant:pe})=>pe==="sun"?o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("circle",{cx:"12",cy:"12",r:"4"})}):o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});i&&(ae.push({id:"profile",type:"action",label:"Mon profil",onClick:()=>{typeof window>"u"||(r==="_blank"?window.open(i,"_blank","noopener,noreferrer"):window.location.assign(i))}}),ae.push({id:"sep-profile",type:"separator"}));const le=S==="dark";return ae.push({id:"theme",type:"action",label:le?"Mode clair":"Mode sombre",icon:o.jsx(ne,{variant:le?"sun":"moon"}),onClick:()=>{z(le?"light":"dark")}}),(t||c)&&(ae.push({id:"sep-theme",type:"separator"}),ae.push({id:"logout",type:"action",label:"Se déconnecter",danger:!0,onClick:()=>{if(t){if(typeof window>"u")return;n==="_blank"?window.open(t,"_blank","noopener,noreferrer"):window.location.assign(t);return}c?.()}})),ae},[S,t,n,c,i,r,z]),T=v??R,O=()=>{if(!A.current){V(ae=>!ae);return}if(!P){const ae=A.current.getBoundingClientRect(),ne=window.innerWidth,le=window.innerHeight,pe=200,me=200,W=4,X=b?.x??0,se=b?.y??0,Re=ne-ae.right>=pe+W;q(Re?{top:ae.bottom-me+se,left:ae.right+W+X}:{bottom:le-ae.top+se,left:ae.left+X})}V(ae=>!ae)};if(k.useEffect(()=>{if(!P||!A.current)return;const ae=()=>{const ne=A.current.getBoundingClientRect(),le=window.innerWidth,pe=window.innerHeight,me=200,W=200,X=4,se=b?.x??0,$e=b?.y??0,ve=le-ne.right>=me+X;q(ve?{top:ne.bottom-W+$e,left:ne.right+X+se}:{bottom:pe-ne.top+$e,left:ne.left+se})};return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),()=>{window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae)}},[P,b]),k.useEffect(()=>{if(!P||!A.current||!H.current)return;const ae=()=>{const le=A.current.getBoundingClientRect(),pe=H.current.getBoundingClientRect(),me=b?.x??0,W=b?.y??0;q(X=>X.left!==void 0&&X.top!==void 0&&X.left>=le.right-1?{top:le.bottom-pe.height+W,left:X.left+me}:X)},ne=requestAnimationFrame(()=>{setTimeout(ae,0)});return()=>cancelAnimationFrame(ne)},[P,b]),!N)return null;const J=N,E=parseInt(h,10)||40,U=`${E*.375}px`,ie=`${E*1.375}px`,ce=`${E*.2}px`,Me=`${E*.6}px`,re=()=>{const ae=parseInt(h,10)||40,ne=Math.max(8,ae*.34375),le=Math.max(2,ae*.05);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{position:"relative",flexShrink:0,userSelect:"none"},children:[J.image?o.jsx("img",{src:J.image,alt:`${J.prenom} ${J.nom}`,style:{width:h,height:h,borderRadius:"50%",objectFit:"cover",userSelect:"none"}}):o.jsxs("div",{style:{width:h,height:h,position:"relative",borderRadius:"50%",backgroundColor:M,overflow:"hidden",userSelect:"none"},children:[o.jsx("div",{style:{width:U,height:U,borderRadius:"50%",backgroundColor:x,position:"absolute",top:ce,left:"50%",transform:"translateX(-50%)",zIndex:2,userSelect:"none"}}),o.jsx("div",{style:{width:ie,height:ie,borderRadius:"50%",backgroundColor:x,position:"absolute",top:Me,left:"50%",transform:"translateX(-50%)",zIndex:1,userSelect:"none"}})]}),w&&o.jsx("div",{style:{position:"absolute",bottom:le,right:le,width:`${ne}px`,height:`${ne}px`,borderRadius:"50%",backgroundColor:w,border:"2px solid white",zIndex:10}})]}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",minWidth:0,flex:1},children:[o.jsx("span",{style:{fontWeight:f,fontSize:y,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.email,children:J.email}),o.jsx("span",{style:{color:l,fontSize:g,fontWeight:m,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.role,children:J.role})]})]})};return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:A,className:`user-info ${L}`,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,backgroundColor:s,gap:p,color:d,width:"100%",boxSizing:"border-box",cursor:"pointer",userSelect:"none",..._},onClick:O,title:Y(C,J.role),role:"button",tabIndex:0,children:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:p,flex:1,minWidth:0},children:o.jsx(re,{})})}),o.jsx(q8e,{ref:H,isVisible:P,onClose:()=>V(!1),items:T,style:I,position:$})]})},A8e="_navItem_16uqf_1",z8e="_label_16uqf_14",V8e="_icon_16uqf_26",f1={navItem:A8e,label:z8e,icon:V8e},lC=({label:e,labelKey:t,onClick:n,href:c,isActive:i,icon:r,style:s,className:d="",highlightColor:l="#00aec7",color:h="#333",activeColor:u="#00aec7",highlightBackgroundColor:p="rgba(0, 0, 0, 0.05)",fontSize:y="15px",fontWeight:f="500",sidebarCollapsed:g=!1,padding:m="10px 16px",borderWidth:x="4px",iconGap:M="12px",disabled:v=!1,disabledColor:I,a11yConfig:b})=>{const w=()=>{v||n?.()},C=o.jsxs(o.Fragment,{children:[r&&o.jsx("span",{className:f1.icon,style:{marginRight:g?0:M},children:r}),!g&&o.jsx("span",{className:f1.label,children:e})]}),_=()=>{if(!i)return"transparent";const j=N=>{const S=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return S?{r:parseInt(S[1],16),g:parseInt(S[2],16),b:parseInt(S[3],16)}:null};if(l.startsWith("#")){const N=j(l);if(N)return`rgba(${N.r}, ${N.g}, ${N.b}, 0.08)`}else if(l.startsWith("rgb")){const N=l.match(/\d+/g);if(N&&N.length>=3)return`rgba(${N[0]}, ${N[1]}, ${N[2]}, 0.08)`}return p},L={onClick:w,className:`${f1.navItem} ${i?f1.active:""} ${d} ${v?f1.disabled:""}`,style:{padding:m,color:i?u:v?I||"#999":h,borderLeft:i?`${x} solid ${l}`:`${x} solid transparent`,backgroundColor:_(),fontSize:y,fontWeight:f,cursor:v?"not-allowed":"pointer",textDecoration:"none",...s},"aria-disabled":v};return c&&!n&&!v?o.jsx("a",{href:c,...L,title:Y(b,t),children:C}):o.jsx("div",{...L,role:n?"button":void 0,tabIndex:n&&!v?0:void 0,title:Y(b,t),children:C})},P8e="_navbar_y5tex_1",T8e="_topSection_y5tex_9",H8e="_logoContainer_y5tex_14",D8e="_collapseToggle_y5tex_20",B8e="_collapsedRail_y5tex_37",R8e="_collapsedToggle_y5tex_44",F8e="_sectionsContainer_y5tex_67",E8e="_sectionTitle_y5tex_73",O8e="_sectionItems_y5tex_78",U8e="_bottomSection_y5tex_83",W8e="_versionContainer_y5tex_102",Qe={navbar:P8e,topSection:T8e,logoContainer:H8e,collapseToggle:D8e,collapsedRail:B8e,collapsedToggle:R8e,sectionsContainer:F8e,sectionTitle:E8e,sectionItems:O8e,bottomSection:U8e,versionContainer:W8e},G8e=({logoProps:e,logoSpacing:t,navItems:n,padding:c="24px 16px",sectionSpacing:i="32px",itemSpacing:r="4px",backgroundColor:s="#fff",highlightColor:d="#00aec7",highlightBackgroundColor:l="rgba(0, 0, 0, 0.05)",version:h,navSectionStyle:u,navLinkStyle:p,navItemPadding:y="10px 16px",navItemBorderWidth:f="4px",navItemIconGap:g="12px",navItemFontSize:m="15px",navItemFontWeight:x="500",navItemColor:M,sectionTitlePadding:v="16px",sectionTitleFontSize:I="11px",sectionTitleColor:b="#999",sectionTitleWeight:w="500",versionFontSize:C="12px",versionFontWeight:_="400",versionColor:L="#999",userInfoProps:j,style:N,className:S="",width:z="280px",showLogo:A=!0,versionA11yConfig:H,displayNone:P=!1,showCollapseToggle:V=!1,collapsed:$=!1,onCollapseToggle:q,collapseToggleLabel:R="Toggle sidebar",collapseToggleIconPath:T="/icon/dock_to_left.svg"})=>{const O=ft(),J=O.activeNav,E=O.setActiveNav,U=O.user,ie=j.user||U;return V&&$?o.jsx("div",{className:`${Qe.collapsedRail} ${S}`,style:{display:P?"none":"flex"},children:o.jsx("button",{type:"button",className:Qe.collapsedToggle,onClick:q,"aria-label":R,children:o.jsx(Mw,{path:T,width:18,height:18})})}):o.jsxs("div",{className:`${Qe.navbar} ${S}`,style:{width:z,backgroundColor:s,padding:c,display:P?"none":"flex",...N},children:[o.jsxs("div",{className:Qe.topSection,style:{gap:t},children:[A&&o.jsxs("div",{className:Qe.logoContainer,children:[o.jsx(wL,{...e}),V&&o.jsx("button",{type:"button",className:Qe.collapseToggle,onClick:q,"aria-label":R,children:o.jsx(Mw,{path:T,width:20,height:20})})]}),o.jsx("div",{className:Qe.sectionsContainer,style:{gap:i},children:n.map((ce,Me)=>o.jsxs("div",{className:Qe.section,children:[ce.title&&o.jsx("div",{className:Qe.sectionTitle,title:Y(ce.a11yConfig,ce.titleKey),style:{fontSize:I,color:b,padding:v,fontWeight:w,border:"4px solid transparent",...u},children:ce.title}),o.jsx("div",{className:Qe.sectionItems,style:{gap:r},children:ce.items.map(re=>o.jsx(lC,{...re,isActive:re.isActive===null?re.isActive:J===re.id,onClick:()=>{re.onClick&&re.onClick(),re.isActive==null&&E(re.id)},highlightColor:d,activeColor:d,highlightBackgroundColor:l,padding:y,borderWidth:f,iconGap:g,fontSize:m,fontWeight:x,color:M,style:p},re.id))})]},Me))})]}),o.jsxs("div",{className:Qe.bottomSection,style:{gap:t},children:[o.jsx(zA,{...j,user:ie}),h&&o.jsx("div",{className:Qe.versionContainer,title:Y(H,h),style:{fontSize:C,fontWeight:_,color:L},children:h})]})]})},K8e="_container_4qege_1",Z8e="_titleContainer_4qege_10",X8e="_title_4qege_10",Y8e="_inlineToggleContainer_4qege_24",J8e="_rightContentContainer_4qege_30",g1={container:K8e,titleContainer:Z8e,title:X8e,inlineToggleContainer:Y8e,rightContentContainer:J8e},Q8e=({className:e="",style:t,fontSize:n="20px",fontWeight:c="bold",color:i="#000",padding:r="0",margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,navItems:y,allNavItems:f,formatTitle:g=M=>M,rightContent:m,inlineToggle:x})=>{const{activeNav:M}=ft(),v=y.find(b=>b.id===M)||f?.find(b=>b.id===M),I=v?g(v.label):M||"";return I?o.jsxs("div",{className:`${g1.container} ${e}`,style:{padding:r,margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,...t},children:[o.jsxs("div",{className:g1.titleContainer,children:[o.jsx("div",{className:g1.title,style:{fontSize:n,fontWeight:c,color:i},children:I}),x&&o.jsx("div",{className:g1.inlineToggleContainer,children:x})]}),m&&o.jsx("div",{className:g1.rightContentContainer,children:m})]}):null},ege="_navItem_1hg26_1",tge="_navItemIcon_1hg26_21",age="_navItemLabel_1hg26_29",nge="_navItemCount_1hg26_36",oge="_navItemIndicator_1hg26_49",v1={navItem:ege,navItemIcon:tge,navItemLabel:age,navItemCount:nge,navItemIndicator:oge},VA=({a11yConfig:e,label:t,isActive:n,onClick:c,href:i,labelKey:r,icon:s,count:d,activeColor:l="#00aec7",inactiveColor:h="#666",activeBackgroundColor:u="transparent",countBackgroundColor:p,countColor:y="#fff",countBorderRadius:f="10px",countPadding:g="2px 6px",countFontSize:m="12px",countFontWeight:x="500",indicatorColor:M="#00aec7",indicatorHeight:v="3px",padding:I="8px 4px",fontSize:b="14px",fontWeight:w="500",gap:C="8px",style:_,className:L="",disabled:j=!1,onNavigate:N})=>{const S=()=>{j||(c?.(),i&&(N?N(i):window.location.href=i))};return o.jsxs("div",{className:`${v1.navItem} ${L}`,onClick:S,title:Y(e,r),style:{gap:C,padding:I,color:n?l:h,backgroundColor:n?u:"transparent",fontSize:b,fontWeight:w,..._},children:[s&&o.jsx("span",{className:v1.navItemIcon,children:s}),o.jsx("span",{className:v1.navItemLabel,children:t}),d!==void 0&&o.jsx("span",{className:v1.navItemCount,style:{backgroundColor:p,color:y,borderRadius:f,padding:g,fontSize:m,fontWeight:x},children:d}),n&&!j&&o.jsx("div",{className:v1.navItemIndicator,style:{height:v,backgroundColor:M}})]})},cge="_container_13hsa_1",ige="_groupHeader_13hsa_8",rge="_groupHeaderLeft_13hsa_18",sge="_groupIcon_13hsa_23",dge="_dropdown_13hsa_29",lge="_item_13hsa_42",hge="_itemIcon_13hsa_65",uge="_chevron_13hsa_72",pge="_chevronOpen_13hsa_79",gt={container:cge,groupHeader:ige,groupHeaderLeft:rge,groupIcon:sge,dropdown:dge,item:lge,itemIcon:hge,chevron:uge,chevronOpen:pge},yge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-344 240-584l43-43 197 197 197-197 43 43z"})),F1=k.memo(yge),PA=({groups:e,activeItemId:t,onItemClick:n,style:c,className:i,bgColor:r="transparent",color:s="var(--color-text)",headerBgColor:d="var(--color-indicator)",headerColor:l="var(--color-text)",headerBorderBottomColor:h="var(--color-border)",dropdownBgColor:u="var(--color-background)",itemBgColor:p="transparent",itemHoverBgColor:y="rgba(0,0,0,0.05)",itemColor:f="var(--color-text)",itemActiveColor:g="var(--color-primary)",itemActiveBorderColor:m="var(--color-primary)",itemDividerColor:x="var(--color-border)",iconColor:M="#555555",activeIconColor:v="var(--color-primary)",headerIconColor:I="var(--color-text)",chevronColor:b="var(--color-text)",iconSize:w=22,headerPadding:C="14px 20px",itemPadding:_="14px 20px",iconGap:L=14,borderRadius:j=0})=>{const[N,S]=k.useState(""),z=k.useRef(null);k.useEffect(()=>{const H=P=>{z.current&&!z.current.contains(P.target)&&S("")};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);const A={backgroundColor:r,color:s,borderRadius:j,...c};return o.jsx("nav",{ref:z,className:[gt.container,i].filter(Boolean).join(" "),style:A,children:e.map(H=>{const P=N===H.id,V={backgroundColor:d,color:l,padding:C,borderBottom:`1px solid ${h}`,gap:L},$={backgroundColor:u};return o.jsxs("div",{children:[o.jsxs("div",{className:gt.groupHeader,style:V,onClick:()=>S(P?"":H.id),role:"button","aria-expanded":P,children:[o.jsxs("div",{className:gt.groupHeaderLeft,style:{gap:L},children:[H.icon&&o.jsx("span",{className:gt.groupIcon,style:{color:I,width:w,height:w},children:H.icon}),o.jsx("span",{children:H.label})]}),o.jsx("span",{className:[gt.chevron,P?gt.chevronOpen:""].join(" "),style:{color:b},children:o.jsx(F1,{width:18,height:18})})]}),P&&o.jsx("div",{className:gt.dropdown,style:$,children:H.items.map(q=>{const R=q.id===t,T={padding:_,gap:L,color:R?g:f,backgroundColor:p,"--item-border-width":R?"4px":"1px","--item-border-color":R?m:x};return o.jsxs("div",{className:gt.item,style:T,onClick:()=>{n?.(H.id,q.id),S("")},role:"menuitem",onMouseEnter:O=>{R||(O.currentTarget.style.backgroundColor=y)},children:[q.icon&&o.jsx("span",{className:gt.itemIcon,style:{color:R?v:M,width:w,height:w},children:q.icon}),o.jsx("span",{children:q.label})]},q.id)})})]},H.id)})})},kge="_subheaderContent_1glo8_1",mge="_navContainer_1glo8_11",fge="_rightContent_1glo8_45",Gb={subheaderContent:kge,navContainer:mge,rightContent:fge},gge=({subNavItems:e,backgroundColor:t="transparent",padding:n="0",margin:c,width:i,height:r="auto",border:s,borderBottom:d="none",itemGap:l="24px",actionsGap:h="16px",itemPadding:u="12px 0",itemFontSize:p="14px",itemFontWeight:y="500",activeItemColor:f="#00aec7",inactiveItemColor:g="#5c6975",indicatorHeight:m="3px",showDraggable:x=!1,showLegend:M=!1,showData:v=!1,className:I="",style:b,countBackgroundColor:w,countColor:C,countBorderRadius:_,countPadding:L,countFontSize:j,countFontWeight:N,navContainerClassName:S,navContainerStyle:z,rightContentClassName:A,rightContentStyle:H,rightActions:P,activeSwitcherColor:V,inactiveSwitcherColor:$,isMobile:q=!1,onNavigate:R})=>{const{activeSubNav:T,setActiveSubNav:O,navCounts:J,activeNav:E}=ft();if(q){const U=e.find(ce=>ce.id===T)||e[0],ie=[{id:"current-group",label:U?.label||E?.toUpperCase()||"MENU",icon:U?.icon,items:e.map(ce=>({id:ce.id,label:ce.label,icon:ce.icon}))}];return o.jsx("div",{className:I,style:b,children:o.jsx(PA,{groups:ie,activeItemId:T,onItemClick:(ce,Me)=>{const re=e.find(ae=>ae.id===Me);re&&(re.onClick&&re.onClick(),re.href&&(R?R(re.href):re.onNavigate?re.onNavigate(re.href):window.location.href=re.href),O(Me))},headerBgColor:t})})}return o.jsxs("div",{className:`${Gb.subheaderContent} ${I}`,style:{backgroundColor:t,padding:n,margin:c,width:i,height:r,border:s,borderBottom:d,...b},children:[o.jsx("div",{className:`${Gb.navContainer} ${S||""}`,style:{gap:l,...z},children:e.map(U=>{const ie=U.count!==void 0?U.count:J[U.id],ce=T===U.id||U.isActive;return o.jsx(VA,{...U,onNavigate:R||U.onNavigate,count:ie,isActive:ce,onClick:()=>{U.onClick&&U.onClick(),O(U.id)},activeColor:f,inactiveColor:g,countBackgroundColor:w,countColor:C,countBorderRadius:_,countPadding:L,countFontSize:j,countFontWeight:N,indicatorColor:f,indicatorHeight:m,padding:u,fontSize:p,fontWeight:y,gap:"8px",style:U.style},U.id)})}),o.jsxs("div",{className:`${Gb.rightContent} ${A||""}`,style:{gap:h,...H},children:[x&&o.jsx(kL,{size:20,colors:{bg:V,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),M&&o.jsx(mL,{size:20,colors:{bg:V,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),v&&o.jsx(fL,{size:20,colors:{bg:V,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),P]})]})},vge=({onSwitch:e,size:t="20px",lightIconColor:n="#666",darkIconColor:c="#fff",backgroundColor:i="transparent",padding:r="8px",borderRadius:s="50%",style:d,className:l=""})=>{const[h,u]=k.useState(!1),{currentTheme:p,switchTheme:y}=CL(),f=p!="dark",g=()=>{y(f?"dark":"light"),e?.()};return k.useEffect(()=>{u(!0)},[]),!h||!p?o.jsx(o.Fragment,{}):o.jsx("div",{className:`theme-switcher ${l}`,onClick:g,style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i,padding:r,borderRadius:s,transition:"all 0.3s ease",...d},children:f?o.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):o.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"5"}),o.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),o.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),o.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),o.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),o.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),o.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),o.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),o.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})})},xge=({initialSortBy:e=null,initialSortOrder:t="asc",onSortChange:n})=>{const[c,i]=k.useState({sortBy:e,sortOrder:t,filters:{}}),r=k.useCallback(s=>{let d="asc";c.sortBy===s&&(d=c.sortOrder==="asc"?"desc":"asc");const l={...c,sortBy:s,sortOrder:d};i(l),n(s,d)},[c,n]);return{tableState:c,handleSort:r}},Mge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487z"})),_ge=k.memo(Mge),Lge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487z"})),Ige=k.memo(Lge),bge=({columns:e,sortBy:t,sortOrder:n,onSort:c,removeLabelSpan:i=!1})=>o.jsx("thead",{children:o.jsx("tr",{children:e.map((r,s)=>{const d=t===r.key,l=!!r.sortable;return o.jsx("th",{className:`${r.className||""}${l?" sortable":""}`,style:{width:r.width,textAlign:r.align||"left"},onClick:()=>l&&c(String(r.key)),title:Y(r.a11yConfig,r.titleKey),children:o.jsxs("div",{className:`th-content ${r.align?`align-${r.align}`:""}`,children:[i?r.label:o.jsx("span",{children:r.label}),l&&o.jsx("span",{className:"sort-icon-container",style:{display:"inline-flex",alignItems:"center"},children:d&&n==="asc"?o.jsx(Ige,{width:16,height:16,style:{fill:"currentColor",transition:"all 0.2s ease"}}):o.jsx(_ge,{width:16,height:16,style:{fill:"currentColor",opacity:d?1:.5,transition:"all 0.2s ease"}})})]})},String(r.key)||s)})})}),wge=({data:e,columns:t,rowKey:n,onRowClick:c,isLoading:i,text:r,rowStyle:s,rowClassName:d,renderSeparator:l})=>!e.length&&!i?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:t.length,style:{textAlign:"center",padding:"32px"},children:o.jsx("span",{style:{color:"var(--table-text-muted)"},children:r?.noData||"Aucune donnée disponible"})})})}):o.jsx("tbody",{children:e.map((h,u)=>{const p=h[n],y=typeof p=="string"||typeof p=="number"?p:u,f=l?l(h):null;return o.jsx("tr",{onClick:()=>c&&c(h),style:{cursor:c?"pointer":"default",...s?s(h):{}},className:d?d(h,u):"",children:f?o.jsx("td",{colSpan:t.length,children:f}):t.map((g,m)=>o.jsx("td",{style:{width:g.width,textAlign:g.align||"left"},className:g.className,children:g.render?g.render(h):h[g.key]},`${String(g.key)}-${m}`))},y)})}),Cge=({state:e,onPaginationChange:t,onLoadMore:n,infiniteScroll:c,hasMore:i,text:r,isLoading:s,pageSizeOptions:d})=>{const{page:l,pageSize:h,total:u}=e,p=h===-1?u:h,y=Math.ceil(u/p)||1,f=Math.min(Math.max(1,l),y),g=u===0?0:(f-1)*p+1,m=Math.min(f*p,u),x=b=>{t({page:b})},M=k.useMemo(()=>{if(y<=6)return Array.from({length:y},(z,A)=>A+1);const C=Math.max(f-1,1),_=Math.min(f+1,y),L=C>2,j=_<y-2,N=1,S=y;if(!L&&j)return[...Array.from({length:5},(H,P)=>P+1),"...",y];if(L&&!j){const A=Array.from({length:5},(H,P)=>y-5+P+1);return[N,"...",...A]}if(L&&j){const z=Array.from({length:_-C+1},(A,H)=>C+H);return[N,"...",...z,"...",S]}return[]},[f,y]),v=!!(d&&d.length>0),I=!c&&h!==-1&&y>1&&o.jsxs("div",{className:"pagination-controls",children:[o.jsx("button",{className:"pagination-btn",onClick:()=>x(1),disabled:f===1,title:r?.first||"Premier",children:"<<"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f-1),disabled:f===1,title:r?.previous||"Précédent",children:"<"}),(M||[]).map((b,w)=>b==="..."?o.jsx("span",{style:{padding:"0 4px",color:"var(--table-text-muted)"},children:"..."},w):o.jsx("button",{className:`pagination-btn ${b===f?"active":""}`,onClick:()=>x(b),children:b},w)),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f+1),disabled:f===y,title:r?.next||"Suivant",children:">"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(y),disabled:f===y,title:r?.last||"Dernier",children:">>"})]});return o.jsxs("div",{className:"table-pagination",children:[o.jsx("div",{className:"pagination-summary",children:u>0?o.jsx("span",{children:r?.itemsRange?r.itemsRange(g,m,u):o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[g,"–",m]})," ",r?.of||"sur"," ",o.jsx("b",{children:u.toLocaleString()})," ",r?.items||"éléments"]})}):o.jsx("span",{children:r?.noResults||"0 résultats"})}),v?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-center",children:I}),o.jsxs("div",{className:"pagination-pagesize",children:[o.jsx("label",{htmlFor:"table-pagination-pagesize",children:r?.perPage||"Par page"}),o.jsx("select",{id:"table-pagination-pagesize",value:h,onChange:b=>t({pageSize:Number(b.target.value),page:1}),children:(d||[]).map(b=>o.jsx("option",{value:b,children:b},b))})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-spacer"}),I]}),!c&&n&&i&&o.jsx("div",{className:"pagination-load-more",children:o.jsx("button",{className:"btn-load-more",onClick:n,disabled:s,style:{padding:"8px 16px",backgroundColor:"white",border:"1px solid #ddd",borderRadius:"6px",cursor:s?"wait":"pointer",color:"#555",fontWeight:600},children:s?r?.loading||"Chargement...":r?.loadMore||"Charger plus"})})]})},hC=({data:e,columns:t,isLoading:n,pagination:c,onPaginationChange:i,onSortChange:r,rowKey:s,loaderSize:d=40,stickyHeader:l=!0,height:h,minHeight:u="200px",text:p,onLoadMore:y,infiniteScroll:f,hasMore:g,tableState:m,className:x,style:M,rowStyle:v,onRowClick:I,rowClassName:b,titleKey:w,removeLabelSpan:C=!1,a11yConfig:_,renderSeparator:L,pageSizeOptions:j})=>{const N=k.useMemo(()=>({...p}),[p]),S=k.useRef(null);k.useEffect(()=>{if(!f||!y||!g||n)return;const $=new IntersectionObserver(q=>{q[0].isIntersecting&&y()},{threshold:.1});return S.current&&$.observe(S.current),()=>$.disconnect()},[f,y,g,n]);const{tableState:z,handleSort:A}=xge({initialSortBy:null,onSortChange:r}),H=(m?.sortBy!==void 0?m.sortBy:z.sortBy)??void 0,P=m?.sortOrder!==void 0?m.sortOrder:z.sortOrder,V=$=>{const q=H,R=P;let T="asc";q===$&&(T=R==="asc"?"desc":"asc"),m?.sortBy!==void 0?r($,T):A($)};return o.jsxs("div",{className:`table-container ${x||""}`,style:M,title:Y(_,w),children:[o.jsxs("div",{className:"table-frame",style:{height:h??void 0,minHeight:u??void 0},children:[n&&o.jsx("div",{className:"table-loader-overlay",children:o.jsx("div",{className:"spinner",style:{width:d,height:d,borderTopColor:"var(--table-primary)"}})}),o.jsxs("div",{className:`table-wrapper ${l?"sticky-header":""}`,children:[o.jsxs("table",{className:"data-table",children:[o.jsx(bge,{columns:t,sortBy:H,sortOrder:P,onSort:V,removeLabelSpan:C}),o.jsx(wge,{data:e,columns:t.map($=>({...$,render:$.render?q=>$.render(q,{}):void 0})),rowKey:s,onRowClick:I,isLoading:n,text:N,rowStyle:typeof v=="function"?v:v?()=>v:void 0,rowClassName:b,renderSeparator:L})]}),f&&o.jsx("div",{ref:S,style:{height:20,margin:10}})]})]}),o.jsx(Cge,{state:c,onPaginationChange:i,text:N,onLoadMore:y,infiniteScroll:f,hasMore:g,isLoading:n,pageSizeOptions:j})]})};function TA(e,t,n,c,i,r,s){e.forEach(d=>{const l=d[n],h=d[t]??[],u=h.length>0,p=c.has(l);r.set(l,{level:i,hasChildren:u,isExpanded:p}),s.push(d),u&&p&&TA(h,t,n,c,i+1,r,s)})}const Nge=({data:e,columns:t,rowKey:n,childrenKey:c="children",treeColumnKey:i,defaultExpandedKeys:r,expandedKeys:s,onExpandedKeysChange:d,indent:l=20,showFooter:h=!0,pagination:u,onPaginationChange:p,colors:y,rowClassName:f,...g})=>{const[m,x]=k.useState(()=>new Set(r)),M=s!==void 0,v=k.useMemo(()=>M?new Set(s):m,[M,s,m]),I=N=>{const S=new Set(v);S.has(N)?S.delete(N):S.add(N),M?d?.(Array.from(S)):x(S)},b=k.useMemo(()=>{if(!u||u.pageSize===-1)return e;const N=(u.page-1)*u.pageSize;return e.slice(N,N+u.pageSize)},[e,u]),{rows:w,meta:C}=k.useMemo(()=>{const N=new Map,S=[];return TA(b,c,n,v,0,N,S),{rows:S,meta:N}},[b,c,n,v]),_=k.useMemo(()=>t.reduce((N,S)=>{const z=S.width?parseInt(S.width,10):NaN;return N+(Number.isFinite(z)?z:140)},0),[t]),L=k.useMemo(()=>t.map(N=>N.key!==i?N:{...N,render:S=>{const z=S[n],{level:A,hasChildren:H,isExpanded:P}=C.get(z)??{level:0,hasChildren:!1,isExpanded:!1},V=N.render?N.render(S):S[N.key];return o.jsxs("span",{className:"htl-cell",style:{paddingLeft:A*l},children:[H?o.jsx("button",{type:"button",className:"htl-toggle",onClick:$=>{$.stopPropagation(),I(z)},children:o.jsx(qA,{width:16,height:16,style:{fill:"currentColor",transform:P?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.15s ease"}})}):o.jsx("span",{className:"htl-toggle-spacer"}),V]})}}),[t,i,C,l,n]),j=(N,S)=>{const z=N[n],{level:A,hasChildren:H,isExpanded:P}=C.get(z)??{level:0,hasChildren:!1,isExpanded:!1},V=["htl-row"];return A===0?(V.push("htl-root"),H&&P&&V.push("htl-root-expanded")):H&&V.push("htl-group"),f&&V.push(f(N,S,A)),V.join(" ")};return o.jsx("div",{className:`htl-wrapper ${h?"":"htl-no-footer"}`,style:{"--htl-active-bg":y?.activeRowBackground,"--htl-nested-bg":y?.groupRowBackground,"--htl-toggle-color":y?.toggleIconColor,"--htl-root-color":y?.rootTextColor,"--htl-table-min-width":`${_}px`},children:o.jsx(hC,{...g,data:w,columns:L,rowKey:n,rowClassName:j,pagination:u??{page:1,pageSize:w.length||1,total:w.length},onPaginationChange:p??(()=>{})})})},Sge="_datePickerContainer_1lcer_3",jge="_label_1lcer_16",$ge="_displayNode_1lcer_23",qge="_datePickerButton_1lcer_30",Age="_datePickerButtonDisabled_1lcer_50",zge="_datePickerButtonOpen_1lcer_59",Vge="_datePickerLabel_1lcer_68",Pge="_placeholder_1lcer_79",Tge="_trailingIcons_1lcer_83",Hge="_chevron_1lcer_89",Dge="_clearButton_1lcer_97",Bge="_errorMessage_1lcer_114",Rge="_dropdown_1lcer_119",Fge="_calendarHeader_1lcer_143",Ege="_navButton_1lcer_152",Oge="_headerSelectors_1lcer_171",Uge="_monthSelector_1lcer_179",Wge="_yearSelector_1lcer_180",Gge="_selectorButton_1lcer_184",Kge="_selectorChevron_1lcer_201",Zge="_selectorChevronOpen_1lcer_206",Xge="_monthDropdown_1lcer_210",Yge="_yearDropdown_1lcer_211",Jge="_monthItem_1lcer_231",Qge="_yearItem_1lcer_232",e7e="_monthItemSelected_1lcer_254",t7e="_yearItemSelected_1lcer_255",a7e="_weekdays_1lcer_259",n7e="_weekday_1lcer_259",o7e="_calendarGrid_1lcer_275",c7e="_dateCell_1lcer_284",i7e="_dateCellSelected_1lcer_307",r7e="_dateCellOtherMonth_1lcer_311",s7e="_dateCellOtherMonthSelected_1lcer_315",d7e="_calendarFooter_1lcer_319",l7e="_cancelButton_1lcer_327",h7e="_applyButton_1lcer_328",u7e="_timePickerContainer_1lcer_372",p7e="_timeGroup_1lcer_381",y7e="_timeLabel_1lcer_388",k7e="_timeInputWrapper_1lcer_394",m7e="_timeInput_1lcer_394",f7e="_timeSeparator_1lcer_422",Z={datePickerContainer:Sge,label:jge,displayNode:$ge,datePickerButton:qge,datePickerButtonDisabled:Age,datePickerButtonOpen:zge,datePickerLabel:Vge,placeholder:Pge,trailingIcons:Tge,chevron:Hge,clearButton:Dge,errorMessage:Bge,dropdown:Rge,calendarHeader:Fge,navButton:Ege,headerSelectors:Oge,monthSelector:Uge,yearSelector:Wge,selectorButton:Gge,selectorChevron:Kge,selectorChevronOpen:Zge,monthDropdown:Xge,yearDropdown:Yge,monthItem:Jge,yearItem:Qge,monthItemSelected:e7e,yearItemSelected:t7e,weekdays:a7e,weekday:n7e,calendarGrid:o7e,dateCell:c7e,dateCellSelected:i7e,dateCellOtherMonth:r7e,dateCellOtherMonthSelected:s7e,calendarFooter:d7e,cancelButton:l7e,applyButton:h7e,timePickerContainer:u7e,timeGroup:p7e,timeLabel:y7e,timeInputWrapper:k7e,timeInput:m7e,timeSeparator:f7e},g7e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144zM480-80q-83 0-156-31.5T197-197t-85.5-127T80-480t31.5-156T197-763t127-85.5T480-880t156 31.5T763-763t85.5 127T880-480t-31.5 156T763-197t-127 85.5T480-80m0-80q134 0 227-93t93-227-93-227-227-93-227 93-93 227 93 227 227 93m0-320"})),v7e=k.memo(g7e),Dj=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],x7e=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],Lw=({value:e,onChange:t,label:n,placeholder:c="Sélectionner une date...",className:i="",fullWidth:r=!0,disabled:s=!1,error:d,buttonHeight:l="2.75rem",buttonPadding:h="0.75rem 1rem 0.75rem 1rem",dropdownMaxHeight:u="auto",fontSize:p="0.875rem",iconSize:y="1.5rem",labelMarginBottom:f="0.5rem",errorMarginTop:g="0.25rem",dropdownMarginTop:m="0.25rem",itemPadding:x="0.5rem 0.75rem",fontWeight:M="400",buttonBgColor:v,buttonBorderColor:I,buttonTextColor:b,dropdownBgColor:w="var(--color-card-background, #ffffff)",itemHoverColor:C,selectedItemBgColor:_,iconColor:L,errorColor:j,labelColor:N,placeholderColor:S,borderRadius:z="var(--radius-content)",borderWidth:A="0.0625rem",boxShadow:H="0 0.25rem 0.75rem rgba(0, 0, 0, 0.1)",transitionDuration:P="0.2s",transitionTiming:V="ease",dateCellSize:$="2.5rem",headerTextColor:q="var(--color-text, #6c757d)",weekdayTextColor:R="color-mix(in srgb, var(--color-text, #6c757d) 70%, transparent)",currentMonthDateColor:T="var(--color-text, #212529)",otherMonthDateColor:O="color-mix(in srgb, var(--color-text, #adb5bd) 55%, transparent)",selectedDateBgColor:J="var(--color-primary, #00A6D9)",selectedDateTextColor:E="var(--color-text-on-primary, #ffffff)",cancelButtonBgColor:U="var(--color-switcher-background, #e9ecef)",cancelButtonTextColor:ie="var(--color-text, #212529)",applyButtonBgColor:ce="var(--color-primary, #00A6D9)",applyButtonTextColor:Me="var(--color-text-on-primary, #ffffff)",actionButtonPadding:re,actionButtonFontSize:ae,width:ne,displayNode:le=void 0,displayMode:pe="auto",displayNodeAriaLabel:me,dropdownPosition:W="auto",dropdownAlignment:X="right",dropdownWidth:se,withBorder:$e=!1,icon:Re,precision:ve="day",horizontalTimePicker:je=!1,hoursLabel:Bc="Heures",minutesLabel:u1="Minutes",lowerLimit:oe=null,upperLimit:we=null,strictTimeLimits:BL=!1,outOfLimitsMessage:Ie="La date/heure choisie est hors des limites autorisées",months:Ct,weekdays:ZA,cancelText:XA="Annuler",applyText:YA="Appliquer",prevMonthAriaLabel:JA="Mois précédent",nextMonthAriaLabel:QA="Mois suivant",calendarAriaLabel:ez="Sélecteur de date",openedAriaLabel:tz="Ouvrir le sélecteur de date",selectedDateAriaLabel:az="Date sélectionnée: ",rotateIcon:nz=!0,clearable:oz=!1,clearAriaLabel:cz="Effacer la date"})=>{const Nt=D=>{if(D instanceof Date)return isNaN(D.getTime())?null:D;if(typeof D=="string"&&D){const K=new Date(D);return isNaN(K.getTime())?null:K}return null},[Ke,Ft]=k.useState(!1),[p1,iz]=k.useState({top:0,left:0,width:0}),[uC,rz]=k.useState("bottom"),[pC,sz]=k.useState(null),[ue,y1]=k.useState(Nt(e)||new Date),[k1,RL]=k.useState(Nt(e)),[ei,FL]=k.useState(Nt(e)?.getHours()??0),[ti,EL]=k.useState(Nt(e)?.getMinutes()??0),[OL,Rc]=k.useState(!1),[UL,Fc]=k.useState(!1),WL=k.useRef(null),Ec=k.useRef(null),yC=k.useRef(null),GL=k.useRef(null),KL=k.useRef(null),kC=k.useRef(Nt(e)?.getTime());k.useEffect(()=>{const D=Nt(e),K=D?.getTime();K!==kC.current&&(kC.current=K,RL(D),D&&(y1(D),FL(D.getHours()),EL(D.getMinutes())))},[e]);const mC=k.useCallback(()=>{if(Ec.current){const D=Ec.current.getBoundingClientRect();iz({top:D.top,left:D.left,width:D.width})}},[]),fC=8,ai=k.useCallback(()=>{if(!Ec.current)return;const D=Ec.current.getBoundingClientRect(),K=(parseFloat(m.replace("rem",""))||0)*16,_e=D.top-K-fC,He=window.innerHeight-D.bottom-K-fC;let Ve;if(W!=="auto")Ve=W;else{const Fe=yC.current?.scrollHeight??0;Ve=Fe<=He?"bottom":Fe<=_e||_e>He?"top":"bottom"}rz(Fe=>Fe===Ve?Fe:Ve),sz(Math.max(Ve==="bottom"?He:_e,0))},[W,m]),Oc=k.useCallback(()=>{mC(),ai()},[mC,ai]);k.useEffect(()=>(Ke&&(Oc(),window.addEventListener("scroll",Oc,!0),window.addEventListener("resize",Oc)),()=>{window.removeEventListener("scroll",Oc,!0),window.removeEventListener("resize",Oc)}),[Ke,Oc]),k.useLayoutEffect(()=>{Ke&&ai()},[Ke,ai]),k.useEffect(()=>{const D=K=>{if(WL.current&&!WL.current.contains(K.target)){const _e=document.getElementById("datepicker-dropdown");if(_e&&_e.contains(K.target))return;Ft(!1),Rc(!1),Fc(!1)}GL.current&&!GL.current.contains(K.target)&&Rc(!1),KL.current&&!KL.current.contains(K.target)&&Fc(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const gC=D=>new Date(D.getFullYear(),D.getMonth()+1,0).getDate(),dz=D=>{const K=new Date(D.getFullYear(),D.getMonth(),1).getDay();return K===0?6:K-1},lz=()=>{const D=[],K=dz(ue),_e=gC(ue),He=new Date(ue.getFullYear(),ue.getMonth()-1,1),Ve=gC(He);for(let Ne=K-1;Ne>=0;Ne--)D.push(new Date(ue.getFullYear(),ue.getMonth()-1,Ve-Ne));for(let Ne=1;Ne<=_e;Ne++)D.push(new Date(ue.getFullYear(),ue.getMonth(),Ne));const Fe=42-D.length;for(let Ne=1;Ne<=Fe;Ne++)D.push(new Date(ue.getFullYear(),ue.getMonth()+1,Ne));return D},hz=(D,K)=>!D||!K?!1:D.getDate()===K.getDate()&&D.getMonth()===K.getMonth()&&D.getFullYear()===K.getFullYear(),uz=D=>D.getMonth()===ue.getMonth()&&D.getFullYear()===ue.getFullYear(),ni=BL?D=>Math.floor(D.getTime()/6e4)*6e4:D=>new Date(D.getFullYear(),D.getMonth(),D.getDate()).getTime(),vC=D=>!(oe&&ni(D)<ni(oe)||we&&ni(D)>ni(we)),xC=k1?(()=>{const D=new Date(k1);return D.setHours(ei),D.setMinutes(ti),D})():null,Uc=xC?!vC(xC):!1,oi=new Date(ue.getFullYear(),ue.getMonth()-1,1),ci=new Date(ue.getFullYear(),ue.getMonth()+1,1),ZL=!!(oe&&(oi.getFullYear()<oe.getFullYear()||oi.getFullYear()===oe.getFullYear()&&oi.getMonth()<oe.getMonth())),XL=!!(we&&(ci.getFullYear()>we.getFullYear()||ci.getFullYear()===we.getFullYear()&&ci.getMonth()>we.getMonth())),pz=()=>{ZL||y1(oi)},yz=()=>{XL||y1(ci)},kz=D=>{if(!s){const K=new Date(D);K.setHours(ei),K.setMinutes(ti),RL(K)}},mz=()=>{if(!s){if(k1){const D=new Date(k1);if(D.setHours(ei),D.setMinutes(ti),!vC(D))return;t(D)}else t(null);Ft(!1)}},fz=()=>{const D=Nt(e);RL(D),D&&(FL(D.getHours()),EL(D.getMinutes())),Ft(!1)},gz=D=>{y1(new Date(ue.getFullYear(),D,1)),Rc(!1)},vz=D=>{y1(new Date(D,ue.getMonth(),1)),Fc(!1)},xz=()=>{const D=ue.getFullYear(),K=oe?oe.getFullYear():D-10,_e=we?we.getFullYear():D+10,He=[];for(let Ve=K;Ve<=_e;Ve++)He.push(Ve);return He},Mz=D=>{const K=ue.getFullYear();return!!(oe&&(K<oe.getFullYear()||K===oe.getFullYear()&&D<oe.getMonth())||we&&(K>we.getFullYear()||K===we.getFullYear()&&D>we.getMonth()))},_z=D=>{if(!s)switch(D.key){case"Enter":case" ":D.preventDefault(),Ft(!Ke);break;case"Escape":Ft(!1),Rc(!1),Fc(!1);break;case"Tab":Ke&&(Ft(!1),Rc(!1),Fc(!1));break}},Lz={width:ne||(r?"100%":"auto"),fontSize:p,fontWeight:M},Iz={height:l,padding:h,backgroundColor:v||"var(--color-card-background, #ffffff)",border:$e?void 0:"none",borderColor:d?j||"#dc3545":I||"var(--color-border, #dee2e6)",color:b||"var(--color-text, #212529)",borderRadius:z,borderWidth:A,fontWeight:M,transition:`all ${P} ${V}`},bz=je?{flexDirection:"column",borderTop:"none",borderLeft:"1px solid var(--color-border, #eee)"}:{},wz=je?{flex:1,minWidth:0}:void 0,Cz=je?{display:"flex",flexDirection:"row",alignItems:"stretch"}:void 0,Nz={backgroundColor:w||"var(--color-card-background, #ffffff)",maxHeight:u==="auto"?pC!=null?`${pC}px`:void 0:u,overflowY:"auto",borderRadius:z,borderWidth:A,boxShadow:H,transition:`opacity ${P} ${V}, transform ${P} ${V}`,position:"fixed",top:uC==="bottom"?p1.top+(Ec.current?.offsetHeight||0)+parseFloat(m.replace("rem",""))*16:"auto",bottom:uC==="top"?window.innerHeight-p1.top+parseFloat(m.replace("rem",""))*16:"auto",left:X==="left"?p1.left:"auto",right:X==="right"?window.innerWidth-(p1.left+p1.width):"auto",width:se||"30vw",minWidth:se?void 0:0,zIndex:10001},MC={width:y,height:y,color:L||"var(--color-text, #6c757d)","--icon-rotation":nz&&Ke?"rotate(180deg)":"rotate(0deg)"},Sz={color:N||"var(--color-text, #212529)",marginBottom:f,fontWeight:M},jz={color:S||"color-mix(in srgb, var(--color-text, #6c757d) 60%, transparent)"},$z={color:j||"#dc3545",marginTop:g},qz=lz(),ot=Nt(e),_C=D=>`${D.getDate().toString().padStart(2,"0")}/${(D.getMonth()+1).toString().padStart(2,"0")}/${D.getFullYear()}`,LC=ot?ve==="minutes"?`${_C(ot)} ${ot.getHours().toString().padStart(2,"0")}:${ot.getMinutes().toString().padStart(2,"0")}`:_C(ot):"",IC=!!le&&(pe==="icon"||pe==="auto"&&!ot),Az=oz&&!IC&&!!ot&&!s,zz={width:"0.875rem",height:"0.875rem",color:L||"var(--color-text, #6c757d)"},Vz=me||(ot?`${az}${LC}`:tz);return o.jsxs("div",{className:`${Z.datePickerContainer} ${i}`,ref:WL,style:Lz,"data-fullwidth":r,"data-disabled":s,"data-error":!!d,children:[n&&o.jsx("label",{className:Z.label,style:Sz,children:n}),o.jsxs("button",{ref:Ec,type:"button",onClick:()=>!s&&Ft(!Ke),onKeyDown:_z,className:`
8337
8337
  ${Z.datePickerButton}
8338
8338
  ${Ke?Z.datePickerButtonOpen:""}
8339
8339
  ${s?Z.datePickerButtonDisabled:""}
8340
- `,style:Iz,disabled:s,"aria-expanded":Ke,"aria-haspopup":"dialog","aria-label":Vz,"aria-labelledby":n?`${n}-label`:void 0,children:[IC?o.jsx("span",{className:Z.displayNode,"aria-hidden":!0,children:le}):o.jsx("span",{className:`${Z.datePickerLabel} ${ot?"":Z.placeholder}`,style:ot?void 0:jz,children:ot?LC:c}),o.jsxs("span",{className:Z.trailingIcons,children:[Az&&o.jsx("span",{role:"button",tabIndex:0,className:Z.clearButton,"aria-label":cz,onClick:D=>{D.stopPropagation(),t(null)},onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),D.stopPropagation(),t(null))},children:o.jsx(v7e,{fill:"var(--color-text)",style:zz})}),Re?o.jsx("span",{className:Z.chevron,style:MC,children:Re}):o.jsx(F1,{fill:"var(--color-text)",className:`${Z.chevron} ${Ke?Z.chevronOpen:""}`,style:MC})]})]}),d&&o.jsx("div",{className:Z.errorMessage,style:$z,children:d}),Ke&&!s&&Iw.createPortal(o.jsxs("div",{id:"datepicker-dropdown",ref:yC,className:Z.dropdown,style:Nz,role:"dialog","aria-label":ez,children:[o.jsxs("div",{style:Cz,children:[o.jsxs("div",{style:wz,children:[o.jsxs("div",{className:Z.calendarHeader,children:[o.jsx("button",{type:"button",className:Z.navButton,onClick:pz,"aria-label":JA,disabled:ZL,style:ZL?{opacity:.3,cursor:"not-allowed"}:void 0,children:"‹"}),o.jsxs("div",{className:Z.headerSelectors,children:[o.jsxs("div",{className:Z.monthSelector,ref:GL,children:[o.jsxs("button",{type:"button",className:Z.selectorButton,onClick:()=>Rc(!OL),style:{color:q,"--hover-color":C},children:[(Ct||Dj)[ue.getMonth()],o.jsx(F1,{fill:"var(--color-text)",className:`${Z.selectorChevron} ${OL?Z.selectorChevronOpen:""}`,style:{width:"0.75rem",height:"0.75rem",marginLeft:"0.25rem"}})]}),OL&&o.jsx("div",{className:Z.monthDropdown,children:(Ct||Dj).map((D,K)=>{const _e=Mz(K);return o.jsx("button",{type:"button",disabled:_e,className:`${Z.monthItem} ${ue.getMonth()===K?Z.monthItemSelected:""}`,onClick:()=>!_e&&gz(K),style:{padding:x,backgroundColor:ue.getMonth()===K?_||"#e7f1ff":w,opacity:_e?.3:1,cursor:_e?"not-allowed":"pointer"},onMouseEnter:He=>{C&&ue.getMonth()!==K&&!_e&&(He.currentTarget.style.backgroundColor=C)},onMouseLeave:He=>{C&&(He.currentTarget.style.backgroundColor=ue.getMonth()===K?_||"#e7f1ff":w)},children:D},K)})})]}),o.jsxs("div",{className:Z.yearSelector,ref:KL,children:[o.jsxs("button",{type:"button",className:Z.selectorButton,onClick:()=>Fc(!UL),style:{color:q,"--hover-color":C},children:[ue.getFullYear(),o.jsx(F1,{fill:"var(--color-text)",className:`${Z.selectorChevron} ${UL?Z.selectorChevronOpen:""}`,style:{width:"0.75rem",height:"0.75rem",marginLeft:"0.25rem"}})]}),UL&&o.jsx("div",{className:Z.yearDropdown,children:xz().map(D=>o.jsx("button",{type:"button",className:`${Z.yearItem} ${ue.getFullYear()===D?Z.yearItemSelected:""}`,onClick:()=>vz(D),style:{padding:x,backgroundColor:ue.getFullYear()===D?_||"#e7f1ff":w},onMouseEnter:K=>{C&&ue.getFullYear()!==D&&(K.currentTarget.style.backgroundColor=C)},onMouseLeave:K=>{C&&(K.currentTarget.style.backgroundColor=ue.getFullYear()===D?_||"#e7f1ff":w)},children:D},D))})]})]}),o.jsx("button",{type:"button",className:Z.navButton,onClick:yz,"aria-label":QA,disabled:XL,style:XL?{opacity:.3,cursor:"not-allowed"}:void 0,children:"›"})]}),o.jsx("div",{className:Z.weekdays,children:(ZA||x7e).map(D=>o.jsx("div",{className:Z.weekday,style:{color:R},children:D},D))}),o.jsx("div",{className:Z.calendarGrid,children:qz.map((D,K)=>{if(!D)return null;const _e=hz(D,k1),He=uz(D),Ve=Ne=>new Date(Ne.getFullYear(),Ne.getMonth(),Ne.getDate()).getTime(),Fe=!!(oe&&Ve(D)<Ve(oe)||we&&Ve(D)>Ve(we));return o.jsx("button",{type:"button",className:`${Z.dateCell} ${_e?Z.dateCellSelected:""} ${_e?Z.dateCellOtherMonthSelected:""} ${He?"":Z.dateCellOtherMonth} ${Fe?Z.dateCellDisabled:""}`,onClick:()=>!Fe&&kz(D),disabled:Fe,style:{width:$,height:$,color:_e?E:He?T:O,backgroundColor:_e?J:"transparent",opacity:Fe?.4:1,cursor:Fe?"not-allowed":"pointer"},onMouseEnter:Ne=>{!_e&&!Fe&&C&&(Ne.currentTarget.style.backgroundColor=C)},onMouseLeave:Ne=>{_e||(Ne.currentTarget.style.backgroundColor="transparent")},children:D.getDate()},K)})})]}),ve==="minutes"&&o.jsxs("div",{className:Z.timePickerContainer,style:bz,children:[o.jsxs("div",{className:Z.timeGroup,children:[o.jsx("span",{className:Z.timeLabel,children:Bc}),o.jsx("div",{className:Z.timeInputWrapper,children:o.jsx("input",{type:"number",min:"0",max:"23",value:ei,onChange:D=>{const K=parseInt(D.target.value);!isNaN(K)&&K>=0&&K<=23&&FL(K)},className:Z.timeInput,style:Uc?{borderColor:"#dc2626",color:"#dc2626"}:void 0})})]}),!je&&o.jsx("span",{className:Z.timeSeparator,children:":"}),o.jsxs("div",{className:Z.timeGroup,children:[o.jsx("span",{className:Z.timeLabel,children:u1}),o.jsx("div",{className:Z.timeInputWrapper,children:o.jsx("input",{type:"number",min:"0",max:"59",value:ti,onChange:D=>{const K=parseInt(D.target.value);!isNaN(K)&&K>=0&&K<=59&&EL(K)},className:Z.timeInput,style:Uc?{borderColor:"#dc2626",color:"#dc2626"}:void 0})})]})]})]}),Uc&&o.jsx("div",{role:"alert",style:{color:"#dc2626",fontSize:"0.75rem",padding:"0 4px 4px",textAlign:"center"},children:Ie}),o.jsxs("div",{className:Z.calendarFooter,children:[o.jsx("button",{type:"button",className:Z.cancelButton,onClick:fz,style:{backgroundColor:U,color:ie,borderRadius:z,padding:re??x,fontSize:ae},children:XA}),o.jsx("button",{type:"button",className:Z.applyButton,onClick:mz,disabled:Uc,style:{backgroundColor:ce,color:Me,borderRadius:z,padding:re??x,fontSize:ae,opacity:Uc?.5:1,cursor:Uc?"not-allowed":"pointer"},children:YA})]})]}),document.body)]})},M7e="_selectContainer_1ptm9_1",_7e="_label_1ptm9_15",L7e="_selectButton_1ptm9_23",I7e="_selectButtonDisabled_1ptm9_43",b7e="_selectButtonOpen_1ptm9_48",w7e="_selectButtonContent_1ptm9_58",C7e="_selectIcon_1ptm9_66",N7e="_selectLabel_1ptm9_72",S7e="_placeholder_1ptm9_79",j7e="_chevron_1ptm9_84",$7e="_errorMessage_1ptm9_93",q7e="_dropdown_1ptm9_99",A7e="_dropdownContent_1ptm9_123",z7e="_item_1ptm9_129",V7e="_itemSelected_1ptm9_151",P7e="_itemContent_1ptm9_155",T7e="_itemIcon_1ptm9_162",H7e="_itemLabel_1ptm9_168",Se={selectContainer:M7e,label:_7e,selectButton:L7e,selectButtonDisabled:I7e,selectButtonOpen:b7e,selectButtonContent:w7e,selectIcon:C7e,selectLabel:N7e,placeholder:S7e,chevron:j7e,errorMessage:$7e,dropdown:q7e,dropdownContent:A7e,item:z7e,itemSelected:V7e,itemContent:P7e,itemIcon:T7e,itemLabel:H7e},HA=({items:e,value:t,onChange:n,label:c,placeholder:i="Sélectionner...",className:r="",fullWidth:s=!0,disabled:d=!1,error:l,buttonHeight:h="var(--select-button-height, 2.75rem)",buttonPadding:u="var(--select-button-padding, 0.75rem)",dropdownMaxHeight:p="var(--select-dropdown-max-height, 15rem)",fontSize:y="var(--select-font-size, 0.875rem)",fontWeight:f,iconSize:g="var(--select-icon-size, 1.5rem)",labelMarginBottom:m="var(--select-label-margin-bottom, 0.5rem)",errorMarginTop:x="var(--select-error-margin-top, 0.25rem)",dropdownMarginTop:M="var(--select-dropdown-margin-top, 0.25rem)",itemPadding:v="var(--select-item-padding, 0.5rem 0.75rem)",gap:I="var(--select-gap, 0.5rem)",buttonBgColor:b,buttonBorderColor:w,buttonTextColor:C,dropdownBgColor:_,itemHoverColor:L,selectedItemBgColor:j,iconColor:N,errorColor:S,labelColor:z,placeholderColor:A,border:H,borderRadius:P="var(--select-border-radius, 0.5rem)",borderWidth:V="var(--select-border-width, 0.0625rem)",boxShadow:$="var(--select-box-shadow, 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1))",transitionDuration:q="var(--select-transition-duration, 0.2s)",transitionTiming:R="var(--select-transition-timing, ease)",scrollbarWidth:T="var(--select-scrollbar-width, 0.375rem)",scrollbarTrackColor:O="var(--select-scrollbar-track-color, #f1f1f1)",scrollbarThumbColor:J="var(--select-scrollbar-thumb-color, #c1c1c1)",width:E,minWidth:U,dropdownPosition:ie="bottom",dropdownAlignment:ce="right",dropdownWidth:Me,a11yConfig:re,titleKey:ae})=>{const[ne,le]=k.useState(!1),pe=k.useRef(null),me=e.find(Ie=>Ie.value===t);k.useEffect(()=>{const Ie=Ct=>{pe.current&&!pe.current.contains(Ct.target)&&le(!1)};return document.addEventListener("mousedown",Ie),()=>document.removeEventListener("mousedown",Ie)},[]);const W=Ie=>{d||(n(Ie),le(!1))},X=Ie=>{if(!d)switch(Ie.key){case"Enter":case" ":Ie.preventDefault(),le(!ne);break;case"Escape":le(!1);break;case"Tab":ne&&le(!1);break}},se={width:E||(s?"100%":"auto"),minWidth:U,fontSize:y},$e={height:h,padding:u,backgroundColor:b||"var(--select-button-bg-color, #ffffff)",border:H,borderColor:l?S||"var(--select-error-color, #dc3545)":w||"var(--select-button-border-color, #dee2e6)",color:C||"var(--select-button-text-color, #212529)",borderRadius:P,borderWidth:V,transition:`all ${q} ${R}`,fontWeight:f},Re={backgroundColor:_||"var(--select-dropdown-bg-color, #ffffff)",maxHeight:p,borderRadius:P,borderWidth:V,boxShadow:$,transition:`opacity ${q} ${R}, transform ${q} ${R}`,position:"absolute",top:ie==="bottom"?"100%":"auto",bottom:ie==="top"?"100%":"auto",left:ce==="left"?0:"auto",right:ce==="right"?0:"auto",width:Me||(s?"100%":"auto"),marginTop:ie==="bottom"?M:0,marginBottom:ie==="top"?M:0,zIndex:1001},ve={width:g,height:g,color:N||"var(--select-icon-color, #6c757d)","--icon-rotation":ne?"rotate(180deg)":"rotate(0deg)"},je={color:z||"var(--select-label-color, #212529)",marginBottom:m},Bc={color:A||"var(--select-placeholder-color, #6c757d)"},u1={color:S||"var(--select-error-color, #dc3545)",marginTop:x},oe={padding:v,transition:`background-color ${q} ${R}`,fontWeight:f},we={gap:I},BL={"--scrollbar-width":T,"--scrollbar-track-color":O,"--scrollbar-thumb-color":J};return o.jsxs("div",{className:`${Se.selectContainer} ${r}`,ref:pe,style:se,"data-fullwidth":s,"data-disabled":d,"data-error":!!l,title:Y(re,ae),children:[c&&o.jsx("label",{className:Se.label,style:je,children:c}),o.jsxs("button",{type:"button",onClick:()=>!d&&le(!ne),onKeyDown:X,className:`
8340
+ `,style:Iz,disabled:s,"aria-expanded":Ke,"aria-haspopup":"dialog","aria-label":Vz,"aria-labelledby":n?`${n}-label`:void 0,children:[IC?o.jsx("span",{className:Z.displayNode,"aria-hidden":!0,children:le}):o.jsx("span",{className:`${Z.datePickerLabel} ${ot?"":Z.placeholder}`,style:ot?void 0:jz,children:ot?LC:c}),o.jsxs("span",{className:Z.trailingIcons,children:[Az&&o.jsx("span",{role:"button",tabIndex:0,className:Z.clearButton,"aria-label":cz,onClick:D=>{D.stopPropagation(),t(null)},onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),D.stopPropagation(),t(null))},children:o.jsx(v7e,{fill:"var(--color-text)",style:zz})}),Re?o.jsx("span",{className:Z.chevron,style:MC,children:Re}):o.jsx(F1,{fill:"var(--color-text)",className:`${Z.chevron} ${Ke?Z.chevronOpen:""}`,style:MC})]})]}),d&&o.jsx("div",{className:Z.errorMessage,style:$z,children:d}),Ke&&!s&&Iw.createPortal(o.jsxs("div",{id:"datepicker-dropdown",ref:yC,className:Z.dropdown,style:Nz,role:"dialog","aria-label":ez,children:[o.jsxs("div",{style:Cz,children:[o.jsxs("div",{style:wz,children:[o.jsxs("div",{className:Z.calendarHeader,children:[o.jsx("button",{type:"button",className:Z.navButton,onClick:pz,"aria-label":JA,disabled:ZL,style:ZL?{opacity:.3,cursor:"not-allowed"}:void 0,children:"‹"}),o.jsxs("div",{className:Z.headerSelectors,children:[o.jsxs("div",{className:Z.monthSelector,ref:GL,children:[o.jsxs("button",{type:"button",className:Z.selectorButton,onClick:()=>Rc(!OL),style:{color:q,"--hover-color":C},children:[(Ct||Dj)[ue.getMonth()],o.jsx(F1,{fill:"var(--color-text)",className:`${Z.selectorChevron} ${OL?Z.selectorChevronOpen:""}`,style:{width:"0.75rem",height:"0.75rem",marginLeft:"0.25rem"}})]}),OL&&o.jsx("div",{className:Z.monthDropdown,children:(Ct||Dj).map((D,K)=>{const _e=Mz(K);return o.jsx("button",{type:"button",disabled:_e,className:`${Z.monthItem} ${ue.getMonth()===K?Z.monthItemSelected:""}`,onClick:()=>!_e&&gz(K),style:{padding:x,backgroundColor:ue.getMonth()===K?_||"var(--color-lite-primary, #e7f1ff)":w,opacity:_e?.3:1,cursor:_e?"not-allowed":"pointer"},onMouseEnter:He=>{C&&ue.getMonth()!==K&&!_e&&(He.currentTarget.style.backgroundColor=C)},onMouseLeave:He=>{C&&(He.currentTarget.style.backgroundColor=ue.getMonth()===K?_||"var(--color-lite-primary, #e7f1ff)":w)},children:D},K)})})]}),o.jsxs("div",{className:Z.yearSelector,ref:KL,children:[o.jsxs("button",{type:"button",className:Z.selectorButton,onClick:()=>Fc(!UL),style:{color:q,"--hover-color":C},children:[ue.getFullYear(),o.jsx(F1,{fill:"var(--color-text)",className:`${Z.selectorChevron} ${UL?Z.selectorChevronOpen:""}`,style:{width:"0.75rem",height:"0.75rem",marginLeft:"0.25rem"}})]}),UL&&o.jsx("div",{className:Z.yearDropdown,children:xz().map(D=>o.jsx("button",{type:"button",className:`${Z.yearItem} ${ue.getFullYear()===D?Z.yearItemSelected:""}`,onClick:()=>vz(D),style:{padding:x,backgroundColor:ue.getFullYear()===D?_||"var(--color-lite-primary, #e7f1ff)":w},onMouseEnter:K=>{C&&ue.getFullYear()!==D&&(K.currentTarget.style.backgroundColor=C)},onMouseLeave:K=>{C&&(K.currentTarget.style.backgroundColor=ue.getFullYear()===D?_||"var(--color-lite-primary, #e7f1ff)":w)},children:D},D))})]})]}),o.jsx("button",{type:"button",className:Z.navButton,onClick:yz,"aria-label":QA,disabled:XL,style:XL?{opacity:.3,cursor:"not-allowed"}:void 0,children:"›"})]}),o.jsx("div",{className:Z.weekdays,children:(ZA||x7e).map(D=>o.jsx("div",{className:Z.weekday,style:{color:R},children:D},D))}),o.jsx("div",{className:Z.calendarGrid,children:qz.map((D,K)=>{if(!D)return null;const _e=hz(D,k1),He=uz(D),Ve=Ne=>new Date(Ne.getFullYear(),Ne.getMonth(),Ne.getDate()).getTime(),Fe=!!(oe&&Ve(D)<Ve(oe)||we&&Ve(D)>Ve(we));return o.jsx("button",{type:"button",className:`${Z.dateCell} ${_e?Z.dateCellSelected:""} ${_e?Z.dateCellOtherMonthSelected:""} ${He?"":Z.dateCellOtherMonth} ${Fe?Z.dateCellDisabled:""}`,onClick:()=>!Fe&&kz(D),disabled:Fe,style:{width:$,height:$,color:_e?E:He?T:O,backgroundColor:_e?J:"transparent",opacity:Fe?.4:1,cursor:Fe?"not-allowed":"pointer"},onMouseEnter:Ne=>{!_e&&!Fe&&C&&(Ne.currentTarget.style.backgroundColor=C)},onMouseLeave:Ne=>{_e||(Ne.currentTarget.style.backgroundColor="transparent")},children:D.getDate()},K)})})]}),ve==="minutes"&&o.jsxs("div",{className:Z.timePickerContainer,style:bz,children:[o.jsxs("div",{className:Z.timeGroup,children:[o.jsx("span",{className:Z.timeLabel,children:Bc}),o.jsx("div",{className:Z.timeInputWrapper,children:o.jsx("input",{type:"number",min:"0",max:"23",value:ei,onChange:D=>{const K=parseInt(D.target.value);!isNaN(K)&&K>=0&&K<=23&&FL(K)},className:Z.timeInput,style:Uc?{borderColor:"#dc2626",color:"#dc2626"}:void 0})})]}),!je&&o.jsx("span",{className:Z.timeSeparator,children:":"}),o.jsxs("div",{className:Z.timeGroup,children:[o.jsx("span",{className:Z.timeLabel,children:u1}),o.jsx("div",{className:Z.timeInputWrapper,children:o.jsx("input",{type:"number",min:"0",max:"59",value:ti,onChange:D=>{const K=parseInt(D.target.value);!isNaN(K)&&K>=0&&K<=59&&EL(K)},className:Z.timeInput,style:Uc?{borderColor:"#dc2626",color:"#dc2626"}:void 0})})]})]})]}),Uc&&o.jsx("div",{role:"alert",style:{color:"#dc2626",fontSize:"0.75rem",padding:"0 4px 4px",textAlign:"center"},children:Ie}),o.jsxs("div",{className:Z.calendarFooter,children:[o.jsx("button",{type:"button",className:Z.cancelButton,onClick:fz,style:{backgroundColor:U,color:ie,borderRadius:z,padding:re??x,fontSize:ae},children:XA}),o.jsx("button",{type:"button",className:Z.applyButton,onClick:mz,disabled:Uc,style:{backgroundColor:ce,color:Me,borderRadius:z,padding:re??x,fontSize:ae,opacity:Uc?.5:1,cursor:Uc?"not-allowed":"pointer"},children:YA})]})]}),document.body)]})},M7e="_selectContainer_1ptm9_1",_7e="_label_1ptm9_15",L7e="_selectButton_1ptm9_23",I7e="_selectButtonDisabled_1ptm9_43",b7e="_selectButtonOpen_1ptm9_48",w7e="_selectButtonContent_1ptm9_58",C7e="_selectIcon_1ptm9_66",N7e="_selectLabel_1ptm9_72",S7e="_placeholder_1ptm9_79",j7e="_chevron_1ptm9_84",$7e="_errorMessage_1ptm9_93",q7e="_dropdown_1ptm9_99",A7e="_dropdownContent_1ptm9_123",z7e="_item_1ptm9_129",V7e="_itemSelected_1ptm9_151",P7e="_itemContent_1ptm9_155",T7e="_itemIcon_1ptm9_162",H7e="_itemLabel_1ptm9_168",Se={selectContainer:M7e,label:_7e,selectButton:L7e,selectButtonDisabled:I7e,selectButtonOpen:b7e,selectButtonContent:w7e,selectIcon:C7e,selectLabel:N7e,placeholder:S7e,chevron:j7e,errorMessage:$7e,dropdown:q7e,dropdownContent:A7e,item:z7e,itemSelected:V7e,itemContent:P7e,itemIcon:T7e,itemLabel:H7e},HA=({items:e,value:t,onChange:n,label:c,placeholder:i="Sélectionner...",className:r="",fullWidth:s=!0,disabled:d=!1,error:l,buttonHeight:h="var(--select-button-height, 2.75rem)",buttonPadding:u="var(--select-button-padding, 0.75rem)",dropdownMaxHeight:p="var(--select-dropdown-max-height, 15rem)",fontSize:y="var(--select-font-size, 0.875rem)",fontWeight:f,iconSize:g="var(--select-icon-size, 1.5rem)",labelMarginBottom:m="var(--select-label-margin-bottom, 0.5rem)",errorMarginTop:x="var(--select-error-margin-top, 0.25rem)",dropdownMarginTop:M="var(--select-dropdown-margin-top, 0.25rem)",itemPadding:v="var(--select-item-padding, 0.5rem 0.75rem)",gap:I="var(--select-gap, 0.5rem)",buttonBgColor:b,buttonBorderColor:w,buttonTextColor:C,dropdownBgColor:_,itemHoverColor:L,selectedItemBgColor:j,iconColor:N,errorColor:S,labelColor:z,placeholderColor:A,border:H,borderRadius:P="var(--select-border-radius, 0.5rem)",borderWidth:V="var(--select-border-width, 0.0625rem)",boxShadow:$="var(--select-box-shadow, 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1))",transitionDuration:q="var(--select-transition-duration, 0.2s)",transitionTiming:R="var(--select-transition-timing, ease)",scrollbarWidth:T="var(--select-scrollbar-width, 0.375rem)",scrollbarTrackColor:O="var(--select-scrollbar-track-color, #f1f1f1)",scrollbarThumbColor:J="var(--select-scrollbar-thumb-color, #c1c1c1)",width:E,minWidth:U,dropdownPosition:ie="bottom",dropdownAlignment:ce="right",dropdownWidth:Me,a11yConfig:re,titleKey:ae})=>{const[ne,le]=k.useState(!1),pe=k.useRef(null),me=e.find(Ie=>Ie.value===t);k.useEffect(()=>{const Ie=Ct=>{pe.current&&!pe.current.contains(Ct.target)&&le(!1)};return document.addEventListener("mousedown",Ie),()=>document.removeEventListener("mousedown",Ie)},[]);const W=Ie=>{d||(n(Ie),le(!1))},X=Ie=>{if(!d)switch(Ie.key){case"Enter":case" ":Ie.preventDefault(),le(!ne);break;case"Escape":le(!1);break;case"Tab":ne&&le(!1);break}},se={width:E||(s?"100%":"auto"),minWidth:U,fontSize:y},$e={height:h,padding:u,backgroundColor:b||"var(--select-button-bg-color, #ffffff)",border:H,borderColor:l?S||"var(--select-error-color, #dc3545)":w||"var(--select-button-border-color, #dee2e6)",color:C||"var(--select-button-text-color, #212529)",borderRadius:P,borderWidth:V,transition:`all ${q} ${R}`,fontWeight:f},Re={backgroundColor:_||"var(--select-dropdown-bg-color, #ffffff)",maxHeight:p,borderRadius:P,borderWidth:V,boxShadow:$,transition:`opacity ${q} ${R}, transform ${q} ${R}`,position:"absolute",top:ie==="bottom"?"100%":"auto",bottom:ie==="top"?"100%":"auto",left:ce==="left"?0:"auto",right:ce==="right"?0:"auto",width:Me||(s?"100%":"auto"),marginTop:ie==="bottom"?M:0,marginBottom:ie==="top"?M:0,zIndex:1001},ve={width:g,height:g,color:N||"var(--select-icon-color, #6c757d)","--icon-rotation":ne?"rotate(180deg)":"rotate(0deg)"},je={color:z||"var(--select-label-color, #212529)",marginBottom:m},Bc={color:A||"var(--select-placeholder-color, #6c757d)"},u1={color:S||"var(--select-error-color, #dc3545)",marginTop:x},oe={padding:v,transition:`background-color ${q} ${R}`,fontWeight:f},we={gap:I},BL={"--scrollbar-width":T,"--scrollbar-track-color":O,"--scrollbar-thumb-color":J};return o.jsxs("div",{className:`${Se.selectContainer} ${r}`,ref:pe,style:se,"data-fullwidth":s,"data-disabled":d,"data-error":!!l,title:Y(re,ae),children:[c&&o.jsx("label",{className:Se.label,style:je,children:c}),o.jsxs("button",{type:"button",onClick:()=>!d&&le(!ne),onKeyDown:X,className:`
8341
8341
  ${Se.selectButton}
8342
8342
  ${ne?Se.selectButtonOpen:""}
8343
8343
  ${d?Se.selectButtonDisabled:""}
8344
8344
  `,style:$e,disabled:d,"aria-expanded":ne,"aria-haspopup":"listbox","aria-labelledby":c?`${c}-label`:void 0,children:[o.jsxs("div",{className:Se.selectButtonContent,style:we,children:[me?.icon&&o.jsx("span",{className:Se.selectIcon,style:ve,children:me.icon}),o.jsx("span",{className:`${Se.selectLabel} ${me?"":Se.placeholder}`,style:me?void 0:Bc,children:me?me.label:i})]}),o.jsx(F1,{fill:"var(--color-text)",className:`${Se.chevron} ${ne?Se.chevronOpen:""}`,style:ve})]}),l&&o.jsx("div",{className:Se.errorMessage,style:u1,children:l}),ne&&!d&&o.jsx("div",{className:Se.dropdown,style:Re,role:"listbox","aria-label":c||"Options de sélection",children:o.jsx("div",{className:Se.dropdownContent,style:BL,children:e.map(Ie=>o.jsx("button",{type:"button",onClick:()=>W(Ie.value),className:`
8345
8345
  ${Se.item}
8346
8346
  ${t===Ie.value?Se.itemSelected:""}
8347
- `,style:{...oe,backgroundColor:t===Ie.value?j||"#F0F4F6":"transparent"},onMouseEnter:Ct=>{L&&(Ct.currentTarget.style.backgroundColor=L)},onMouseLeave:Ct=>{L&&(Ct.currentTarget.style.backgroundColor=t===Ie.value?j||"#F0F4F6":"transparent")},role:"option","aria-selected":t===Ie.value,children:o.jsxs("div",{className:Se.itemContent,style:we,children:[Ie.icon&&o.jsx("span",{className:Se.itemIcon,style:ve,children:Ie.icon}),o.jsx("span",{className:Se.itemLabel,children:Ie.label})]})},Ie.value))})})]})},D7e="_filterBar_1hlqe_3",B7e="_label_1hlqe_11",Bj={filterBar:D7e,label:B7e},R7e=({label:e="Filtres",startDate:t,endDate:n,granularity:c,onStartDateChange:i,onEndDateChange:r,onGranularityChange:s,granularityItems:d,startDatePlaceholder:l="Date début",endDatePlaceholder:h="Date fin",granularityPlaceholder:u="Sélectionner...",className:p="",disabled:y=!1,gap:f="0.75rem",labelFontSize:g="0.875rem",labelFontWeight:m="400",labelColor:x="#212529",labelMarginRight:M="1rem",startDateWidth:v,endDateWidth:I,selectWidth:b,datePickerProps:w={},selectProps:C={},rightContent:_,extraContent:L})=>{const j={fontSize:g,fontWeight:m,color:x,marginRight:M},N={gap:f};return o.jsxs("div",{className:`${Bj.filterBar} ${p}`,style:N,children:[e&&o.jsx("span",{className:Bj.label,style:j,children:e}),o.jsx(Lw,{value:t,onChange:i,placeholder:l,fullWidth:!1,disabled:y,label:void 0,width:v,...w}),o.jsx(Lw,{value:n,onChange:r,placeholder:h,fullWidth:!1,disabled:y,label:void 0,width:I,...w}),o.jsx(HA,{items:d,value:c,onChange:s,placeholder:u,fullWidth:!1,disabled:y,label:void 0,width:b,...C}),L,_&&o.jsx("div",{style:{marginLeft:"auto"},children:_})]})},F7e="_container_1x6mq_16",E7e="_disabled_1x6mq_26",O7e="_predStyle_1x6mq_32",U7e="_realStyle_1x6mq_36",W7e="_predGap_1x6mq_40",G7e="_realGap_1x6mq_44",K7e="_big_1x6mq_49",Z7e="_medium_1x6mq_53",X7e="_iconWrapper_1x6mq_58",Y7e="_predRelative_1x6mq_68",J7e="_realRelative_1x6mq_72",Q7e="_iconImg_1x6mq_76",eve="_content_1x6mq_84",tve="_header_1x6mq_93",ave="_predJustify_1x6mq_99",nve="_realJustify_1x6mq_103",ove="_predHeaderLineHeight_1x6mq_116",cve="_realHeaderLineHeight_1x6mq_120",ive="_title_1x6mq_129",rve="_titleBlack_1x6mq_144",sve="_titleWhite_1x6mq_148",dve="_subtitle_1x6mq_153",lve="_valueRowHorizontal_1x6mq_163",hve="_valueRowVertical_1x6mq_171",uve="_singleValue_1x6mq_180",pve="_primaryRow_1x6mq_184",yve="_maxBadge_1x6mq_191",kve="_valuePrimary_1x6mq_203",mve="_valuePrimaryBlack_1x6mq_210",fve="_valuePrimaryWhite_1x6mq_214",gve="_valueSlash_1x6mq_219",vve="_valueSecondary_1x6mq_226",xve="_valueSecondaryBlue_1x6mq_232",Mve="_valueSecondaryWhite_1x6mq_236",_ve="_valueSecondaryBlack_1x6mq_240",Lve="_valueStacked_1x6mq_245",Ive="_stackedTop_1x6mq_254",bve="_stackedBottom_1x6mq_255",ye={container:F7e,disabled:E7e,predStyle:O7e,realStyle:U7e,predGap:W7e,realGap:G7e,big:K7e,medium:Z7e,iconWrapper:X7e,predRelative:Y7e,realRelative:J7e,iconImg:Q7e,content:eve,header:tve,predJustify:ave,realJustify:nve,predHeaderLineHeight:ove,realHeaderLineHeight:cve,title:ive,titleBlack:rve,titleWhite:sve,subtitle:dve,valueRowHorizontal:lve,valueRowVertical:hve,singleValue:uve,primaryRow:pve,maxBadge:yve,valuePrimary:kve,valuePrimaryBlack:mve,valuePrimaryWhite:fve,valueSlash:gve,valueSecondary:vve,valueSecondaryBlue:xve,valueSecondaryWhite:Mve,valueSecondaryBlack:_ve,valueStacked:Lve,stackedTop:Ive,stackedBottom:bve},wve=({a11yConfig:e,iconName:t,title:n,subtitle:c,showSubtitle:i,realised:r="-",prediction:s="-",size:d="big",titleColor:l="black",valueColor:h="blue",realValueColor:u,predictionValueColor:p,className:y="",style:f="",variant:g="horizontal",showMax:m=!1,titleFontSize:x,titleFontWeight:M,subtitleFontSize:v,subtitleFontWeight:I,primaryFontSize:b,primaryFontWeight:w,secondaryFontSize:C,secondaryFontWeight:_,backgroundColor:L="#f2f9fc",gap:j="",disabled:N=!1,positionRelative:S="",justifyContent:z="",headerLineHeight:A="",headerMinHeight:H="",contentSpace:P="",titleKey:V,subtitleKey:$,subtitleA11yKey:q,maxBadgeKey:R,maxBadgeA11yKey:T,predictionKey:O,predictionA11yKey:J,realisedKey:E,realisedA11yKey:U})=>{const ie=i!==void 0?i:!!c,ce=`${ye.container} ${ye[d]} ${ye[f]} ${N?ye.disabled:""}`,Me=h==="white"?ye.valuePrimaryWhite:ye.valuePrimaryBlack,re=h==="blue"?ye.valueSecondaryBlue:h==="white"?ye.valueSecondaryWhite:ye.valueSecondaryBlack,ae=W=>W===void 0?void 0:typeof W=="number"?`${W}px`:W,ne=W=>W===void 0?void 0:W,le=g==="vertical",pe=s!=null&&s!==""&&s!=="-"&&s!=="—",me=le?ye.valueRowVertical:ye.valueRowHorizontal;return o.jsxs("div",{className:`${ce} ${y}`,style:{backgroundColor:L},children:[t&&o.jsx("div",{className:`${ye.iconWrapper} ${ye[S]}`,children:t}),o.jsxs("div",{className:`${ye.content} ${ye[j]} ${pe?"":ye.singleValue} content-indicator-v2`,style:{justifyContent:P},children:[o.jsx("div",{className:`${ye.header} ${ye[z]} ${ye[A]} header-indicator-v2`,style:{minHeight:H},children:o.jsx("h6",{className:`${ye.title}`,style:{fontSize:ae(x),fontWeight:ne(M),color:l},title:Y(e,V),children:n})}),ie&&c?o.jsx("div",{className:"subtitle-container",children:o.jsx("span",{className:ye.subtitle,style:{fontSize:ae(v),fontWeight:ne(I)},title:Y(e,$,q),children:c})}):null,o.jsxs("div",{className:`${me} count-indicator-v2`,children:[o.jsxs("div",{className:ye.primaryRow,children:[m&&o.jsx("span",{className:`${ye.maxBadge} max-badge-indicator-v2`,title:Y(e,R,T),children:"MAX"}),o.jsx("span",{className:`${ye.valuePrimary} ${Me}`,style:{fontSize:ae(b||(!pe&&le?"1.75rem":void 0)),fontWeight:ne(w),color:u||void 0},title:Y(e,E,U),children:r})]}),pe&&o.jsxs(o.Fragment,{children:[!le&&o.jsx("span",{className:ye.valueSlash,style:{fontSize:ae(C),fontWeight:ne(_)},children:"/"}),o.jsx("span",{className:`${ye.valueSecondary} ${re}`,style:{fontSize:ae(C),fontWeight:ne(_),color:p||void 0},title:Y(e,O,J),children:s})]})]})]})]})},Cve="_banner_f10in_2",Nve="_iep_f10in_14",Sve="_groupSmall_f10in_24",jve="_genre_f10in_34",$ve="_gravite_f10in_42",qve="_orientationContainer_f10in_48",Ave="_service_f10in_61",zve="_roomBedContainer_f10in_71",Vve="_room_f10in_71",Pve="_bed_f10in_87",Tve="_bedUf_f10in_92",Hve="_statusContainer_f10in_97",Dve="_status_f10in_97",Bve="_centeredWarn_f10in_124",Oe={banner:Cve,iep:Nve,groupSmall:Sve,genre:jve,gravite:$ve,orientationContainer:qve,service:Ave,roomBedContainer:zve,room:Vve,bed:Pve,bedUf:Tve,statusContainer:Hve,status:Dve,centeredWarn:Bve},Rve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("mask",{id:"a",width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},te.createElement("path",{fill:"#D9D9D9",d:"M0 0h16v16H0z"})),te.createElement("g",{mask:"url(#a)"},te.createElement("path",{fill:"#C60000",d:"M.666 14 7.999 1.333 15.333 14zm2.3-1.333h10.067L7.999 4zm5.508-.859a.65.65 0 0 0 .192-.475.65.65 0 0 0-.192-.475.65.65 0 0 0-.475-.191.65.65 0 0 0-.475.191.65.65 0 0 0-.191.475q0 .285.191.475A.65.65 0 0 0 8 12a.65.65 0 0 0 .475-.192M7.333 10h1.333V6.667H7.333z"}))),Rj=k.memo(Rve),Fve=({patient:e,genre:t,gravite:n,bed:c,bed_uf:i,room:r,orientation:s,status:d,backgroundColor:l="#ffffff",primaryFontColor:h="#111827",secondaryFontColor:u="#6b7280",statusFontColor:p="#0284c7",statusBackgroundColor:y="#e0f2fe",genreBackgroundColor:f="#9ca3af",genreFontSize:g,style:m,warn:x=!1,warnMessage:M,warnColor:v="#F94134"})=>o.jsxs("div",{className:Oe.banner,style:{backgroundColor:l,...m},children:[o.jsxs("div",{className:Oe.iep,children:[o.jsx("div",{style:{color:u},children:e.iep??"--"}),o.jsxs("div",{style:{color:h},children:[((e.nom||"").trim().split(/\s+/)[0]||"").substring(0,3).toUpperCase(),"."," ",((e.prenom||"").trim().split(/\s+/)[0]||"").substring(0,3).toLowerCase().replace(/^./,I=>I.toUpperCase()),".(",e.age,")"]})]}),o.jsxs("div",{className:Oe.groupSmall,children:[o.jsx("span",{className:`${Oe.genre} genre-info-banner`,style:{color:"#ffffff",background:f,fontSize:g},children:t??"--"}),o.jsx("span",{className:`${Oe.gravite} gravite-info-banner`,children:n??"--"})]}),o.jsx("div",{className:Oe.orientationContainer,children:o.jsx("div",{className:Oe.service,style:{color:h},children:s??"--"})}),o.jsxs("div",{className:Oe.roomBedContainer,children:[i&&o.jsx("span",{className:Oe.bedUf,children:i}),o.jsx("span",{className:Oe.room,children:r??"--"}),o.jsx("span",{className:Oe.bed,children:c??"--"})]}),o.jsxs("div",{className:Oe.statusContainer,children:[d?o.jsx("div",{className:`${Oe.status} status-info-banner`,style:{color:p,backgroundColor:y},children:d}):x&&o.jsxs("div",{className:Oe.centeredWarn,style:{textTransform:"uppercase"},children:[o.jsx(Rj,{color:v,width:20,height:20,style:{marginRight:"6px"}}),o.jsx("span",{style:{color:v,fontSize:"12px",fontWeight:600},children:M})]}),d&&x&&o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",color:v,fontSize:"10px",fontWeight:400,marginTop:"4px",textTransform:"uppercase"},children:[o.jsx(Rj,{color:v,width:12,height:12,style:{marginRight:"4px"}}),o.jsx("span",{children:M})]})]})]}),Eve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M200-200v-240h60v180h180v60zm500-320v-180H520v-60h240v240z"})),Ove=k.memo(Eve),Uve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231z"})),DA=k.memo(Uve),Wve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-440v240h-60v-180H200v-60zm140-320v180h180v60H520v-240z"})),Gve=k.memo(Wve),Kve="_overlay_1sx2l_1",Zve="_container_1sx2l_11",Xve="_fullscreen_1sx2l_24",Yve="_header_1sx2l_30",Jve="_headerActions_1sx2l_42",Qve="_iconButton_1sx2l_47",e9e="_body_1sx2l_58",t9e="_sidebar_1sx2l_65",a9e="_content_1sx2l_91",n9e="_contentHeader_1sx2l_98",o9e="_childrenWrapper_1sx2l_114",c9e="_footer_1sx2l_138",i9e="_baseButton_1sx2l_147",r9e="_noOverlay_1sx2l_161",s9e="_contained_1sx2l_169",qe={overlay:Kve,container:Zve,fullscreen:Xve,header:Yve,headerActions:Jve,iconButton:Qve,body:e9e,sidebar:t9e,content:a9e,contentHeader:n9e,childrenWrapper:o9e,footer:c9e,baseButton:i9e,noOverlay:r9e,contained:s9e},d9e=({headerText:e,headerTextColor:t="var(--color-text)",backgroundColor:n="var(--color-background)",headerFontSize:c="1rem",headerFontWeight:i="600",isOpen:r,onClose:s,leftButton:d,rightButton:l,children:h,contentTitle:u,contentBackgroundColor:p="var(--color-content-background)",sideContent:y,hideMaximize:f=!1,hideHeader:g=!1,hideSidebar:m=!1,onDelete:x,deleteLabel:M="Supprimer",width:v="75%",maxWidth:I="none",height:b="85%",maxHeight:w="85%",borderRadius:C="0.5rem",childrenPadding:_="1rem",overflow:L="auto",contentHeaderAction:j,contentFooterAction:N,footerOverride:S,hideFooter:z=!1,hideOverlay:A=!1,position:H,a11yConfig:P})=>{const[V,$]=k.useState(!1),q=k.useRef(null);if(k.useEffect(()=>{if(!r||!A)return;const T=O=>{(O.type==="scroll"||O.type==="wheel"||O.type==="touchmove"||q.current&&!q.current.contains(O.target))&&s()};return document.addEventListener("mousedown",T),document.addEventListener("scroll",T,!0),document.addEventListener("wheel",T,{passive:!0,capture:!0}),document.addEventListener("touchmove",T,{passive:!0,capture:!0}),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("scroll",T,!0),document.removeEventListener("wheel",T,!0),document.removeEventListener("touchmove",T,!0)}},[r,A,s]),!r)return null;const R=(T,O=!1)=>o.jsx(yL,{onClick:T.disabled?void 0:T.onClick,className:qe.baseButton,disabled:T.disabled,style:{background:T.backgroundColor??(O?"#008FBB":"#ffffff"),color:T.textColor??(O?"#ffffff":"#374151"),border:T.borderColor?`1px solid ${T.borderColor}`:O?"none":void 0,cursor:T.disabled?T.cursor??"not-allowed":T.cursor??"pointer",filter:T.disabled?T.filter??"grayscale(0.5)":T.filter??"none",opacity:T.disabled?.65:1},title:Y(T.a11yConfig,T.text),children:T.text});return o.jsx("div",{className:A?qe.noOverlay:qe.overlay,onClick:s,children:o.jsxs("div",{ref:q,className:`${qe.container} ${V?qe.fullscreen:""} ${A?qe.contained:""}`,onClick:T=>T.stopPropagation(),style:{width:V?"100%":v,maxWidth:V?"none":I,height:V?"100%":b,maxHeight:V?"100%":w,borderRadius:V?"0":C,overflow:L,...H||{}},children:[!g&&o.jsxs("header",{className:qe.header,style:{backgroundColor:n},children:[o.jsx("h2",{style:{fontSize:c,fontWeight:i,color:t},title:Y(P,e),children:e}),o.jsxs("div",{className:qe.headerActions,children:[!f&&o.jsx("button",{onClick:()=>$(!V),className:qe.iconButton,title:V?"Réduire":"Agrandir",children:V?o.jsx(Gve,{width:22,height:22,fill:t}):o.jsx(Ove,{width:22,height:22,fill:t})}),o.jsx("button",{onClick:s,className:qe.iconButton,title:"Fermer",children:o.jsx(DA,{width:22,height:22,fill:t})})]})]}),o.jsxs("div",{className:qe.body,style:{overflow:L},children:[y&&!m&&o.jsx("aside",{className:qe.sidebar,children:y}),o.jsxs("main",{className:qe.content,style:{backgroundColor:p,overflow:L},children:[u&&o.jsxs("header",{className:qe.contentHeader,style:{backgroundColor:n},children:[o.jsx("span",{style:{color:t},children:u}),j]}),o.jsx("div",{className:qe.childrenWrapper,style:{padding:_,overflow:L},children:h})]})]}),!z&&o.jsx("footer",{className:qe.footer,style:{backgroundColor:n},children:S!==void 0?S:o.jsxs(o.Fragment,{children:[x&&o.jsx(yL,{onClick:x,className:qe.baseButton,style:{background:"#fee2e2",color:"#ef4444",marginRight:"auto",border:"none"},children:M}),N,R(d),R(l,!0)]})})]})})},l9e="_container_1vb1c_1",h9e="_searchWrapper_1vb1c_10",u9e="_navItems_1vb1c_17",Kb={container:l9e,searchWrapper:h9e,navItems:u9e},p9e=({items:e,activeId:t,activeColor:n="#00aec7",backgroundColor:c="#fff",textColor:i="#000",onItemClick:r,searchValue:s="",onSearchChange:d,searchPlaceholder:l="Rechercher",width:h="100%",className:u=""})=>o.jsxs("div",{className:`${Kb.container} ${u}`,style:{width:h,backgroundColor:c,color:i},children:[o.jsx("div",{className:Kb.searchWrapper,children:o.jsx($A,{value:s,onChange:d,placeholder:l,iconPosition:"right",iconColor:"var(--color-text)"})}),o.jsx("div",{className:Kb.navItems,children:e.map(p=>o.jsx(lC,{id:p.id,label:p.label,icon:p.icon,isActive:t===p.id,onClick:()=>r?.(p.id),activeColor:n,color:i,fontWeight:"600",fontSize:"0.75rem",padding:"0.75rem 1rem",iconGap:"0.5rem"},p.id))})]}),y9e=({modules:e,selectedModuleId:t,onSelectModule:n,onAddModule:c,onItemAdd:i,onEditModule:r,onDeleteModule:s,onReorder:d,title:l="Modules",titleKey:h,addModuleTitle:u="Ajouter un module",addModuleLabel:p="Titre",addModulePlaceholder:y="Nom du module",renameModuleTitle:f="Renommer le module",renameModuleLabel:g="Titre",renameModulePlaceholder:m="Nom du module",confirmText:x="Valider",cancelText:M="Annuler",headerLabel:v,headerLabelKey:I,showAddIcon:b=!0,showCount:w=!0,showToggle:C=!1,showActions:_=!0,onToggle:L,a11yConfig:j})=>{const[N,S]=k.useState(!1),[z,A]=k.useState(null),[H,P]=k.useState(null),[V,$]=k.useState(null),[q,R]=k.useState(null),T=()=>{R(W=>W===null?"asc":W==="asc"?"desc":null),L&&L()},O=k.useMemo(()=>q?[...e].sort((W,X)=>{const se=W.title.toLowerCase(),$e=X.title.toLowerCase();return q==="asc"?se.localeCompare($e):$e.localeCompare(se)}):e,[e,q]),J=()=>S(!0),E=()=>S(!1),U=W=>{const X=W.title?.trim();X&&c&&c(X),E()},ie=(W,X)=>{W.stopPropagation(),A(X)},ce=()=>A(null),Me=W=>{const X=W.title?.trim();z&&X&&r&&r(z,X),ce()},re=(W,X)=>{W.stopPropagation(),s&&s(X)},ae=(W,X)=>{W.stopPropagation(),i&&i(X)},ne=(W,X)=>{P(X),W.dataTransfer.effectAllowed="move"},le=(W,X)=>{H!==null&&(W.preventDefault(),W.dataTransfer.dropEffect="move",X!==V&&$(X))},pe=(W,X)=>{if(W.preventDefault(),H===null||H===X||!d)return;const se=[...O],[$e]=se.splice(H,1);se.splice(X,0,$e),R(null),d(se),P(null),$(null)},me=()=>{P(null),$(null)};return o.jsxs("div",{className:"module-sidebar-v2",children:[o.jsx("div",{className:"sidebar-header",children:v?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-label-container",onClick:T,children:[o.jsx("div",{className:"header-label",title:Y(j,I),children:v}),q==="asc"?o.jsx(t1,{size:12,className:"header-toggle-icon",strokeWidth:3}):o.jsx(e1,{size:12,className:"header-toggle-icon",strokeWidth:3})]}),b&&o.jsx(Ac,{size:18,className:"add-view-icon",onClick:J})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-title",title:Y(j,h),children:[C&&(q==="asc"?o.jsx(t1,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:T}):o.jsx(e1,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:T})),l," ",w&&`(${O.length})`]}),b&&o.jsx(Ac,{size:18,className:"add-view-icon",onClick:J})]})}),o.jsx("div",{className:"module-list",children:O.map((W,X)=>o.jsxs("div",{className:`module-item ${W.id===t?"selected":""} ${V===X&&H!==X?"drag-over":""} ${H===X?"dragging":""}`,onClick:()=>n&&n(W),draggable:!!d,onDragStart:d?se=>ne(se,X):void 0,onDragOver:d?se=>le(se,X):void 0,onDrop:d?se=>pe(se,X):void 0,onDragEnd:d?me:void 0,children:[W.icon||o.jsx(A1,{size:18,className:"drag-handle"}),o.jsxs("div",{className:"module-content",title:Y(W.a11yConfig,W.titleKey),children:[o.jsx("div",{className:"module-title",children:W.title}),W.subtitle&&o.jsx("div",{className:"module-subtitle",children:W.subtitle})]}),typeof W.count<"u"&&o.jsx("span",{className:"module-count",children:W.count}),_&&o.jsxs("div",{className:"module-actions",children:[i&&o.jsx(zc,{size:14,className:"action-icon add",onClick:se=>ae(se,W)}),r&&o.jsx(xt,{size:12,className:"action-icon edit",onClick:se=>ie(se,W)}),s&&o.jsx(kt,{size:12,className:"action-icon delete",onClick:se=>re(se,W)})]})]},W.id))}),o.jsx(Dc,{isOpen:N,onClose:E,onSave:U,title:u,fields:[{name:"title",label:p,placeholder:y}],confirmText:x,cancelText:M}),z&&o.jsx(Dc,{isOpen:!!z,onClose:ce,onSave:Me,title:f,initialValues:{title:z.title},fields:[{name:"title",label:g,placeholder:m}],confirmText:x,cancelText:M})]})},k9e=({mod:e,index:t,total:n,isSelected:c,onSelectModule:i})=>o.jsxs("div",{className:`module-item${c?" selected":""}`,onClick:()=>i?.(e),"aria-posinset":t+1,"aria-setsize":n,role:"listitem",children:[e.icon,o.jsxs("div",{className:"module-content",title:Y(e.a11yConfig,e.titleKey),children:[o.jsx("div",{className:"module-title",children:e.title}),e.subtitle&&o.jsx("div",{className:"module-subtitle",children:e.subtitle})]})]}),m9e=({modules:e,selectedModuleId:t,onSelectModule:n,title:c="Modules",titleKey:i,showCount:r=!0,showSearch:s=!0,searchValue:d,searchPlaceholder:l,onSearchTyping:h,onSearchSubmit:u,searchDebounceMs:p=300,isLoading:y=!1,loadingComponent:f,emptyComponent:g,a11yConfig:m,borderColor:x,hoverBackgroundColor:M,selectedBackgroundColor:v})=>{const[I,b]=k.useState(d??""),w=k.useRef(null);k.useEffect(()=>{d!==void 0&&b(d)},[d]),k.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const C=j=>{const N=j.target.value;b(N),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{h?.(N)},p)},_=j=>{j.key==="Enter"&&u?.(I)},L={"--smsb-border-color":x??"var(--color-border, #efefef)","--smsb-hover-background":M??"var(--color-content-background, #f8fafc)","--smsb-selected-background":v??"var(--color-neutral, #f4f4f4)"};return o.jsxs("div",{className:"searchable-module-sidebar",style:L,children:[o.jsx("div",{className:"sidebar-header",children:o.jsxs("div",{className:"header-title",title:Y(m,i),children:[c," ",r&&`(${e.length})`]})}),s&&o.jsx("div",{className:"sidebar-search",children:o.jsx("input",{type:"text",className:"search-input",value:I,placeholder:l,onChange:C,onKeyDown:_})}),o.jsx("div",{className:"module-list",children:y?f:e.length===0?g:e.map((j,N)=>o.jsx(k9e,{mod:j,index:N,total:e.length,isSelected:j.id===t,onSelectModule:n},j.id))})]})},f9e=({keyName:e,translations:t,availableLanguages:n,onChange:c,onRename:i,onDelete:r,a11yConfig:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(e),[p,y]=k.useState(null),[f,g]=k.useState(""),[m,x]=k.useState(!1),[M,v]=k.useState(""),[I,b]=k.useState(""),w=k.useMemo(()=>{const V={};return Array.isArray(t)&&t.forEach($=>{$&&$.language&&(V[$.language.toUpperCase()]=$.value)}),V},[t]),C=k.useMemo(()=>n,[n]),_=()=>{l(!1),h!==e&&h.trim()!==""?i&&i(h.trim()):u(e)},L=V=>{V.key==="Enter"?_():V.key==="Escape"&&(u(e),l(!1))},j=V=>{const $=V.toUpperCase();y($),g(w[$]||"")},N=()=>{p&&(c(p,f),y(null),g(""))},S=V=>{V.key==="Enter"?N():V.key==="Escape"&&(y(null),g(""))},z=()=>{x(!0),C.length>0&&v(C[0].toUpperCase()),b("")},A=()=>{M&&I.trim()&&(c(M,I.trim()),x(!1),v(""),b(""))},H=()=>{x(!1),v(""),b("")},P=V=>{V.key==="Enter"?A():V.key==="Escape"&&H()};return o.jsxs("div",{className:"translation-key-v2",children:[o.jsxs("div",{className:"header",children:[d?o.jsx("input",{className:"key-name-input",value:h,onChange:V=>u(V.target.value),onBlur:_,onKeyDown:L,autoFocus:!0}):o.jsx("h3",{className:"header-title",title:Y(s,e),children:e}),o.jsxs("div",{className:"header-actions",children:[o.jsx(xt,{size:16,className:"action-icon edit",onClick:()=>l(!0)}),o.jsx(kt,{size:16,className:"action-icon delete",onClick:r})]})]}),o.jsxs("div",{className:"translations-list",children:[n.map(V=>{const $=V.toUpperCase(),q=w[$]||"",R=p===$;return o.jsxs("div",{className:"lang-row",children:[o.jsx("div",{className:"lang-label",children:$}),R?o.jsx("input",{className:"translation-input editing",value:f,onChange:T=>g(T.target.value),onBlur:N,onKeyDown:S,placeholder:"Entrez la traduction...",autoFocus:!0}):o.jsx("div",{className:`translation-value ${q?"":"empty"}`,onClick:()=>j(V),title:"Cliquer pour éditer",children:q||"Cliquer pour ajouter..."})]},V)}),m?o.jsxs("div",{className:"lang-row add-row",children:[o.jsx("select",{className:"lang-select",value:M,onChange:V=>v(V.target.value),children:C.map(V=>o.jsx("option",{value:V.toUpperCase(),children:V.toUpperCase()},V))}),o.jsx("input",{className:"translation-input editing",value:I,onChange:V=>b(V.target.value),onKeyDown:P,placeholder:"Mot",autoFocus:!0}),o.jsxs("div",{className:"add-actions",children:[o.jsx(N1,{size:18,className:"action-icon confirm",onClick:A}),o.jsx(at,{size:18,className:"action-icon cancel",onClick:H})]})]}):C.length>0&&o.jsxs("button",{className:"add-translation-btn",onClick:z,children:[o.jsx(zc,{size:16}),o.jsx("span",{children:"Ajouter"})]})]})]})},g9e="_overlay_afn8e_1",v9e="_modal_afn8e_15",x9e="_body_afn8e_28",M9e="_footer_afn8e_48",_9e="_confirmButton_afn8e_57",L9e="_danger_afn8e_74",I9e="_cancelButton_afn8e_78",jt={overlay:g9e,modal:v9e,body:x9e,footer:M9e,confirmButton:_9e,danger:L9e,cancelButton:I9e},b9e=({isOpen:e,message:t,children:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",isDanger:d=!1,hideFooter:l=!1,secondaryConfirmText:h,onSecondaryConfirm:u,modalStyle:p,bodyStyle:y,footerStyle:f,cancelButtonStyle:g,confirmButtonStyle:m,overlayStyle:x,modalClassName:M,bodyClassName:v,footerClassName:I,overlayClassName:b})=>{if(!e)return null;const w=n??t;return o.jsx("div",{className:`${jt.overlay} ${b||""}`.trim(),onClick:i,style:x,children:o.jsxs("div",{className:`${jt.modal} ${M||""}`.trim(),onClick:C=>C.stopPropagation(),style:p,children:[o.jsx("div",{className:`${jt.body} ${v||""}`.trim(),style:y,children:typeof w=="string"?o.jsx("p",{children:w}):w}),!l&&o.jsxs("div",{className:`${jt.footer} ${I||""}`.trim(),style:f,children:[s&&o.jsx("button",{className:jt.cancelButton,onClick:i,style:g,children:s}),h&&u&&o.jsx("button",{className:jt.confirmButton,onClick:u,children:h}),r&&o.jsx("button",{className:`${jt.confirmButton} ${d?jt.danger:""}`,onClick:c,style:m,children:r})]})]})})},w9e="_card_1ildr_1",C9e="_topIcon_1ildr_17",N9e="_title_1ildr_24",S9e="_text_1ildr_31",j9e="_bottomIcon_1ildr_37",x1={card:w9e,topIcon:C9e,title:N9e,text:S9e,bottomIcon:j9e},$9e=({topIcon:e,title:t,text:n,bottomIcon:c,onClick:i,className:r="",headerTextColor:s="#000",textColor:d="#4b5563",backgroundColor:l="#fff",a11yConfig:h})=>o.jsxs("div",{className:`${x1.card} ${r}`,onClick:i,role:i?"button":void 0,tabIndex:i?0:void 0,style:{backgroundColor:l},title:Y(h,t),children:[e&&o.jsx("div",{className:x1.topIcon,children:e}),o.jsx("h3",{className:x1.title,style:{color:s},children:t}),o.jsx("p",{className:x1.text,style:{color:d},children:n}),c&&o.jsx("div",{className:x1.bottomIcon,children:c})]}),q9e="_container_1bmmf_1",A9e="_disabled_1bmmf_9",z9e="_selectBox_1bmmf_14",V9e="_selectBoxOpen_1bmmf_36",P9e="_tagsContainer_1bmmf_41",T9e="_tagsContainerWrap_1bmmf_51",H9e="_tag_1bmmf_41",D9e="_tagLabel_1bmmf_72",B9e="_removeBtnContainer_1bmmf_78",R9e="_removeBtn_1bmmf_78",F9e="_searchInput_1bmmf_103",E9e="_placeholder_1bmmf_123",O9e="_actions_1bmmf_130",U9e="_clearBtn_1bmmf_137",W9e="_chevron_1bmmf_159",G9e="_chevronOpen_1bmmf_165",K9e="_dropdown_1bmmf_169",Z9e="_option_1bmmf_183",X9e="_optionHeader_1bmmf_196",Y9e="_noOptions_1bmmf_212",J9e="_overflowBlock_1bmmf_219",Q9e="_overflowEllipsis_1bmmf_226",exe="_overflowBadge_1bmmf_233",txe="_overflowBadgeWrap_1bmmf_256",axe="_overflowDropdown_1bmmf_262",nxe="_overflowDropdownItem_1bmmf_278",oxe="_overflowDropdownItemLabel_1bmmf_289",cxe="_overflowDropdownItemRemove_1bmmf_296",de={container:q9e,disabled:A9e,selectBox:z9e,selectBoxOpen:V9e,tagsContainer:P9e,tagsContainerWrap:T9e,tag:H9e,tagLabel:D9e,removeBtnContainer:B9e,removeBtn:R9e,searchInput:F9e,placeholder:E9e,actions:O9e,clearBtn:U9e,chevron:W9e,chevronOpen:G9e,dropdown:K9e,option:Z9e,optionHeader:X9e,noOptions:Y9e,overflowBlock:J9e,overflowEllipsis:Q9e,overflowBadge:exe,overflowBadgeWrap:txe,overflowDropdown:axe,overflowDropdownItem:nxe,overflowDropdownItemLabel:oxe,overflowDropdownItemRemove:cxe},ixe=({options:e,noOptionsMessage:t="",value:n,onChange:c,placeholder:i="Sélectionner...",isSearchable:r=!0,className:s="",disabled:d=!1,allowWrap:l=!1})=>{const[h,u]=k.useState(!1),[p,y]=k.useState(""),f=k.useRef(null),g=k.useRef(null),m=k.useRef(null),x=k.useRef(null),[M,v]=k.useState(null),[I,b]=k.useState(!1),w=k.useRef([]),C=k.useRef(null),_=k.useMemo(()=>{const $=new Map(e.map(q=>[q.value,q]));return n.map(q=>$.get(q)).filter(q=>q!==void 0)},[e,n]),L=k.useMemo(()=>e.filter($=>!n.includes($.value)),[e,n]),j=k.useMemo(()=>{let $=L;return p&&($=$.filter(q=>q.label.toLowerCase().includes(p.toLowerCase()))),$.filter((q,R)=>{if(!q.isHeader)return!0;for(let T=R+1;T<$.length&&!$[T].isHeader;T++)return!0;return!1})},[L,p]);k.useEffect(()=>{const $=q=>{const R=q.target;f.current&&!f.current.contains(R)&&(u(!1),y(""),v(null),b(!1))};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]),k.useEffect(()=>{if(l)return;if(_.length===0){v(null),w.current=[];return}_.length>w.current.length&&v(null);const $=()=>{const O=m.current,J=x.current;if(!O||!J)return;const E=J.getBoundingClientRect().width,U=J.querySelector(`.${de.actions}`),ie=U?U.getBoundingClientRect().width:80,ce=56,Me=r?80:0,re=16,ae=Array.from(O.querySelectorAll(`.${de.tag}`));ae.length===_.length&&(w.current=ae.map(ve=>{const je=ve.getBoundingClientRect(),Bc=ve.scrollWidth;return Math.max(je.width,Bc,ve.offsetWidth||0)}));const ne=w.current,le=ne.length>0?ne.reduce((ve,je)=>ve+je,0)/ne.length:120,pe=_.length<=ne.length?ne.slice(0,_.length):[...ne,...Array(_.length-ne.length).fill(le)],me=4,W=Math.max(0,E-ie-Me-re);let X=0,se=0;for(let ve=0;ve<_.length;ve++){const je=pe[ve]??120;if(X+je+me>W)break;X+=je+me,se++}if(se>=_.length){v(null);return}const $e=Math.max(0,E-ce-ie-Me-re);X=0;let Re=0;for(let ve=0;ve<_.length;ve++){const je=pe[ve]??120;if(X+je+me>$e)break;X+=je+me,Re++}Re<_.length&&Re>0?v(Re):v(null)},q=requestAnimationFrame(()=>{$()}),R=setTimeout($,100),T=new ResizeObserver(()=>{$()});return x.current&&T.observe(x.current),()=>{cancelAnimationFrame(q),clearTimeout(R),T.disconnect()}},[_,r,h,l]);const N=()=>{if(d)return;const $=!h;$&&b(!1),u($),$&&r&&setTimeout(()=>g.current?.focus(),0)},S=$=>{if(n.includes($.value))return;b(!1);const q=[..._,$];c(q),y(""),v(null),u(!1)},z=$=>{$.preventDefault(),$.stopPropagation(),b(q=>!q)},A=M!=null&&M<_.length?_.slice(M):[],H=($,q)=>{q.stopPropagation();const R=_.filter(T=>T.value!==$);c(R)},P=$=>{$.stopPropagation(),c([])},V=$=>{$.stopPropagation(),h||u(!0)};return o.jsxs("div",{className:`${de.container} ${s} ${d?de.disabled:""}`,ref:f,children:[o.jsxs("div",{ref:x,className:`${de.selectBox} ${h?de.selectBoxOpen:""}`,onClick:N,role:"combobox","aria-expanded":h,"aria-haspopup":"listbox",children:[o.jsxs("div",{className:`${de.tagsContainer} ${l?de.tagsContainerWrap:""}`,ref:m,children:[M!==null&&M>0?_.slice(0,M).map(($,q)=>o.jsxs("div",{className:de.tag,children:[o.jsx("div",{className:de.tagLabel,children:o.jsx("span",{children:$.label})}),o.jsx("div",{className:de.removeBtnContainer,children:o.jsx("button",{type:"button",className:de.removeBtn,onClick:R=>H($.value,R),"aria-label":`Supprimer ${$.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${$.value}-${q}`)):_.map(($,q)=>o.jsxs("div",{className:de.tag,children:[o.jsx("div",{className:de.tagLabel,children:o.jsx("span",{children:$.label})}),o.jsx("div",{className:de.removeBtnContainer,children:o.jsx("button",{type:"button",className:de.removeBtn,onClick:R=>H($.value,R),"aria-label":`Supprimer ${$.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${$.value}-${q}`)),r?o.jsx("input",{ref:g,type:"text",className:de.searchInput,placeholder:_.length===0?i:"",value:p,onChange:$=>{y($.target.value),h||u(!0)},onClick:V,disabled:d}):_.length===0&&o.jsx("span",{className:de.placeholder,children:i})]}),!l&&M!==null&&M<_.length&&o.jsxs("div",{className:de.overflowBlock,children:[o.jsx("span",{className:de.overflowEllipsis,children:"..."}),o.jsxs("div",{className:de.overflowBadgeWrap,children:[o.jsx("button",{ref:C,type:"button",className:de.overflowBadge,onClick:z,"aria-label":`Afficher ${A.length} éléments cachés`,children:A.length}),I&&A.length>0&&o.jsx("div",{className:de.overflowDropdown,role:"list","aria-label":"Éléments cachés",children:A.map(($,q)=>o.jsxs("div",{className:de.overflowDropdownItem,children:[o.jsx("span",{className:de.overflowDropdownItemLabel,children:$.label}),o.jsx("button",{type:"button",className:de.overflowDropdownItemRemove,onClick:R=>{R.stopPropagation(),H($.value,R)},"aria-label":`Supprimer ${$.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]},`hidden-${$.value}-${q}`))})]})]}),o.jsxs("div",{className:de.actions,children:[_.length>0&&o.jsx("button",{type:"button",className:de.clearBtn,onClick:P,"aria-label":"Effacer tout",children:o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:o.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),o.jsx("svg",{className:`${de.chevron} ${h?de.chevronOpen:""}`,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M6 9l6 6 6-6"})})]})]}),h&&!d&&o.jsx("div",{className:de.dropdown,role:"listbox",children:j.length>0?j.map(($,q)=>o.jsx("div",{className:`${de.option} ${$.isHeader?de.optionHeader:""}`,onClick:()=>!$.isHeader&&S($),role:"option","aria-selected":!1,children:$.label},`opt-${$.value}-${q}`)):o.jsx("div",{className:de.noOptions,children:t})})]})},rxe="_container_h7jek_1",Fj={container:rxe},sxe=({a11yConfigs:e=[],titleKeys:t=[],labels:n=[],data:c=[],selectedUfs:i=[],icons:r=[],lastCardTextColor:s="black",boardColors:d={},order:l})=>{const h=k.useMemo(()=>{const g=i.length===0?c:c.filter(x=>x&&i.includes(String(x.uf).replace(/^0+/,""))),m=new Set;return g.filter(x=>{if(!x||!x.uf)return!1;const M=String(x.uf).replace(/^0+/,"");return m.has(M)?!1:(m.add(M),!0)})},[c,i]),u=k.useMemo(()=>h.reduce((g,m)=>({disponibles:g.disponibles+(m.totalAvailable??m.disponibles??0),homme:g.homme+(m.availableMen??m.disponibleHomme??0),femme:g.femme+(m.availableWomen??m.disponibleFemme??0),indifferencie:g.indifferencie+(m.availableIndifferentSex??m.indifferences??0),sorties:g.sorties+(m.outToday??m.sortie24??0),occupiedBed:g.occupiedBed+(m.occupiedBed??0),patientsPresents:g.patientsPresents+(m.patientsPresents??0),occupationRate:g.occupationRate+(m.occupationRate??0),occupesRaw:g.occupesRaw+(m.occupesRaw??0),ouvertsRaw:g.ouvertsRaw+(m.ouvertsRaw??0)}),{disponibles:0,homme:0,femme:0,indifferencie:0,sorties:0,occupiedBed:0,patientsPresents:0,occupationRate:0,occupesRaw:0,ouvertsRaw:0}),[h]),p=g=>d.disponibles?d.disponibles:g>3?"#35994E":g>=1?"#EF6C00":"#C62828",y={bars:"none",justifyContent:"flexStart",alignItems:"center",valueFontWeight:"400",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}},f=(g,m)=>{const x=l!==void 0&&m===l.length-1;switch(g){case"disponibles":return{...y,value:u.disponibles.toLocaleString("fr-FR"),backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",titleColor:"white",valueColor:"white"};case"occupiedBed":return{...y,value:u.occupiedBed.toLocaleString("fr-FR"),backgroundColor:d.occupes??d.homme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"patientsPresents":return{...y,value:u.patientsPresents.toLocaleString("fr-FR"),backgroundColor:d.patientsPresents??d.femme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"occupationRate":{const M=u.ouvertsRaw>0?parseFloat((u.occupesRaw/u.ouvertsRaw*100).toFixed(2)):u.occupationRate;return{...y,value:`${M.toLocaleString("fr-FR")}%`,backgroundColor:d.occupationRate??d.indifferencie??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"}}case"outToday":return{...y,value:u.sorties.toLocaleString("fr-FR"),backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",titleColor:s,valueColor:s}}};return l&&l.length>0?o.jsx("div",{className:Fj.container,children:l.map((g,m)=>o.jsx(Mt,{a11yConfig:e[m],titleKey:t[m],label:n[m],iconName:r[m],...f(g,m)},g))}):o.jsxs("div",{className:Fj.container,children:[o.jsx(Mt,{a11yConfig:e[0],titleKey:t[0],label:n[0],value:u.disponibles.toLocaleString("fr-FR"),iconName:r[0],backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"white",valueColor:"white",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[1],titleKey:t[1],label:n[1],value:u.homme.toLocaleString("fr-FR"),iconName:r[1],backgroundColor:d.homme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[2],titleKey:t[2],label:n[2],value:u.femme.toLocaleString("fr-FR"),iconName:r[2],backgroundColor:d.femme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[3],titleKey:t[3],label:n[3],value:u.indifferencie.toLocaleString("fr-FR"),iconName:r[3],backgroundColor:d.indifferencie??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[4],titleKey:t[4],label:n[4],value:u.sorties.toLocaleString("fr-FR"),iconName:r[4],backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:s,valueColor:s,titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}})]})},dxe="_container_1pt6c_1",lxe="_chartContainer_1pt6c_14",hxe="_legend_1pt6c_22",uxe="_legendItem_1pt6c_29",pxe="_leftSection_1pt6c_41",yxe="_colorIndicator_1pt6c_47",kxe="_label_1pt6c_54",mxe="_rightSection_1pt6c_60",fxe="_ratio_1pt6c_66",gxe="_value1_1pt6c_73",vxe="_separator_1pt6c_78",xxe="_value2_1pt6c_82",Mxe="_statusIndicator_1pt6c_87",_xe="_inactive_1pt6c_102",Ue={container:dxe,chartContainer:lxe,legend:hxe,legendItem:uxe,leftSection:pxe,colorIndicator:yxe,label:kxe,rightSection:mxe,ratio:fxe,value1:gxe,separator:vxe,value2:xxe,statusIndicator:Mxe,inactive:_xe},Ej=Math.PI/180,Lxe=({data:e,height:t=400,bg:n,backgroundColor:c,color:i,fontSize:r,fontWeight:s,padding:d,margin:l,borderRadius:h,className:u="",style:p={},labelColor:y,ratioColor:f,separatorColor:g,borderColor:m,hideDonut:x=!0,hideColorIndicator:M=!1})=>{const[v,I]=k.useState(new Set(e.map(N=>N.nom))),b=N=>{const S=new Set(v);S.has(N)?S.size>1&&S.delete(N):S.add(N),I(S)},w={...p,"--bg-color":n||c||"transparent","--text-color":i||"inherit","--font-size":r||"14px","--font-weight":s||"400","--padding":d||"0","--margin":l||"0","--border-radius":h||"0","--label-color":y||"inherit","--ratio-color":f||"inherit","--separator-color":g||"#03a9f4","--border-color":m||"#e0e0e0"},C=k.useMemo(()=>e.map(N=>({...N,displayValue:v.has(N.nom)?N.value:0})),[e,v]),_=k.useMemo(()=>e.every(N=>N.value===0),[e]),L=k.useMemo(()=>_?1:C.reduce((N,S)=>N+S.displayValue,0)||1,[_,C]),j=k.useCallback(({cx:N,cy:S,midAngle:z,innerRadius:A,outerRadius:H,value:P})=>{if(P===0||_)return null;const V=A+(H-A)*.5,$=N+V*Math.cos(-z*Ej),q=S+V*Math.sin(-z*Ej),R=Math.round(P/L*100);return o.jsx(a.Text,{x:$,y:q,fill:"white",textAnchor:"middle",dominantBaseline:"central",fontSize:12,fontWeight:"bold",children:`${R}%`})},[L,_]);return o.jsxs("div",{className:`${Ue.container} ${u}`,style:w,children:[!x&&o.jsx("div",{className:Ue.chartContainer,style:{height:t/2+100},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:"100%",children:o.jsx(a.PieChart,{children:o.jsx(a.Pie,{data:_?[{displayValue:1,color:"#A3C2CB"}]:C,cx:"50%",cy:"50%",innerRadius:45,outerRadius:75,paddingAngle:0,dataKey:"displayValue",stroke:"white",strokeWidth:_?0:2,startAngle:90,endAngle:450,labelLine:!1,label:j,isAnimationActive:!1,children:_?o.jsx(a.Cell,{fill:"#A3C2CB"}):C.map((N,S)=>o.jsx(a.Cell,{fill:N.color},`cell-${S}`))})})})}),o.jsx("div",{className:Ue.legend,children:e.map((N,S)=>{const z=v.has(N.nom);return o.jsxs("div",{className:`${Ue.legendItem} ${!x&&!z?Ue.inactive:""}`,onClick:()=>b(N.nom),style:{cursor:"pointer",transition:"opacity 0.2s"},children:[o.jsxs("div",{className:Ue.leftSection,children:[!M&&o.jsx("div",{className:Ue.colorIndicator,style:{backgroundColor:N.color,opacity:x||z?1:.3}}),o.jsx("span",{className:Ue.label,style:{opacity:x||z?1:.5},children:N.nom})]}),o.jsxs("div",{className:Ue.rightSection,style:{opacity:x||z?1:.5},children:[o.jsxs("div",{className:Ue.ratio,children:[o.jsx("span",{className:Ue.value1,children:N.value1}),o.jsx("span",{className:Ue.separator,children:"/"}),o.jsx("span",{className:Ue.value2,children:N.value2})]}),N.statusColor&&o.jsx("div",{className:Ue.statusIndicator,style:{backgroundColor:N.statusColor}})]})]},`legend-${S}`)})})]})},Ixe="_container_1pc4v_1",bxe="_leftGroup_1pc4v_10",wxe="_iconBtn_1pc4v_16",pi={container:Ixe,leftGroup:bxe,iconBtn:wxe},Cxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M3 12h18M3 6h18M3 18h18"})),Nxe=k.memo(Cxe),Sxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8m-4-6-4-4-4 4m4-4v13"})),BA=k.memo(Sxe),jxe=({menuIcon:e,logoProps:t,actionIcon:n,style:c,className:i,bgColor:r="var(--header-bg)",color:s="var(--color-text)",borderBottomColor:d="var(--color-border)",borderBottomWidth:l=1,height:h="8vh",onMenuClick:u,onActionClick:p})=>{const y={backgroundColor:r,color:s,borderBottom:`${l}px solid ${d}`,height:h,...c};return o.jsxs("header",{className:[pi.container,i].filter(Boolean).join(" "),style:y,children:[o.jsxs("div",{className:pi.leftGroup,children:[o.jsx("button",{className:pi.iconBtn,onClick:u,"aria-label":"Menu",style:{color:"inherit"},children:e??o.jsx(Nxe,{width:22,height:22})}),o.jsx(wL,{...t,size:"medium"})]}),o.jsx("button",{className:pi.iconBtn,onClick:p,"aria-label":"Action",style:{color:"inherit"},children:n??o.jsx(BA,{width:22,height:22})})]})},$xe="_container_24g3e_1",qxe="_iconBtn_24g3e_10",Axe="_title_24g3e_22",yi={container:$xe,iconBtn:qxe,title:Axe},zxe=({title:e="Menu",closeIcon:t,actionIcon:n,style:c,className:i,titleStyle:r,bgColor:s="var(--header-bg)",color:d="var(--color-text)",borderBottomColor:l="transparent",borderBottomWidth:h=0,height:u="8vh",onClose:p,onAction:y})=>{const f={backgroundColor:s,color:d,borderBottom:`${h}px solid ${l}`,height:u,...c};return o.jsxs("div",{className:[yi.container,i].filter(Boolean).join(" "),style:f,children:[o.jsx("button",{className:yi.iconBtn,onClick:p,"aria-label":"Fermer",style:{color:"inherit"},children:t??o.jsx(DA,{width:22,height:22})}),o.jsx("span",{className:yi.title,style:{fontWeight:"var(--font-weight-h)",fontSize:"var(--h5)",...r},children:e.toUpperCase()}),o.jsx("button",{className:yi.iconBtn,onClick:y,"aria-label":"Partager",style:{color:"inherit"},children:n??o.jsx(BA,{width:22,height:22})})]})};function RA(e){return e.state?e.state:e.active?"active":"available"}const Vxe=({title:e,countLabel:t="UF",actionIcon:n=o.jsx(kt,{size:16}),onAction:c,items:i=[],onItemClick:r,activeColor:s="#0083bb",id:d,children:l})=>{const h=k.useMemo(()=>i.filter(u=>RA(u)==="active").length,[i]);return o.jsxs(Pxe,{id:d,children:[o.jsxs(Txe,{children:[o.jsxs(Hxe,{children:[o.jsx(Dxe,{children:e}),o.jsxs(Bxe,{children:["(",h," ",t,")"]})]}),c&&o.jsx(Rxe,{onClick:c,title:"Action",children:n})]}),o.jsx(Fxe,{children:o.jsx(Exe,{children:i.map(u=>o.jsx(Uxe,{item:u,activeColor:s,onItemClick:r},u.id))})}),l&&o.jsx(Wxe,{children:l})]})},Pxe=F.div`
8348
- background: white;
8349
- border: 1px solid #ddd;
8347
+ `,style:{...oe,backgroundColor:t===Ie.value?j||"#F0F4F6":"transparent"},onMouseEnter:Ct=>{L&&(Ct.currentTarget.style.backgroundColor=L)},onMouseLeave:Ct=>{L&&(Ct.currentTarget.style.backgroundColor=t===Ie.value?j||"#F0F4F6":"transparent")},role:"option","aria-selected":t===Ie.value,children:o.jsxs("div",{className:Se.itemContent,style:we,children:[Ie.icon&&o.jsx("span",{className:Se.itemIcon,style:ve,children:Ie.icon}),o.jsx("span",{className:Se.itemLabel,children:Ie.label})]})},Ie.value))})})]})},D7e="_filterBar_1hlqe_3",B7e="_label_1hlqe_11",Bj={filterBar:D7e,label:B7e},R7e=({label:e="Filtres",startDate:t,endDate:n,granularity:c,onStartDateChange:i,onEndDateChange:r,onGranularityChange:s,granularityItems:d,startDatePlaceholder:l="Date début",endDatePlaceholder:h="Date fin",granularityPlaceholder:u="Sélectionner...",className:p="",disabled:y=!1,gap:f="0.75rem",labelFontSize:g="0.875rem",labelFontWeight:m="400",labelColor:x="#212529",labelMarginRight:M="1rem",startDateWidth:v,endDateWidth:I,selectWidth:b,datePickerProps:w={},selectProps:C={},rightContent:_,extraContent:L})=>{const j={fontSize:g,fontWeight:m,color:x,marginRight:M},N={gap:f};return o.jsxs("div",{className:`${Bj.filterBar} ${p}`,style:N,children:[e&&o.jsx("span",{className:Bj.label,style:j,children:e}),o.jsx(Lw,{value:t,onChange:i,placeholder:l,fullWidth:!1,disabled:y,label:void 0,width:v,...w}),o.jsx(Lw,{value:n,onChange:r,placeholder:h,fullWidth:!1,disabled:y,label:void 0,width:I,...w}),o.jsx(HA,{items:d,value:c,onChange:s,placeholder:u,fullWidth:!1,disabled:y,label:void 0,width:b,...C}),L,_&&o.jsx("div",{style:{marginLeft:"auto"},children:_})]})},F7e="_container_1x6mq_16",E7e="_disabled_1x6mq_26",O7e="_predStyle_1x6mq_32",U7e="_realStyle_1x6mq_36",W7e="_predGap_1x6mq_40",G7e="_realGap_1x6mq_44",K7e="_big_1x6mq_49",Z7e="_medium_1x6mq_53",X7e="_iconWrapper_1x6mq_58",Y7e="_predRelative_1x6mq_68",J7e="_realRelative_1x6mq_72",Q7e="_iconImg_1x6mq_76",eve="_content_1x6mq_84",tve="_header_1x6mq_93",ave="_predJustify_1x6mq_99",nve="_realJustify_1x6mq_103",ove="_predHeaderLineHeight_1x6mq_116",cve="_realHeaderLineHeight_1x6mq_120",ive="_title_1x6mq_129",rve="_titleBlack_1x6mq_144",sve="_titleWhite_1x6mq_148",dve="_subtitle_1x6mq_153",lve="_valueRowHorizontal_1x6mq_163",hve="_valueRowVertical_1x6mq_171",uve="_singleValue_1x6mq_180",pve="_primaryRow_1x6mq_184",yve="_maxBadge_1x6mq_191",kve="_valuePrimary_1x6mq_203",mve="_valuePrimaryBlack_1x6mq_210",fve="_valuePrimaryWhite_1x6mq_214",gve="_valueSlash_1x6mq_219",vve="_valueSecondary_1x6mq_226",xve="_valueSecondaryBlue_1x6mq_232",Mve="_valueSecondaryWhite_1x6mq_236",_ve="_valueSecondaryBlack_1x6mq_240",Lve="_valueStacked_1x6mq_245",Ive="_stackedTop_1x6mq_254",bve="_stackedBottom_1x6mq_255",ye={container:F7e,disabled:E7e,predStyle:O7e,realStyle:U7e,predGap:W7e,realGap:G7e,big:K7e,medium:Z7e,iconWrapper:X7e,predRelative:Y7e,realRelative:J7e,iconImg:Q7e,content:eve,header:tve,predJustify:ave,realJustify:nve,predHeaderLineHeight:ove,realHeaderLineHeight:cve,title:ive,titleBlack:rve,titleWhite:sve,subtitle:dve,valueRowHorizontal:lve,valueRowVertical:hve,singleValue:uve,primaryRow:pve,maxBadge:yve,valuePrimary:kve,valuePrimaryBlack:mve,valuePrimaryWhite:fve,valueSlash:gve,valueSecondary:vve,valueSecondaryBlue:xve,valueSecondaryWhite:Mve,valueSecondaryBlack:_ve,valueStacked:Lve,stackedTop:Ive,stackedBottom:bve},wve=({a11yConfig:e,iconName:t,title:n,subtitle:c,showSubtitle:i,realised:r="-",prediction:s="-",size:d="big",titleColor:l="black",valueColor:h="blue",realValueColor:u,predictionValueColor:p,className:y="",style:f="",variant:g="horizontal",showMax:m=!1,titleFontSize:x,titleFontWeight:M,subtitleFontSize:v,subtitleFontWeight:I,primaryFontSize:b,primaryFontWeight:w,secondaryFontSize:C,secondaryFontWeight:_,backgroundColor:L="#f2f9fc",gap:j="",disabled:N=!1,positionRelative:S="",justifyContent:z="",headerLineHeight:A="",headerMinHeight:H="",contentSpace:P="",titleKey:V,subtitleKey:$,subtitleA11yKey:q,maxBadgeKey:R,maxBadgeA11yKey:T,predictionKey:O,predictionA11yKey:J,realisedKey:E,realisedA11yKey:U})=>{const ie=i!==void 0?i:!!c,ce=`${ye.container} ${ye[d]} ${ye[f]} ${N?ye.disabled:""}`,Me=h==="white"?ye.valuePrimaryWhite:ye.valuePrimaryBlack,re=h==="blue"?ye.valueSecondaryBlue:h==="white"?ye.valueSecondaryWhite:ye.valueSecondaryBlack,ae=W=>W===void 0?void 0:typeof W=="number"?`${W}px`:W,ne=W=>W===void 0?void 0:W,le=g==="vertical",pe=s!=null&&s!==""&&s!=="-"&&s!=="—",me=le?ye.valueRowVertical:ye.valueRowHorizontal;return o.jsxs("div",{className:`${ce} ${y}`,style:{backgroundColor:L},children:[t&&o.jsx("div",{className:`${ye.iconWrapper} ${ye[S]}`,children:t}),o.jsxs("div",{className:`${ye.content} ${ye[j]} ${pe?"":ye.singleValue} content-indicator-v2`,style:{justifyContent:P},children:[o.jsx("div",{className:`${ye.header} ${ye[z]} ${ye[A]} header-indicator-v2`,style:{minHeight:H},children:o.jsx("h6",{className:`${ye.title}`,style:{fontSize:ae(x),fontWeight:ne(M),color:l},title:Y(e,V),children:n})}),ie&&c?o.jsx("div",{className:"subtitle-container",children:o.jsx("span",{className:ye.subtitle,style:{fontSize:ae(v),fontWeight:ne(I)},title:Y(e,$,q),children:c})}):null,o.jsxs("div",{className:`${me} count-indicator-v2`,children:[o.jsxs("div",{className:ye.primaryRow,children:[m&&o.jsx("span",{className:`${ye.maxBadge} max-badge-indicator-v2`,title:Y(e,R,T),children:"MAX"}),o.jsx("span",{className:`${ye.valuePrimary} ${Me}`,style:{fontSize:ae(b||(!pe&&le?"1.75rem":void 0)),fontWeight:ne(w),color:u||void 0},title:Y(e,E,U),children:r})]}),pe&&o.jsxs(o.Fragment,{children:[!le&&o.jsx("span",{className:ye.valueSlash,style:{fontSize:ae(C),fontWeight:ne(_)},children:"/"}),o.jsx("span",{className:`${ye.valueSecondary} ${re}`,style:{fontSize:ae(C),fontWeight:ne(_),color:p||void 0},title:Y(e,O,J),children:s})]})]})]})]})},Cve="_banner_f10in_2",Nve="_iep_f10in_14",Sve="_groupSmall_f10in_24",jve="_genre_f10in_34",$ve="_gravite_f10in_42",qve="_orientationContainer_f10in_48",Ave="_service_f10in_61",zve="_roomBedContainer_f10in_71",Vve="_room_f10in_71",Pve="_bed_f10in_87",Tve="_bedUf_f10in_92",Hve="_statusContainer_f10in_97",Dve="_status_f10in_97",Bve="_centeredWarn_f10in_124",Oe={banner:Cve,iep:Nve,groupSmall:Sve,genre:jve,gravite:$ve,orientationContainer:qve,service:Ave,roomBedContainer:zve,room:Vve,bed:Pve,bedUf:Tve,statusContainer:Hve,status:Dve,centeredWarn:Bve},Rve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("mask",{id:"a",width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},te.createElement("path",{fill:"#D9D9D9",d:"M0 0h16v16H0z"})),te.createElement("g",{mask:"url(#a)"},te.createElement("path",{fill:"#C60000",d:"M.666 14 7.999 1.333 15.333 14zm2.3-1.333h10.067L7.999 4zm5.508-.859a.65.65 0 0 0 .192-.475.65.65 0 0 0-.192-.475.65.65 0 0 0-.475-.191.65.65 0 0 0-.475.191.65.65 0 0 0-.191.475q0 .285.191.475A.65.65 0 0 0 8 12a.65.65 0 0 0 .475-.192M7.333 10h1.333V6.667H7.333z"}))),Rj=k.memo(Rve),Fve=({patient:e,genre:t,gravite:n,bed:c,bed_uf:i,room:r,orientation:s,status:d,backgroundColor:l="#ffffff",primaryFontColor:h="#111827",secondaryFontColor:u="#6b7280",statusFontColor:p="#0284c7",statusBackgroundColor:y="#e0f2fe",genreBackgroundColor:f="#9ca3af",genreFontSize:g,style:m,warn:x=!1,warnMessage:M,warnColor:v="#F94134"})=>o.jsxs("div",{className:Oe.banner,style:{backgroundColor:l,...m},children:[o.jsxs("div",{className:Oe.iep,children:[o.jsx("div",{style:{color:u},children:e.iep??"--"}),o.jsxs("div",{style:{color:h},children:[((e.nom||"").trim().split(/\s+/)[0]||"").substring(0,3).toUpperCase(),"."," ",((e.prenom||"").trim().split(/\s+/)[0]||"").substring(0,3).toLowerCase().replace(/^./,I=>I.toUpperCase()),".(",e.age,")"]})]}),o.jsxs("div",{className:Oe.groupSmall,children:[o.jsx("span",{className:`${Oe.genre} genre-info-banner`,style:{color:"#ffffff",background:f,fontSize:g},children:t??"--"}),o.jsx("span",{className:`${Oe.gravite} gravite-info-banner`,children:n??"--"})]}),o.jsx("div",{className:Oe.orientationContainer,children:o.jsx("div",{className:Oe.service,style:{color:h},children:s??"--"})}),o.jsxs("div",{className:Oe.roomBedContainer,children:[i&&o.jsx("span",{className:Oe.bedUf,children:i}),o.jsx("span",{className:Oe.room,children:r??"--"}),o.jsx("span",{className:Oe.bed,children:c??"--"})]}),o.jsxs("div",{className:Oe.statusContainer,children:[d?o.jsx("div",{className:`${Oe.status} status-info-banner`,style:{color:p,backgroundColor:y},children:d}):x&&o.jsxs("div",{className:Oe.centeredWarn,style:{textTransform:"uppercase"},children:[o.jsx(Rj,{color:v,width:20,height:20,style:{marginRight:"6px"}}),o.jsx("span",{style:{color:v,fontSize:"12px",fontWeight:600},children:M})]}),d&&x&&o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",color:v,fontSize:"10px",fontWeight:400,marginTop:"4px",textTransform:"uppercase"},children:[o.jsx(Rj,{color:v,width:12,height:12,style:{marginRight:"4px"}}),o.jsx("span",{children:M})]})]})]}),Eve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M200-200v-240h60v180h180v60zm500-320v-180H520v-60h240v240z"})),Ove=k.memo(Eve),Uve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231z"})),DA=k.memo(Uve),Wve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-440v240h-60v-180H200v-60zm140-320v180h180v60H520v-240z"})),Gve=k.memo(Wve),Kve="_overlay_1sx2l_1",Zve="_container_1sx2l_11",Xve="_fullscreen_1sx2l_24",Yve="_header_1sx2l_30",Jve="_headerActions_1sx2l_42",Qve="_iconButton_1sx2l_47",e9e="_body_1sx2l_58",t9e="_sidebar_1sx2l_65",a9e="_content_1sx2l_91",n9e="_contentHeader_1sx2l_98",o9e="_childrenWrapper_1sx2l_114",c9e="_footer_1sx2l_138",i9e="_baseButton_1sx2l_147",r9e="_noOverlay_1sx2l_161",s9e="_contained_1sx2l_169",qe={overlay:Kve,container:Zve,fullscreen:Xve,header:Yve,headerActions:Jve,iconButton:Qve,body:e9e,sidebar:t9e,content:a9e,contentHeader:n9e,childrenWrapper:o9e,footer:c9e,baseButton:i9e,noOverlay:r9e,contained:s9e},d9e=({headerText:e,headerTextColor:t="var(--color-text)",backgroundColor:n="var(--color-background)",headerFontSize:c="1rem",headerFontWeight:i="600",isOpen:r,onClose:s,leftButton:d,rightButton:l,children:h,contentTitle:u,contentBackgroundColor:p="var(--color-content-background)",sideContent:y,hideMaximize:f=!1,hideHeader:g=!1,hideSidebar:m=!1,onDelete:x,deleteLabel:M="Supprimer",width:v="75%",maxWidth:I="none",height:b="85%",maxHeight:w="85%",borderRadius:C="0.5rem",childrenPadding:_="1rem",overflow:L="auto",contentHeaderAction:j,contentFooterAction:N,footerOverride:S,hideFooter:z=!1,hideOverlay:A=!1,position:H,a11yConfig:P})=>{const[V,$]=k.useState(!1),q=k.useRef(null);if(k.useEffect(()=>{if(!r||!A)return;const T=O=>{(O.type==="scroll"||O.type==="wheel"||O.type==="touchmove"||q.current&&!q.current.contains(O.target))&&s()};return document.addEventListener("mousedown",T),document.addEventListener("scroll",T,!0),document.addEventListener("wheel",T,{passive:!0,capture:!0}),document.addEventListener("touchmove",T,{passive:!0,capture:!0}),()=>{document.removeEventListener("mousedown",T),document.removeEventListener("scroll",T,!0),document.removeEventListener("wheel",T,!0),document.removeEventListener("touchmove",T,!0)}},[r,A,s]),!r)return null;const R=(T,O=!1)=>o.jsx(yL,{onClick:T.disabled?void 0:T.onClick,className:qe.baseButton,disabled:T.disabled,style:{background:T.backgroundColor??(O?"#008FBB":"#ffffff"),color:T.textColor??(O?"#ffffff":"#374151"),border:T.borderColor?`1px solid ${T.borderColor}`:O?"none":void 0,cursor:T.disabled?T.cursor??"not-allowed":T.cursor??"pointer",filter:T.disabled?T.filter??"grayscale(0.5)":T.filter??"none",opacity:T.disabled?.65:1},title:Y(T.a11yConfig,T.text),children:T.text});return o.jsx("div",{className:A?qe.noOverlay:qe.overlay,onClick:s,children:o.jsxs("div",{ref:q,className:`${qe.container} ${V?qe.fullscreen:""} ${A?qe.contained:""}`,onClick:T=>T.stopPropagation(),style:{width:V?"100%":v,maxWidth:V?"none":I,height:V?"100%":b,maxHeight:V?"100%":w,borderRadius:V?"0":C,overflow:L,...H||{}},children:[!g&&o.jsxs("header",{className:qe.header,style:{backgroundColor:n},children:[o.jsx("h2",{style:{fontSize:c,fontWeight:i,color:t},title:Y(P,e),children:e}),o.jsxs("div",{className:qe.headerActions,children:[!f&&o.jsx("button",{onClick:()=>$(!V),className:qe.iconButton,title:V?"Réduire":"Agrandir",children:V?o.jsx(Gve,{width:22,height:22,fill:t}):o.jsx(Ove,{width:22,height:22,fill:t})}),o.jsx("button",{onClick:s,className:qe.iconButton,title:"Fermer",children:o.jsx(DA,{width:22,height:22,fill:t})})]})]}),o.jsxs("div",{className:qe.body,style:{overflow:L},children:[y&&!m&&o.jsx("aside",{className:qe.sidebar,children:y}),o.jsxs("main",{className:qe.content,style:{backgroundColor:p,overflow:L},children:[u&&o.jsxs("header",{className:qe.contentHeader,style:{backgroundColor:n},children:[o.jsx("span",{style:{color:t},children:u}),j]}),o.jsx("div",{className:qe.childrenWrapper,style:{padding:_,overflow:L},children:h})]})]}),!z&&o.jsx("footer",{className:qe.footer,style:{backgroundColor:n},children:S!==void 0?S:o.jsxs(o.Fragment,{children:[x&&o.jsx(yL,{onClick:x,className:qe.baseButton,style:{background:"#fee2e2",color:"#ef4444",marginRight:"auto",border:"none"},children:M}),N,R(d),R(l,!0)]})})]})})},l9e="_container_1vb1c_1",h9e="_searchWrapper_1vb1c_10",u9e="_navItems_1vb1c_17",Kb={container:l9e,searchWrapper:h9e,navItems:u9e},p9e=({items:e,activeId:t,activeColor:n="#00aec7",backgroundColor:c="#fff",textColor:i="#000",onItemClick:r,searchValue:s="",onSearchChange:d,searchPlaceholder:l="Rechercher",width:h="100%",className:u=""})=>o.jsxs("div",{className:`${Kb.container} ${u}`,style:{width:h,backgroundColor:c,color:i},children:[o.jsx("div",{className:Kb.searchWrapper,children:o.jsx($A,{value:s,onChange:d,placeholder:l,iconPosition:"right",iconColor:"var(--color-text)"})}),o.jsx("div",{className:Kb.navItems,children:e.map(p=>o.jsx(lC,{id:p.id,label:p.label,icon:p.icon,isActive:t===p.id,onClick:()=>r?.(p.id),activeColor:n,color:i,fontWeight:"600",fontSize:"0.75rem",padding:"0.75rem 1rem",iconGap:"0.5rem"},p.id))})]}),y9e=({modules:e,selectedModuleId:t,onSelectModule:n,onAddModule:c,onItemAdd:i,onEditModule:r,onDeleteModule:s,onReorder:d,title:l="Modules",titleKey:h,addModuleTitle:u="Ajouter un module",addModuleLabel:p="Titre",addModulePlaceholder:y="Nom du module",renameModuleTitle:f="Renommer le module",renameModuleLabel:g="Titre",renameModulePlaceholder:m="Nom du module",confirmText:x="Valider",cancelText:M="Annuler",headerLabel:v,headerLabelKey:I,showAddIcon:b=!0,showCount:w=!0,showToggle:C=!1,showActions:_=!0,onToggle:L,a11yConfig:j})=>{const[N,S]=k.useState(!1),[z,A]=k.useState(null),[H,P]=k.useState(null),[V,$]=k.useState(null),[q,R]=k.useState(null),T=()=>{R(W=>W===null?"asc":W==="asc"?"desc":null),L&&L()},O=k.useMemo(()=>q?[...e].sort((W,X)=>{const se=W.title.toLowerCase(),$e=X.title.toLowerCase();return q==="asc"?se.localeCompare($e):$e.localeCompare(se)}):e,[e,q]),J=()=>S(!0),E=()=>S(!1),U=W=>{const X=W.title?.trim();X&&c&&c(X),E()},ie=(W,X)=>{W.stopPropagation(),A(X)},ce=()=>A(null),Me=W=>{const X=W.title?.trim();z&&X&&r&&r(z,X),ce()},re=(W,X)=>{W.stopPropagation(),s&&s(X)},ae=(W,X)=>{W.stopPropagation(),i&&i(X)},ne=(W,X)=>{P(X),W.dataTransfer.effectAllowed="move"},le=(W,X)=>{H!==null&&(W.preventDefault(),W.dataTransfer.dropEffect="move",X!==V&&$(X))},pe=(W,X)=>{if(W.preventDefault(),H===null||H===X||!d)return;const se=[...O],[$e]=se.splice(H,1);se.splice(X,0,$e),R(null),d(se),P(null),$(null)},me=()=>{P(null),$(null)};return o.jsxs("div",{className:"module-sidebar-v2",children:[o.jsx("div",{className:"sidebar-header",children:v?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-label-container",onClick:T,children:[o.jsx("div",{className:"header-label",title:Y(j,I),children:v}),q==="asc"?o.jsx(t1,{size:12,className:"header-toggle-icon",strokeWidth:3}):o.jsx(e1,{size:12,className:"header-toggle-icon",strokeWidth:3})]}),b&&o.jsx(Ac,{size:18,className:"add-view-icon",onClick:J})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-title",title:Y(j,h),children:[C&&(q==="asc"?o.jsx(t1,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:T}):o.jsx(e1,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:T})),l," ",w&&`(${O.length})`]}),b&&o.jsx(Ac,{size:18,className:"add-view-icon",onClick:J})]})}),o.jsx("div",{className:"module-list",children:O.map((W,X)=>o.jsxs("div",{className:`module-item ${W.id===t?"selected":""} ${V===X&&H!==X?"drag-over":""} ${H===X?"dragging":""}`,onClick:()=>n&&n(W),draggable:!!d,onDragStart:d?se=>ne(se,X):void 0,onDragOver:d?se=>le(se,X):void 0,onDrop:d?se=>pe(se,X):void 0,onDragEnd:d?me:void 0,children:[W.icon||o.jsx(A1,{size:18,className:"drag-handle"}),o.jsxs("div",{className:"module-content",title:Y(W.a11yConfig,W.titleKey),children:[o.jsx("div",{className:"module-title",children:W.title}),W.subtitle&&o.jsx("div",{className:"module-subtitle",children:W.subtitle})]}),typeof W.count<"u"&&o.jsx("span",{className:"module-count",children:W.count}),_&&o.jsxs("div",{className:"module-actions",children:[i&&o.jsx(zc,{size:14,className:"action-icon add",onClick:se=>ae(se,W)}),r&&o.jsx(xt,{size:12,className:"action-icon edit",onClick:se=>ie(se,W)}),s&&o.jsx(kt,{size:12,className:"action-icon delete",onClick:se=>re(se,W)})]})]},W.id))}),o.jsx(Dc,{isOpen:N,onClose:E,onSave:U,title:u,fields:[{name:"title",label:p,placeholder:y}],confirmText:x,cancelText:M}),z&&o.jsx(Dc,{isOpen:!!z,onClose:ce,onSave:Me,title:f,initialValues:{title:z.title},fields:[{name:"title",label:g,placeholder:m}],confirmText:x,cancelText:M})]})},k9e=({mod:e,index:t,total:n,isSelected:c,onSelectModule:i})=>o.jsxs("div",{className:`module-item${c?" selected":""}`,onClick:()=>i?.(e),"aria-posinset":t+1,"aria-setsize":n,role:"listitem",children:[e.icon,o.jsxs("div",{className:"module-content",title:Y(e.a11yConfig,e.titleKey),children:[o.jsx("div",{className:"module-title",children:e.title}),e.subtitle&&o.jsx("div",{className:"module-subtitle",children:e.subtitle})]})]}),m9e=({modules:e,selectedModuleId:t,onSelectModule:n,title:c="Modules",titleKey:i,showCount:r=!0,showSearch:s=!0,searchValue:d,searchPlaceholder:l,onSearchTyping:h,onSearchSubmit:u,searchDebounceMs:p=300,isLoading:y=!1,loadingComponent:f,emptyComponent:g,a11yConfig:m,borderColor:x,hoverBackgroundColor:M,selectedBackgroundColor:v})=>{const[I,b]=k.useState(d??""),w=k.useRef(null);k.useEffect(()=>{d!==void 0&&b(d)},[d]),k.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const C=j=>{const N=j.target.value;b(N),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{h?.(N)},p)},_=j=>{j.key==="Enter"&&u?.(I)},L={"--smsb-border-color":x??"var(--color-border, #efefef)","--smsb-hover-background":M??"var(--color-content-background, #f8fafc)","--smsb-selected-background":v??"var(--color-neutral, #f4f4f4)"};return o.jsxs("div",{className:"searchable-module-sidebar",style:L,children:[o.jsx("div",{className:"sidebar-header",children:o.jsxs("div",{className:"header-title",title:Y(m,i),children:[c," ",r&&`(${e.length})`]})}),s&&o.jsx("div",{className:"sidebar-search",children:o.jsx("input",{type:"text",className:"search-input",value:I,placeholder:l,onChange:C,onKeyDown:_})}),o.jsx("div",{className:"module-list",children:y?f:e.length===0?g:e.map((j,N)=>o.jsx(k9e,{mod:j,index:N,total:e.length,isSelected:j.id===t,onSelectModule:n},j.id))})]})},f9e=({keyName:e,translations:t,availableLanguages:n,onChange:c,onRename:i,onDelete:r,a11yConfig:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(e),[p,y]=k.useState(null),[f,g]=k.useState(""),[m,x]=k.useState(!1),[M,v]=k.useState(""),[I,b]=k.useState(""),w=k.useMemo(()=>{const V={};return Array.isArray(t)&&t.forEach($=>{$&&$.language&&(V[$.language.toUpperCase()]=$.value)}),V},[t]),C=k.useMemo(()=>n,[n]),_=()=>{l(!1),h!==e&&h.trim()!==""?i&&i(h.trim()):u(e)},L=V=>{V.key==="Enter"?_():V.key==="Escape"&&(u(e),l(!1))},j=V=>{const $=V.toUpperCase();y($),g(w[$]||"")},N=()=>{p&&(c(p,f),y(null),g(""))},S=V=>{V.key==="Enter"?N():V.key==="Escape"&&(y(null),g(""))},z=()=>{x(!0),C.length>0&&v(C[0].toUpperCase()),b("")},A=()=>{M&&I.trim()&&(c(M,I.trim()),x(!1),v(""),b(""))},H=()=>{x(!1),v(""),b("")},P=V=>{V.key==="Enter"?A():V.key==="Escape"&&H()};return o.jsxs("div",{className:"translation-key-v2",children:[o.jsxs("div",{className:"header",children:[d?o.jsx("input",{className:"key-name-input",value:h,onChange:V=>u(V.target.value),onBlur:_,onKeyDown:L,autoFocus:!0}):o.jsx("h3",{className:"header-title",title:Y(s,e),children:e}),o.jsxs("div",{className:"header-actions",children:[o.jsx(xt,{size:16,className:"action-icon edit",onClick:()=>l(!0)}),o.jsx(kt,{size:16,className:"action-icon delete",onClick:r})]})]}),o.jsxs("div",{className:"translations-list",children:[n.map(V=>{const $=V.toUpperCase(),q=w[$]||"",R=p===$;return o.jsxs("div",{className:"lang-row",children:[o.jsx("div",{className:"lang-label",children:$}),R?o.jsx("input",{className:"translation-input editing",value:f,onChange:T=>g(T.target.value),onBlur:N,onKeyDown:S,placeholder:"Entrez la traduction...",autoFocus:!0}):o.jsx("div",{className:`translation-value ${q?"":"empty"}`,onClick:()=>j(V),title:"Cliquer pour éditer",children:q||"Cliquer pour ajouter..."})]},V)}),m?o.jsxs("div",{className:"lang-row add-row",children:[o.jsx("select",{className:"lang-select",value:M,onChange:V=>v(V.target.value),children:C.map(V=>o.jsx("option",{value:V.toUpperCase(),children:V.toUpperCase()},V))}),o.jsx("input",{className:"translation-input editing",value:I,onChange:V=>b(V.target.value),onKeyDown:P,placeholder:"Mot",autoFocus:!0}),o.jsxs("div",{className:"add-actions",children:[o.jsx(N1,{size:18,className:"action-icon confirm",onClick:A}),o.jsx(at,{size:18,className:"action-icon cancel",onClick:H})]})]}):C.length>0&&o.jsxs("button",{className:"add-translation-btn",onClick:z,children:[o.jsx(zc,{size:16}),o.jsx("span",{children:"Ajouter"})]})]})]})},g9e="_overlay_t6q3c_1",v9e="_modal_t6q3c_15",x9e="_body_t6q3c_30",M9e="_footer_t6q3c_50",_9e="_confirmButton_t6q3c_59",L9e="_danger_t6q3c_76",I9e="_cancelButton_t6q3c_80",jt={overlay:g9e,modal:v9e,body:x9e,footer:M9e,confirmButton:_9e,danger:L9e,cancelButton:I9e},b9e=({isOpen:e,message:t,children:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",isDanger:d=!1,hideFooter:l=!1,secondaryConfirmText:h,onSecondaryConfirm:u,modalStyle:p,bodyStyle:y,footerStyle:f,cancelButtonStyle:g,confirmButtonStyle:m,overlayStyle:x,modalClassName:M,bodyClassName:v,footerClassName:I,overlayClassName:b})=>{if(!e)return null;const w=n??t;return o.jsx("div",{className:`${jt.overlay} ${b||""}`.trim(),onClick:i,style:x,children:o.jsxs("div",{className:`${jt.modal} ${M||""}`.trim(),onClick:C=>C.stopPropagation(),style:p,children:[o.jsx("div",{className:`${jt.body} ${v||""}`.trim(),style:y,children:typeof w=="string"?o.jsx("p",{children:w}):w}),!l&&o.jsxs("div",{className:`${jt.footer} ${I||""}`.trim(),style:f,children:[s&&o.jsx("button",{className:jt.cancelButton,onClick:i,style:g,children:s}),h&&u&&o.jsx("button",{className:jt.confirmButton,onClick:u,children:h}),r&&o.jsx("button",{className:`${jt.confirmButton} ${d?jt.danger:""}`,onClick:c,style:m,children:r})]})]})})},w9e="_card_1ildr_1",C9e="_topIcon_1ildr_17",N9e="_title_1ildr_24",S9e="_text_1ildr_31",j9e="_bottomIcon_1ildr_37",x1={card:w9e,topIcon:C9e,title:N9e,text:S9e,bottomIcon:j9e},$9e=({topIcon:e,title:t,text:n,bottomIcon:c,onClick:i,className:r="",headerTextColor:s="#000",textColor:d="#4b5563",backgroundColor:l="#fff",a11yConfig:h})=>o.jsxs("div",{className:`${x1.card} ${r}`,onClick:i,role:i?"button":void 0,tabIndex:i?0:void 0,style:{backgroundColor:l},title:Y(h,t),children:[e&&o.jsx("div",{className:x1.topIcon,children:e}),o.jsx("h3",{className:x1.title,style:{color:s},children:t}),o.jsx("p",{className:x1.text,style:{color:d},children:n}),c&&o.jsx("div",{className:x1.bottomIcon,children:c})]}),q9e="_container_oylor_1",A9e="_disabled_oylor_9",z9e="_selectBox_oylor_14",V9e="_selectBoxOpen_oylor_36",P9e="_tagsContainer_oylor_41",T9e="_tagsContainerWrap_oylor_51",H9e="_tag_oylor_41",D9e="_tagLabel_oylor_73",B9e="_removeBtnContainer_oylor_79",R9e="_removeBtn_oylor_79",F9e="_searchInput_oylor_104",E9e="_placeholder_oylor_124",O9e="_actions_oylor_131",U9e="_clearBtn_oylor_138",W9e="_chevron_oylor_160",G9e="_chevronOpen_oylor_166",K9e="_dropdown_oylor_170",Z9e="_option_oylor_184",X9e="_optionHeader_oylor_197",Y9e="_noOptions_oylor_213",J9e="_overflowBlock_oylor_220",Q9e="_overflowEllipsis_oylor_227",exe="_overflowBadge_oylor_234",txe="_overflowBadgeWrap_oylor_257",axe="_overflowDropdown_oylor_263",nxe="_overflowDropdownItem_oylor_279",oxe="_overflowDropdownItemLabel_oylor_290",cxe="_overflowDropdownItemRemove_oylor_297",de={container:q9e,disabled:A9e,selectBox:z9e,selectBoxOpen:V9e,tagsContainer:P9e,tagsContainerWrap:T9e,tag:H9e,tagLabel:D9e,removeBtnContainer:B9e,removeBtn:R9e,searchInput:F9e,placeholder:E9e,actions:O9e,clearBtn:U9e,chevron:W9e,chevronOpen:G9e,dropdown:K9e,option:Z9e,optionHeader:X9e,noOptions:Y9e,overflowBlock:J9e,overflowEllipsis:Q9e,overflowBadge:exe,overflowBadgeWrap:txe,overflowDropdown:axe,overflowDropdownItem:nxe,overflowDropdownItemLabel:oxe,overflowDropdownItemRemove:cxe},ixe=({options:e,noOptionsMessage:t="",value:n,onChange:c,placeholder:i="Sélectionner...",isSearchable:r=!0,className:s="",disabled:d=!1,allowWrap:l=!1})=>{const[h,u]=k.useState(!1),[p,y]=k.useState(""),f=k.useRef(null),g=k.useRef(null),m=k.useRef(null),x=k.useRef(null),[M,v]=k.useState(null),[I,b]=k.useState(!1),w=k.useRef([]),C=k.useRef(null),_=k.useMemo(()=>{const $=new Map(e.map(q=>[q.value,q]));return n.map(q=>$.get(q)).filter(q=>q!==void 0)},[e,n]),L=k.useMemo(()=>e.filter($=>!n.includes($.value)),[e,n]),j=k.useMemo(()=>{let $=L;return p&&($=$.filter(q=>q.label.toLowerCase().includes(p.toLowerCase()))),$.filter((q,R)=>{if(!q.isHeader)return!0;for(let T=R+1;T<$.length&&!$[T].isHeader;T++)return!0;return!1})},[L,p]);k.useEffect(()=>{const $=q=>{const R=q.target;f.current&&!f.current.contains(R)&&(u(!1),y(""),v(null),b(!1))};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]),k.useEffect(()=>{if(l)return;if(_.length===0){v(null),w.current=[];return}_.length>w.current.length&&v(null);const $=()=>{const O=m.current,J=x.current;if(!O||!J)return;const E=J.getBoundingClientRect().width,U=J.querySelector(`.${de.actions}`),ie=U?U.getBoundingClientRect().width:80,ce=56,Me=r?80:0,re=16,ae=Array.from(O.querySelectorAll(`.${de.tag}`));ae.length===_.length&&(w.current=ae.map(ve=>{const je=ve.getBoundingClientRect(),Bc=ve.scrollWidth;return Math.max(je.width,Bc,ve.offsetWidth||0)}));const ne=w.current,le=ne.length>0?ne.reduce((ve,je)=>ve+je,0)/ne.length:120,pe=_.length<=ne.length?ne.slice(0,_.length):[...ne,...Array(_.length-ne.length).fill(le)],me=4,W=Math.max(0,E-ie-Me-re);let X=0,se=0;for(let ve=0;ve<_.length;ve++){const je=pe[ve]??120;if(X+je+me>W)break;X+=je+me,se++}if(se>=_.length){v(null);return}const $e=Math.max(0,E-ce-ie-Me-re);X=0;let Re=0;for(let ve=0;ve<_.length;ve++){const je=pe[ve]??120;if(X+je+me>$e)break;X+=je+me,Re++}Re<_.length&&Re>0?v(Re):v(null)},q=requestAnimationFrame(()=>{$()}),R=setTimeout($,100),T=new ResizeObserver(()=>{$()});return x.current&&T.observe(x.current),()=>{cancelAnimationFrame(q),clearTimeout(R),T.disconnect()}},[_,r,h,l]);const N=()=>{if(d)return;const $=!h;$&&b(!1),u($),$&&r&&setTimeout(()=>g.current?.focus(),0)},S=$=>{if(n.includes($.value))return;b(!1);const q=[..._,$];c(q),y(""),v(null),u(!1)},z=$=>{$.preventDefault(),$.stopPropagation(),b(q=>!q)},A=M!=null&&M<_.length?_.slice(M):[],H=($,q)=>{q.stopPropagation();const R=_.filter(T=>T.value!==$);c(R)},P=$=>{$.stopPropagation(),c([])},V=$=>{$.stopPropagation(),h||u(!0)};return o.jsxs("div",{className:`${de.container} ${s} ${d?de.disabled:""}`,ref:f,children:[o.jsxs("div",{ref:x,className:`${de.selectBox} ${h?de.selectBoxOpen:""}`,onClick:N,role:"combobox","aria-expanded":h,"aria-haspopup":"listbox",children:[o.jsxs("div",{className:`${de.tagsContainer} ${l?de.tagsContainerWrap:""}`,ref:m,children:[M!==null&&M>0?_.slice(0,M).map(($,q)=>o.jsxs("div",{className:de.tag,children:[o.jsx("div",{className:de.tagLabel,children:o.jsx("span",{children:$.label})}),o.jsx("div",{className:de.removeBtnContainer,children:o.jsx("button",{type:"button",className:de.removeBtn,onClick:R=>H($.value,R),"aria-label":`Supprimer ${$.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${$.value}-${q}`)):_.map(($,q)=>o.jsxs("div",{className:de.tag,children:[o.jsx("div",{className:de.tagLabel,children:o.jsx("span",{children:$.label})}),o.jsx("div",{className:de.removeBtnContainer,children:o.jsx("button",{type:"button",className:de.removeBtn,onClick:R=>H($.value,R),"aria-label":`Supprimer ${$.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${$.value}-${q}`)),r?o.jsx("input",{ref:g,type:"text",className:de.searchInput,placeholder:_.length===0?i:"",value:p,onChange:$=>{y($.target.value),h||u(!0)},onClick:V,disabled:d}):_.length===0&&o.jsx("span",{className:de.placeholder,children:i})]}),!l&&M!==null&&M<_.length&&o.jsxs("div",{className:de.overflowBlock,children:[o.jsx("span",{className:de.overflowEllipsis,children:"..."}),o.jsxs("div",{className:de.overflowBadgeWrap,children:[o.jsx("button",{ref:C,type:"button",className:de.overflowBadge,onClick:z,"aria-label":`Afficher ${A.length} éléments cachés`,children:A.length}),I&&A.length>0&&o.jsx("div",{className:de.overflowDropdown,role:"list","aria-label":"Éléments cachés",children:A.map(($,q)=>o.jsxs("div",{className:de.overflowDropdownItem,children:[o.jsx("span",{className:de.overflowDropdownItemLabel,children:$.label}),o.jsx("button",{type:"button",className:de.overflowDropdownItemRemove,onClick:R=>{R.stopPropagation(),H($.value,R)},"aria-label":`Supprimer ${$.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]},`hidden-${$.value}-${q}`))})]})]}),o.jsxs("div",{className:de.actions,children:[_.length>0&&o.jsx("button",{type:"button",className:de.clearBtn,onClick:P,"aria-label":"Effacer tout",children:o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:o.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),o.jsx("svg",{className:`${de.chevron} ${h?de.chevronOpen:""}`,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M6 9l6 6 6-6"})})]})]}),h&&!d&&o.jsx("div",{className:de.dropdown,role:"listbox",children:j.length>0?j.map(($,q)=>o.jsx("div",{className:`${de.option} ${$.isHeader?de.optionHeader:""}`,onClick:()=>!$.isHeader&&S($),role:"option","aria-selected":!1,children:$.label},`opt-${$.value}-${q}`)):o.jsx("div",{className:de.noOptions,children:t})})]})},rxe="_container_h7jek_1",Fj={container:rxe},sxe=({a11yConfigs:e=[],titleKeys:t=[],labels:n=[],data:c=[],selectedUfs:i=[],icons:r=[],lastCardTextColor:s="black",boardColors:d={},order:l})=>{const h=k.useMemo(()=>{const g=i.length===0?c:c.filter(x=>x&&i.includes(String(x.uf).replace(/^0+/,""))),m=new Set;return g.filter(x=>{if(!x||!x.uf)return!1;const M=String(x.uf).replace(/^0+/,"");return m.has(M)?!1:(m.add(M),!0)})},[c,i]),u=k.useMemo(()=>h.reduce((g,m)=>({disponibles:g.disponibles+(m.totalAvailable??m.disponibles??0),homme:g.homme+(m.availableMen??m.disponibleHomme??0),femme:g.femme+(m.availableWomen??m.disponibleFemme??0),indifferencie:g.indifferencie+(m.availableIndifferentSex??m.indifferences??0),sorties:g.sorties+(m.outToday??m.sortie24??0),occupiedBed:g.occupiedBed+(m.occupiedBed??0),patientsPresents:g.patientsPresents+(m.patientsPresents??0),occupationRate:g.occupationRate+(m.occupationRate??0),occupesRaw:g.occupesRaw+(m.occupesRaw??0),ouvertsRaw:g.ouvertsRaw+(m.ouvertsRaw??0)}),{disponibles:0,homme:0,femme:0,indifferencie:0,sorties:0,occupiedBed:0,patientsPresents:0,occupationRate:0,occupesRaw:0,ouvertsRaw:0}),[h]),p=g=>d.disponibles?d.disponibles:g>3?"#35994E":g>=1?"#EF6C00":"#C62828",y={bars:"none",justifyContent:"flexStart",alignItems:"center",valueFontWeight:"400",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}},f=(g,m)=>{const x=l!==void 0&&m===l.length-1;switch(g){case"disponibles":return{...y,value:u.disponibles.toLocaleString("fr-FR"),backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",titleColor:"white",valueColor:"white"};case"occupiedBed":return{...y,value:u.occupiedBed.toLocaleString("fr-FR"),backgroundColor:d.occupes??d.homme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"patientsPresents":return{...y,value:u.patientsPresents.toLocaleString("fr-FR"),backgroundColor:d.patientsPresents??d.femme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"occupationRate":{const M=u.ouvertsRaw>0?parseFloat((u.occupesRaw/u.ouvertsRaw*100).toFixed(2)):u.occupationRate;return{...y,value:`${M.toLocaleString("fr-FR")}%`,backgroundColor:d.occupationRate??d.indifferencie??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"}}case"outToday":return{...y,value:u.sorties.toLocaleString("fr-FR"),backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",titleColor:s,valueColor:s}}};return l&&l.length>0?o.jsx("div",{className:Fj.container,children:l.map((g,m)=>o.jsx(Mt,{a11yConfig:e[m],titleKey:t[m],label:n[m],iconName:r[m],...f(g,m)},g))}):o.jsxs("div",{className:Fj.container,children:[o.jsx(Mt,{a11yConfig:e[0],titleKey:t[0],label:n[0],value:u.disponibles.toLocaleString("fr-FR"),iconName:r[0],backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"white",valueColor:"white",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[1],titleKey:t[1],label:n[1],value:u.homme.toLocaleString("fr-FR"),iconName:r[1],backgroundColor:d.homme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[2],titleKey:t[2],label:n[2],value:u.femme.toLocaleString("fr-FR"),iconName:r[2],backgroundColor:d.femme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[3],titleKey:t[3],label:n[3],value:u.indifferencie.toLocaleString("fr-FR"),iconName:r[3],backgroundColor:d.indifferencie??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(Mt,{a11yConfig:e[4],titleKey:t[4],label:n[4],value:u.sorties.toLocaleString("fr-FR"),iconName:r[4],backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:s,valueColor:s,titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}})]})},dxe="_container_1pt6c_1",lxe="_chartContainer_1pt6c_14",hxe="_legend_1pt6c_22",uxe="_legendItem_1pt6c_29",pxe="_leftSection_1pt6c_41",yxe="_colorIndicator_1pt6c_47",kxe="_label_1pt6c_54",mxe="_rightSection_1pt6c_60",fxe="_ratio_1pt6c_66",gxe="_value1_1pt6c_73",vxe="_separator_1pt6c_78",xxe="_value2_1pt6c_82",Mxe="_statusIndicator_1pt6c_87",_xe="_inactive_1pt6c_102",Ue={container:dxe,chartContainer:lxe,legend:hxe,legendItem:uxe,leftSection:pxe,colorIndicator:yxe,label:kxe,rightSection:mxe,ratio:fxe,value1:gxe,separator:vxe,value2:xxe,statusIndicator:Mxe,inactive:_xe},Ej=Math.PI/180,Lxe=({data:e,height:t=400,bg:n,backgroundColor:c,color:i,fontSize:r,fontWeight:s,padding:d,margin:l,borderRadius:h,className:u="",style:p={},labelColor:y,ratioColor:f,separatorColor:g,borderColor:m,hideDonut:x=!0,hideColorIndicator:M=!1})=>{const[v,I]=k.useState(new Set(e.map(N=>N.nom))),b=N=>{const S=new Set(v);S.has(N)?S.size>1&&S.delete(N):S.add(N),I(S)},w={...p,"--bg-color":n||c||"transparent","--text-color":i||"inherit","--font-size":r||"14px","--font-weight":s||"400","--padding":d||"0","--margin":l||"0","--border-radius":h||"0","--label-color":y||"inherit","--ratio-color":f||"inherit","--separator-color":g||"#03a9f4","--border-color":m||"#e0e0e0"},C=k.useMemo(()=>e.map(N=>({...N,displayValue:v.has(N.nom)?N.value:0})),[e,v]),_=k.useMemo(()=>e.every(N=>N.value===0),[e]),L=k.useMemo(()=>_?1:C.reduce((N,S)=>N+S.displayValue,0)||1,[_,C]),j=k.useCallback(({cx:N,cy:S,midAngle:z,innerRadius:A,outerRadius:H,value:P})=>{if(P===0||_)return null;const V=A+(H-A)*.5,$=N+V*Math.cos(-z*Ej),q=S+V*Math.sin(-z*Ej),R=Math.round(P/L*100);return o.jsx(a.Text,{x:$,y:q,fill:"white",textAnchor:"middle",dominantBaseline:"central",fontSize:12,fontWeight:"bold",children:`${R}%`})},[L,_]);return o.jsxs("div",{className:`${Ue.container} ${u}`,style:w,children:[!x&&o.jsx("div",{className:Ue.chartContainer,style:{height:t/2+100},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:"100%",children:o.jsx(a.PieChart,{children:o.jsx(a.Pie,{data:_?[{displayValue:1,color:"#A3C2CB"}]:C,cx:"50%",cy:"50%",innerRadius:45,outerRadius:75,paddingAngle:0,dataKey:"displayValue",stroke:"white",strokeWidth:_?0:2,startAngle:90,endAngle:450,labelLine:!1,label:j,isAnimationActive:!1,children:_?o.jsx(a.Cell,{fill:"#A3C2CB"}):C.map((N,S)=>o.jsx(a.Cell,{fill:N.color},`cell-${S}`))})})})}),o.jsx("div",{className:Ue.legend,children:e.map((N,S)=>{const z=v.has(N.nom);return o.jsxs("div",{className:`${Ue.legendItem} ${!x&&!z?Ue.inactive:""}`,onClick:()=>b(N.nom),style:{cursor:"pointer",transition:"opacity 0.2s"},children:[o.jsxs("div",{className:Ue.leftSection,children:[!M&&o.jsx("div",{className:Ue.colorIndicator,style:{backgroundColor:N.color,opacity:x||z?1:.3}}),o.jsx("span",{className:Ue.label,style:{opacity:x||z?1:.5},children:N.nom})]}),o.jsxs("div",{className:Ue.rightSection,style:{opacity:x||z?1:.5},children:[o.jsxs("div",{className:Ue.ratio,children:[o.jsx("span",{className:Ue.value1,children:N.value1}),o.jsx("span",{className:Ue.separator,children:"/"}),o.jsx("span",{className:Ue.value2,children:N.value2})]}),N.statusColor&&o.jsx("div",{className:Ue.statusIndicator,style:{backgroundColor:N.statusColor}})]})]},`legend-${S}`)})})]})},Ixe="_container_1pc4v_1",bxe="_leftGroup_1pc4v_10",wxe="_iconBtn_1pc4v_16",pi={container:Ixe,leftGroup:bxe,iconBtn:wxe},Cxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M3 12h18M3 6h18M3 18h18"})),Nxe=k.memo(Cxe),Sxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8m-4-6-4-4-4 4m4-4v13"})),BA=k.memo(Sxe),jxe=({menuIcon:e,logoProps:t,actionIcon:n,style:c,className:i,bgColor:r="var(--header-bg)",color:s="var(--color-text)",borderBottomColor:d="var(--color-border)",borderBottomWidth:l=1,height:h="8vh",onMenuClick:u,onActionClick:p})=>{const y={backgroundColor:r,color:s,borderBottom:`${l}px solid ${d}`,height:h,...c};return o.jsxs("header",{className:[pi.container,i].filter(Boolean).join(" "),style:y,children:[o.jsxs("div",{className:pi.leftGroup,children:[o.jsx("button",{className:pi.iconBtn,onClick:u,"aria-label":"Menu",style:{color:"inherit"},children:e??o.jsx(Nxe,{width:22,height:22})}),o.jsx(wL,{...t,size:"medium"})]}),o.jsx("button",{className:pi.iconBtn,onClick:p,"aria-label":"Action",style:{color:"inherit"},children:n??o.jsx(BA,{width:22,height:22})})]})},$xe="_container_24g3e_1",qxe="_iconBtn_24g3e_10",Axe="_title_24g3e_22",yi={container:$xe,iconBtn:qxe,title:Axe},zxe=({title:e="Menu",closeIcon:t,actionIcon:n,style:c,className:i,titleStyle:r,bgColor:s="var(--header-bg)",color:d="var(--color-text)",borderBottomColor:l="transparent",borderBottomWidth:h=0,height:u="8vh",onClose:p,onAction:y})=>{const f={backgroundColor:s,color:d,borderBottom:`${h}px solid ${l}`,height:u,...c};return o.jsxs("div",{className:[yi.container,i].filter(Boolean).join(" "),style:f,children:[o.jsx("button",{className:yi.iconBtn,onClick:p,"aria-label":"Fermer",style:{color:"inherit"},children:t??o.jsx(DA,{width:22,height:22})}),o.jsx("span",{className:yi.title,style:{fontWeight:"var(--font-weight-h)",fontSize:"var(--h5)",...r},children:e.toUpperCase()}),o.jsx("button",{className:yi.iconBtn,onClick:y,"aria-label":"Partager",style:{color:"inherit"},children:n??o.jsx(BA,{width:22,height:22})})]})};function RA(e){return e.state?e.state:e.active?"active":"available"}const Vxe=({title:e,countLabel:t="UF",actionIcon:n=o.jsx(kt,{size:16}),onAction:c,items:i=[],onItemClick:r,activeColor:s="var(--color-primary, #0083bb)",id:d,children:l})=>{const h=k.useMemo(()=>i.filter(u=>RA(u)==="active").length,[i]);return o.jsxs(Pxe,{id:d,children:[o.jsxs(Txe,{children:[o.jsxs(Hxe,{children:[o.jsx(Dxe,{children:e}),o.jsxs(Bxe,{children:["(",h," ",t,")"]})]}),c&&o.jsx(Rxe,{onClick:c,title:"Action",children:n})]}),o.jsx(Fxe,{children:o.jsx(Exe,{children:i.map(u=>o.jsx(Uxe,{item:u,activeColor:s,onItemClick:r},u.id))})}),l&&o.jsx(Wxe,{children:l})]})},Pxe=F.div`
8348
+ background: var(--color-card-background, white);
8349
+ border: 1px solid var(--color-border, #ddd);
8350
8350
  border-radius: 4px;
8351
8351
  overflow: hidden;
8352
- font-family: Arial, sans-serif;
8352
+ font-family: var(--font-primary, Arial, sans-serif);
8353
8353
  width: 100%;
8354
8354
  height: 100%;
8355
8355
  display: flex;
8356
8356
  flex-direction: column;
8357
+ color: var(--color-text, inherit);
8357
8358
  `,Txe=F.div`
8358
8359
  display: flex;
8359
8360
  justify-content: space-between;
@@ -8362,7 +8363,7 @@
8362
8363
  min-height: 40px;
8363
8364
  height: 3rem;
8364
8365
  box-sizing: border-box;
8365
- border-bottom: 1px solid #efefef;
8366
+ border-bottom: 1px solid var(--color-border, #efefef);
8366
8367
  `,Hxe=F.div`
8367
8368
  display: flex;
8368
8369
  align-items: baseline;
@@ -8371,11 +8372,11 @@
8371
8372
  margin: 0;
8372
8373
  font-size: 1rem;
8373
8374
  font-weight: 800;
8374
- color: #1a1a1a;
8375
+ color: var(--color-text, #1a1a1a);
8375
8376
  `,Bxe=F.span`
8376
8377
  font-size: 0.9rem;
8377
8378
  font-weight: 500;
8378
- color: #718096;
8379
+ color: var(--color-text-secondary, #718096);
8379
8380
  `,Rxe=F.button`
8380
8381
  background: transparent;
8381
8382
  border: none;
@@ -8384,7 +8385,7 @@
8384
8385
  display: flex;
8385
8386
  align-items: center;
8386
8387
  justify-content: center;
8387
- color: #ff4d4d;
8388
+ color: var(--color-error, #ff4d4d);
8388
8389
 
8389
8390
  &:hover {
8390
8391
  opacity: 0.7;
@@ -8403,13 +8404,13 @@
8403
8404
  align-items: center;
8404
8405
  justify-content: center;
8405
8406
  border: 1px solid
8406
- ${e=>e.$state==="active"?e.$activeColor:e.$state==="elsewhere"?Oj:"#ccc"};
8407
+ ${e=>e.$state==="active"?e.$activeColor:e.$state==="elsewhere"?Oj:"var(--color-border, #ccc)"};
8407
8408
  border-radius: 3px;
8408
8409
  font-size: 1.13rem;
8409
8410
  line-height: 1.13rem;
8410
8411
  font-weight: 400;
8411
- background-color: ${e=>e.$state==="active"?e.$activeColor:e.$state==="elsewhere"?Oj:"#ffffff"};
8412
- color: ${e=>e.$state==="active"?"#ffffff":"#333"};
8412
+ background-color: ${e=>e.$state==="active"?e.$activeColor:e.$state==="elsewhere"?Oj:"var(--color-content-background, #ffffff)"};
8413
+ color: ${e=>e.$state==="active"?"#ffffff":"var(--color-text, #333)"};
8413
8414
  cursor: pointer;
8414
8415
  user-select: none;
8415
8416
 
@@ -8667,8 +8668,9 @@
8667
8668
  display: flex;
8668
8669
  align-items: center;
8669
8670
  justify-content: space-between;
8670
- background-color: #ffffff;
8671
- border: 1px solid ${({$isOpen:e})=>e?"#00A6D9":"#dee2e6"};
8671
+ background-color: var(--color-card-background, #ffffff);
8672
+ border: 1px solid
8673
+ ${({$isOpen:e})=>e?"var(--color-primary, #00A6D9)":"var(--color-border, #dee2e6)"};
8672
8674
  border-radius: 8px;
8673
8675
  padding: 0 1rem;
8674
8676
  height: 2.75rem;
@@ -8677,11 +8679,11 @@
8677
8679
  outline: none;
8678
8680
  font-family: inherit;
8679
8681
  font-size: 0.875rem;
8680
- color: #212529;
8682
+ color: var(--color-text, #212529);
8681
8683
  transition: border-color 0.2s;
8682
8684
 
8683
8685
  &:hover {
8684
- ${({$disabled:e})=>!e&&"border-color: #86b7fe;"}
8686
+ ${({$disabled:e})=>!e&&"border-color: var(--color-primary, #86b7fe);"}
8685
8687
  }
8686
8688
  `,mMe=F.div`
8687
8689
  display: flex;
@@ -8690,18 +8692,19 @@
8690
8692
  width: 100%;
8691
8693
  gap: 0.5rem;
8692
8694
  `,fMe=F.span`
8693
- color: ${({$isPlaceholder:e})=>e?"#adb5bd":"inherit"};
8695
+ color: ${({$isPlaceholder:e})=>e?"var(--color-text-secondary, #adb5bd)":"inherit"};
8694
8696
  `,gMe=F(hMe)`
8695
- color: #6c757d;
8697
+ color: var(--color-text-secondary, #6c757d);
8696
8698
  flex-shrink: 0;
8697
8699
  `,vMe=F.div`
8698
8700
  position: absolute;
8699
8701
  top: 100%;
8700
8702
  ${({$alignment:e})=>e==="right"?"right: 0;":"left: 0;"}
8701
- background-color: #ffffff;
8703
+ background-color: var(--color-card-background, #ffffff);
8704
+ border: 1px solid var(--color-border, #dee2e6);
8702
8705
  z-index: 1000;
8703
8706
  border-radius: 8px;
8704
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
8707
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
8705
8708
  margin-top: 0.25rem;
8706
8709
  padding: 1rem;
8707
8710
  display: flex;
@@ -8720,11 +8723,11 @@
8720
8723
  gap: 0.25rem;
8721
8724
  `,Kj=F.span`
8722
8725
  font-size: 0.75rem;
8723
- color: #6c757d;
8726
+ color: var(--color-text-secondary, #6c757d);
8724
8727
  font-weight: 500;
8725
8728
  `,Zj=F.div`
8726
- background-color: #f8f9fa;
8727
- border: 1px solid #dee2e6;
8729
+ background-color: var(--color-content-background, #f8f9fa);
8730
+ border: 1px solid var(--color-border, #dee2e6);
8728
8731
  border-radius: 6px;
8729
8732
  padding: 0.25rem 0.5rem;
8730
8733
  display: flex;
@@ -8736,7 +8739,7 @@
8736
8739
  text-align: center;
8737
8740
  font-size: 1rem;
8738
8741
  font-weight: 600;
8739
- color: #212529;
8742
+ color: var(--color-text, #212529);
8740
8743
  outline: none;
8741
8744
  padding: 0;
8742
8745
  appearance: none;
@@ -8755,7 +8758,7 @@
8755
8758
  `,MMe=F.span`
8756
8759
  font-size: 1.25rem;
8757
8760
  font-weight: 600;
8758
- color: #adb5bd;
8761
+ color: var(--color-text-secondary, #adb5bd);
8759
8762
  margin-top: 1rem;
8760
8763
  `,_Me=F.div`
8761
8764
  display: flex;
@@ -8776,12 +8779,12 @@
8776
8779
  }
8777
8780
 
8778
8781
  &.cancel {
8779
- background-color: #f3f4f6;
8780
- color: #374151;
8782
+ background-color: var(--color-content-background, #f3f4f6);
8783
+ color: var(--color-text, #374151);
8781
8784
  }
8782
8785
 
8783
8786
  &.apply {
8784
- background-color: #00a6d9;
8787
+ background-color: var(--color-primary, #00a6d9);
8785
8788
  color: #ffffff;
8786
8789
  }
8787
8790
  `,LMe=({title:e="Liste d'attente",onClose:t,onBack:n,content:c,footer:i,className:r,a11yConfig:s,ariaLabel:d})=>{const l=Y(s,e);return o.jsxs(IMe,{className:r,title:l,role:"region","aria-label":d||e,children:[o.jsxs("div",{className:"header",children:[o.jsxs("div",{className:"header-left",children:[n&&o.jsx("span",{className:"back-btn",onClick:n,role:"button","aria-label":"Retour",tabIndex:0,onKeyDown:h=>h.key==="Enter"&&n(),children:o.jsx(w1,{size:24})}),o.jsx("p",{children:e})]}),t&&o.jsx("span",{className:"close-btn",onClick:t,role:"button","aria-label":"Fermer",tabIndex:0,onKeyDown:h=>h.key==="Enter"&&t(),children:o.jsx(at,{size:24})})]}),o.jsx("div",{className:"content",children:c}),i&&o.jsx("div",{className:"footer",children:i})]})},IMe=F.div`
@@ -8909,7 +8912,7 @@
8909
8912
  &:hover {
8910
8913
  opacity: 1;
8911
8914
  }
8912
- `,PMe="_patientCard_1ed58_1",TMe="_notAllowedCursor_1ed58_18",HMe="_innerPadding_1ed58_28",DMe="_noFooterMargin_1ed58_35",BMe="_topArea_1ed58_39",RMe="_small_1ed58_48",FMe="_header_1ed58_61",EMe="_headerLeft_1ed58_68",OMe="_headerRight_1ed58_74",UMe="_uf_1ed58_79",WMe="_rmBadge_1ed58_87",GMe="_roomBed_1ed58_102",KMe="_content_1ed58_109",ZMe="_body_1ed58_121",XMe="_upperBodyContent_1ed58_139",YMe="_patientInfo_1ed58_149",JMe="_iep_1ed58_154",QMe="_name_1ed58_159",e_e="_birthName_1ed58_166",t_e="_firstNames_1ed58_171",a_e="_dobAge_1ed58_176",n_e="_duration_1ed58_181",o_e="_comment_1ed58_187",c_e="_timeline_1ed58_194",i_e="_destination_1ed58_198",r_e="_todayReservation_1ed58_208",s_e="_arrow_1ed58_229",d_e="_progressBar_1ed58_234",l_e="_progressFill_1ed58_244",h_e="_progressDate_1ed58_254",u_e="_footer_1ed58_265",p_e="_iconWrap_1ed58_274",y_e="_centerLabelHuge_1ed58_293",k_e="_labelYellow_1ed58_300",m_e="_expectedBottom_1ed58_319",f_e="_expectedPrefix_1ed58_327",g_e="_expectedDate_1ed58_333",v_e="_notesView_1ed58_354",x_e="_notesHeader_1ed58_362",M_e="_notesTitle_1ed58_368",__e="_notesList_1ed58_374",L_e="_noteItem_1ed58_380",I_e="_reservationView_1ed58_385",b_e="_reservationNote_1ed58_397",w_e="_bottomArea_1ed58_402",C_e="_bottomLeftSymbol_1ed58_410",G={patientCard:PMe,notAllowedCursor:TMe,innerPadding:HMe,noFooterMargin:DMe,topArea:BMe,small:RMe,header:FMe,headerLeft:EMe,headerRight:OMe,uf:UMe,rmBadge:WMe,roomBed:GMe,content:KMe,body:ZMe,upperBodyContent:XMe,patientInfo:YMe,iep:JMe,name:QMe,birthName:e_e,firstNames:t_e,dobAge:a_e,duration:n_e,comment:o_e,timeline:c_e,destination:i_e,todayReservation:r_e,arrow:s_e,progressBar:d_e,progressFill:l_e,progressDate:h_e,footer:u_e,iconWrap:p_e,centerLabelHuge:y_e,labelYellow:k_e,expectedBottom:m_e,expectedPrefix:f_e,expectedDate:g_e,notesView:v_e,notesHeader:x_e,notesTitle:M_e,notesList:__e,noteItem:L_e,reservationView:I_e,reservationNote:b_e,bottomArea:w_e,bottomLeftSymbol:C_e},N_e=({size:e="large",className:t="",customStyle:n,topAreaStyle:c,headerLeft:i,headerRight:r,centerHugeLabel:s,iep:d,nameLine:l,birthName:h,birthNamePrefix:u,firstNamesLine:p,dobAgeLine:y,stayDuration:f,comment:g,expectedDate:m,expectedDatePrefix:x,showTimeline:M=!1,destination:v,progress:I=0,progressTrackColor:b,progressFillColor:w,progressLabel:C,progressTitle:_,showFooter:L=!1,leftIcons:j=[],rightIcons:N=[],activeView:S="default",notesHeaderTitle:z,notesHeaderIcon:A,notesList:H=[],notesTitles:P,reservationNote:V,isYellowLabel:$=!1,bottomLeftSymbol:q,cursorNotAllowed:R=!1,rmBadge:T,isReservationToday:O=!1})=>{const J=e==="small",E=`
8915
+ `,PMe="_patientCard_r0eh1_1",TMe="_notAllowedCursor_r0eh1_18",HMe="_innerPadding_r0eh1_28",DMe="_noFooterMargin_r0eh1_35",BMe="_topArea_r0eh1_39",RMe="_small_r0eh1_49",FMe="_header_r0eh1_62",EMe="_headerLeft_r0eh1_69",OMe="_headerRight_r0eh1_75",UMe="_uf_r0eh1_80",WMe="_rmBadge_r0eh1_88",GMe="_roomBed_r0eh1_103",KMe="_content_r0eh1_110",ZMe="_body_r0eh1_122",XMe="_upperBodyContent_r0eh1_140",YMe="_patientInfo_r0eh1_150",JMe="_iep_r0eh1_155",QMe="_name_r0eh1_160",e_e="_birthName_r0eh1_167",t_e="_firstNames_r0eh1_172",a_e="_dobAge_r0eh1_177",n_e="_duration_r0eh1_182",o_e="_comment_r0eh1_188",c_e="_timeline_r0eh1_195",i_e="_destination_r0eh1_199",r_e="_todayReservation_r0eh1_209",s_e="_arrow_r0eh1_230",d_e="_progressBar_r0eh1_235",l_e="_progressFill_r0eh1_245",h_e="_progressDate_r0eh1_255",u_e="_footer_r0eh1_266",p_e="_iconWrap_r0eh1_275",y_e="_centerLabelHuge_r0eh1_294",k_e="_labelYellow_r0eh1_301",m_e="_expectedBottom_r0eh1_320",f_e="_expectedPrefix_r0eh1_328",g_e="_expectedDate_r0eh1_334",v_e="_notesView_r0eh1_355",x_e="_notesHeader_r0eh1_363",M_e="_notesTitle_r0eh1_369",__e="_notesList_r0eh1_376",L_e="_noteItem_r0eh1_382",I_e="_reservationView_r0eh1_387",b_e="_reservationNote_r0eh1_399",w_e="_bottomArea_r0eh1_404",C_e="_bottomLeftSymbol_r0eh1_412",G={patientCard:PMe,notAllowedCursor:TMe,innerPadding:HMe,noFooterMargin:DMe,topArea:BMe,small:RMe,header:FMe,headerLeft:EMe,headerRight:OMe,uf:UMe,rmBadge:WMe,roomBed:GMe,content:KMe,body:ZMe,upperBodyContent:XMe,patientInfo:YMe,iep:JMe,name:QMe,birthName:e_e,firstNames:t_e,dobAge:a_e,duration:n_e,comment:o_e,timeline:c_e,destination:i_e,todayReservation:r_e,arrow:s_e,progressBar:d_e,progressFill:l_e,progressDate:h_e,footer:u_e,iconWrap:p_e,centerLabelHuge:y_e,labelYellow:k_e,expectedBottom:m_e,expectedPrefix:f_e,expectedDate:g_e,notesView:v_e,notesHeader:x_e,notesTitle:M_e,notesList:__e,noteItem:L_e,reservationView:I_e,reservationNote:b_e,bottomArea:w_e,bottomLeftSymbol:C_e},N_e=({size:e="large",className:t="",customStyle:n,topAreaStyle:c,headerLeft:i,headerRight:r,centerHugeLabel:s,iep:d,nameLine:l,birthName:h,birthNamePrefix:u,firstNamesLine:p,dobAgeLine:y,stayDuration:f,comment:g,expectedDate:m,expectedDatePrefix:x,showTimeline:M=!1,destination:v,progress:I=0,progressTrackColor:b,progressFillColor:w,progressLabel:C,progressTitle:_,showFooter:L=!1,leftIcons:j=[],rightIcons:N=[],activeView:S="default",notesHeaderTitle:z,notesHeaderIcon:A,notesList:H=[],notesTitles:P,reservationNote:V,isYellowLabel:$=!1,bottomLeftSymbol:q,cursorNotAllowed:R=!1,rmBadge:T,isReservationToday:O=!1})=>{const J=e==="small",E=`
8913
8916
  ${G.patientCard}
8914
8917
  ${J?G.small:""}
8915
8918
  ${R?G.notAllowedCursor:""}