@riddix/hamh 2.1.0-alpha.606 → 2.1.0-alpha.607
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.
|
@@ -144,7 +144,7 @@ export default theme;`}function XF(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
144
144
|
animation: ${xD} 1.4s linear infinite;
|
|
145
145
|
`:null,kSe=typeof SD!="string"?i0`
|
|
146
146
|
animation: ${SD} 1.4s ease-in-out infinite;
|
|
147
|
-
`:null,ESe=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${ve(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ve(n)}`,i&&"circleDisableShrink"]};return nt(o,wSe,t)},ASe=ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ve(n.color)}`]]}})(Ye(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:CSe||{animation:`${xD} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),DSe=ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),_Se=ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ve(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ye(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:kSe||{animation:`${SD} 1.4s ease-in-out infinite`}}]}))),TSe=ge("circle",{name:"MuiCircularProgress",slot:"Track"})(Ye(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Xn=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:c,thickness:u=3.6,value:d=0,variant:p="indeterminate",...g}=r,y={...r,color:o,disableShrink:s,size:l,thickness:u,value:d,variant:p,enableTrackSlot:a},b=ESe(y),v={},S={},C={};if(p==="determinate"){const w=2*Math.PI*((nl-u)/2);v.strokeDasharray=w.toFixed(3),C["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*w).toFixed(3)}px`,S.transform="rotate(-90deg)"}return h.jsx(ASe,{className:_e(b.root,i),style:{width:l,height:l,...S,...c},ownerState:y,ref:n,role:"progressbar",...C,...g,children:h.jsxs(DSe,{className:b.svg,ownerState:y,viewBox:`${nl/2} ${nl/2} ${nl} ${nl}`,children:[a?h.jsx(TSe,{className:b.track,ownerState:y,cx:nl,cy:nl,r:(nl-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,h.jsx(_Se,{className:b.circle,style:v,ownerState:y,cx:nl,cy:nl,r:(nl-u)/2,fill:"none",strokeWidth:u})]})})});function OSe(e){return tt("MuiIconButton",e)}const iz=st("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),MSe=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o,loading:s}=e,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${ve(r)}`,i&&`edge${ve(i)}`,`size${ve(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return nt(a,OSe,t)},jSe=ge(ss,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ve(n.color)}`],n.edge&&t[`edge${ve(n.edge)}`],t[`size${ve(n.size)}`]]}})(Ye(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ye(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${iz.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${iz.loading}`]:{color:"transparent"}}))),RSe=ge("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),qt=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:d,loading:p=null,loadingIndicator:g,...y}=r,b=Ju(d),v=g??h.jsx(Xn,{"aria-labelledby":b,color:"inherit",size:16}),S={...r,edge:i,color:a,disabled:l,disableFocusRipple:c,loading:p,loadingIndicator:v,size:u},C=MSe(S);return h.jsxs(jSe,{id:p?b:d,className:_e(C.root,s),centerRipple:!0,focusRipple:!c,disabled:l||p,ref:n,...y,ownerState:S,children:[typeof p=="boolean"&&h.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:h.jsx(RSe,{className:C.loadingIndicator,ownerState:S,children:p&&v})}),o]})}),ISe=Ee(h.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),PSe=Ee(h.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),NSe=Ee(h.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),$Se=Ee(h.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),nX=Ee(h.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),LSe=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${ve(n||r)}`,`${t}${ve(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return nt(o,G5e,i)},FSe=ge(zr,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ve(n.color||n.severity)}`]]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Gn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${tz.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Gn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${tz.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Gn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),zSe=ge("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),BSe=ge("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),HSe=ge("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),oz={success:h.jsx(ISe,{fontSize:"inherit"}),warning:h.jsx(PSe,{fontSize:"inherit"}),error:h.jsx(NSe,{fontSize:"inherit"}),info:h.jsx($Se,{fontSize:"inherit"})},zt=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:p=oz,onClose:g,role:y="alert",severity:b="success",slotProps:v={},slots:S={},variant:C="standard",...w}=r,E={...r,color:l,severity:b,variant:C,colorSeverity:l||b},k=LSe(E),T={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...S},slotProps:{...u,...v}},[_,O]=ft("root",{ref:n,shouldForwardComponentProp:!0,className:_e(k.root,s),elementType:FSe,externalForwardedProps:{...T,...w},ownerState:E,additionalProps:{role:y,elevation:0}}),[R,P]=ft("icon",{className:k.icon,elementType:zSe,externalForwardedProps:T,ownerState:E}),[L,M]=ft("message",{className:k.message,elementType:BSe,externalForwardedProps:T,ownerState:E}),[N,$]=ft("action",{className:k.action,elementType:HSe,externalForwardedProps:T,ownerState:E}),[B,F]=ft("closeButton",{elementType:qt,externalForwardedProps:T,ownerState:E}),[V,W]=ft("closeIcon",{elementType:nX,externalForwardedProps:T,ownerState:E});return h.jsxs(_,{...O,children:[d!==!1?h.jsx(R,{...P,children:d||p[b]||oz[b]}):null,h.jsx(L,{...M,children:o}),i!=null?h.jsx(N,{...$,children:i}):null,i==null&&g?h.jsx(N,{...$,children:h.jsx(B,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...F,children:h.jsx(V,{fontSize:"small",...W})})}):null]})});function USe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=Kd();A.useEffect(()=>{if(!i)return;function S(C){C.defaultPrevented||C.key==="Escape"&&r?.(C,"escapeKeyDown")}return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[i,r]);const a=hi((S,C)=>{r?.(S,C)}),l=hi(S=>{!r||S==null||s.start(S,()=>{a(null,"timeout")})});A.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const c=S=>{r?.(S,"clickaway")},u=s.clear,d=A.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),p=S=>C=>{const w=S.onBlur;w?.(C),d()},g=S=>C=>{const w=S.onFocus;w?.(C),u()},y=S=>C=>{const w=S.onMouseEnter;w?.(C),u()},b=S=>C=>{const w=S.onMouseLeave;w?.(C),d()};return A.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(S={})=>{const C={...ro(e),...ro(S)};return{role:"presentation",...S,...C,onBlur:p(C),onFocus:g(C),onMouseEnter:y(C),onMouseLeave:b(C)}},onClickAway:c}}function Rf(e){return parseInt(A.version,10)>=19?e?.props?.ref||null:e?.ref||null}function sz(e){return e.substring(2).toLowerCase()}function VSe(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function rX(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,s=A.useRef(!1),a=A.useRef(null),l=A.useRef(!1),c=A.useRef(!1);A.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Br(Rf(t),a),d=hi(y=>{const b=c.current;c.current=!1;const v=Ei(a.current);if(!l.current||!a.current||"clientX"in y&&VSe(y,v))return;if(s.current){s.current=!1;return}let S;y.composedPath?S=y.composedPath().includes(a.current):S=!v.documentElement.contains(y.target)||a.current.contains(y.target),!S&&(n||!b)&&i(y)}),p=y=>b=>{c.current=!0;const v=t.props[y];v&&v(b)},g={ref:u};return o!==!1&&(g[o]=p(o)),A.useEffect(()=>{if(o!==!1){const y=sz(o),b=Ei(a.current),v=()=>{s.current=!0};return b.addEventListener(y,d),b.addEventListener("touchmove",v),()=>{b.removeEventListener(y,d),b.removeEventListener("touchmove",v)}}},[d,o]),r!==!1&&(g[r]=p(r)),A.useEffect(()=>{if(r!==!1){const y=sz(r),b=Ei(a.current);return b.addEventListener(y,d),()=>{b.removeEventListener(y,d)}}},[d,r]),A.cloneElement(t,g)}const IO=e=>e.scrollTop;function gf(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function wD(e){return`scale(${e}, ${e**2})`}const WSe={entering:{opacity:1,transform:wD(1)},entered:{opacity:1,transform:"none"}},m9=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),vb=A.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:g,style:y,timeout:b="auto",TransitionComponent:v=Ja,...S}=t,C=Kd(),w=A.useRef(),E=Ki(),k=A.useRef(null),T=Br(k,Rf(o),n),_=B=>F=>{if(B){const V=k.current;F===void 0?B(V):B(V,F)}},O=_(u),R=_((B,F)=>{IO(B);const{duration:V,delay:W,easing:q}=gf({style:y,timeout:b,easing:s},{mode:"enter"});let Z;b==="auto"?(Z=E.transitions.getAutoHeightDuration(B.clientHeight),w.current=Z):Z=V,B.style.transition=[E.transitions.create("opacity",{duration:Z,delay:W}),E.transitions.create("transform",{duration:m9?Z:Z*.666,delay:W,easing:q})].join(","),l&&l(B,F)}),P=_(c),L=_(g),M=_(B=>{const{duration:F,delay:V,easing:W}=gf({style:y,timeout:b,easing:s},{mode:"exit"});let q;b==="auto"?(q=E.transitions.getAutoHeightDuration(B.clientHeight),w.current=q):q=F,B.style.transition=[E.transitions.create("opacity",{duration:q,delay:V}),E.transitions.create("transform",{duration:m9?q:q*.666,delay:m9?V:V||q*.333,easing:W})].join(","),B.style.opacity=0,B.style.transform=wD(.75),d&&d(B)}),N=_(p),$=B=>{b==="auto"&&C.start(w.current||0,B),r&&r(k.current,B)};return h.jsx(v,{appear:i,in:a,nodeRef:k,onEnter:R,onEntered:P,onEntering:O,onExit:M,onExited:N,onExiting:L,addEndListener:$,timeout:b==="auto"?null:b,...S,children:(B,{ownerState:F,...V})=>A.cloneElement(o,{style:{opacity:0,transform:wD(.75),visibility:B==="exited"&&!a?"hidden":void 0,...WSe[B],...y,...o.props.style},ref:T,...V})})});vb&&(vb.muiSupportAuto=!0);function qSe(e){return tt("MuiSnackbarContent",e)}st("MuiSnackbarContent",["root","message","action"]);const KSe=e=>{const{classes:t}=e;return nt({root:["root"],action:["action"],message:["message"]},qSe,t)},GSe=ge(zr,{name:"MuiSnackbarContent",slot:"Root"})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(yb(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:yb(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),YSe=ge("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),JSe=ge("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),ZSe=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert",...l}=r,c=r,u=KSe(c);return h.jsxs(GSe,{role:a,elevation:6,className:_e(u.root,o),ownerState:c,ref:n,...l,children:[h.jsx(YSe,{className:u.message,ownerState:c,children:s}),i?h.jsx(JSe,{className:u.action,ownerState:c,children:i}):null]})});function XSe(e){return tt("MuiSnackbar",e)}st("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const QSe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ve(n.vertical)}${ve(n.horizontal)}`]};return nt(r,XSe,t)},e4e=ge("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ve(n.anchorOrigin.vertical)}${ve(n.anchorOrigin.horizontal)}`]]}})(Ye(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),N6=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiSnackbar"}),i=Ki(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:y=!1,message:b,onBlur:v,onClose:S,onFocus:C,onMouseEnter:w,onMouseLeave:E,open:k,resumeHideDuration:T,slots:_={},slotProps:O={},TransitionComponent:R,transitionDuration:P=o,TransitionProps:{onEnter:L,onExited:M,...N}={},...$}=r,B={...r,anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:y,TransitionComponent:R,transitionDuration:P},F=QSe(B),{getRootProps:V,onClickAway:W}=USe(B),[q,Z]=A.useState(!0),z=oe=>{Z(!0),M&&M(oe)},U=(oe,le)=>{Z(!1),L&&L(oe,le)},Y={slots:{transition:R,..._},slotProps:{content:g,clickAwayListener:p,transition:N,...O}},[H,K]=ft("root",{ref:n,className:[F.root,d],elementType:e4e,getSlotProps:V,externalForwardedProps:{...Y,...$},ownerState:B}),[Q,{ownerState:ie,...te}]=ft("clickAwayListener",{elementType:rX,externalForwardedProps:Y,getSlotProps:oe=>({onClickAway:(...le)=>{const fe=le[0];oe.onClickAway?.(...le),!fe?.defaultMuiPrevented&&W(...le)}}),ownerState:B}),[ce,ee]=ft("content",{elementType:ZSe,shouldForwardComponentProp:!0,externalForwardedProps:Y,additionalProps:{message:b,action:s},ownerState:B}),[J,X]=ft("transition",{elementType:vb,externalForwardedProps:Y,getSlotProps:oe=>({onEnter:(...le)=>{oe.onEnter?.(...le),U(...le)},onExited:(...le)=>{oe.onExited?.(...le),z(...le)}}),additionalProps:{appear:!0,in:k,timeout:P,direction:a==="top"?"down":"up"},ownerState:B});return!k&&q?null:h.jsx(Q,{...te,..._.clickAwayListener&&{ownerState:ie},children:h.jsx(H,{...K,children:h.jsx(J,{...X,children:u||h.jsx(ce,{...ee})})})})}),iX=A.createContext({show:()=>{}});let t4e=0;const n4e=e=>{const[t,n]=A.useState([]),r=A.useCallback(o=>{n(s=>[...s,{...o,autoHideDuration:o.autoHideDuration??6e3,notificationId:t4e++}])},[]),i=o=>{n(s=>s.filter(a=>a.notificationId!==o))};return h.jsxs(iX.Provider,{value:{show:r},children:[e.children,t.map(o=>h.jsx(N6,{open:!0,autoHideDuration:o.autoHideDuration,onClose:()=>i(o.notificationId),children:h.jsx(zt,{severity:o.severity,variant:"filled",sx:{minWidth:"300px"},children:o.message})},o.notificationId))]})};function vo(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var r4e=typeof Symbol=="function"&&Symbol.observable||"@@observable",az=r4e,g9=()=>Math.random().toString(36).substring(7).split("").join("."),i4e={INIT:`@@redux/INIT${g9()}`,REPLACE:`@@redux/REPLACE${g9()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${g9()}`},v4=i4e;function PO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oX(e,t,n){if(typeof e!="function")throw new Error(vo(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(vo(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(vo(1));return n(oX)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((v,S)=>{s.set(S,v)}))}function u(){if(l)throw new Error(vo(3));return i}function d(v){if(typeof v!="function")throw new Error(vo(4));if(l)throw new Error(vo(5));let S=!0;c();const C=a++;return s.set(C,v),function(){if(S){if(l)throw new Error(vo(6));S=!1,c(),s.delete(C),o=null}}}function p(v){if(!PO(v))throw new Error(vo(7));if(typeof v.type>"u")throw new Error(vo(8));if(typeof v.type!="string")throw new Error(vo(17));if(l)throw new Error(vo(9));try{l=!0,i=r(i,v)}finally{l=!1}return(o=s).forEach(C=>{C()}),v}function g(v){if(typeof v!="function")throw new Error(vo(10));r=v,p({type:v4.REPLACE})}function y(){const v=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(vo(11));function C(){const E=S;E.next&&E.next(u())}return C(),{unsubscribe:v(C)}},[az](){return this}}}return p({type:v4.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:g,[az]:y}}function o4e(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:v4.INIT})>"u")throw new Error(vo(12));if(typeof n(void 0,{type:v4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(vo(13))})}function s4e(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{o4e(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const d=r[u],p=n[d],g=s[d],y=p(g,a);if(typeof y>"u")throw a&&a.type,new Error(vo(14));c[d]=y,l=l||y!==g}return l=l||r.length!==Object.keys(s).length,l?c:s}}function x4(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function a4e(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(vo(15))};const s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=x4(...a)(i.dispatch),{...i,dispatch:o}}}function l4e(e){return PO(e)&&"type"in e&&typeof e.type=="string"}var sX=Symbol.for("immer-nothing"),lz=Symbol.for("immer-draftable"),as=Symbol.for("immer-state");function al(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ta=Object,Ag=ta.getPrototypeOf,S4="constructor",$6="prototype",CD="configurable",w4="enumerable",mS="writable",xb="value",Fu=e=>!!e&&!!e[as];function Sl(e){return e?aX(e)||F6(e)||!!e[lz]||!!e[S4]?.[lz]||z6(e)||B6(e):!1}var c4e=ta[$6][S4].toString(),cz=new WeakMap;function aX(e){if(!e||!NO(e))return!1;const t=Ag(e);if(t===null||t===ta[$6])return!0;const n=ta.hasOwnProperty.call(t,S4)&&t[S4];if(n===Object)return!0;if(!Om(n))return!1;let r=cz.get(n);return r===void 0&&(r=Function.toString.call(n),cz.set(n,r)),r===c4e}function L6(e,t,n=!0){U2(e)===0?(n?Reflect.ownKeys(e):ta.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function U2(e){const t=e[as];return t?t.type_:F6(e)?1:z6(e)?2:B6(e)?3:0}var uz=(e,t,n=U2(e))=>n===2?e.has(t):ta[$6].hasOwnProperty.call(e,t),kD=(e,t,n=U2(e))=>n===2?e.get(t):e[t],C4=(e,t,n,r=U2(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function u4e(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var F6=Array.isArray,z6=e=>e instanceof Map,B6=e=>e instanceof Set,NO=e=>typeof e=="object",Om=e=>typeof e=="function",y9=e=>typeof e=="boolean";function d4e(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var wu=e=>e.copy_||e.base_,$O=e=>e.modified_?e.copy_:e.base_;function ED(e,t){if(z6(e))return new Map(e);if(B6(e))return new Set(e);if(F6(e))return Array[$6].slice.call(e);const n=aX(e);if(t===!0||t==="class_only"&&!n){const r=ta.getOwnPropertyDescriptors(e);delete r[as];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a[mS]===!1&&(a[mS]=!0,a[CD]=!0),(a.get||a.set)&&(r[s]={[CD]:!0,[mS]:!0,[w4]:a[w4],[xb]:e[s]})}return ta.create(Ag(e),r)}else{const r=Ag(e);if(r!==null&&n)return{...e};const i=ta.create(r);return ta.assign(i,e)}}function LO(e,t=!1){return H6(e)||Fu(e)||!Sl(e)||(U2(e)>1&&ta.defineProperties(e,{set:n3,add:n3,clear:n3,delete:n3}),ta.freeze(e),t&&L6(e,(n,r)=>{LO(r,!0)},!1)),e}function f4e(){al(2)}var n3={[xb]:f4e};function H6(e){return e===null||!NO(e)?!0:ta.isFrozen(e)}var k4="MapSet",AD="Patches",dz="ArrayMethods",lX={};function Jh(e){const t=lX[e];return t||al(0,e),t}var fz=e=>!!lX[e],Sb,cX=()=>Sb,h4e=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:fz(k4)?Jh(k4):void 0,arrayMethodsPlugin_:fz(dz)?Jh(dz):void 0});function hz(e,t){t&&(e.patchPlugin_=Jh(AD),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function DD(e){_D(e),e.drafts_.forEach(p4e),e.drafts_=null}function _D(e){e===Sb&&(Sb=e.parent_)}var pz=e=>Sb=h4e(Sb,e);function p4e(e){const t=e[as];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function mz(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[as].modified_&&(DD(t),al(4)),Sl(e)&&(e=gz(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[as].base_,e,t)}else e=gz(t,n);return m4e(t,e,!0),DD(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sX?e:void 0}function gz(e,t){if(H6(t))return t;const n=t[as];if(!n)return E4(t,e.handledSet_,e);if(!U6(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);fX(n,e)}return n.copy_}function m4e(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&LO(t,n)}function uX(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var U6=(e,t)=>e.scope_===t,g4e=[];function dX(e,t,n,r){const i=wu(e),o=e.type_;if(r!==void 0&&kD(i,r,o)===t){C4(i,r,n,o);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;L6(i,(l,c)=>{if(Fu(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const s=e.draftLocations_.get(t)??g4e;for(const a of s)C4(i,a,n,o)}function y4e(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!U6(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const s=$O(o);dX(e,o.draft_??o,s,n),fX(o,i)})}function fX(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}uX(e)}}function b4e(e,t,n){const{scope_:r}=e;if(Fu(n)){const i=n[as];U6(i,r)&&i.callbacks_.push(function(){gS(e);const s=$O(i);dX(e,n,s,t)})}else Sl(n)&&e.callbacks_.push(function(){const o=wu(e);e.type_===3?o.has(n)&&E4(n,r.handledSet_,r):kD(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&E4(kD(e.copy_,t,e.type_),r.handledSet_,r)})}function E4(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Fu(e)||t.has(e)||!Sl(e)||H6(e)||(t.add(e),L6(e,(r,i)=>{if(Fu(i)){const o=i[as];if(U6(o,n)){const s=$O(o);C4(e,r,s,e.type_),uX(o)}}else Sl(i)&&E4(i,t,n)})),e}function v4e(e,t){const n=F6(e),r={type_:n?1:0,scope_:t?t.scope_:cX(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=A4;n&&(i=[r],o=wb);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}var A4={get(e,t){if(t===as)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=wu(e);if(!uz(i,t,e.type_))return x4e(e,i,t);const o=i[t];if(e.finalized_||!Sl(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&d4e(t))return o;if(o===b9(e.base_,t)){gS(e);const s=e.type_===1?+t:t,a=OD(e.scope_,o,e,s);return e.copy_[s]=a}return o},has(e,t){return t in wu(e)},ownKeys(e){return Reflect.ownKeys(wu(e))},set(e,t,n){const r=hX(wu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=b9(wu(e),t),o=i?.[as];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(u4e(n,i)&&(n!==void 0||uz(e.base_,t,e.type_)))return!0;gS(e),TD(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),b4e(e,t,n)),!0},deleteProperty(e,t){return gS(e),b9(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),TD(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=wu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mS]:!0,[CD]:e.type_!==1||t!=="length",[w4]:r[w4],[xb]:n[t]}},defineProperty(){al(11)},getPrototypeOf(e){return Ag(e.base_)},setPrototypeOf(){al(12)}},wb={};for(let e in A4){let t=A4[e];wb[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}wb.deleteProperty=function(e,t){return wb.set.call(this,e,t,void 0)};wb.set=function(e,t,n){return A4.set.call(this,e[0],t,n,e[0])};function b9(e,t){const n=e[as];return(n?wu(n):e)[t]}function x4e(e,t,n){const r=hX(t,n);return r?xb in r?r[xb]:r.get?.call(e.draft_):void 0}function hX(e,t){if(!(t in e))return;let n=Ag(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ag(n)}}function TD(e){e.modified_||(e.modified_=!0,e.parent_&&TD(e.parent_))}function gS(e){e.copy_||(e.assigned_=new Map,e.copy_=ED(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var S4e=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(Om(t)&&!Om(n)){const o=n;n=t;const s=this;return function(l=o,...c){return s.produce(l,u=>n.call(this,u,...c))}}Om(n)||al(6),r!==void 0&&!Om(r)&&al(7);let i;if(Sl(t)){const o=pz(this),s=OD(o,t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?DD(o):_D(o)}return hz(o,r),mz(i,o)}else if(!t||!NO(t)){if(i=n(t),i===void 0&&(i=t),i===sX&&(i=void 0),this.autoFreeze_&&LO(i,!0),r){const o=[],s=[];Jh(AD).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),r(o,s)}return i}else al(1,t)},this.produceWithPatches=(t,n)=>{if(Om(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},y9(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),y9(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),y9(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Sl(e)||al(8),Fu(e)&&(e=w4e(e));const t=pz(this),n=OD(t,e,void 0);return n[as].isManual_=!0,_D(t),n}finishDraft(e,t){const n=e&&e[as];(!n||!n.isManual_)&&al(9);const{scope_:r}=n;return hz(r,t),mz(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Jh(AD).applyPatches_;return Fu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function OD(e,t,n,r){const[i,o]=z6(t)?Jh(k4).proxyMap_(t,n):B6(t)?Jh(k4).proxySet_(t,n):v4e(t,n);return(n?.scope_??cX()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?y4e(n,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),i}function w4e(e){return Fu(e)||al(10,e),pX(e)}function pX(e){if(!Sl(e)||H6(e))return e;const t=e[as];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ED(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ED(e,!0);return L6(n,(i,o)=>{C4(n,i,pX(o))},r),t&&(t.finalized_=!1),n}var C4e=new S4e,mX=C4e.produce,D4=Symbol("NOT_FOUND");function k4e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function E4e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function A4e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var yz=e=>Array.isArray(e)?e:[e];function D4e(e){const t=Array.isArray(e[0])?e[0]:e;return A4e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _4e(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function T4e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:D4},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function O4e(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return D4}function i(a,l){r(a)===D4&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function o(){return n}function s(){n=[]}return{get:r,put:i,getEntries:o,clear:s}}var M4e=(e,t)=>e===t;function j4e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function R4e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=M4e,maxSize:i=1,resultEqualityCheck:o}=n,s=j4e(r);let a=0;const l=i<=1?T4e(s):O4e(i,s);function c(){let u=l.get(arguments);if(u===D4){if(u=e.apply(null,arguments),a++,o){const p=l.getEntries().find(g=>o(g.value,u));p&&(u=p.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var I4e=class{constructor(e){this.value=e}deref(){return this.value}},P4e=typeof WeakRef<"u"?WeakRef:I4e,N4e=0,bz=1;function r3(){return{s:N4e,v:void 0,o:null,p:null}}function gX(e,t={}){let n=r3();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,p=l;d<p;d++){const g=arguments[d];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=a.o;y===null&&(a.o=y=new WeakMap);const b=y.get(g);b===void 0?(a=r3(),y.set(g,a)):a=b}else{let y=a.p;y===null&&(a.p=y=new Map);const b=y.get(g);b===void 0?(a=r3(),y.set(g,a)):a=b}}const c=a;let u;if(a.s===bz)u=a.v;else if(u=e.apply(null,arguments),o++,r){const d=i?.deref?.()??i;d!=null&&r(d,u)&&(u=d,o!==0&&o--),i=typeof u=="object"&&u!==null||typeof u=="function"?new P4e(u):u}return c.s=bz,c.v=u,u}return s.clearCache=()=>{n=r3(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function yX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),k4e(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:p=[],argsMemoize:g=gX,argsMemoizeOptions:y=[]}=u,b=yz(p),v=yz(y),S=D4e(i),C=d(function(){return o++,c.apply(null,arguments)},...b),w=g(function(){s++;const k=_4e(S,arguments);return a=C.apply(null,k),a},...v);return Object.assign(w,{resultFunc:c,memoizedResultFunc:C,dependencies:S,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var bX=yX(gX),$4e=Object.assign((e,t=bX)=>{E4e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>$4e});function vX(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var L4e=vX(),F4e=vX,z4e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?x4:x4.apply(null,arguments)},B4e=e=>e&&typeof e.match=="function";function Oy(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(_4(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>l4e(r)&&r.type===e,n}var xX=class cy extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cy.prototype)}static get[Symbol.species](){return cy}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cy(...t[0].concat(this)):new cy(...t.concat(this))}};function vz(e){return Sl(e)?mX(e,()=>{}):e}function H4e(e){return typeof e=="boolean"}var U4e=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new xX;return n&&(H4e(n)?s.push(L4e):s.push(F4e(n.extraArgument))),s},V4e="RTK_autoBatch",xz=e=>t=>{setTimeout(t,e)},W4e=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:xz(10):e.type==="callback"?e.queueNotification:xz(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>i&&u(),p=r.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[V4e],o=!i,o&&(s||(s=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},q4e=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new xX(e);return r&&i.push(W4e(typeof r=="object"?r:void 0)),i};function K4e(e){const t=U4e(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(PO(n))a=s4e(n);else throw new Error(_4(1));let l;typeof r=="function"?l=r(t):l=t();let c=x4;i&&(c=z4e({trace:!1,...typeof i=="object"&&i}));const u=a4e(...l),d=q4e(u);let p=typeof s=="function"?s(d):d();const g=c(...p);return oX(a,o,g)}function G4e(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(_4(28));if(a in t)throw new Error(_4(29));return t[a]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function Y4e(e){return typeof e=="function"}function FO(e,t){let[n,r,i]=G4e(t),o;if(Y4e(e))o=()=>vz(e());else{const a=vz(e);o=()=>a}function s(a=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(Fu(u)){const g=d(u,l);return g===void 0?u:g}else{if(Sl(u))return mX(u,p=>d(p,l));{const p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var J4e=(e,t)=>B4e(e)?e.match(t):e(t);function Z4e(...e){return t=>e.some(n=>J4e(n,t))}var X4e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Q4e=(e=21)=>{let t="",n=e;for(;n--;)t+=X4e[Math.random()*64|0];return t},ewe=["name","message","stack","code"],v9=class{constructor(e,t){this.payload=e,this.meta=t}_type},Sz=class{constructor(e,t){this.payload=e,this.meta=t}_type},twe=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of ewe)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},wz="External signal was aborted",nwe=(()=>{function e(t,n,r){const i=Oy(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=Oy(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=Oy(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(r&&r.serializeError||twe)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{const g=r?.idGenerator?r.idGenerator(l):Q4e(),y=new AbortController;let b,v;function S(w){v=w,y.abort()}c&&(c.aborted?S(wz):c.addEventListener("abort",()=>S(wz),{once:!0}));const C=(async function(){let w;try{let k=r?.condition?.(l,{getState:d,extra:p});if(iwe(k)&&(k=await k),k===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((_,O)=>{b=()=>{O({name:"AbortError",message:v||"Aborted"})},y.signal.addEventListener("abort",b,{once:!0})});u(o(g,l,r?.getPendingMeta?.({requestId:g,arg:l},{getState:d,extra:p}))),w=await Promise.race([T,Promise.resolve(n(l,{dispatch:u,getState:d,extra:p,requestId:g,signal:y.signal,abort:S,rejectWithValue:(_,O)=>new v9(_,O),fulfillWithValue:(_,O)=>new Sz(_,O)})).then(_=>{if(_ instanceof v9)throw _;return _ instanceof Sz?i(_.payload,g,l,_.meta):i(_,g,l)})])}catch(k){w=k instanceof v9?s(null,g,l,k.payload,k.meta):s(k,g,l)}finally{b&&y.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition||u(w),w})();return Object.assign(C,{abort:S,requestId:g,arg:l,unwrap(){return C.then(rwe)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:Z4e(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function rwe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iwe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}function _4(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}class owe extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r,this.name="ApiError"}}async function ar(e){const t=await e.text();try{return JSON.parse(t)}catch{throw new owe(`Invalid JSON response (HTTP ${e.status}): ${t.slice(0,120)}`,e.status,t)}}async function Rn(e,t){if(!e.ok){const n=await e.text().catch(()=>"");let r=t;try{const i=JSON.parse(n);i?.error&&(r=i.error)}catch{n?r=`${t} (HTTP ${e.status}: ${n.slice(0,120)})`:r=`${t} (HTTP ${e.status})`}throw new Error(r)}}async function swe(){const e=await fetch(`api/matter/bridges?_s=${Date.now()}`);return await Rn(e,"Failed to fetch bridges"),ar(e)}async function zO(e){const t=await fetch("api/matter/bridges",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Rn(t,"Failed to create bridge"),ar(t)}async function SX(e){const t=await fetch(`api/matter/bridges/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Rn(t,"Failed to update bridge"),ar(t)}async function awe(e){await fetch(`api/matter/bridges/${e}`,{method:"DELETE"})}async function lwe(e){const t=await fetch(`api/matter/bridges/${e}/actions/factory-reset`,{method:"POST"});return await Rn(t,"Factory reset failed"),ar(t)}async function wX(e){const t=await fetch(`api/matter/bridges/${e}/actions/force-sync`,{method:"POST"});return await Rn(t,"Force sync failed"),ar(t)}async function cwe(e){const t=await fetch(`api/matter/bridges/${e}/actions/open-commissioning-window`,{method:"POST"});return await Rn(t,"Failed to open commissioning window"),ar(t)}async function uwe(e){if(!(await fetch("api/matter/bridges/priorities",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:e})})).ok)throw new Error("Failed to update priorities")}async function CX(){const e=await fetch("api/matter/bridges/actions/start-all",{method:"POST"});return await Rn(e,"Failed to start all bridges"),ar(e)}async function kX(){const e=await fetch("api/matter/bridges/actions/stop-all",{method:"POST"});return await Rn(e,"Failed to stop all bridges"),ar(e)}async function EX(){const e=await fetch("api/matter/bridges/actions/restart-all",{method:"POST"});return await Rn(e,"Failed to restart all bridges"),ar(e)}const a0=nwe.withTypes(),V6=bX.withTypes(),Lo=a0("bridges/load",swe),AX=a0("bridges/create",zO),DX=a0("bridges/delete",awe),_X=a0("bridges/update",SX),TX=a0("bridges/reset",lwe),OX=Oy("bridges/setFromWebSocket"),MX=Oy("bridges/updateFromWebSocket"),Rs=bhe.withTypes(),l0=She.withTypes(),jX=A.createContext({isConnected:!1,error:null});function RX(){return A.useContext(jX)}function dwe({children:e}){const t=Rs(),[n,r]=A.useState(!1),[i,o]=A.useState(null),s=A.useRef(null),a=A.useRef(void 0),l=A.useCallback(u=>{switch(u.type){case"bridges_update":t(OX(u.data));break;case"bridge_update":t(MX(u.data));break;case"ping":s.current?.send(JSON.stringify({type:"pong"}));break}},[t]),c=A.useCallback(()=>{if(s.current?.readyState===WebSocket.OPEN)return;const u=window.location.protocol==="https:"?"wss:":"ws:",d=document.querySelector("base")?.href||window.location.origin,p=new URL(d),g=`${u}//${p.host}${p.pathname}api/ws`.replace(/\/+/g,"/").replace(":/","://");try{const y=new WebSocket(g);s.current=y,y.onopen=()=>{r(!0),o(null)},y.onmessage=b=>{try{const v=JSON.parse(b.data);l(v)}catch{console.warn("Invalid WebSocket message")}},y.onclose=()=>{r(!1),s.current=null,a.current=setTimeout(c,3e3)},y.onerror=()=>{o(new Error("WebSocket connection error")),y.close()}}catch(y){o(y instanceof Error?y:new Error("Failed to connect"))}},[l]);return A.useEffect(()=>(c(),()=>{a.current&&clearTimeout(a.current),s.current?.close()}),[c]),h.jsx(jX.Provider,{value:{isConnected:n,error:i},children:e})}const fwe=()=>{const e=Rs();return A.useEffect(()=>{e(Lo())},[e]),h.jsx(HJ,{})};var cc;(function(e){e.Starting="starting",e.Running="running",e.Stopped="stopped",e.Failed="failed"})(cc||(cc={}));var Tr;(function(e){e.Pattern="pattern",e.Regex="regex",e.Domain="domain",e.Platform="platform",e.Label="label",e.EntityLabel="entity_label",e.DeviceLabel="device_label",e.Area="area",e.EntityCategory="entity_category",e.DeviceName="device_name",e.ProductName="product_name",e.DeviceClass="device_class"})(Tr||(Tr={}));const IX=[{id:"all_lights",name:"All Lights",description:"Expose all light entities. Ideal for controlling lights via Apple Home, Google Home, or Alexa.",icon:"light",filter:{include:[{type:Tr.Domain,value:"light"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["lights","popular"]},{id:"all_switches",name:"All Switches & Plugs",description:"Expose all switch entities including smart plugs. Includes power and energy monitoring.",icon:"switch",filter:{include:[{type:Tr.Domain,value:"switch"}],exclude:[]},featureFlags:{},tags:["switches","plugs"]},{id:"sensors_only",name:"All Sensors",description:"Expose temperature, humidity, pressure, and other sensors. Auto-combines related sensors from the same device.",icon:"sensor",filter:{include:[{type:Tr.Domain,value:"sensor"},{type:Tr.Domain,value:"binary_sensor"}],exclude:[]},featureFlags:{autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["sensors","temperature","humidity"]},{id:"climate_control",name:"Climate & Covers",description:"Expose thermostats, fans, covers, and humidifiers for climate control.",icon:"climate",filter:{include:[{type:Tr.Domain,value:"climate"},{type:Tr.Domain,value:"fan"},{type:Tr.Domain,value:"cover"},{type:Tr.Domain,value:"humidifier"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["climate","thermostat","covers"]},{id:"security",name:"Security & Locks",description:"Expose locks, alarm panels, and security-related binary sensors (motion, door, window).",icon:"lock",filter:{include:[{type:Tr.Domain,value:"lock"},{type:Tr.Domain,value:"alarm_control_panel"},{type:Tr.DeviceClass,value:"motion"},{type:Tr.DeviceClass,value:"door"},{type:Tr.DeviceClass,value:"window"}],exclude:[],includeMode:"any"},featureFlags:{autoBatteryMapping:!0},tags:["security","locks","alarm"]},{id:"robot_vacuum",name:"Robot Vacuum (Server Mode)",description:"Single vacuum bridge with Server Mode enabled. Required for Apple Home Siri commands and proper Alexa discovery. Add only ONE vacuum to this bridge.",icon:"vacuum",filter:{include:[{type:Tr.Domain,value:"vacuum"}],exclude:[]},featureFlags:{serverMode:!0},tags:["vacuum","server-mode","apple-home"]},{id:"media_players",name:"Media Players & Speakers",description:"Expose media players, speakers, and TVs for volume and playback control.",icon:"media_player",filter:{include:[{type:Tr.Domain,value:"media_player"}],exclude:[]},featureFlags:{},tags:["media","speakers","tv"]},{id:"google_home_optimized",name:"Google Home Optimized",description:"All devices with Auto Force Sync enabled. Prevents Google Home from showing devices as offline after a few hours.",icon:"default",filter:{include:[{type:Tr.Pattern,value:"*"}],exclude:[]},featureFlags:{autoForceSync:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["google-home","all-devices"]},{id:"alexa_covers",name:"Alexa-Optimized Covers",description:"Covers with Alexa-friendly percentage display. Displayed percentage matches Home Assistant values.",icon:"cover",filter:{include:[{type:Tr.Domain,value:"cover"}],exclude:[]},featureFlags:{coverUseHomeAssistantPercentage:!0,autoBatteryMapping:!0},tags:["alexa","covers"]},{id:"automations_scripts",name:"Automations & Scripts",description:"Expose Home Assistant automations, scripts, and scenes as Matter switches.",icon:"remote",filter:{include:[{type:Tr.Domain,value:"automation"},{type:Tr.Domain,value:"script"},{type:Tr.Domain,value:"scene"}],exclude:[]},featureFlags:{},tags:["automations","scripts","scenes"]}];var Cz;(function(e){e[e.locked=1]="locked",e[e.unlocked=2]="unlocked"})(Cz||(Cz={}));var kz;(function(e){e[e.Off=0]="Off",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.On=4]="On",e[e.Auto=5]="Auto",e[e.Smart=6]="Smart"})(kz||(kz={}));var Ez;(function(e){e[e.Forward=0]="Forward",e[e.Reverse=1]="Reverse"})(Ez||(Ez={}));var Az;(function(e){e[e.OffLowMedHigh=0]="OffLowMedHigh",e[e.OffLowHigh=1]="OffLowHigh",e[e.OffLowMedHighAuto=2]="OffLowMedHighAuto",e[e.OffLowHighAuto=3]="OffLowHighAuto",e[e.OffHighAuto=4]="OffHighAuto",e[e.OffHigh=5]="OffHigh"})(Az||(Az={}));var Dz;(function(e){e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked"})(Dz||(Dz={}));var _z;(function(e){e[e.Off=0]="Off",e[e.Auto=1]="Auto",e[e.Cool=3]="Cool",e[e.Heat=4]="Heat",e[e.EmergencyHeat=5]="EmergencyHeat",e[e.Precooling=6]="Precooling",e[e.FanOnly=7]="FanOnly",e[e.Dry=8]="Dry",e[e.Sleep=9]="Sleep"})(_z||(_z={}));var MD;(function(e){e.homeAssistantEntity="homeAssistantEntity",e.identify="identify",e.groups="groups",e.scenesManagement="scenesManagement",e.bridgedDeviceBasicInformation="bridgedDeviceBasicInformation",e.airQuality="airQuality",e.booleanState="booleanState",e.carbonDioxideConcentrationMeasurement="carbonDioxideConcentrationMeasurement",e.carbonMonoxideConcentrationMeasurement="carbonMonoxideConcentrationMeasurement",e.colorControl="colorControl",e.doorLock="doorLock",e.electricalEnergyMeasurement="electricalEnergyMeasurement",e.electricalPowerMeasurement="electricalPowerMeasurement",e.flowMeasurement="flowMeasurement",e.levelControl="levelControl",e.fanControl="fanControl",e.illuminanceMeasurement="illuminanceMeasurement",e.nitrogenDioxideConcentrationMeasurement="nitrogenDioxideConcentrationMeasurement",e.occupancySensing="occupancySensing",e.onOff="onOff",e.ozoneConcentrationMeasurement="ozoneConcentrationMeasurement",e.pm1ConcentrationMeasurement="pm1ConcentrationMeasurement",e.pm10ConcentrationMeasurement="pm10ConcentrationMeasurement",e.pm25ConcentrationMeasurement="pm25ConcentrationMeasurement",e.powerSource="powerSource",e.pressureMeasurement="pressureMeasurement",e.relativeHumidityMeasurement="relativeHumidityMeasurement",e.smokeCoAlarm="smokeCoAlarm",e.temperatureMeasurement="temperatureMeasurement",e.thermostat="thermostat",e.thermostatUserInterfaceConfiguration="thermostatUserInterfaceConfiguration",e.totalVolatileOrganicCompoundsConcentrationMeasurement="totalVolatileOrganicCompoundsConcentrationMeasurement",e.valveConfigurationAndControl="valveConfigurationAndControl",e.windowCovering="windowCovering",e.mediaInput="mediaInput",e.rvcCleanMode="rvcCleanMode",e.rvcRunMode="rvcRunMode",e.rvcOperationalState="rvcOperationalState",e.serviceArea="serviceArea",e.switch="switch",e.modeSelect="modeSelect"})(MD||(MD={}));const PX=[{id:"apple_home",name:"Apple Home",description:"Optimized for Apple Home and Siri. Enables composed devices for clean sensor grouping. Covers use standard Matter percentage (inverted from HA).",icon:"default",featureFlags:{autoComposedDevices:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0}},{id:"google_home",name:"Google Home",description:"Optimized for Google Home. Enables Auto Force Sync to prevent devices from going offline. Composed devices enabled for proper sensor grouping.",icon:"default",featureFlags:{autoForceSync:!0,autoComposedDevices:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0}},{id:"alexa",name:"Amazon Alexa",description:"Optimized for Alexa. Enables Auto Force Sync and Alexa-friendly cover percentages. Battery mapping included for sensor devices.",icon:"default",featureFlags:{autoForceSync:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0,coverUseHomeAssistantPercentage:!0}},{id:"multi_controller",name:"Multi-Controller",description:"Balanced settings for use with multiple controllers at once (e.g. Apple Home + Alexa). Force Sync enabled. Standard cover behavior.",icon:"default",featureFlags:{autoForceSync:!0,autoComposedDevices:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0}}];var Tz;(function(e){e.Battery="battery",e.BatteryCharging="battery_charging",e.CarbonMonoxide="carbon_monoxide",e.Cold="cold",e.Connectivity="connectivity",e.Door="door",e.GarageDoor="garage_door",e.Gas="gas",e.Heat="heat",e.Light="light",e.Lock="lock",e.Moisture="moisture",e.Motion="motion",e.Moving="moving",e.Occupancy="occupancy",e.Opening="opening",e.Plug="plug",e.Power="power",e.Presence="presence",e.Problem="problem",e.Rain="rain",e.Running="running",e.Safety="safety",e.Smoke="smoke",e.Sound="sound",e.Tamper="tamper",e.Update="update",e.Vibration="vibration",e.Window="window"})(Tz||(Tz={}));var Oz;(function(e){e.off="off",e.heat="heat",e.cool="cool",e.heat_cool="heat_cool",e.auto="auto",e.dry="dry",e.fan_only="fan_only"})(Oz||(Oz={}));var Mz;(function(e){e.off="off",e.preheating="preheating",e.heating="heating",e.cooling="cooling",e.drying="drying",e.fan="fan",e.idle="idle",e.defrosting="defrosting"})(Mz||(Mz={}));var jz;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE"})(jz||(jz={}));var Rz;(function(e){e.closed="closed",e.open="open",e.closing="closing",e.opening="opening"})(Rz||(Rz={}));var Iz;(function(e){e.button="button",e.doorbell="doorbell",e.motion="motion"})(Iz||(Iz={}));var Pz;(function(e){e.FORWARD="forward",e.REVERSE="reverse"})(Pz||(Pz={}));var Nz;(function(e){e[e.SET_SPEED=1]="SET_SPEED",e[e.OSCILLATE=2]="OSCILLATE",e[e.DIRECTION=4]="DIRECTION",e[e.PRESET_MODE=8]="PRESET_MODE",e[e.TURN_ON=16]="TURN_ON",e[e.TURN_OFF=32]="TURN_OFF"})(Nz||(Nz={}));var $z;(function(e){e.UNKNOWN="unknown",e.ONOFF="onoff",e.BRIGHTNESS="brightness",e.COLOR_TEMP="color_temp",e.HS="hs",e.XY="xy",e.RGB="rgb",e.RGBW="rgbw",e.RGBWW="rgbww",e.WHITE="white"})($z||($z={}));var Lz;(function(e){e.Tv="tv",e.Speaker="speaker",e.Receiver="receiver"})(Lz||(Lz={}));var Fz;(function(e){e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e[e.MEDIA_ANNOUNCE=1048576]="MEDIA_ANNOUNCE",e[e.MEDIA_ENQUEUE=2097152]="MEDIA_ENQUEUE"})(Fz||(Fz={}));var zz;(function(e){e.None="None",e.apparent_power="apparent_power",e.aqi="aqi",e.atmospheric_pressure="atmospheric_pressure",e.battery="battery",e.carbon_dioxide="carbon_dioxide",e.carbon_monoxide="carbon_monoxide",e.current="current",e.data_rate="data_rate",e.data_size="data_size",e.date="date",e.distance="distance",e.duration="duration",e.energy="energy",e.energy_storage="energy_storage",e.enum="enum",e.frequency="frequency",e.gas="gas",e.humidity="humidity",e.illuminance="illuminance",e.irradiance="irradiance",e.moisture="moisture",e.monetary="monetary",e.nitrogen_dioxide="nitrogen_dioxide",e.nitrogen_monoxide="nitrogen_monoxide",e.nitrous_oxide="nitrous_oxide",e.ozone="ozone",e.ph="ph",e.pm1="pm1",e.pm25="pm25",e.pm10="pm10",e.power_factor="power_factor",e.power="power",e.precipitation="precipitation",e.precipitation_intensity="precipitation_intensity",e.pressure="pressure",e.radon="radon",e.reactive_power="reactive_power",e.signal_strength="signal_strength",e.sound_pressure="sound_pressure",e.speed="speed",e.sulphur_dioxide="sulphur_dioxide",e.temperature="temperature",e.timestamp="timestamp",e.volatile_organic_compounds="volatile_organic_compounds",e.volatile_organic_compounds_parts="volatile_organic_compounds_parts",e.voltage="voltage",e.volume="volume",e.volume_flow_rate="volume_flow_rate",e.volume_storage="volume_storage",e.water="water",e.weight="weight",e.wind_speed="wind_speed"})(zz||(zz={}));var Bz;(function(e){e.cleaning="cleaning",e.docked="docked",e.returning="returning",e.error="error",e.idle="idle",e.paused="paused",e.segment_cleaning="segment_cleaning",e.zone_cleaning="zone_cleaning",e.spot_cleaning="spot_cleaning",e.mop_cleaning="mop_cleaning"})(Bz||(Bz={}));var Hz;(function(e){e[e.TURN_ON=1]="TURN_ON",e[e.TURN_OFF=2]="TURN_OFF",e[e.PAUSE=4]="PAUSE",e[e.STOP=8]="STOP",e[e.RETURN_HOME=16]="RETURN_HOME",e[e.FAN_SPEED=32]="FAN_SPEED",e[e.BATTERY=64]="BATTERY",e[e.STATUS=128]="STATUS",e[e.SEND_COMMAND=256]="SEND_COMMAND",e[e.LOCATE=512]="LOCATE",e[e.CLEAN_SPOT=1024]="CLEAN_SPOT",e[e.MAP=2048]="MAP",e[e.STATE=4096]="STATE",e[e.START=8192]="START",e[e.CLEAN_AREA=16384]="CLEAN_AREA"})(Hz||(Hz={}));var Uz;(function(e){e.off="off",e.low="low",e.medium="medium",e.high="high",e.turbo="turbo",e.auto="auto",e.max="max"})(Uz||(Uz={}));var Vz;(function(e){e.off="off",e.eco="eco",e.electric="electric",e.gas="gas",e.heat_pump="heat_pump",e.high_demand="high_demand",e.performance="performance"})(Vz||(Vz={}));var Wz;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.OPERATION_MODE=2]="OPERATION_MODE",e[e.AWAY_MODE=4]="AWAY_MODE",e[e.ON_OFF=8]="ON_OFF"})(Wz||(Wz={}));const x9={air_purifier:"Air Purifier",air_quality_sensor:"Air Quality Sensor",basic_video_player:"Basic Video Player (TV)",battery_storage:"Battery Sensor",carbon_monoxide_sensor:"Carbon Monoxide (CO) Sensor",color_temperature_light:"Color Temperature Light",contact_sensor:"Contact Sensor",dishwasher:"Dishwasher",dimmable_light:"Dimmable Light",dimmable_plugin_unit:"Dimmable Plug-in Unit",door_lock:"Door Lock",electrical_sensor:"Electrical Sensor (Power/Energy/Voltage/Current)",extended_color_light:"Extended Color Light",fan:"Fan",flow_sensor:"Flow Sensor",formaldehyde_sensor:"Formaldehyde (HCHO) Sensor",generic_switch:"Generic Switch (Button)",humidifier_dehumidifier:"Humidifier/Dehumidifier",humidity_sensor:"Humidity Sensor",light_sensor:"Light Sensor",mode_select:"Mode Select",motion_sensor:"Motion Sensor (PIR)",nitrogen_dioxide_sensor:"Nitrogen Dioxide (NO₂) Sensor",occupancy_sensor:"Occupancy Sensor",on_off_light:"On/Off Light",on_off_plugin_unit:"On/Off Plug-in Unit",on_off_switch:"On/Off Switch",ozone_sensor:"Ozone (O₃) Sensor",pm1_sensor:"PM1 Sensor",pressure_sensor:"Pressure Sensor",pump:"Pump",rain_sensor:"Rain Sensor",radon_sensor:"Radon Sensor",robot_vacuum_cleaner:"Robot Vacuum Cleaner",smoke_co_alarm:"Smoke/CO Alarm",speaker:"Speaker",temperature_sensor:"Temperature Sensor",thermostat:"Thermostat",tvoc_sensor:"TVOC / VOC Index Sensor",water_heater:"Water Heater",water_freeze_detector:"Water Freeze Detector",water_leak_detector:"Water Leak Detector",water_valve:"Water Valve",window_covering:"Window Covering"},R1={Auto:0,Quick:1,Quiet:2,LowNoise:3,LowEnergy:4,Vacation:5,Min:6,Max:7,Night:8,Day:9,DeepClean:16384,Vacuum:16385,Mop:16386,VacuumThenMop:16387},hwe={alarm_control_panel:["mode_select","on_off_plugin_unit"],automation:["on_off_switch"],binary_sensor:["contact_sensor","motion_sensor","occupancy_sensor","rain_sensor","smoke_co_alarm","water_freeze_detector","water_leak_detector"],button:["generic_switch"],climate:["thermostat"],cover:["window_covering"],event:["generic_switch"],fan:["air_purifier","fan"],humidifier:["humidifier_dehumidifier"],input_boolean:["on_off_plugin_unit","on_off_switch"],input_select:["mode_select"],input_button:["generic_switch"],light:["color_temperature_light","dimmable_light","extended_color_light","on_off_light"],lock:["door_lock"],media_player:["basic_video_player","on_off_switch","speaker"],scene:["on_off_switch"],script:["on_off_switch"],sensor:["air_quality_sensor","battery_storage","carbon_monoxide_sensor","electrical_sensor","formaldehyde_sensor","humidity_sensor","light_sensor","nitrogen_dioxide_sensor","ozone_sensor","pm1_sensor","pressure_sensor","radon_sensor","temperature_sensor","tvoc_sensor"],select:["mode_select"],siren:["on_off_plugin_unit"],switch:["dishwasher","on_off_plugin_unit","on_off_switch","pump","water_valve"],vacuum:["robot_vacuum_cleaner"],valve:["water_valve","on_off_plugin_unit"],water_heater:["water_heater","thermostat"]};var qz;(function(e){e.alarm_control_panel="alarm_control_panel",e.automation="automation",e.button="button",e.binary_sensor="binary_sensor",e.climate="climate",e.cover="cover",e.event="event",e.fan="fan",e.humidifier="humidifier",e.input_boolean="input_boolean",e.input_button="input_button",e.input_select="input_select",e.light="light",e.lock="lock",e.media_player="media_player",e.remote="remote",e.scene="scene",e.select="select",e.script="script",e.sensor="sensor",e.siren="siren",e.switch="switch",e.vacuum="vacuum",e.valve="valve",e.water_heater="water_heater"})(qz||(qz={}));const Kz={type:"object",default:{type:"",value:""},properties:{type:{title:"Type",type:"string",oneOf:[{const:"pattern",title:"pattern",description:"Wildcard pattern matching entity IDs. Use * as wildcard. Example: 'light.living_room_*' matches all lights in the living room."},{const:"regex",title:"regex",description:"Full regular expression matching entity IDs. Use ^ and $ for anchors. Example: '^(light|switch)\\.kitchen_.*' matches all kitchen lights and switches."},{const:"domain",title:"domain",description:"Match entities by their domain (the part before the dot). Example: 'light', 'switch', 'sensor'."},{const:"platform",title:"platform",description:"Match entities by their integration/platform. Example: 'hue', 'zwave', 'mqtt'."},{const:"label",title:"label (deprecated)",description:"Deprecated: use entity_label or device_label instead. Behaves like entity_label."},{const:"entity_label",title:"entity_label",description:"Matches only entities that have this label assigned directly. Other entities of the same device are NOT included."},{const:"device_label",title:"device_label",description:"Matches ALL entities of a device if the device has this label. Use this to include a complete device with all its entities."},{const:"area",title:"area",description:"Match entities by their area slug. Example: 'living_room', 'bedroom'."},{const:"entity_category",title:"entity_category",description:"Match entities by their category. Example: 'config', 'diagnostic' to exclude configuration entities."},{const:"device_name",title:"device_name",description:"Match entities by their device name. Supports wildcards. Example: '*Philips*' matches all Philips devices."},{const:"product_name",title:"product_name",description:"Match entities by their product/model name. Supports wildcards. Example: 'Hue*Bulb'."},{const:"device_class",title:"device_class",description:"Match entities by their device class attribute. Example: 'temperature', 'motion', 'door', 'window'."}]},value:{title:"Value",description:"For labels, use the display name or the label_id (slug). You can look up both on the Labels page in the sidebar.",type:"string",minLength:1}},required:["type","value"],additionalProperties:!1},pwe={title:"Include or exclude entities",type:"object",properties:{include:{title:"Include",type:"array",items:Kz},exclude:{title:"Exclude",type:"array",items:Kz},includeMode:{title:"Include Mode",type:"string",description:"How to combine include rules: 'any' matches if ANY rule matches (OR), 'all' matches only if ALL rules match (AND). Default: 'any'",enum:["any","all"],default:"any"}},required:["include","exclude"],additionalProperties:!1},mwe={title:"Feature Flags",type:"object",properties:{coverDoNotInvertPercentage:{title:"Do not invert Percentages for Covers",description:"Do not invert the percentage of covers to match Home Assistant (not Matter compliant)",type:"boolean",default:!1},coverUseHomeAssistantPercentage:{title:"Use Home Assistant Percentage for Covers (Alexa-friendly)",description:"Display cover percentages matching Home Assistant values in Matter controllers like Alexa. This makes the displayed percentage match what you see in Home Assistant, but the semantic meaning differs: in HA, higher percentage = more open; in Alexa, higher percentage is typically interpreted as more closed. Open/Close commands will still work correctly.",type:"boolean",default:!1},coverSwapOpenClose:{title:"Swap Open/Close for Covers",description:"Swap open/close commands and invert position reporting for covers. Enable this if Alexa voice commands are reversed (saying 'close' opens the blinds and vice versa).",type:"boolean",default:!1},includeHiddenEntities:{title:"Include Hidden Entities",description:"Include entities that are marked as hidden in Home Assistant",type:"boolean",default:!1},serverMode:{title:"Server Mode (for Robot Vacuums)",description:"Expose the device as a standalone Matter device instead of a bridged device. This is required for Apple Home to properly support Siri voice commands for Robot Vacuums. IMPORTANT: Only ONE device should be in this bridge when server mode is enabled.",type:"boolean",default:!1},autoBatteryMapping:{title:"Auto Battery Mapping",description:"Automatically assign battery sensors from the same Home Assistant device to the main entity. When enabled, battery sensors will be merged into their parent devices instead of appearing as separate devices.",type:"boolean",default:!1},autoHumidityMapping:{title:"Auto Humidity Mapping",description:"Automatically combine humidity sensors with temperature sensors from the same Home Assistant device. When enabled, humidity sensors will be merged into temperature sensors to create combined TemperatureHumiditySensor devices.",type:"boolean",default:!0},autoPressureMapping:{title:"Auto Pressure Mapping",description:"Automatically combine pressure sensors with temperature sensors from the same Home Assistant device. When enabled, pressure sensors will be merged into temperature sensors to create combined sensor devices.",type:"boolean",default:!0},autoComposedDevices:{title:"Auto Composed Devices",description:"Master toggle: automatically combine related entities from the same Home Assistant device into single Matter endpoints. Enables battery, humidity, pressure, power, and energy auto-mapping at once. This provides a cleaner device experience in Matter controllers (e.g., a Shelly Plug appears as one device with power monitoring).",type:"boolean",default:!1},autoForceSync:{title:"Auto Force Sync",description:"Periodically compare and push all device states to connected controllers every 90 seconds. Enable this if devices get out of sync after extended periods. Health checks for dead sessions always run regardless of this setting.",type:"boolean",default:!1},productNameFromNodeLabel:{title:"Product Name from Node Label",description:"Report the entity's node label (custom name / friendly name / entity id) as the Matter productName. Useful for controllers like Aqara that display productName as the device name instead of nodeLabel. A per-entity customProductName still takes precedence.",type:"boolean",default:!1},vacuumOnOff:{title:"Vacuum: Include OnOff Cluster (Alexa)",description:"Add an OnOff cluster to robot vacuum endpoints. Alexa REQUIRES this (PowerController) to show robotic vacuums in the app. Without it, Alexa commissions the device but never displays it. In Server Mode this is enabled automatically — only check this for bridge mode. WARNING: OnOff is NOT part of the Matter RVC device type specification. Enabling this may break Apple Home (shows 'Updating') and Google Home.",type:"boolean"}}},My={type:"object",title:"Bridge Config",properties:{name:{title:"Name",type:"string",minLength:1,maxLength:32},port:{title:"Port",type:"number",minimum:1},icon:{title:"Icon",type:"string",description:"Icon to display for this bridge in the UI",enum:["light","switch","climate","cover","fan","lock","sensor","media_player","vacuum","remote","humidifier","speaker","garage","door","window","motion","battery","power","camera","default"]},countryCode:{title:"Country Code",type:"string",description:"An ISO 3166-1 alpha-2 code to represent the country in which the Node is located. Only needed if the commissioning fails due to missing country code.",minLength:2,maxLength:3},priority:{title:"Startup Priority",type:"number",description:"Startup order priority. Lower values start first. Default is 100.",default:100,minimum:1,maximum:999},serialNumberSuffix:{title:"Serial Number Suffix",type:"string",description:"Append a suffix to every entity serial number on this bridge. Useful for forcing controllers like Aqara to treat devices as new and bypass cached device data. Leave empty for default behavior.",maxLength:16},filter:pwe,featureFlags:mwe},required:["name","port","filter"],additionalProperties:!1};({...My,properties:{...My.properties},required:[...My?.required??[]]});const NX=Ee(h.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),Za=Ee(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),c0=Ee(h.jsx("path",{d:"M9.19 6.35c-2.04 2.29-3.44 5.58-3.57 5.89L2 10.69l4.05-4.05c.47-.47 1.15-.68 1.81-.55zM11.17 17s3.74-1.55 5.89-3.7c5.4-5.4 4.5-9.62 4.21-10.57-.95-.3-5.17-1.19-10.57 4.21C8.55 9.09 7 12.83 7 12.83zm6.48-2.19c-2.29 2.04-5.58 3.44-5.89 3.57L13.31 22l4.05-4.05c.47-.47.68-1.15.55-1.81zM9 18c0 .83-.34 1.58-.88 2.12C6.94 21.3 2 22 2 22s.7-4.94 1.88-6.12C4.42 15.34 5.17 15 6 15c1.66 0 3 1.34 3 3m4-9c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2"})),gwe=st("MuiBox",["root"]),ywe=M6(),se=Bxe({themeId:ja,defaultTheme:ywe,defaultClassName:gwe.root,generateClassName:_Z.generate});function bwe(e){return tt("MuiButton",e)}const ah=st("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),vwe=A.createContext({}),xwe=A.createContext(void 0),Swe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:s,loadingPosition:a,classes:l}=e,c={root:["root",s&&"loading",o,`${o}${ve(t)}`,`size${ve(i)}`,`${o}Size${ve(i)}`,`color${ve(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${ve(a)}`],startIcon:["icon","startIcon",`iconSize${ve(i)}`],endIcon:["icon","endIcon",`iconSize${ve(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=nt(c,bwe,l);return{...l,...u}},$X=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],wwe=ge(ss,{shouldForwardProp:e=>Li(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ve(n.color)}`],t[`size${ve(n.size)}`],t[`${n.variant}Size${ve(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${ah.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${ah.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ah.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${ah.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Gn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ah.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ah.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${ah.loading}`]:{color:"transparent"}}}]}})),Cwe=ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ve(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...$X]})),kwe=ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ve(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...$X]})),Ewe=ge("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Gz=ge("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Ue=A.forwardRef(function(t,n){const r=A.useContext(vwe),i=A.useContext(xwe),o=Eg(r,t),s=ct({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:y,focusVisibleClassName:b,fullWidth:v=!1,id:S,loading:C=null,loadingIndicator:w,loadingPosition:E="center",size:k="medium",startIcon:T,type:_,variant:O="text",...R}=s,P=Ju(S),L=w??h.jsx(Xn,{"aria-labelledby":P,color:"inherit",size:16}),M={...s,color:l,component:c,disabled:d,disableElevation:p,disableFocusRipple:g,fullWidth:v,loading:C,loadingIndicator:L,loadingPosition:E,size:k,type:_,variant:O},N=Swe(M),$=(T||C&&E==="start")&&h.jsx(Cwe,{className:N.startIcon,ownerState:M,children:T||h.jsx(Gz,{className:N.loadingIconPlaceholder,ownerState:M})}),B=(y||C&&E==="end")&&h.jsx(kwe,{className:N.endIcon,ownerState:M,children:y||h.jsx(Gz,{className:N.loadingIconPlaceholder,ownerState:M})}),F=i||"",V=typeof C=="boolean"?h.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:C&&h.jsx(Ewe,{className:N.loadingIndicator,ownerState:M,children:L})}):null;return h.jsxs(wwe,{ownerState:M,className:_e(r.className,N.root,u,F),component:c,disabled:d||C,focusRipple:!g,focusVisibleClassName:_e(N.focusVisible,b),ref:n,type:_,id:C?P:S,...R,classes:N,children:[$,E!=="end"&&V,a,E==="end"&&V,B]})});function Awe(e){return tt("MuiCard",e)}st("MuiCard",["root"]);const Dwe=e=>{const{classes:t}=e;return nt({root:["root"]},Awe,t)},_we=ge(zr,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),Mn=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCard"}),{className:i,raised:o=!1,...s}=r,a={...r,raised:o},l=Dwe(a);return h.jsx(_we,{className:_e(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a,...s})});function Twe(e){return tt("MuiCardActionArea",e)}const S9=st("MuiCardActionArea",["root","focusVisible","focusHighlight"]),Owe=e=>{const{classes:t}=e;return nt({root:["root"],focusHighlight:["focusHighlight"]},Twe,t)},Mwe=ge(ss,{name:"MuiCardActionArea",slot:"Root"})(Ye(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${S9.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${S9.focusVisible} .${S9.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),jwe=ge("span",{name:"MuiCardActionArea",slot:"FocusHighlight"})(Ye(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),zu=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCardActionArea"}),{children:i,className:o,focusVisibleClassName:s,slots:a={},slotProps:l={},...c}=r,u=r,d=Owe(u),p={slots:a,slotProps:l},[g,y]=ft("root",{elementType:Mwe,externalForwardedProps:{...p,...c},shouldForwardComponentProp:!0,ownerState:u,ref:n,className:_e(d.root,o),additionalProps:{focusVisibleClassName:_e(s,d.focusVisible)}}),[b,v]=ft("focusHighlight",{elementType:jwe,externalForwardedProps:p,ownerState:u,className:d.focusHighlight});return h.jsxs(g,{...y,children:[i,h.jsx(b,{...v})]})});function Rwe(e){return tt("MuiCardContent",e)}st("MuiCardContent",["root"]);const Iwe=e=>{const{classes:t}=e;return nt({root:["root"]},Rwe,t)},Pwe=ge("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),Qn=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCardContent"}),{className:i,component:o="div",...s}=r,a={...r,component:o},l=Iwe(a);return h.jsx(Pwe,{as:o,className:_e(l.root,i),ownerState:a,ref:n,...s})}),W6=A.createContext(void 0);function Dl(){return A.useContext(W6)}function Nwe(e){return tt("PrivateSwitchBase",e)}st("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const $we=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${ve(i)}`],input:["input"]};return nt(o,Nwe,t)},Lwe=ge(ss,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),Fwe=ge("input",{name:"MuiSwitchBase",shouldForwardProp:Li})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),BO=A.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,defaultChecked:s,disabled:a,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:g,name:y,onBlur:b,onChange:v,onFocus:S,readOnly:C,required:w=!1,tabIndex:E,type:k,value:T,slots:_={},slotProps:O={},...R}=t,[P,L]=ml({controlled:i,default:!!s,name:"SwitchBase",state:"checked"}),M=Dl(),N=K=>{S&&S(K),M&&M.onFocus&&M.onFocus(K)},$=K=>{b&&b(K),M&&M.onBlur&&M.onBlur(K)},B=K=>{if(K.nativeEvent.defaultPrevented||C)return;const Q=K.target.checked;L(Q),v&&v(K,Q)};let F=a;M&&typeof F>"u"&&(F=M.disabled);const V=k==="checkbox"||k==="radio",W={...t,checked:P,disabled:F,disableFocusRipple:l,edge:c},q=$we(W),Z={slots:_,slotProps:{input:p,...O}},[z,U]=ft("root",{ref:n,elementType:Lwe,className:q.root,shouldForwardComponentProp:!0,externalForwardedProps:{...Z,component:"span",...R},getSlotProps:K=>({...K,onFocus:Q=>{K.onFocus?.(Q),N(Q)},onBlur:Q=>{K.onBlur?.(Q),$(Q)}}),ownerState:W,additionalProps:{centerRipple:!0,focusRipple:!l,role:void 0,tabIndex:null}}),[Y,H]=ft("input",{ref:g,elementType:Fwe,className:q.input,externalForwardedProps:Z,getSlotProps:K=>({...K,onChange:Q=>{K.onChange?.(Q),B(Q)}}),ownerState:W,additionalProps:{autoFocus:r,checked:i,defaultChecked:s,disabled:F,id:V?d:void 0,name:y,readOnly:C,required:w,tabIndex:E,type:k,...k==="checkbox"&&T===void 0?{}:{value:T}}});return h.jsxs(z,{...U,children:[h.jsx(Y,{...H}),P?o:u]})}),zwe=Ee(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),Bwe=Ee(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Hwe=Ee(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function Uwe(e){return tt("MuiCheckbox",e)}const w9=st("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Vwe=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${ve(r)}`,`size${ve(i)}`]},s=nt(o,Uwe,t);return{...t,...s}},Wwe=ge(BO,{shouldForwardProp:e=>Li(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${ve(n.size)}`],n.color!=="default"&&t[`color${ve(n.color)}`]]}})(Ye(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{[`&.${w9.checked}, &.${w9.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${w9.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),qwe=h.jsx(Bwe,{}),Kwe=h.jsx(zwe,{}),Gwe=h.jsx(Hwe,{}),ws=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCheckbox"}),{checkedIcon:i=qwe,color:o="primary",icon:s=Kwe,indeterminate:a=!1,indeterminateIcon:l=Gwe,inputProps:c,size:u="medium",disableRipple:d=!1,className:p,slots:g={},slotProps:y={},...b}=r,v=a?l:s,S=a?l:i,C={...r,disableRipple:d,color:o,indeterminate:a,size:u},w=Vwe(C),E=y.input??c,[k,T]=ft("root",{ref:n,elementType:Wwe,className:_e(w.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:g,slotProps:y,...b},ownerState:C,additionalProps:{type:"checkbox",icon:A.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:A.cloneElement(S,{fontSize:S.props.fontSize??u}),disableRipple:d,slots:g,slotProps:{input:MO(typeof E=="function"?E(C):E,{"data-indeterminate":a})}}});return h.jsx(k,{...T,classes:w})}),Ywe=Ee(h.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function Jwe(e){return tt("MuiChip",e)}const Ln=st("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Zwe=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${ve(r)}`,`color${ve(i)}`,a&&"clickable",a&&`clickableColor${ve(i)}`,s&&"deletable",s&&`deletableColor${ve(i)}`,`${l}${ve(i)}`],label:["label",`label${ve(r)}`],avatar:["avatar",`avatar${ve(r)}`,`avatarColor${ve(i)}`],icon:["icon",`icon${ve(r)}`,`iconColor${ve(o)}`],deleteIcon:["deleteIcon",`deleteIcon${ve(r)}`,`deleteIconColor${ve(i)}`,`deleteIcon${ve(l)}Color${ve(i)}`]};return nt(c,Jwe,t)},Xwe=ge("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Ln.avatar}`]:t.avatar},{[`& .${Ln.avatar}`]:t[`avatar${ve(a)}`]},{[`& .${Ln.avatar}`]:t[`avatarColor${ve(r)}`]},{[`& .${Ln.icon}`]:t.icon},{[`& .${Ln.icon}`]:t[`icon${ve(a)}`]},{[`& .${Ln.icon}`]:t[`iconColor${ve(i)}`]},{[`& .${Ln.deleteIcon}`]:t.deleteIcon},{[`& .${Ln.deleteIcon}`]:t[`deleteIcon${ve(a)}`]},{[`& .${Ln.deleteIcon}`]:t[`deleteIconColor${ve(r)}`]},{[`& .${Ln.deleteIcon}`]:t[`deleteIcon${ve(l)}Color${ve(r)}`]},t.root,t[`size${ve(a)}`],t[`color${ve(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${ve(r)}`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${ve(r)}`],t[l],t[`${l}${ve(r)}`]]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ln.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ln.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Ln.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ln.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ln.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ln.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Ln.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Ln.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Ln.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Gn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Ln.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Ln.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Ln.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Ln.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Gn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Ln.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Ln.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Gn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ln.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ln.avatar}`]:{marginLeft:4},[`& .${Ln.avatarSmall}`]:{marginLeft:2},[`& .${Ln.icon}`]:{marginLeft:4},[`& .${Ln.iconSmall}`]:{marginLeft:2},[`& .${Ln.deleteIcon}`]:{marginRight:5},[`& .${Ln.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Gn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${Ln.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Ln.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Ln.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Qwe=ge("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ve(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Yz(e){return e.key==="Backspace"||e.key==="Delete"}const ot=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:p,onClick:g,onDelete:y,onKeyDown:b,onKeyUp:v,size:S="medium",variant:C="filled",tabIndex:w,skipFocusWhenDisabled:E=!1,slots:k={},slotProps:T={},..._}=r,O=A.useRef(null),R=Br(O,n),P=Q=>{Q.stopPropagation(),y(Q)},L=Q=>{Q.currentTarget===Q.target&&Yz(Q)&&Q.preventDefault(),b&&b(Q)},M=Q=>{Q.currentTarget===Q.target&&y&&Yz(Q)&&y(Q),v&&v(Q)},N=s!==!1&&g?!0:s,$=N||y?ss:l||"div",B={...r,component:$,disabled:u,size:S,color:a,iconColor:A.isValidElement(d)&&d.props.color||a,onDelete:!!y,clickable:N,variant:C},F=Zwe(B),V=$===ss?{component:l||"div",focusVisibleClassName:F.focusVisible,...y&&{disableRipple:!0}}:{};let W=null;y&&(W=c&&A.isValidElement(c)?A.cloneElement(c,{className:_e(c.props.className,F.deleteIcon),onClick:P}):h.jsx(Ywe,{className:F.deleteIcon,onClick:P}));let q=null;i&&A.isValidElement(i)&&(q=A.cloneElement(i,{className:_e(F.avatar,i.props.className)}));let Z=null;d&&A.isValidElement(d)&&(Z=A.cloneElement(d,{className:_e(F.icon,d.props.className)}));const z={slots:k,slotProps:T},[U,Y]=ft("root",{elementType:Xwe,externalForwardedProps:{...z,..._},ownerState:B,shouldForwardComponentProp:!0,ref:R,className:_e(F.root,o),additionalProps:{disabled:N&&u?!0:void 0,tabIndex:E&&u?-1:w,...V},getSlotProps:Q=>({...Q,onClick:ie=>{Q.onClick?.(ie),g?.(ie)},onKeyDown:ie=>{Q.onKeyDown?.(ie),L(ie)},onKeyUp:ie=>{Q.onKeyUp?.(ie),M(ie)}})}),[H,K]=ft("label",{elementType:Qwe,externalForwardedProps:z,ownerState:B,className:F.label});return h.jsxs(U,{as:$,...Y,children:[q||Z,h.jsx(H,{...K,children:p}),W]})});function Jz(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function T4(e,t=!1){return e&&(Jz(e.value)&&e.value!==""||t&&Jz(e.defaultValue)&&e.defaultValue!=="")}function e6e(e){return e.startAdornment}function t6e(e){return tt("MuiFormControl",e)}st("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const n6e=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${ve(n)}`,r&&"fullWidth"]};return nt(i,t6e,t)},r6e=ge("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ve(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),rs=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:g="none",required:y=!1,size:b="medium",variant:v="outlined",...S}=r,C={...r,color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:g,required:y,size:b,variant:v},w=n6e(C),[E,k]=A.useState(()=>{let B=!1;return i&&A.Children.forEach(i,F=>{if(!Ty(F,["Input","Select"]))return;const V=Ty(F,["Select"])?F.props.input:F;V&&e6e(V.props)&&(B=!0)}),B}),[T,_]=A.useState(()=>{let B=!1;return i&&A.Children.forEach(i,F=>{Ty(F,["Input","Select"])&&(T4(F.props,!0)||T4(F.props.inputProps,!0))&&(B=!0)}),B}),[O,R]=A.useState(!1);l&&O&&R(!1);const P=u!==void 0&&!l?u:O;let L;A.useRef(!1);const M=A.useCallback(()=>{_(!0)},[]),N=A.useCallback(()=>{_(!1)},[]),$=A.useMemo(()=>({adornedStart:E,setAdornedStart:k,color:s,disabled:l,error:c,filled:T,focused:P,fullWidth:d,hiddenLabel:p,size:b,onBlur:()=>{R(!1)},onFocus:()=>{R(!0)},onEmpty:N,onFilled:M,registerEffect:L,required:y,variant:v}),[E,s,l,c,T,P,d,p,L,N,M,y,b,v]);return h.jsx(W6.Provider,{value:$,children:h.jsx(r6e,{as:a,ownerState:C,className:_e(w.root,o),ref:n,...S,children:i})})});function i6e(e){return tt("MuiTypography",e)}const Zz=st("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),o6e={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},s6e=j5e(),a6e=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${ve(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return nt(a,i6e,s)},l6e=ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ve(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ye(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ve(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Xz={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},re=A.forwardRef(function(t,n){const{color:r,...i}=ct({props:t,name:"MuiTypography"}),o=!o6e[r],s=s6e({...i,...o&&{color:r}}),{align:a="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:p=!1,variant:g="body1",variantMapping:y=Xz,...b}=s,v={...s,align:a,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:p,variant:g,variantMapping:y},S=c||(p?"p":y[g]||Xz[g])||"span",C=a6e(v);return h.jsx(l6e,{as:S,ref:n,className:_e(C.root,l),...b,ownerState:v,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...b.style}})});function c6e(e){return tt("MuiFormControlLabel",e)}const uy=st("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function If({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const u6e=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${ve(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return nt(s,c6e,t)},d6e=ge("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${uy.label}`]:t.label},t.root,t[`labelPlacement${ve(n.labelPlacement)}`]]}})(Ye(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${uy.disabled}`]:{cursor:"default"},[`& .${uy.label}`]:{[`&.${uy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),f6e=ge("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Ye(({theme:e})=>({[`&.${uy.error}`]:{color:(e.vars||e).palette.error.main}}))),Ro=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiFormControlLabel"}),{checked:i,className:o,componentsProps:s={},control:a,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:p="end",name:g,onChange:y,required:b,slots:v={},slotProps:S={},value:C,...w}=r,E=Dl(),k=l??a.props.disabled??E?.disabled,T=b??a.props.required,_={disabled:k,required:T};["checked","name","onChange","value","inputRef"].forEach(B=>{typeof a.props[B]>"u"&&typeof r[B]<"u"&&(_[B]=r[B])});const O=If({props:r,muiFormControl:E,states:["error"]}),R={...r,disabled:k,labelPlacement:p,required:T,error:O.error},P=u6e(R),L={slots:v,slotProps:{...s,...S}},[M,N]=ft("typography",{elementType:re,externalForwardedProps:L,ownerState:R});let $=d;return $!=null&&$.type!==re&&!c&&($=h.jsx(M,{component:"span",...N,className:_e(P.label,N?.className),children:$})),h.jsxs(d6e,{className:_e(P.root,o),ownerState:R,ref:n,...w,children:[A.cloneElement(a,_),T?h.jsxs("div",{children:[$,h.jsxs(f6e,{ownerState:R,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):$]})}),ht=K3e({createStyledComponent:ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>ct({props:e,name:"MuiGrid"}),useTheme:Ki});function h6e(e){return tt("MuiLinearProgress",e)}st("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const jD=4,RD=jf`
|
|
147
|
+
`:null,ESe=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${ve(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ve(n)}`,i&&"circleDisableShrink"]};return nt(o,wSe,t)},ASe=ge("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ve(n.color)}`]]}})(Ye(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:CSe||{animation:`${xD} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),DSe=ge("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),_Se=ge("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ve(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ye(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:kSe||{animation:`${SD} 1.4s ease-in-out infinite`}}]}))),TSe=ge("circle",{name:"MuiCircularProgress",slot:"Track"})(Ye(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Xn=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:c,thickness:u=3.6,value:d=0,variant:p="indeterminate",...g}=r,y={...r,color:o,disableShrink:s,size:l,thickness:u,value:d,variant:p,enableTrackSlot:a},b=ESe(y),v={},S={},C={};if(p==="determinate"){const w=2*Math.PI*((nl-u)/2);v.strokeDasharray=w.toFixed(3),C["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*w).toFixed(3)}px`,S.transform="rotate(-90deg)"}return h.jsx(ASe,{className:_e(b.root,i),style:{width:l,height:l,...S,...c},ownerState:y,ref:n,role:"progressbar",...C,...g,children:h.jsxs(DSe,{className:b.svg,ownerState:y,viewBox:`${nl/2} ${nl/2} ${nl} ${nl}`,children:[a?h.jsx(TSe,{className:b.track,ownerState:y,cx:nl,cy:nl,r:(nl-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,h.jsx(_Se,{className:b.circle,style:v,ownerState:y,cx:nl,cy:nl,r:(nl-u)/2,fill:"none",strokeWidth:u})]})})});function OSe(e){return tt("MuiIconButton",e)}const iz=st("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),MSe=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o,loading:s}=e,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${ve(r)}`,i&&`edge${ve(i)}`,`size${ve(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return nt(a,OSe,t)},jSe=ge(ss,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ve(n.color)}`],n.edge&&t[`edge${ve(n.edge)}`],t[`size${ve(n.size)}`]]}})(Ye(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ye(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${iz.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${iz.loading}`]:{color:"transparent"}}))),RSe=ge("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),qt=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:a="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:d,loading:p=null,loadingIndicator:g,...y}=r,b=Ju(d),v=g??h.jsx(Xn,{"aria-labelledby":b,color:"inherit",size:16}),S={...r,edge:i,color:a,disabled:l,disableFocusRipple:c,loading:p,loadingIndicator:v,size:u},C=MSe(S);return h.jsxs(jSe,{id:p?b:d,className:_e(C.root,s),centerRipple:!0,focusRipple:!c,disabled:l||p,ref:n,...y,ownerState:S,children:[typeof p=="boolean"&&h.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:h.jsx(RSe,{className:C.loadingIndicator,ownerState:S,children:p&&v})}),o]})}),ISe=Ee(h.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),PSe=Ee(h.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),NSe=Ee(h.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),$Se=Ee(h.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),nX=Ee(h.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),LSe=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${ve(n||r)}`,`${t}${ve(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return nt(o,G5e,i)},FSe=ge(zr,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ve(n.color||n.severity)}`]]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Gn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${tz.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Gn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${tz.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Gn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),zSe=ge("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),BSe=ge("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),HSe=ge("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),oz={success:h.jsx(ISe,{fontSize:"inherit"}),warning:h.jsx(PSe,{fontSize:"inherit"}),error:h.jsx(NSe,{fontSize:"inherit"}),info:h.jsx($Se,{fontSize:"inherit"})},zt=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiAlert"}),{action:i,children:o,className:s,closeText:a="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:p=oz,onClose:g,role:y="alert",severity:b="success",slotProps:v={},slots:S={},variant:C="standard",...w}=r,E={...r,color:l,severity:b,variant:C,colorSeverity:l||b},k=LSe(E),T={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...S},slotProps:{...u,...v}},[_,O]=ft("root",{ref:n,shouldForwardComponentProp:!0,className:_e(k.root,s),elementType:FSe,externalForwardedProps:{...T,...w},ownerState:E,additionalProps:{role:y,elevation:0}}),[R,P]=ft("icon",{className:k.icon,elementType:zSe,externalForwardedProps:T,ownerState:E}),[L,M]=ft("message",{className:k.message,elementType:BSe,externalForwardedProps:T,ownerState:E}),[N,$]=ft("action",{className:k.action,elementType:HSe,externalForwardedProps:T,ownerState:E}),[B,F]=ft("closeButton",{elementType:qt,externalForwardedProps:T,ownerState:E}),[V,W]=ft("closeIcon",{elementType:nX,externalForwardedProps:T,ownerState:E});return h.jsxs(_,{...O,children:[d!==!1?h.jsx(R,{...P,children:d||p[b]||oz[b]}):null,h.jsx(L,{...M,children:o}),i!=null?h.jsx(N,{...$,children:i}):null,i==null&&g?h.jsx(N,{...$,children:h.jsx(B,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...F,children:h.jsx(V,{fontSize:"small",...W})})}):null]})});function USe(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,s=Kd();A.useEffect(()=>{if(!i)return;function S(C){C.defaultPrevented||C.key==="Escape"&&r?.(C,"escapeKeyDown")}return document.addEventListener("keydown",S),()=>{document.removeEventListener("keydown",S)}},[i,r]);const a=hi((S,C)=>{r?.(S,C)}),l=hi(S=>{!r||S==null||s.start(S,()=>{a(null,"timeout")})});A.useEffect(()=>(i&&l(t),s.clear),[i,t,l,s]);const c=S=>{r?.(S,"clickaway")},u=s.clear,d=A.useCallback(()=>{t!=null&&l(o??t*.5)},[t,o,l]),p=S=>C=>{const w=S.onBlur;w?.(C),d()},g=S=>C=>{const w=S.onFocus;w?.(C),u()},y=S=>C=>{const w=S.onMouseEnter;w?.(C),u()},b=S=>C=>{const w=S.onMouseLeave;w?.(C),d()};return A.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(S={})=>{const C={...ro(e),...ro(S)};return{role:"presentation",...S,...C,onBlur:p(C),onFocus:g(C),onMouseEnter:y(C),onMouseLeave:b(C)}},onClickAway:c}}function Rf(e){return parseInt(A.version,10)>=19?e?.props?.ref||null:e?.ref||null}function sz(e){return e.substring(2).toLowerCase()}function VSe(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function rX(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,s=A.useRef(!1),a=A.useRef(null),l=A.useRef(!1),c=A.useRef(!1);A.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Br(Rf(t),a),d=hi(y=>{const b=c.current;c.current=!1;const v=Ei(a.current);if(!l.current||!a.current||"clientX"in y&&VSe(y,v))return;if(s.current){s.current=!1;return}let S;y.composedPath?S=y.composedPath().includes(a.current):S=!v.documentElement.contains(y.target)||a.current.contains(y.target),!S&&(n||!b)&&i(y)}),p=y=>b=>{c.current=!0;const v=t.props[y];v&&v(b)},g={ref:u};return o!==!1&&(g[o]=p(o)),A.useEffect(()=>{if(o!==!1){const y=sz(o),b=Ei(a.current),v=()=>{s.current=!0};return b.addEventListener(y,d),b.addEventListener("touchmove",v),()=>{b.removeEventListener(y,d),b.removeEventListener("touchmove",v)}}},[d,o]),r!==!1&&(g[r]=p(r)),A.useEffect(()=>{if(r!==!1){const y=sz(r),b=Ei(a.current);return b.addEventListener(y,d),()=>{b.removeEventListener(y,d)}}},[d,r]),A.cloneElement(t,g)}const IO=e=>e.scrollTop;function gf(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function wD(e){return`scale(${e}, ${e**2})`}const WSe={entering:{opacity:1,transform:wD(1)},entered:{opacity:1,transform:"none"}},m9=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),vb=A.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:g,style:y,timeout:b="auto",TransitionComponent:v=Ja,...S}=t,C=Kd(),w=A.useRef(),E=Ki(),k=A.useRef(null),T=Br(k,Rf(o),n),_=B=>F=>{if(B){const V=k.current;F===void 0?B(V):B(V,F)}},O=_(u),R=_((B,F)=>{IO(B);const{duration:V,delay:W,easing:q}=gf({style:y,timeout:b,easing:s},{mode:"enter"});let Z;b==="auto"?(Z=E.transitions.getAutoHeightDuration(B.clientHeight),w.current=Z):Z=V,B.style.transition=[E.transitions.create("opacity",{duration:Z,delay:W}),E.transitions.create("transform",{duration:m9?Z:Z*.666,delay:W,easing:q})].join(","),l&&l(B,F)}),P=_(c),L=_(g),M=_(B=>{const{duration:F,delay:V,easing:W}=gf({style:y,timeout:b,easing:s},{mode:"exit"});let q;b==="auto"?(q=E.transitions.getAutoHeightDuration(B.clientHeight),w.current=q):q=F,B.style.transition=[E.transitions.create("opacity",{duration:q,delay:V}),E.transitions.create("transform",{duration:m9?q:q*.666,delay:m9?V:V||q*.333,easing:W})].join(","),B.style.opacity=0,B.style.transform=wD(.75),d&&d(B)}),N=_(p),$=B=>{b==="auto"&&C.start(w.current||0,B),r&&r(k.current,B)};return h.jsx(v,{appear:i,in:a,nodeRef:k,onEnter:R,onEntered:P,onEntering:O,onExit:M,onExited:N,onExiting:L,addEndListener:$,timeout:b==="auto"?null:b,...S,children:(B,{ownerState:F,...V})=>A.cloneElement(o,{style:{opacity:0,transform:wD(.75),visibility:B==="exited"&&!a?"hidden":void 0,...WSe[B],...y,...o.props.style},ref:T,...V})})});vb&&(vb.muiSupportAuto=!0);function qSe(e){return tt("MuiSnackbarContent",e)}st("MuiSnackbarContent",["root","message","action"]);const KSe=e=>{const{classes:t}=e;return nt({root:["root"],action:["action"],message:["message"]},qSe,t)},GSe=ge(zr,{name:"MuiSnackbarContent",slot:"Root"})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(yb(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:yb(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),YSe=ge("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),JSe=ge("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),ZSe=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:a="alert",...l}=r,c=r,u=KSe(c);return h.jsxs(GSe,{role:a,elevation:6,className:_e(u.root,o),ownerState:c,ref:n,...l,children:[h.jsx(YSe,{className:u.message,ownerState:c,children:s}),i?h.jsx(JSe,{className:u.action,ownerState:c,children:i}):null]})});function XSe(e){return tt("MuiSnackbar",e)}st("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const QSe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${ve(n.vertical)}${ve(n.horizontal)}`]};return nt(r,XSe,t)},e4e=ge("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${ve(n.anchorOrigin.vertical)}${ve(n.anchorOrigin.horizontal)}`]]}})(Ye(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),N6=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiSnackbar"}),i=Ki(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:a,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:g,disableWindowBlurListener:y=!1,message:b,onBlur:v,onClose:S,onFocus:C,onMouseEnter:w,onMouseLeave:E,open:k,resumeHideDuration:T,slots:_={},slotProps:O={},TransitionComponent:R,transitionDuration:P=o,TransitionProps:{onEnter:L,onExited:M,...N}={},...$}=r,B={...r,anchorOrigin:{vertical:a,horizontal:l},autoHideDuration:c,disableWindowBlurListener:y,TransitionComponent:R,transitionDuration:P},F=QSe(B),{getRootProps:V,onClickAway:W}=USe(B),[q,Z]=A.useState(!0),z=oe=>{Z(!0),M&&M(oe)},U=(oe,le)=>{Z(!1),L&&L(oe,le)},Y={slots:{transition:R,..._},slotProps:{content:g,clickAwayListener:p,transition:N,...O}},[H,K]=ft("root",{ref:n,className:[F.root,d],elementType:e4e,getSlotProps:V,externalForwardedProps:{...Y,...$},ownerState:B}),[Q,{ownerState:ie,...te}]=ft("clickAwayListener",{elementType:rX,externalForwardedProps:Y,getSlotProps:oe=>({onClickAway:(...le)=>{const fe=le[0];oe.onClickAway?.(...le),!fe?.defaultMuiPrevented&&W(...le)}}),ownerState:B}),[ce,ee]=ft("content",{elementType:ZSe,shouldForwardComponentProp:!0,externalForwardedProps:Y,additionalProps:{message:b,action:s},ownerState:B}),[J,X]=ft("transition",{elementType:vb,externalForwardedProps:Y,getSlotProps:oe=>({onEnter:(...le)=>{oe.onEnter?.(...le),U(...le)},onExited:(...le)=>{oe.onExited?.(...le),z(...le)}}),additionalProps:{appear:!0,in:k,timeout:P,direction:a==="top"?"down":"up"},ownerState:B});return!k&&q?null:h.jsx(Q,{...te,..._.clickAwayListener&&{ownerState:ie},children:h.jsx(H,{...K,children:h.jsx(J,{...X,children:u||h.jsx(ce,{...ee})})})})}),iX=A.createContext({show:()=>{}});let t4e=0;const n4e=e=>{const[t,n]=A.useState([]),r=A.useCallback(o=>{n(s=>[...s,{...o,autoHideDuration:o.autoHideDuration??6e3,notificationId:t4e++}])},[]),i=o=>{n(s=>s.filter(a=>a.notificationId!==o))};return h.jsxs(iX.Provider,{value:{show:r},children:[e.children,t.map(o=>h.jsx(N6,{open:!0,autoHideDuration:o.autoHideDuration,onClose:()=>i(o.notificationId),children:h.jsx(zt,{severity:o.severity,variant:"filled",sx:{minWidth:"300px"},children:o.message})},o.notificationId))]})};function vo(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var r4e=typeof Symbol=="function"&&Symbol.observable||"@@observable",az=r4e,g9=()=>Math.random().toString(36).substring(7).split("").join("."),i4e={INIT:`@@redux/INIT${g9()}`,REPLACE:`@@redux/REPLACE${g9()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${g9()}`},v4=i4e;function PO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function oX(e,t,n){if(typeof e!="function")throw new Error(vo(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(vo(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(vo(1));return n(oX)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((v,S)=>{s.set(S,v)}))}function u(){if(l)throw new Error(vo(3));return i}function d(v){if(typeof v!="function")throw new Error(vo(4));if(l)throw new Error(vo(5));let S=!0;c();const C=a++;return s.set(C,v),function(){if(S){if(l)throw new Error(vo(6));S=!1,c(),s.delete(C),o=null}}}function p(v){if(!PO(v))throw new Error(vo(7));if(typeof v.type>"u")throw new Error(vo(8));if(typeof v.type!="string")throw new Error(vo(17));if(l)throw new Error(vo(9));try{l=!0,i=r(i,v)}finally{l=!1}return(o=s).forEach(C=>{C()}),v}function g(v){if(typeof v!="function")throw new Error(vo(10));r=v,p({type:v4.REPLACE})}function y(){const v=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(vo(11));function C(){const E=S;E.next&&E.next(u())}return C(),{unsubscribe:v(C)}},[az](){return this}}}return p({type:v4.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:g,[az]:y}}function o4e(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:v4.INIT})>"u")throw new Error(vo(12));if(typeof n(void 0,{type:v4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(vo(13))})}function s4e(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{o4e(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const c={};for(let u=0;u<r.length;u++){const d=r[u],p=n[d],g=s[d],y=p(g,a);if(typeof y>"u")throw a&&a.type,new Error(vo(14));c[d]=y,l=l||y!==g}return l=l||r.length!==Object.keys(s).length,l?c:s}}function x4(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function a4e(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(vo(15))};const s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=x4(...a)(i.dispatch),{...i,dispatch:o}}}function l4e(e){return PO(e)&&"type"in e&&typeof e.type=="string"}var sX=Symbol.for("immer-nothing"),lz=Symbol.for("immer-draftable"),as=Symbol.for("immer-state");function al(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ta=Object,Ag=ta.getPrototypeOf,S4="constructor",$6="prototype",CD="configurable",w4="enumerable",mS="writable",xb="value",Fu=e=>!!e&&!!e[as];function Sl(e){return e?aX(e)||F6(e)||!!e[lz]||!!e[S4]?.[lz]||z6(e)||B6(e):!1}var c4e=ta[$6][S4].toString(),cz=new WeakMap;function aX(e){if(!e||!NO(e))return!1;const t=Ag(e);if(t===null||t===ta[$6])return!0;const n=ta.hasOwnProperty.call(t,S4)&&t[S4];if(n===Object)return!0;if(!Om(n))return!1;let r=cz.get(n);return r===void 0&&(r=Function.toString.call(n),cz.set(n,r)),r===c4e}function L6(e,t,n=!0){U2(e)===0?(n?Reflect.ownKeys(e):ta.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function U2(e){const t=e[as];return t?t.type_:F6(e)?1:z6(e)?2:B6(e)?3:0}var uz=(e,t,n=U2(e))=>n===2?e.has(t):ta[$6].hasOwnProperty.call(e,t),kD=(e,t,n=U2(e))=>n===2?e.get(t):e[t],C4=(e,t,n,r=U2(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function u4e(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var F6=Array.isArray,z6=e=>e instanceof Map,B6=e=>e instanceof Set,NO=e=>typeof e=="object",Om=e=>typeof e=="function",y9=e=>typeof e=="boolean";function d4e(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var wu=e=>e.copy_||e.base_,$O=e=>e.modified_?e.copy_:e.base_;function ED(e,t){if(z6(e))return new Map(e);if(B6(e))return new Set(e);if(F6(e))return Array[$6].slice.call(e);const n=aX(e);if(t===!0||t==="class_only"&&!n){const r=ta.getOwnPropertyDescriptors(e);delete r[as];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a[mS]===!1&&(a[mS]=!0,a[CD]=!0),(a.get||a.set)&&(r[s]={[CD]:!0,[mS]:!0,[w4]:a[w4],[xb]:e[s]})}return ta.create(Ag(e),r)}else{const r=Ag(e);if(r!==null&&n)return{...e};const i=ta.create(r);return ta.assign(i,e)}}function LO(e,t=!1){return H6(e)||Fu(e)||!Sl(e)||(U2(e)>1&&ta.defineProperties(e,{set:n3,add:n3,clear:n3,delete:n3}),ta.freeze(e),t&&L6(e,(n,r)=>{LO(r,!0)},!1)),e}function f4e(){al(2)}var n3={[xb]:f4e};function H6(e){return e===null||!NO(e)?!0:ta.isFrozen(e)}var k4="MapSet",AD="Patches",dz="ArrayMethods",lX={};function Jh(e){const t=lX[e];return t||al(0,e),t}var fz=e=>!!lX[e],Sb,cX=()=>Sb,h4e=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:fz(k4)?Jh(k4):void 0,arrayMethodsPlugin_:fz(dz)?Jh(dz):void 0});function hz(e,t){t&&(e.patchPlugin_=Jh(AD),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function DD(e){_D(e),e.drafts_.forEach(p4e),e.drafts_=null}function _D(e){e===Sb&&(Sb=e.parent_)}var pz=e=>Sb=h4e(Sb,e);function p4e(e){const t=e[as];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function mz(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[as].modified_&&(DD(t),al(4)),Sl(e)&&(e=gz(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[as].base_,e,t)}else e=gz(t,n);return m4e(t,e,!0),DD(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sX?e:void 0}function gz(e,t){if(H6(t))return t;const n=t[as];if(!n)return E4(t,e.handledSet_,e);if(!U6(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);fX(n,e)}return n.copy_}function m4e(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&LO(t,n)}function uX(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var U6=(e,t)=>e.scope_===t,g4e=[];function dX(e,t,n,r){const i=wu(e),o=e.type_;if(r!==void 0&&kD(i,r,o)===t){C4(i,r,n,o);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;L6(i,(l,c)=>{if(Fu(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const s=e.draftLocations_.get(t)??g4e;for(const a of s)C4(i,a,n,o)}function y4e(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!U6(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const s=$O(o);dX(e,o.draft_??o,s,n),fX(o,i)})}function fX(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}uX(e)}}function b4e(e,t,n){const{scope_:r}=e;if(Fu(n)){const i=n[as];U6(i,r)&&i.callbacks_.push(function(){gS(e);const s=$O(i);dX(e,n,s,t)})}else Sl(n)&&e.callbacks_.push(function(){const o=wu(e);e.type_===3?o.has(n)&&E4(n,r.handledSet_,r):kD(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&E4(kD(e.copy_,t,e.type_),r.handledSet_,r)})}function E4(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Fu(e)||t.has(e)||!Sl(e)||H6(e)||(t.add(e),L6(e,(r,i)=>{if(Fu(i)){const o=i[as];if(U6(o,n)){const s=$O(o);C4(e,r,s,e.type_),uX(o)}}else Sl(i)&&E4(i,t,n)})),e}function v4e(e,t){const n=F6(e),r={type_:n?1:0,scope_:t?t.scope_:cX(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=A4;n&&(i=[r],o=wb);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}var A4={get(e,t){if(t===as)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=wu(e);if(!uz(i,t,e.type_))return x4e(e,i,t);const o=i[t];if(e.finalized_||!Sl(o)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&d4e(t))return o;if(o===b9(e.base_,t)){gS(e);const s=e.type_===1?+t:t,a=OD(e.scope_,o,e,s);return e.copy_[s]=a}return o},has(e,t){return t in wu(e)},ownKeys(e){return Reflect.ownKeys(wu(e))},set(e,t,n){const r=hX(wu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=b9(wu(e),t),o=i?.[as];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(u4e(n,i)&&(n!==void 0||uz(e.base_,t,e.type_)))return!0;gS(e),TD(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),b4e(e,t,n)),!0},deleteProperty(e,t){return gS(e),b9(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),TD(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=wu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mS]:!0,[CD]:e.type_!==1||t!=="length",[w4]:r[w4],[xb]:n[t]}},defineProperty(){al(11)},getPrototypeOf(e){return Ag(e.base_)},setPrototypeOf(){al(12)}},wb={};for(let e in A4){let t=A4[e];wb[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}wb.deleteProperty=function(e,t){return wb.set.call(this,e,t,void 0)};wb.set=function(e,t,n){return A4.set.call(this,e[0],t,n,e[0])};function b9(e,t){const n=e[as];return(n?wu(n):e)[t]}function x4e(e,t,n){const r=hX(t,n);return r?xb in r?r[xb]:r.get?.call(e.draft_):void 0}function hX(e,t){if(!(t in e))return;let n=Ag(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ag(n)}}function TD(e){e.modified_||(e.modified_=!0,e.parent_&&TD(e.parent_))}function gS(e){e.copy_||(e.assigned_=new Map,e.copy_=ED(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var S4e=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(Om(t)&&!Om(n)){const o=n;n=t;const s=this;return function(l=o,...c){return s.produce(l,u=>n.call(this,u,...c))}}Om(n)||al(6),r!==void 0&&!Om(r)&&al(7);let i;if(Sl(t)){const o=pz(this),s=OD(o,t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?DD(o):_D(o)}return hz(o,r),mz(i,o)}else if(!t||!NO(t)){if(i=n(t),i===void 0&&(i=t),i===sX&&(i=void 0),this.autoFreeze_&&LO(i,!0),r){const o=[],s=[];Jh(AD).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),r(o,s)}return i}else al(1,t)},this.produceWithPatches=(t,n)=>{if(Om(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},y9(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),y9(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),y9(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Sl(e)||al(8),Fu(e)&&(e=w4e(e));const t=pz(this),n=OD(t,e,void 0);return n[as].isManual_=!0,_D(t),n}finishDraft(e,t){const n=e&&e[as];(!n||!n.isManual_)&&al(9);const{scope_:r}=n;return hz(r,t),mz(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Jh(AD).applyPatches_;return Fu(e)?r(e,t):this.produce(e,i=>r(i,t))}};function OD(e,t,n,r){const[i,o]=z6(t)?Jh(k4).proxyMap_(t,n):B6(t)?Jh(k4).proxySet_(t,n):v4e(t,n);return(n?.scope_??cX()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?y4e(n,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),i}function w4e(e){return Fu(e)||al(10,e),pX(e)}function pX(e){if(!Sl(e)||H6(e))return e;const t=e[as];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ED(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ED(e,!0);return L6(n,(i,o)=>{C4(n,i,pX(o))},r),t&&(t.finalized_=!1),n}var C4e=new S4e,mX=C4e.produce,D4=Symbol("NOT_FOUND");function k4e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function E4e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function A4e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var yz=e=>Array.isArray(e)?e:[e];function D4e(e){const t=Array.isArray(e[0])?e[0]:e;return A4e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _4e(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function T4e(e){let t;return{get(n){return t&&e(t.key,n)?t.value:D4},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function O4e(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return D4}function i(a,l){r(a)===D4&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function o(){return n}function s(){n=[]}return{get:r,put:i,getEntries:o,clear:s}}var M4e=(e,t)=>e===t;function j4e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function R4e(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=M4e,maxSize:i=1,resultEqualityCheck:o}=n,s=j4e(r);let a=0;const l=i<=1?T4e(s):O4e(i,s);function c(){let u=l.get(arguments);if(u===D4){if(u=e.apply(null,arguments),a++,o){const p=l.getEntries().find(g=>o(g.value,u));p&&(u=p.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var I4e=class{constructor(e){this.value=e}deref(){return this.value}},P4e=typeof WeakRef<"u"?WeakRef:I4e,N4e=0,bz=1;function r3(){return{s:N4e,v:void 0,o:null,p:null}}function gX(e,t={}){let n=r3();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,p=l;d<p;d++){const g=arguments[d];if(typeof g=="function"||typeof g=="object"&&g!==null){let y=a.o;y===null&&(a.o=y=new WeakMap);const b=y.get(g);b===void 0?(a=r3(),y.set(g,a)):a=b}else{let y=a.p;y===null&&(a.p=y=new Map);const b=y.get(g);b===void 0?(a=r3(),y.set(g,a)):a=b}}const c=a;let u;if(a.s===bz)u=a.v;else if(u=e.apply(null,arguments),o++,r){const d=i?.deref?.()??i;d!=null&&r(d,u)&&(u=d,o!==0&&o--),i=typeof u=="object"&&u!==null||typeof u=="function"?new P4e(u):u}return c.s=bz,c.v=u,u}return s.clearCache=()=>{n=r3(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function yX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),k4e(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:p=[],argsMemoize:g=gX,argsMemoizeOptions:y=[]}=u,b=yz(p),v=yz(y),S=D4e(i),C=d(function(){return o++,c.apply(null,arguments)},...b),w=g(function(){s++;const k=_4e(S,arguments);return a=C.apply(null,k),a},...v);return Object.assign(w,{resultFunc:c,memoizedResultFunc:C,dependencies:S,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:g})};return Object.assign(r,{withTypes:()=>r}),r}var bX=yX(gX),$4e=Object.assign((e,t=bX)=>{E4e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>$4e});function vX(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var L4e=vX(),F4e=vX,z4e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?x4:x4.apply(null,arguments)},B4e=e=>e&&typeof e.match=="function";function Oy(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(_4(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>l4e(r)&&r.type===e,n}var xX=class cy extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cy.prototype)}static get[Symbol.species](){return cy}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cy(...t[0].concat(this)):new cy(...t.concat(this))}};function vz(e){return Sl(e)?mX(e,()=>{}):e}function H4e(e){return typeof e=="boolean"}var U4e=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new xX;return n&&(H4e(n)?s.push(L4e):s.push(F4e(n.extraArgument))),s},V4e="RTK_autoBatch",xz=e=>t=>{setTimeout(t,e)},W4e=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:xz(10):e.type==="callback"?e.queueNotification:xz(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>i&&u(),p=r.subscribe(d);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[V4e],o=!i,o&&(s||(s=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},q4e=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new xX(e);return r&&i.push(W4e(typeof r=="object"?r:void 0)),i};function K4e(e){const t=U4e(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(PO(n))a=s4e(n);else throw new Error(_4(1));let l;typeof r=="function"?l=r(t):l=t();let c=x4;i&&(c=z4e({trace:!1,...typeof i=="object"&&i}));const u=a4e(...l),d=q4e(u);let p=typeof s=="function"?s(d):d();const g=c(...p);return oX(a,o,g)}function G4e(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(_4(28));if(a in t)throw new Error(_4(29));return t[a]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function Y4e(e){return typeof e=="function"}function FO(e,t){let[n,r,i]=G4e(t),o;if(Y4e(e))o=()=>vz(e());else{const a=vz(e);o=()=>a}function s(a=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(Fu(u)){const g=d(u,l);return g===void 0?u:g}else{if(Sl(u))return mX(u,p=>d(p,l));{const p=d(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var J4e=(e,t)=>B4e(e)?e.match(t):e(t);function Z4e(...e){return t=>e.some(n=>J4e(n,t))}var X4e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Q4e=(e=21)=>{let t="",n=e;for(;n--;)t+=X4e[Math.random()*64|0];return t},ewe=["name","message","stack","code"],v9=class{constructor(e,t){this.payload=e,this.meta=t}_type},Sz=class{constructor(e,t){this.payload=e,this.meta=t}_type},twe=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of ewe)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},wz="External signal was aborted",nwe=(()=>{function e(t,n,r){const i=Oy(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:{...d||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=Oy(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=Oy(t+"/rejected",(l,c,u,d,p)=>({payload:d,error:(r&&r.serializeError||twe)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,d,p)=>{const g=r?.idGenerator?r.idGenerator(l):Q4e(),y=new AbortController;let b,v;function S(w){v=w,y.abort()}c&&(c.aborted?S(wz):c.addEventListener("abort",()=>S(wz),{once:!0}));const C=(async function(){let w;try{let k=r?.condition?.(l,{getState:d,extra:p});if(iwe(k)&&(k=await k),k===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((_,O)=>{b=()=>{O({name:"AbortError",message:v||"Aborted"})},y.signal.addEventListener("abort",b,{once:!0})});u(o(g,l,r?.getPendingMeta?.({requestId:g,arg:l},{getState:d,extra:p}))),w=await Promise.race([T,Promise.resolve(n(l,{dispatch:u,getState:d,extra:p,requestId:g,signal:y.signal,abort:S,rejectWithValue:(_,O)=>new v9(_,O),fulfillWithValue:(_,O)=>new Sz(_,O)})).then(_=>{if(_ instanceof v9)throw _;return _ instanceof Sz?i(_.payload,g,l,_.meta):i(_,g,l)})])}catch(k){w=k instanceof v9?s(null,g,l,k.payload,k.meta):s(k,g,l)}finally{b&&y.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition||u(w),w})();return Object.assign(C,{abort:S,requestId:g,arg:l,unwrap(){return C.then(rwe)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:Z4e(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function rwe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iwe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}function _4(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}class owe extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r,this.name="ApiError"}}async function ar(e){const t=await e.text();try{return JSON.parse(t)}catch{throw new owe(`Invalid JSON response (HTTP ${e.status}): ${t.slice(0,120)}`,e.status,t)}}async function Rn(e,t){if(!e.ok){const n=await e.text().catch(()=>"");let r=t;try{const i=JSON.parse(n);i?.error&&(r=i.error)}catch{n?r=`${t} (HTTP ${e.status}: ${n.slice(0,120)})`:r=`${t} (HTTP ${e.status})`}throw new Error(r)}}async function swe(){const e=await fetch(`api/matter/bridges?_s=${Date.now()}`);return await Rn(e,"Failed to fetch bridges"),ar(e)}async function zO(e){const t=await fetch("api/matter/bridges",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Rn(t,"Failed to create bridge"),ar(t)}async function SX(e){const t=await fetch(`api/matter/bridges/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return await Rn(t,"Failed to update bridge"),ar(t)}async function awe(e){await fetch(`api/matter/bridges/${e}`,{method:"DELETE"})}async function lwe(e){const t=await fetch(`api/matter/bridges/${e}/actions/factory-reset`,{method:"POST"});return await Rn(t,"Factory reset failed"),ar(t)}async function wX(e){const t=await fetch(`api/matter/bridges/${e}/actions/force-sync`,{method:"POST"});return await Rn(t,"Force sync failed"),ar(t)}async function cwe(e){const t=await fetch(`api/matter/bridges/${e}/actions/open-commissioning-window`,{method:"POST"});return await Rn(t,"Failed to open commissioning window"),ar(t)}async function uwe(e){if(!(await fetch("api/matter/bridges/priorities",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:e})})).ok)throw new Error("Failed to update priorities")}async function CX(){const e=await fetch("api/matter/bridges/actions/start-all",{method:"POST"});return await Rn(e,"Failed to start all bridges"),ar(e)}async function kX(){const e=await fetch("api/matter/bridges/actions/stop-all",{method:"POST"});return await Rn(e,"Failed to stop all bridges"),ar(e)}async function EX(){const e=await fetch("api/matter/bridges/actions/restart-all",{method:"POST"});return await Rn(e,"Failed to restart all bridges"),ar(e)}const a0=nwe.withTypes(),V6=bX.withTypes(),Lo=a0("bridges/load",swe),AX=a0("bridges/create",zO),DX=a0("bridges/delete",awe),_X=a0("bridges/update",SX),TX=a0("bridges/reset",lwe),OX=Oy("bridges/setFromWebSocket"),MX=Oy("bridges/updateFromWebSocket"),Rs=bhe.withTypes(),l0=She.withTypes(),jX=A.createContext({isConnected:!1,error:null});function RX(){return A.useContext(jX)}function dwe({children:e}){const t=Rs(),[n,r]=A.useState(!1),[i,o]=A.useState(null),s=A.useRef(null),a=A.useRef(void 0),l=A.useCallback(u=>{switch(u.type){case"bridges_update":t(OX(u.data));break;case"bridge_update":t(MX(u.data));break;case"ping":s.current?.send(JSON.stringify({type:"pong"}));break}},[t]),c=A.useCallback(()=>{if(s.current?.readyState===WebSocket.OPEN)return;const u=window.location.protocol==="https:"?"wss:":"ws:",d=document.querySelector("base")?.href||window.location.origin,p=new URL(d),g=`${u}//${p.host}${p.pathname}api/ws`.replace(/\/+/g,"/").replace(":/","://");try{const y=new WebSocket(g);s.current=y,y.onopen=()=>{r(!0),o(null)},y.onmessage=b=>{try{const v=JSON.parse(b.data);l(v)}catch{console.warn("Invalid WebSocket message")}},y.onclose=()=>{r(!1),s.current=null,a.current=setTimeout(c,3e3)},y.onerror=()=>{o(new Error("WebSocket connection error")),y.close()}}catch(y){o(y instanceof Error?y:new Error("Failed to connect"))}},[l]);return A.useEffect(()=>(c(),()=>{a.current&&clearTimeout(a.current),s.current?.close()}),[c]),h.jsx(jX.Provider,{value:{isConnected:n,error:i},children:e})}const fwe=()=>{const e=Rs();return A.useEffect(()=>{e(Lo())},[e]),h.jsx(HJ,{})};var cc;(function(e){e.Starting="starting",e.Running="running",e.Stopped="stopped",e.Failed="failed"})(cc||(cc={}));var Tr;(function(e){e.Pattern="pattern",e.Regex="regex",e.Domain="domain",e.Platform="platform",e.Label="label",e.EntityLabel="entity_label",e.DeviceLabel="device_label",e.Area="area",e.EntityCategory="entity_category",e.DeviceName="device_name",e.ProductName="product_name",e.DeviceClass="device_class"})(Tr||(Tr={}));const IX=[{id:"all_lights",name:"All Lights",description:"Expose all light entities. Ideal for controlling lights via Apple Home, Google Home, or Alexa.",icon:"light",filter:{include:[{type:Tr.Domain,value:"light"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["lights","popular"]},{id:"all_switches",name:"All Switches & Plugs",description:"Expose all switch entities including smart plugs. Includes power and energy monitoring.",icon:"switch",filter:{include:[{type:Tr.Domain,value:"switch"}],exclude:[]},featureFlags:{},tags:["switches","plugs"]},{id:"sensors_only",name:"All Sensors",description:"Expose temperature, humidity, pressure, and other sensors. Auto-combines related sensors from the same device.",icon:"sensor",filter:{include:[{type:Tr.Domain,value:"sensor"},{type:Tr.Domain,value:"binary_sensor"}],exclude:[]},featureFlags:{autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["sensors","temperature","humidity"]},{id:"climate_control",name:"Climate & Covers",description:"Expose thermostats, fans, covers, and humidifiers for climate control.",icon:"climate",filter:{include:[{type:Tr.Domain,value:"climate"},{type:Tr.Domain,value:"fan"},{type:Tr.Domain,value:"cover"},{type:Tr.Domain,value:"humidifier"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["climate","thermostat","covers"]},{id:"security",name:"Security & Locks",description:"Expose locks, alarm panels, and security-related binary sensors (motion, door, window).",icon:"lock",filter:{include:[{type:Tr.Domain,value:"lock"},{type:Tr.Domain,value:"alarm_control_panel"},{type:Tr.DeviceClass,value:"motion"},{type:Tr.DeviceClass,value:"door"},{type:Tr.DeviceClass,value:"window"}],exclude:[],includeMode:"any"},featureFlags:{autoBatteryMapping:!0},tags:["security","locks","alarm"]},{id:"robot_vacuum",name:"Robot Vacuum (Server Mode)",description:"Single vacuum bridge with Server Mode enabled. Required for Apple Home Siri commands and proper Alexa discovery. Add only ONE vacuum to this bridge.",icon:"vacuum",filter:{include:[{type:Tr.Domain,value:"vacuum"}],exclude:[]},featureFlags:{serverMode:!0},tags:["vacuum","server-mode","apple-home"]},{id:"media_players",name:"Media Players & Speakers",description:"Expose media players, speakers, and TVs for volume and playback control.",icon:"media_player",filter:{include:[{type:Tr.Domain,value:"media_player"}],exclude:[]},featureFlags:{},tags:["media","speakers","tv"]},{id:"google_home_optimized",name:"Google Home Optimized",description:"All devices with Auto Force Sync enabled. Prevents Google Home from showing devices as offline after a few hours.",icon:"default",filter:{include:[{type:Tr.Pattern,value:"*"}],exclude:[]},featureFlags:{autoForceSync:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["google-home","all-devices"]},{id:"alexa_covers",name:"Alexa-Optimized Covers",description:"Covers with Alexa-friendly percentage display. Displayed percentage matches Home Assistant values.",icon:"cover",filter:{include:[{type:Tr.Domain,value:"cover"}],exclude:[]},featureFlags:{coverUseHomeAssistantPercentage:!0,autoBatteryMapping:!0},tags:["alexa","covers"]},{id:"automations_scripts",name:"Automations & Scripts",description:"Expose Home Assistant automations, scripts, and scenes as Matter switches.",icon:"remote",filter:{include:[{type:Tr.Domain,value:"automation"},{type:Tr.Domain,value:"script"},{type:Tr.Domain,value:"scene"}],exclude:[]},featureFlags:{},tags:["automations","scripts","scenes"]}];var Cz;(function(e){e[e.locked=1]="locked",e[e.unlocked=2]="unlocked"})(Cz||(Cz={}));var kz;(function(e){e[e.Off=0]="Off",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.On=4]="On",e[e.Auto=5]="Auto",e[e.Smart=6]="Smart"})(kz||(kz={}));var Ez;(function(e){e[e.Forward=0]="Forward",e[e.Reverse=1]="Reverse"})(Ez||(Ez={}));var Az;(function(e){e[e.OffLowMedHigh=0]="OffLowMedHigh",e[e.OffLowHigh=1]="OffLowHigh",e[e.OffLowMedHighAuto=2]="OffLowMedHighAuto",e[e.OffLowHighAuto=3]="OffLowHighAuto",e[e.OffHighAuto=4]="OffHighAuto",e[e.OffHigh=5]="OffHigh"})(Az||(Az={}));var Dz;(function(e){e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked"})(Dz||(Dz={}));var _z;(function(e){e[e.Off=0]="Off",e[e.Auto=1]="Auto",e[e.Cool=3]="Cool",e[e.Heat=4]="Heat",e[e.EmergencyHeat=5]="EmergencyHeat",e[e.Precooling=6]="Precooling",e[e.FanOnly=7]="FanOnly",e[e.Dry=8]="Dry",e[e.Sleep=9]="Sleep"})(_z||(_z={}));var MD;(function(e){e.homeAssistantEntity="homeAssistantEntity",e.identify="identify",e.groups="groups",e.scenesManagement="scenesManagement",e.bridgedDeviceBasicInformation="bridgedDeviceBasicInformation",e.airQuality="airQuality",e.booleanState="booleanState",e.carbonDioxideConcentrationMeasurement="carbonDioxideConcentrationMeasurement",e.carbonMonoxideConcentrationMeasurement="carbonMonoxideConcentrationMeasurement",e.colorControl="colorControl",e.doorLock="doorLock",e.electricalEnergyMeasurement="electricalEnergyMeasurement",e.electricalPowerMeasurement="electricalPowerMeasurement",e.flowMeasurement="flowMeasurement",e.levelControl="levelControl",e.fanControl="fanControl",e.illuminanceMeasurement="illuminanceMeasurement",e.nitrogenDioxideConcentrationMeasurement="nitrogenDioxideConcentrationMeasurement",e.occupancySensing="occupancySensing",e.onOff="onOff",e.ozoneConcentrationMeasurement="ozoneConcentrationMeasurement",e.pm1ConcentrationMeasurement="pm1ConcentrationMeasurement",e.pm10ConcentrationMeasurement="pm10ConcentrationMeasurement",e.pm25ConcentrationMeasurement="pm25ConcentrationMeasurement",e.powerSource="powerSource",e.pressureMeasurement="pressureMeasurement",e.relativeHumidityMeasurement="relativeHumidityMeasurement",e.smokeCoAlarm="smokeCoAlarm",e.temperatureMeasurement="temperatureMeasurement",e.thermostat="thermostat",e.thermostatUserInterfaceConfiguration="thermostatUserInterfaceConfiguration",e.totalVolatileOrganicCompoundsConcentrationMeasurement="totalVolatileOrganicCompoundsConcentrationMeasurement",e.valveConfigurationAndControl="valveConfigurationAndControl",e.windowCovering="windowCovering",e.mediaInput="mediaInput",e.rvcCleanMode="rvcCleanMode",e.rvcRunMode="rvcRunMode",e.rvcOperationalState="rvcOperationalState",e.serviceArea="serviceArea",e.switch="switch",e.modeSelect="modeSelect"})(MD||(MD={}));const PX=[{id:"apple_home",name:"Apple Home",description:"Optimized for Apple Home and Siri. Enables composed devices for clean sensor grouping. Covers use standard Matter percentage (inverted from HA).",icon:"default",featureFlags:{autoComposedDevices:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0}},{id:"google_home",name:"Google Home",description:"Optimized for Google Home. Enables Auto Force Sync to prevent devices from going offline. Composed devices enabled for proper sensor grouping.",icon:"default",featureFlags:{autoForceSync:!0,autoComposedDevices:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0}},{id:"alexa",name:"Amazon Alexa",description:"Optimized for Alexa. Enables Auto Force Sync and Alexa-friendly cover percentages. Battery mapping included for sensor devices.",icon:"default",featureFlags:{autoForceSync:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0,coverUseHomeAssistantPercentage:!0}},{id:"multi_controller",name:"Multi-Controller",description:"Balanced settings for use with multiple controllers at once (e.g. Apple Home + Alexa). Force Sync enabled. Standard cover behavior.",icon:"default",featureFlags:{autoForceSync:!0,autoComposedDevices:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0}}];var Tz;(function(e){e.Battery="battery",e.BatteryCharging="battery_charging",e.CarbonMonoxide="carbon_monoxide",e.Cold="cold",e.Connectivity="connectivity",e.Door="door",e.GarageDoor="garage_door",e.Gas="gas",e.Heat="heat",e.Light="light",e.Lock="lock",e.Moisture="moisture",e.Motion="motion",e.Moving="moving",e.Occupancy="occupancy",e.Opening="opening",e.Plug="plug",e.Power="power",e.Presence="presence",e.Problem="problem",e.Rain="rain",e.Running="running",e.Safety="safety",e.Smoke="smoke",e.Sound="sound",e.Tamper="tamper",e.Update="update",e.Vibration="vibration",e.Window="window"})(Tz||(Tz={}));var Oz;(function(e){e.off="off",e.heat="heat",e.cool="cool",e.heat_cool="heat_cool",e.auto="auto",e.dry="dry",e.fan_only="fan_only"})(Oz||(Oz={}));var Mz;(function(e){e.off="off",e.preheating="preheating",e.heating="heating",e.cooling="cooling",e.drying="drying",e.fan="fan",e.idle="idle",e.defrosting="defrosting"})(Mz||(Mz={}));var jz;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE"})(jz||(jz={}));var Rz;(function(e){e.closed="closed",e.open="open",e.closing="closing",e.opening="opening"})(Rz||(Rz={}));var Iz;(function(e){e.button="button",e.doorbell="doorbell",e.motion="motion"})(Iz||(Iz={}));var Pz;(function(e){e.FORWARD="forward",e.REVERSE="reverse"})(Pz||(Pz={}));var Nz;(function(e){e[e.SET_SPEED=1]="SET_SPEED",e[e.OSCILLATE=2]="OSCILLATE",e[e.DIRECTION=4]="DIRECTION",e[e.PRESET_MODE=8]="PRESET_MODE",e[e.TURN_ON=16]="TURN_ON",e[e.TURN_OFF=32]="TURN_OFF"})(Nz||(Nz={}));var $z;(function(e){e.UNKNOWN="unknown",e.ONOFF="onoff",e.BRIGHTNESS="brightness",e.COLOR_TEMP="color_temp",e.HS="hs",e.XY="xy",e.RGB="rgb",e.RGBW="rgbw",e.RGBWW="rgbww",e.WHITE="white"})($z||($z={}));var Lz;(function(e){e.Tv="tv",e.Speaker="speaker",e.Receiver="receiver"})(Lz||(Lz={}));var Fz;(function(e){e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e[e.MEDIA_ANNOUNCE=1048576]="MEDIA_ANNOUNCE",e[e.MEDIA_ENQUEUE=2097152]="MEDIA_ENQUEUE"})(Fz||(Fz={}));var zz;(function(e){e.None="None",e.apparent_power="apparent_power",e.aqi="aqi",e.atmospheric_pressure="atmospheric_pressure",e.battery="battery",e.carbon_dioxide="carbon_dioxide",e.carbon_monoxide="carbon_monoxide",e.current="current",e.data_rate="data_rate",e.data_size="data_size",e.date="date",e.distance="distance",e.duration="duration",e.energy="energy",e.energy_storage="energy_storage",e.enum="enum",e.frequency="frequency",e.gas="gas",e.humidity="humidity",e.illuminance="illuminance",e.irradiance="irradiance",e.moisture="moisture",e.monetary="monetary",e.nitrogen_dioxide="nitrogen_dioxide",e.nitrogen_monoxide="nitrogen_monoxide",e.nitrous_oxide="nitrous_oxide",e.ozone="ozone",e.ph="ph",e.pm1="pm1",e.pm25="pm25",e.pm10="pm10",e.power_factor="power_factor",e.power="power",e.precipitation="precipitation",e.precipitation_intensity="precipitation_intensity",e.pressure="pressure",e.radon="radon",e.reactive_power="reactive_power",e.signal_strength="signal_strength",e.sound_pressure="sound_pressure",e.speed="speed",e.sulphur_dioxide="sulphur_dioxide",e.temperature="temperature",e.timestamp="timestamp",e.volatile_organic_compounds="volatile_organic_compounds",e.volatile_organic_compounds_parts="volatile_organic_compounds_parts",e.voltage="voltage",e.volume="volume",e.volume_flow_rate="volume_flow_rate",e.volume_storage="volume_storage",e.water="water",e.weight="weight",e.wind_speed="wind_speed"})(zz||(zz={}));var Bz;(function(e){e.cleaning="cleaning",e.docked="docked",e.returning="returning",e.error="error",e.idle="idle",e.paused="paused",e.segment_cleaning="segment_cleaning",e.zone_cleaning="zone_cleaning",e.spot_cleaning="spot_cleaning",e.mop_cleaning="mop_cleaning"})(Bz||(Bz={}));var Hz;(function(e){e[e.TURN_ON=1]="TURN_ON",e[e.TURN_OFF=2]="TURN_OFF",e[e.PAUSE=4]="PAUSE",e[e.STOP=8]="STOP",e[e.RETURN_HOME=16]="RETURN_HOME",e[e.FAN_SPEED=32]="FAN_SPEED",e[e.BATTERY=64]="BATTERY",e[e.STATUS=128]="STATUS",e[e.SEND_COMMAND=256]="SEND_COMMAND",e[e.LOCATE=512]="LOCATE",e[e.CLEAN_SPOT=1024]="CLEAN_SPOT",e[e.MAP=2048]="MAP",e[e.STATE=4096]="STATE",e[e.START=8192]="START",e[e.CLEAN_AREA=16384]="CLEAN_AREA"})(Hz||(Hz={}));var Uz;(function(e){e.off="off",e.low="low",e.medium="medium",e.high="high",e.turbo="turbo",e.auto="auto",e.max="max"})(Uz||(Uz={}));var Vz;(function(e){e.off="off",e.eco="eco",e.electric="electric",e.gas="gas",e.heat_pump="heat_pump",e.high_demand="high_demand",e.performance="performance"})(Vz||(Vz={}));var Wz;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.OPERATION_MODE=2]="OPERATION_MODE",e[e.AWAY_MODE=4]="AWAY_MODE",e[e.ON_OFF=8]="ON_OFF"})(Wz||(Wz={}));const x9={air_purifier:"Air Purifier",air_quality_sensor:"Air Quality Sensor",basic_video_player:"Basic Video Player (TV)",battery_storage:"Battery Sensor",carbon_monoxide_sensor:"Carbon Monoxide (CO) Sensor",color_temperature_light:"Color Temperature Light",contact_sensor:"Contact Sensor",dishwasher:"Dishwasher",dimmable_light:"Dimmable Light",dimmable_plugin_unit:"Dimmable Plug-in Unit",door_lock:"Door Lock",electrical_sensor:"Electrical Sensor (Power/Energy/Voltage/Current)",extended_color_light:"Extended Color Light",fan:"Fan",flow_sensor:"Flow Sensor",formaldehyde_sensor:"Formaldehyde (HCHO) Sensor",generic_switch:"Generic Switch (Button)",humidifier_dehumidifier:"Humidifier/Dehumidifier",humidity_sensor:"Humidity Sensor",light_sensor:"Light Sensor",mode_select:"Mode Select",motion_sensor:"Motion Sensor (PIR)",nitrogen_dioxide_sensor:"Nitrogen Dioxide (NO₂) Sensor",occupancy_sensor:"Occupancy Sensor",on_off_light:"On/Off Light",on_off_plugin_unit:"On/Off Plug-in Unit",on_off_switch:"On/Off Switch",ozone_sensor:"Ozone (O₃) Sensor",pm1_sensor:"PM1 Sensor",pressure_sensor:"Pressure Sensor",pump:"Pump",rain_sensor:"Rain Sensor",radon_sensor:"Radon Sensor",robot_vacuum_cleaner:"Robot Vacuum Cleaner",smoke_co_alarm:"Smoke/CO Alarm",speaker:"Speaker",temperature_sensor:"Temperature Sensor",thermostat:"Thermostat",tvoc_sensor:"TVOC / VOC Index Sensor",water_heater:"Water Heater",water_freeze_detector:"Water Freeze Detector",water_leak_detector:"Water Leak Detector",water_valve:"Water Valve",window_covering:"Window Covering"},R1={Auto:0,Quick:1,Quiet:2,LowNoise:3,LowEnergy:4,Vacation:5,Min:6,Max:7,Night:8,Day:9,DeepClean:16384,Vacuum:16385,Mop:16386,VacuumThenMop:16387},hwe={alarm_control_panel:["mode_select","on_off_plugin_unit"],automation:["on_off_switch"],binary_sensor:["contact_sensor","motion_sensor","occupancy_sensor","rain_sensor","smoke_co_alarm","water_freeze_detector","water_leak_detector"],button:["generic_switch"],climate:["thermostat"],cover:["window_covering"],event:["generic_switch"],fan:["air_purifier","fan"],humidifier:["humidifier_dehumidifier"],input_boolean:["on_off_plugin_unit","on_off_switch"],input_select:["mode_select"],input_button:["generic_switch"],light:["color_temperature_light","dimmable_light","extended_color_light","on_off_light"],lock:["door_lock"],media_player:["basic_video_player","on_off_switch","speaker"],scene:["on_off_switch"],script:["on_off_switch"],sensor:["air_quality_sensor","battery_storage","carbon_monoxide_sensor","electrical_sensor","formaldehyde_sensor","humidity_sensor","light_sensor","nitrogen_dioxide_sensor","ozone_sensor","pm1_sensor","pressure_sensor","radon_sensor","temperature_sensor","tvoc_sensor"],select:["mode_select"],siren:["on_off_plugin_unit"],switch:["dishwasher","on_off_plugin_unit","on_off_switch","pump","water_valve"],vacuum:["robot_vacuum_cleaner"],valve:["water_valve","on_off_plugin_unit"],water_heater:["water_heater","thermostat"]};var qz;(function(e){e.alarm_control_panel="alarm_control_panel",e.automation="automation",e.button="button",e.binary_sensor="binary_sensor",e.climate="climate",e.cover="cover",e.event="event",e.fan="fan",e.humidifier="humidifier",e.input_boolean="input_boolean",e.input_button="input_button",e.input_select="input_select",e.light="light",e.lock="lock",e.media_player="media_player",e.remote="remote",e.scene="scene",e.select="select",e.script="script",e.sensor="sensor",e.siren="siren",e.switch="switch",e.vacuum="vacuum",e.valve="valve",e.water_heater="water_heater"})(qz||(qz={}));const Kz={type:"object",default:{type:"",value:""},properties:{type:{title:"Type",type:"string",oneOf:[{const:"pattern",title:"pattern",description:"Wildcard pattern matching entity IDs. Use * as wildcard. Example: 'light.living_room_*' matches all lights in the living room."},{const:"regex",title:"regex",description:"Full regular expression matching entity IDs. Use ^ and $ for anchors. Example: '^(light|switch)\\.kitchen_.*' matches all kitchen lights and switches."},{const:"domain",title:"domain",description:"Match entities by their domain (the part before the dot). Example: 'light', 'switch', 'sensor'."},{const:"platform",title:"platform",description:"Match entities by their integration/platform. Example: 'hue', 'zwave', 'mqtt'."},{const:"label",title:"label (deprecated)",description:"Deprecated: use entity_label or device_label instead. Behaves like entity_label."},{const:"entity_label",title:"entity_label",description:"Matches only entities that have this label assigned directly. Other entities of the same device are NOT included."},{const:"device_label",title:"device_label",description:"Matches ALL entities of a device if the device has this label. Use this to include a complete device with all its entities."},{const:"area",title:"area",description:"Match entities by their area slug. Example: 'living_room', 'bedroom'."},{const:"entity_category",title:"entity_category",description:"Match entities by their category. Example: 'config', 'diagnostic' to exclude configuration entities."},{const:"device_name",title:"device_name",description:"Match entities by their device name. Supports wildcards. Example: '*Philips*' matches all Philips devices."},{const:"product_name",title:"product_name",description:"Match entities by their product/model name. Supports wildcards. Example: 'Hue*Bulb'."},{const:"device_class",title:"device_class",description:"Match entities by their device class attribute. Example: 'temperature', 'motion', 'door', 'window'."}]},value:{title:"Value",description:"For labels, use the display name or the label_id (slug). You can look up both on the Labels page in the sidebar.",type:"string",minLength:1}},required:["type","value"],additionalProperties:!1},pwe={title:"Include or exclude entities",type:"object",properties:{include:{title:"Include",type:"array",items:Kz},exclude:{title:"Exclude",type:"array",items:Kz},includeMode:{title:"Include Mode",type:"string",description:"How to combine include rules: 'any' matches if ANY rule matches (OR), 'all' matches only if ALL rules match (AND). Default: 'any'",enum:["any","all"],default:"any"}},required:["include","exclude"],additionalProperties:!1},mwe={title:"Feature Flags",type:"object",properties:{coverDoNotInvertPercentage:{title:"Do not invert Percentages for Covers",description:"Do not invert the percentage of covers to match Home Assistant (not Matter compliant)",type:"boolean",default:!1},coverUseHomeAssistantPercentage:{title:"Use Home Assistant Percentage for Covers (Alexa-friendly)",description:"Display cover percentages matching Home Assistant values in Matter controllers like Alexa. This makes the displayed percentage match what you see in Home Assistant, but the semantic meaning differs: in HA, higher percentage = more open; in Alexa, higher percentage is typically interpreted as more closed. Open/Close commands will still work correctly.",type:"boolean",default:!1},coverSwapOpenClose:{title:"Swap Open/Close for Covers",description:"Swap open/close commands and invert position reporting for covers. Enable this if Alexa voice commands are reversed (saying 'close' opens the blinds and vice versa).",type:"boolean",default:!1},includeHiddenEntities:{title:"Include Hidden Entities",description:"Include entities that are marked as hidden in Home Assistant",type:"boolean",default:!1},serverMode:{title:"Server Mode (for Robot Vacuums)",description:"Expose the device as a standalone Matter device instead of a bridged device. This is required for Apple Home to properly support Siri voice commands for Robot Vacuums. IMPORTANT: Only ONE device should be in this bridge when server mode is enabled.",type:"boolean",default:!1},autoBatteryMapping:{title:"Auto Battery Mapping",description:"Automatically assign battery sensors from the same Home Assistant device to the main entity. When enabled, battery sensors will be merged into their parent devices instead of appearing as separate devices.",type:"boolean",default:!1},autoHumidityMapping:{title:"Auto Humidity Mapping",description:"Automatically combine humidity sensors with temperature sensors from the same Home Assistant device. When enabled, humidity sensors will be merged into temperature sensors to create combined TemperatureHumiditySensor devices.",type:"boolean",default:!0},autoPressureMapping:{title:"Auto Pressure Mapping",description:"Automatically combine pressure sensors with temperature sensors from the same Home Assistant device. When enabled, pressure sensors will be merged into temperature sensors to create combined sensor devices.",type:"boolean",default:!0},autoComposedDevices:{title:"Auto Composed Devices",description:"Master toggle: automatically combine related entities from the same Home Assistant device into single Matter endpoints. Enables battery, humidity, pressure, power, and energy auto-mapping at once. This provides a cleaner device experience in Matter controllers (e.g., a Shelly Plug appears as one device with power monitoring).",type:"boolean",default:!1},autoForceSync:{title:"Auto Force Sync",description:"Periodically compare and push all device states to connected controllers every 90 seconds. Enable this if devices get out of sync after extended periods. Health checks for dead sessions always run regardless of this setting.",type:"boolean",default:!1},productNameFromNodeLabel:{title:"Product Name from Node Label",description:"Report the entity's node label (custom name / friendly name / entity id) as the Matter productName. Useful for controllers like Aqara that display productName as the device name instead of nodeLabel. A per-entity customProductName still takes precedence.",type:"boolean",default:!1},preferEntityRegistryName:{title:"Prefer Entity Registry Name (HA 2026.4 workaround)",description:"Use the entity registry name (or original_name) as nodeLabel instead of the composed friendly_name. Since Home Assistant 2026.4, friendly_name is prefixed with the device name, which breaks voice commands that relied on the short entity name. Resolution order: customName → registry name → registry original_name → friendly_name → entity_id. Matter has no alias concept — this only changes which single name is reported.",type:"boolean",default:!1},vacuumOnOff:{title:"Vacuum: Include OnOff Cluster (Alexa)",description:"Add an OnOff cluster to robot vacuum endpoints. Alexa REQUIRES this (PowerController) to show robotic vacuums in the app. Without it, Alexa commissions the device but never displays it. In Server Mode this is enabled automatically — only check this for bridge mode. WARNING: OnOff is NOT part of the Matter RVC device type specification. Enabling this may break Apple Home (shows 'Updating') and Google Home.",type:"boolean"}}},My={type:"object",title:"Bridge Config",properties:{name:{title:"Name",type:"string",minLength:1,maxLength:32},port:{title:"Port",type:"number",minimum:1},icon:{title:"Icon",type:"string",description:"Icon to display for this bridge in the UI",enum:["light","switch","climate","cover","fan","lock","sensor","media_player","vacuum","remote","humidifier","speaker","garage","door","window","motion","battery","power","camera","default"]},countryCode:{title:"Country Code",type:"string",description:"An ISO 3166-1 alpha-2 code to represent the country in which the Node is located. Only needed if the commissioning fails due to missing country code.",minLength:2,maxLength:3},priority:{title:"Startup Priority",type:"number",description:"Startup order priority. Lower values start first. Default is 100.",default:100,minimum:1,maximum:999},serialNumberSuffix:{title:"Serial Number Suffix",type:"string",description:"Append a suffix to every entity serial number on this bridge. Useful for forcing controllers like Aqara to treat devices as new and bypass cached device data. Leave empty for default behavior.",maxLength:16},filter:pwe,featureFlags:mwe},required:["name","port","filter"],additionalProperties:!1};({...My,properties:{...My.properties},required:[...My?.required??[]]});const NX=Ee(h.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),Za=Ee(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),c0=Ee(h.jsx("path",{d:"M9.19 6.35c-2.04 2.29-3.44 5.58-3.57 5.89L2 10.69l4.05-4.05c.47-.47 1.15-.68 1.81-.55zM11.17 17s3.74-1.55 5.89-3.7c5.4-5.4 4.5-9.62 4.21-10.57-.95-.3-5.17-1.19-10.57 4.21C8.55 9.09 7 12.83 7 12.83zm6.48-2.19c-2.29 2.04-5.58 3.44-5.89 3.57L13.31 22l4.05-4.05c.47-.47.68-1.15.55-1.81zM9 18c0 .83-.34 1.58-.88 2.12C6.94 21.3 2 22 2 22s.7-4.94 1.88-6.12C4.42 15.34 5.17 15 6 15c1.66 0 3 1.34 3 3m4-9c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2"})),gwe=st("MuiBox",["root"]),ywe=M6(),se=Bxe({themeId:ja,defaultTheme:ywe,defaultClassName:gwe.root,generateClassName:_Z.generate});function bwe(e){return tt("MuiButton",e)}const ah=st("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),vwe=A.createContext({}),xwe=A.createContext(void 0),Swe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:s,loadingPosition:a,classes:l}=e,c={root:["root",s&&"loading",o,`${o}${ve(t)}`,`size${ve(i)}`,`${o}Size${ve(i)}`,`color${ve(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${ve(a)}`],startIcon:["icon","startIcon",`iconSize${ve(i)}`],endIcon:["icon","endIcon",`iconSize${ve(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=nt(c,bwe,l);return{...l,...u}},$X=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],wwe=ge(ss,{shouldForwardProp:e=>Li(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ve(n.color)}`],t[`size${ve(n.size)}`],t[`${n.variant}Size${ve(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${ah.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${ah.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ah.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${ah.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Gn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ah.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ah.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${ah.loading}`]:{color:"transparent"}}}]}})),Cwe=ge("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ve(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...$X]})),kwe=ge("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ve(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...$X]})),Ewe=ge("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Gz=ge("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Ue=A.forwardRef(function(t,n){const r=A.useContext(vwe),i=A.useContext(xwe),o=Eg(r,t),s=ct({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:g=!1,endIcon:y,focusVisibleClassName:b,fullWidth:v=!1,id:S,loading:C=null,loadingIndicator:w,loadingPosition:E="center",size:k="medium",startIcon:T,type:_,variant:O="text",...R}=s,P=Ju(S),L=w??h.jsx(Xn,{"aria-labelledby":P,color:"inherit",size:16}),M={...s,color:l,component:c,disabled:d,disableElevation:p,disableFocusRipple:g,fullWidth:v,loading:C,loadingIndicator:L,loadingPosition:E,size:k,type:_,variant:O},N=Swe(M),$=(T||C&&E==="start")&&h.jsx(Cwe,{className:N.startIcon,ownerState:M,children:T||h.jsx(Gz,{className:N.loadingIconPlaceholder,ownerState:M})}),B=(y||C&&E==="end")&&h.jsx(kwe,{className:N.endIcon,ownerState:M,children:y||h.jsx(Gz,{className:N.loadingIconPlaceholder,ownerState:M})}),F=i||"",V=typeof C=="boolean"?h.jsx("span",{className:N.loadingWrapper,style:{display:"contents"},children:C&&h.jsx(Ewe,{className:N.loadingIndicator,ownerState:M,children:L})}):null;return h.jsxs(wwe,{ownerState:M,className:_e(r.className,N.root,u,F),component:c,disabled:d||C,focusRipple:!g,focusVisibleClassName:_e(N.focusVisible,b),ref:n,type:_,id:C?P:S,...R,classes:N,children:[$,E!=="end"&&V,a,E==="end"&&V,B]})});function Awe(e){return tt("MuiCard",e)}st("MuiCard",["root"]);const Dwe=e=>{const{classes:t}=e;return nt({root:["root"]},Awe,t)},_we=ge(zr,{name:"MuiCard",slot:"Root"})({overflow:"hidden"}),Mn=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCard"}),{className:i,raised:o=!1,...s}=r,a={...r,raised:o},l=Dwe(a);return h.jsx(_we,{className:_e(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a,...s})});function Twe(e){return tt("MuiCardActionArea",e)}const S9=st("MuiCardActionArea",["root","focusVisible","focusHighlight"]),Owe=e=>{const{classes:t}=e;return nt({root:["root"],focusHighlight:["focusHighlight"]},Twe,t)},Mwe=ge(ss,{name:"MuiCardActionArea",slot:"Root"})(Ye(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${S9.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${S9.focusVisible} .${S9.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),jwe=ge("span",{name:"MuiCardActionArea",slot:"FocusHighlight"})(Ye(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),zu=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCardActionArea"}),{children:i,className:o,focusVisibleClassName:s,slots:a={},slotProps:l={},...c}=r,u=r,d=Owe(u),p={slots:a,slotProps:l},[g,y]=ft("root",{elementType:Mwe,externalForwardedProps:{...p,...c},shouldForwardComponentProp:!0,ownerState:u,ref:n,className:_e(d.root,o),additionalProps:{focusVisibleClassName:_e(s,d.focusVisible)}}),[b,v]=ft("focusHighlight",{elementType:jwe,externalForwardedProps:p,ownerState:u,className:d.focusHighlight});return h.jsxs(g,{...y,children:[i,h.jsx(b,{...v})]})});function Rwe(e){return tt("MuiCardContent",e)}st("MuiCardContent",["root"]);const Iwe=e=>{const{classes:t}=e;return nt({root:["root"]},Rwe,t)},Pwe=ge("div",{name:"MuiCardContent",slot:"Root"})({padding:16,"&:last-child":{paddingBottom:24}}),Qn=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCardContent"}),{className:i,component:o="div",...s}=r,a={...r,component:o},l=Iwe(a);return h.jsx(Pwe,{as:o,className:_e(l.root,i),ownerState:a,ref:n,...s})}),W6=A.createContext(void 0);function Dl(){return A.useContext(W6)}function Nwe(e){return tt("PrivateSwitchBase",e)}st("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const $we=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${ve(i)}`],input:["input"]};return nt(o,Nwe,t)},Lwe=ge(ss,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),Fwe=ge("input",{name:"MuiSwitchBase",shouldForwardProp:Li})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),BO=A.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,defaultChecked:s,disabled:a,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:g,name:y,onBlur:b,onChange:v,onFocus:S,readOnly:C,required:w=!1,tabIndex:E,type:k,value:T,slots:_={},slotProps:O={},...R}=t,[P,L]=ml({controlled:i,default:!!s,name:"SwitchBase",state:"checked"}),M=Dl(),N=K=>{S&&S(K),M&&M.onFocus&&M.onFocus(K)},$=K=>{b&&b(K),M&&M.onBlur&&M.onBlur(K)},B=K=>{if(K.nativeEvent.defaultPrevented||C)return;const Q=K.target.checked;L(Q),v&&v(K,Q)};let F=a;M&&typeof F>"u"&&(F=M.disabled);const V=k==="checkbox"||k==="radio",W={...t,checked:P,disabled:F,disableFocusRipple:l,edge:c},q=$we(W),Z={slots:_,slotProps:{input:p,...O}},[z,U]=ft("root",{ref:n,elementType:Lwe,className:q.root,shouldForwardComponentProp:!0,externalForwardedProps:{...Z,component:"span",...R},getSlotProps:K=>({...K,onFocus:Q=>{K.onFocus?.(Q),N(Q)},onBlur:Q=>{K.onBlur?.(Q),$(Q)}}),ownerState:W,additionalProps:{centerRipple:!0,focusRipple:!l,role:void 0,tabIndex:null}}),[Y,H]=ft("input",{ref:g,elementType:Fwe,className:q.input,externalForwardedProps:Z,getSlotProps:K=>({...K,onChange:Q=>{K.onChange?.(Q),B(Q)}}),ownerState:W,additionalProps:{autoFocus:r,checked:i,defaultChecked:s,disabled:F,id:V?d:void 0,name:y,readOnly:C,required:w,tabIndex:E,type:k,...k==="checkbox"&&T===void 0?{}:{value:T}}});return h.jsxs(z,{...U,children:[h.jsx(Y,{...H}),P?o:u]})}),zwe=Ee(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),Bwe=Ee(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Hwe=Ee(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function Uwe(e){return tt("MuiCheckbox",e)}const w9=st("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Vwe=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${ve(r)}`,`size${ve(i)}`]},s=nt(o,Uwe,t);return{...t,...s}},Wwe=ge(BO,{shouldForwardProp:e=>Li(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${ve(n.size)}`],n.color!=="default"&&t[`color${ve(n.color)}`]]}})(Ye(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{[`&.${w9.checked}, &.${w9.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${w9.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),qwe=h.jsx(Bwe,{}),Kwe=h.jsx(zwe,{}),Gwe=h.jsx(Hwe,{}),ws=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiCheckbox"}),{checkedIcon:i=qwe,color:o="primary",icon:s=Kwe,indeterminate:a=!1,indeterminateIcon:l=Gwe,inputProps:c,size:u="medium",disableRipple:d=!1,className:p,slots:g={},slotProps:y={},...b}=r,v=a?l:s,S=a?l:i,C={...r,disableRipple:d,color:o,indeterminate:a,size:u},w=Vwe(C),E=y.input??c,[k,T]=ft("root",{ref:n,elementType:Wwe,className:_e(w.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:g,slotProps:y,...b},ownerState:C,additionalProps:{type:"checkbox",icon:A.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:A.cloneElement(S,{fontSize:S.props.fontSize??u}),disableRipple:d,slots:g,slotProps:{input:MO(typeof E=="function"?E(C):E,{"data-indeterminate":a})}}});return h.jsx(k,{...T,classes:w})}),Ywe=Ee(h.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function Jwe(e){return tt("MuiChip",e)}const Ln=st("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Zwe=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${ve(r)}`,`color${ve(i)}`,a&&"clickable",a&&`clickableColor${ve(i)}`,s&&"deletable",s&&`deletableColor${ve(i)}`,`${l}${ve(i)}`],label:["label",`label${ve(r)}`],avatar:["avatar",`avatar${ve(r)}`,`avatarColor${ve(i)}`],icon:["icon",`icon${ve(r)}`,`iconColor${ve(o)}`],deleteIcon:["deleteIcon",`deleteIcon${ve(r)}`,`deleteIconColor${ve(i)}`,`deleteIcon${ve(l)}Color${ve(i)}`]};return nt(c,Jwe,t)},Xwe=ge("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Ln.avatar}`]:t.avatar},{[`& .${Ln.avatar}`]:t[`avatar${ve(a)}`]},{[`& .${Ln.avatar}`]:t[`avatarColor${ve(r)}`]},{[`& .${Ln.icon}`]:t.icon},{[`& .${Ln.icon}`]:t[`icon${ve(a)}`]},{[`& .${Ln.icon}`]:t[`iconColor${ve(i)}`]},{[`& .${Ln.deleteIcon}`]:t.deleteIcon},{[`& .${Ln.deleteIcon}`]:t[`deleteIcon${ve(a)}`]},{[`& .${Ln.deleteIcon}`]:t[`deleteIconColor${ve(r)}`]},{[`& .${Ln.deleteIcon}`]:t[`deleteIcon${ve(l)}Color${ve(r)}`]},t.root,t[`size${ve(a)}`],t[`color${ve(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${ve(r)}`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${ve(r)}`],t[l],t[`${l}${ve(r)}`]]}})(Ye(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ln.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ln.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Ln.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ln.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ln.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ln.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Ln.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Ln.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Ln.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Gn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Ln.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Ln.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Ln.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Ln.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(Gn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Ln.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Ln.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Gn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ln.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ln.avatar}`]:{marginLeft:4},[`& .${Ln.avatarSmall}`]:{marginLeft:2},[`& .${Ln.icon}`]:{marginLeft:4},[`& .${Ln.iconSmall}`]:{marginLeft:2},[`& .${Ln.deleteIcon}`]:{marginRight:5},[`& .${Ln.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Gn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${Ln.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Ln.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Ln.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Qwe=ge("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ve(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Yz(e){return e.key==="Backspace"||e.key==="Delete"}const ot=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:p,onClick:g,onDelete:y,onKeyDown:b,onKeyUp:v,size:S="medium",variant:C="filled",tabIndex:w,skipFocusWhenDisabled:E=!1,slots:k={},slotProps:T={},..._}=r,O=A.useRef(null),R=Br(O,n),P=Q=>{Q.stopPropagation(),y(Q)},L=Q=>{Q.currentTarget===Q.target&&Yz(Q)&&Q.preventDefault(),b&&b(Q)},M=Q=>{Q.currentTarget===Q.target&&y&&Yz(Q)&&y(Q),v&&v(Q)},N=s!==!1&&g?!0:s,$=N||y?ss:l||"div",B={...r,component:$,disabled:u,size:S,color:a,iconColor:A.isValidElement(d)&&d.props.color||a,onDelete:!!y,clickable:N,variant:C},F=Zwe(B),V=$===ss?{component:l||"div",focusVisibleClassName:F.focusVisible,...y&&{disableRipple:!0}}:{};let W=null;y&&(W=c&&A.isValidElement(c)?A.cloneElement(c,{className:_e(c.props.className,F.deleteIcon),onClick:P}):h.jsx(Ywe,{className:F.deleteIcon,onClick:P}));let q=null;i&&A.isValidElement(i)&&(q=A.cloneElement(i,{className:_e(F.avatar,i.props.className)}));let Z=null;d&&A.isValidElement(d)&&(Z=A.cloneElement(d,{className:_e(F.icon,d.props.className)}));const z={slots:k,slotProps:T},[U,Y]=ft("root",{elementType:Xwe,externalForwardedProps:{...z,..._},ownerState:B,shouldForwardComponentProp:!0,ref:R,className:_e(F.root,o),additionalProps:{disabled:N&&u?!0:void 0,tabIndex:E&&u?-1:w,...V},getSlotProps:Q=>({...Q,onClick:ie=>{Q.onClick?.(ie),g?.(ie)},onKeyDown:ie=>{Q.onKeyDown?.(ie),L(ie)},onKeyUp:ie=>{Q.onKeyUp?.(ie),M(ie)}})}),[H,K]=ft("label",{elementType:Qwe,externalForwardedProps:z,ownerState:B,className:F.label});return h.jsxs(U,{as:$,...Y,children:[q||Z,h.jsx(H,{...K,children:p}),W]})});function Jz(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function T4(e,t=!1){return e&&(Jz(e.value)&&e.value!==""||t&&Jz(e.defaultValue)&&e.defaultValue!=="")}function e6e(e){return e.startAdornment}function t6e(e){return tt("MuiFormControl",e)}st("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const n6e=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${ve(n)}`,r&&"fullWidth"]};return nt(i,t6e,t)},r6e=ge("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ve(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),rs=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:g="none",required:y=!1,size:b="medium",variant:v="outlined",...S}=r,C={...r,color:s,component:a,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:g,required:y,size:b,variant:v},w=n6e(C),[E,k]=A.useState(()=>{let B=!1;return i&&A.Children.forEach(i,F=>{if(!Ty(F,["Input","Select"]))return;const V=Ty(F,["Select"])?F.props.input:F;V&&e6e(V.props)&&(B=!0)}),B}),[T,_]=A.useState(()=>{let B=!1;return i&&A.Children.forEach(i,F=>{Ty(F,["Input","Select"])&&(T4(F.props,!0)||T4(F.props.inputProps,!0))&&(B=!0)}),B}),[O,R]=A.useState(!1);l&&O&&R(!1);const P=u!==void 0&&!l?u:O;let L;A.useRef(!1);const M=A.useCallback(()=>{_(!0)},[]),N=A.useCallback(()=>{_(!1)},[]),$=A.useMemo(()=>({adornedStart:E,setAdornedStart:k,color:s,disabled:l,error:c,filled:T,focused:P,fullWidth:d,hiddenLabel:p,size:b,onBlur:()=>{R(!1)},onFocus:()=>{R(!0)},onEmpty:N,onFilled:M,registerEffect:L,required:y,variant:v}),[E,s,l,c,T,P,d,p,L,N,M,y,b,v]);return h.jsx(W6.Provider,{value:$,children:h.jsx(r6e,{as:a,ownerState:C,className:_e(w.root,o),ref:n,...S,children:i})})});function i6e(e){return tt("MuiTypography",e)}const Zz=st("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),o6e={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},s6e=j5e(),a6e=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${ve(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return nt(a,i6e,s)},l6e=ge("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ve(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ye(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(Gn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ve(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Xz={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},re=A.forwardRef(function(t,n){const{color:r,...i}=ct({props:t,name:"MuiTypography"}),o=!o6e[r],s=s6e({...i,...o&&{color:r}}),{align:a="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:p=!1,variant:g="body1",variantMapping:y=Xz,...b}=s,v={...s,align:a,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:p,variant:g,variantMapping:y},S=c||(p?"p":y[g]||Xz[g])||"span",C=a6e(v);return h.jsx(l6e,{as:S,ref:n,className:_e(C.root,l),...b,ownerState:v,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...b.style}})});function c6e(e){return tt("MuiFormControlLabel",e)}const uy=st("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);function If({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const u6e=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${ve(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return nt(s,c6e,t)},d6e=ge("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${uy.label}`]:t.label},t.root,t[`labelPlacement${ve(n.labelPlacement)}`]]}})(Ye(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${uy.disabled}`]:{cursor:"default"},[`& .${uy.label}`]:{[`&.${uy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),f6e=ge("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Ye(({theme:e})=>({[`&.${uy.error}`]:{color:(e.vars||e).palette.error.main}}))),Ro=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiFormControlLabel"}),{checked:i,className:o,componentsProps:s={},control:a,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:p="end",name:g,onChange:y,required:b,slots:v={},slotProps:S={},value:C,...w}=r,E=Dl(),k=l??a.props.disabled??E?.disabled,T=b??a.props.required,_={disabled:k,required:T};["checked","name","onChange","value","inputRef"].forEach(B=>{typeof a.props[B]>"u"&&typeof r[B]<"u"&&(_[B]=r[B])});const O=If({props:r,muiFormControl:E,states:["error"]}),R={...r,disabled:k,labelPlacement:p,required:T,error:O.error},P=u6e(R),L={slots:v,slotProps:{...s,...S}},[M,N]=ft("typography",{elementType:re,externalForwardedProps:L,ownerState:R});let $=d;return $!=null&&$.type!==re&&!c&&($=h.jsx(M,{component:"span",...N,className:_e(P.label,N?.className),children:$})),h.jsxs(d6e,{className:_e(P.root,o),ownerState:R,ref:n,...w,children:[A.cloneElement(a,_),T?h.jsxs("div",{children:[$,h.jsxs(f6e,{ownerState:R,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):$]})}),ht=K3e({createStyledComponent:ge("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid",useThemeProps:e=>ct({props:e,name:"MuiGrid"}),useTheme:Ki});function h6e(e){return tt("MuiLinearProgress",e)}st("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const jD=4,RD=jf`
|
|
148
148
|
0% {
|
|
149
149
|
left: -35%;
|
|
150
150
|
right: 100%;
|
|
@@ -496,4 +496,4 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
496
496
|
To pick up a draggable item, press the space bar.
|
|
497
497
|
While dragging, use the arrow keys to move the item.
|
|
498
498
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
499
|
-
`},_gt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Tgt(e){let{announcements:t=_gt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Dgt}=e;const{announce:o,announcement:s}=kgt(),a=Nv("DndLiveRegion"),[l,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),Egt(A.useMemo(()=>({onDragStart(d){let{active:p}=d;o(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:g}=d;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(d){let{active:p,over:g}=d;o(t.onDragOver({active:p,over:g}))},onDragEnd(d){let{active:p,over:g}=d;o(t.onDragEnd({active:p,over:g}))},onDragCancel(d){let{active:p,over:g}=d;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!l)return null;const u=on.createElement(on.Fragment,null,on.createElement(wgt,{id:r,value:i.draggable}),on.createElement(Cgt,{id:a,announcement:s}));return n?qd.createPortal(u,n):u}var Wi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Wi||(Wi={}));function l6(){}function JY(e,t){return A.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ogt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const El=Object.freeze({x:0,y:0});function pue(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function mue(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Mgt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function ZY(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function gue(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function XY(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const jgt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=XY(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=pue(XY(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(mue)},Rgt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=ZY(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=ZY(l),u=i.reduce((p,g,y)=>p+pue(c[y],g),0),d=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:d}})}}return o.sort(mue)};function Igt(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const Pgt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Igt(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Mgt)};function Ngt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function yue(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:El}function $gt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Lgt=$gt(1);function Fgt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function zgt(e,t,n){const r=Fgt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const Bgt={ignoreTransform:!1};function N0(e,t){t===void 0&&(t=Bgt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=Ps(e).getComputedStyle(e);c&&(n=zgt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function QY(e){return N0(e,{ignoreTransform:!0})}function Hgt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ugt(e,t){return t===void 0&&(t=Ps(e).getComputedStyle(e)),t.position==="fixed"}function Vgt(e,t){t===void 0&&(t=Ps(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function R8(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(xI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Iv(i)||due(i)||n.includes(i))return n;const o=Ps(e).getComputedStyle(i);return i!==e&&Vgt(i,o)&&n.push(i),Ugt(i,o)?n:r(i.parentNode)}return e?r(e):n}function bue(e){const[t]=R8(e,1);return t??null}function qA(e){return!j8||!e?null:I0(e)?e:vI(e)?xI(e)||e===P0(e).scrollingElement?window:Iv(e)?e:null:null}function vue(e){return I0(e)?e.scrollX:e.scrollLeft}function xue(e){return I0(e)?e.scrollY:e.scrollTop}function XT(e){return{x:vue(e),y:xue(e)}}var io;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(io||(io={}));function Sue(e){return!j8||!e?!1:e===document.scrollingElement}function wue(e){const t={x:0,y:0},n=Sue(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const Wgt={x:.2,y:.2};function qgt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=Wgt);const{isTop:c,isBottom:u,isLeft:d,isRight:p}=wue(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=io.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=io.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!p&&a>=t.right-b.width?(g.x=io.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!d&&s<=t.left+b.width&&(g.x=io.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function Kgt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Cue(e){return e.reduce((t,n)=>Cg(t,XT(n)),El)}function Ggt(e){return e.reduce((t,n)=>t+vue(n),0)}function Ygt(e){return e.reduce((t,n)=>t+xue(n),0)}function Jgt(e,t){if(t===void 0&&(t=N0),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);bue(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Zgt=[["x",["left","right"],Ggt],["y",["top","bottom"],Ygt]];class CI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=R8(n),i=Cue(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of Zgt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class sb{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Xgt(e){const{EventTarget:t}=Ps(e);return e instanceof t?e:P0(e)}function KA(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ka;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ka||(ka={}));function eJ(e){e.preventDefault()}function Qgt(e){e.stopPropagation()}var Jn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Jn||(Jn={}));const kue={start:[Jn.Space,Jn.Enter],cancel:[Jn.Esc],end:[Jn.Space,Jn.Enter,Jn.Tab]},e0t=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Jn.Right:return{...n,x:n.x+25};case Jn.Left:return{...n,x:n.x-25};case Jn.Down:return{...n,y:n.y+25};case Jn.Up:return{...n,y:n.y-25}}};class kI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new sb(P0(n)),this.windowListeners=new sb(Ps(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ka.Resize,this.handleCancel),this.windowListeners.add(ka.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ka.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Jgt(r),n(El)}handleKeyDown(t){if(wI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=kue,coordinateGetter:s=e0t,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:El;this.referenceCoordinates||(this.referenceCoordinates=u);const d=s(t,{active:n,context:r.current,currentCoordinates:u});if(d){const p=_2(d,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:E,maxScroll:k,minScroll:T}=wue(b),_=Kgt(b),O={x:Math.min(v===Jn.Right?_.right-_.width/2:_.right,Math.max(v===Jn.Right?_.left:_.left+_.width/2,d.x)),y:Math.min(v===Jn.Down?_.bottom-_.height/2:_.bottom,Math.max(v===Jn.Down?_.top:_.top+_.height/2,d.y))},R=v===Jn.Right&&!C||v===Jn.Left&&!w,P=v===Jn.Down&&!E||v===Jn.Up&&!S;if(R&&O.x!==d.x){const L=b.scrollLeft+p.x,M=v===Jn.Right&&L<=k.x||v===Jn.Left&&L>=T.x;if(M&&!p.y){b.scrollTo({left:L,behavior:a});return}M?g.x=b.scrollLeft-L:g.x=v===Jn.Right?b.scrollLeft-k.x:b.scrollLeft-T.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(P&&O.y!==d.y){const L=b.scrollTop+p.y,M=v===Jn.Down&&L<=k.y||v===Jn.Up&&L>=T.y;if(M&&!p.x){b.scrollTo({top:L,behavior:a});return}M?g.y=b.scrollTop-L:g.y=v===Jn.Down?b.scrollTop-k.y:b.scrollTop-T.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,Cg(_2(d,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}kI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=kue,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function tJ(e){return!!(e&&"distance"in e)}function nJ(e){return!!(e&&"delay"in e)}class EI{constructor(t,n,r){var i;r===void 0&&(r=Xgt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=P0(s),this.documentListeners=new sb(this.document),this.listeners=new sb(r),this.windowListeners=new sb(Ps(s)),this.initialCoordinates=(i=ZT(o))!=null?i:El,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ka.Resize,this.handleCancel),this.windowListeners.add(ka.DragStart,eJ),this.windowListeners.add(ka.VisibilityChange,this.handleCancel),this.windowListeners.add(ka.ContextMenu,eJ),this.documentListeners.add(ka.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(nJ(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(tJ(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ka.Click,Qgt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ka.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=ZT(t))!=null?n:El,c=_2(i,l);if(!r&&a){if(tJ(a)){if(a.tolerance!=null&&KA(c,a.tolerance))return this.handleCancel();if(KA(c,a.distance))return this.handleStart()}if(nJ(a)&&KA(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Jn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const t0t={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class AI extends EI{constructor(t){const{event:n}=t,r=P0(n.target);super(t,t0t,r)}}AI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const n0t={move:{name:"mousemove"},end:{name:"mouseup"}};var QT;(function(e){e[e.RightClick=2]="RightClick"})(QT||(QT={}));class r0t extends EI{constructor(t){super(t,n0t,P0(t.event.target))}}r0t.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===QT.RightClick?!1:(r?.({event:n}),!0)}}];const GA={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class i0t extends EI{constructor(t){super(t,GA)}static setup(){return window.addEventListener(GA.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(GA.move.name,t)};function t(){}}}i0t.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var ab;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ab||(ab={}));var c6;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(c6||(c6={}));function o0t(e){let{acceleration:t,activator:n=ab.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=c6.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:p}=e;const g=a0t({delta:d,disabled:!o}),[y,b]=ygt(),v=A.useRef({x:0,y:0}),S=A.useRef({x:0,y:0}),C=A.useMemo(()=>{switch(n){case ab.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ab.DraggableRect:return i}},[n,i,l]),w=A.useRef(null),E=A.useCallback(()=>{const T=w.current;if(!T)return;const _=v.current.x*S.current.x,O=v.current.y*S.current.y;T.scrollBy(_,O)},[]),k=A.useMemo(()=>a===c6.TreeOrder?[...c].reverse():c,[a,c]);A.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const T of k){if(r?.(T)===!1)continue;const _=c.indexOf(T),O=u[_];if(!O)continue;const{direction:R,speed:P}=qgt(T,O,C,t,p);for(const L of["x","y"])g[L][R[L]]||(P[L]=0,R[L]=0);if(P.x>0||P.y>0){b(),w.current=T,y(E,s),v.current=P,S.current=R;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,E,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,k,u,JSON.stringify(p)])}const s0t={x:{[io.Backward]:!1,[io.Forward]:!1},y:{[io.Backward]:!1,[io.Forward]:!1}};function a0t(e){let{delta:t,disabled:n}=e;const r=JT(t);return Pv(i=>{if(n||!r||!i)return s0t;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[io.Backward]:i.x[io.Backward]||o.x===-1,[io.Forward]:i.x[io.Forward]||o.x===1},y:{[io.Backward]:i.y[io.Backward]||o.y===-1,[io.Forward]:i.y[io.Forward]||o.y===1}}},[n,t,r])}function l0t(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Pv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function c0t(e,t){return A.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var O2;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(O2||(O2={}));var eO;(function(e){e.Optimized="optimized"})(eO||(eO={}));const rJ=new Map;function u0t(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=A.useState(null),{frequency:a,measure:l,strategy:c}=i,u=A.useRef(e),d=v(),p=D2(d),g=A.useCallback(function(S){S===void 0&&(S=[]),!p.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[p]),y=A.useRef(null),b=Pv(S=>{if(d&&!n)return rJ;if(!S||S===rJ||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const E=w.node.current,k=E?new CI(l(E),E):null;w.rect.current=k,k&&C.set(w.id,k)}return C}return S},[e,o,n,d,l]);return A.useEffect(()=>{u.current=e},[e]),A.useEffect(()=>{d||g()},[n,d]),A.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),A.useEffect(()=>{d||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,d,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case O2.Always:return!1;case O2.BeforeDragging:return n;default:return!n}}}function Eue(e,t){return Pv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function d0t(e,t){return Eue(e,t)}function f0t(e){let{callback:t,disabled:n}=e;const r=SI(t),i=A.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return A.useEffect(()=>()=>i?.disconnect(),[i]),i}function I8(e){let{callback:t,disabled:n}=e;const r=SI(t),i=A.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return A.useEffect(()=>()=>i?.disconnect(),[i]),i}function h0t(e){return new CI(N0(e),e)}function iJ(e,t,n){t===void 0&&(t=h0t);const[r,i]=A.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=f0t({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),a=I8({callback:o});return Nc(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function p0t(e){const t=Eue(e);return yue(e,t)}const oJ=[];function m0t(e){const t=A.useRef(e),n=Pv(r=>e?r&&r!==oJ&&e&&t.current&&e.parentNode===t.current.parentNode?r:R8(e):oJ,[e]);return A.useEffect(()=>{t.current=e},[e]),n}function g0t(e){const[t,n]=A.useState(null),r=A.useRef(e),i=A.useCallback(o=>{const s=qA(o.target);s&&n(a=>a?(a.set(s,XT(s)),new Map(a)):null)},[]);return A.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=qA(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,XT(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=qA(l);c?.removeEventListener("scroll",i)})}},[i,e]),A.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Cg(o,s),El):Cue(e):El,[e,t])}function sJ(e,t){t===void 0&&(t=[]);const n=A.useRef(null);return A.useEffect(()=>{n.current=null},t),A.useEffect(()=>{const r=e!==El;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_2(e,n.current):El}function y0t(e){A.useEffect(()=>{if(!j8)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function b0t(e,t){return A.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function Aue(e){return A.useMemo(()=>e?Hgt(e):null,[e])}const aJ=[];function v0t(e,t){t===void 0&&(t=N0);const[n]=e,r=Aue(n?Ps(n):null),[i,o]=A.useState(aJ);function s(){o(()=>e.length?e.map(l=>Sue(l)?r:new CI(t(l),l)):aJ)}const a=I8({callback:s});return Nc(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function x0t(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Iv(t)?t:e}function S0t(e){let{measure:t}=e;const[n,r]=A.useState(null),i=A.useCallback(c=>{for(const{target:u}of c)if(Iv(u)){r(d=>{const p=t(u);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),o=I8({callback:i}),s=A.useCallback(c=>{const u=x0t(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=a6(s);return A.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const w0t=[{sensor:AI,options:{}},{sensor:kI,options:{}}],C0t={current:{}},s4={draggable:{measure:QY},droppable:{measure:QY,strategy:O2.WhileDragging,frequency:eO.Optimized},dragOverlay:{measure:N0}};class lb extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const k0t={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new lb,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:l6},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:s4,measureDroppableContainers:l6,windowRect:null,measuringScheduled:!1},E0t={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:l6,draggableNodes:new Map,over:null,measureDroppableContainers:l6},P8=A.createContext(E0t),Due=A.createContext(k0t);function A0t(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new lb}}}function D0t(e,t){switch(t.type){case Wi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Wi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Wi.DragEnd:case Wi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Wi.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new lb(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Wi.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new lb(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Wi.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new lb(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function _0t(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=A.useContext(P8),o=JT(r),s=JT(n?.id);return A.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!wI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=xgt(u);if(d){d.focus();break}}})}},[r,t,i,s,o]),null}function T0t(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function O0t(e){return A.useMemo(()=>({draggable:{...s4.draggable,...e?.draggable},droppable:{...s4.droppable,...e?.droppable},dragOverlay:{...s4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function M0t(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=A.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;Nc(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=yue(u,r);if(s||(d.x=0),a||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=bue(c);p&&p.scrollBy({top:d.y,left:d.x})}},[t,s,a,r,n])}const _ue=A.createContext({...El,scaleX:1,scaleY:1});var Ld;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ld||(Ld={}));const j0t=A.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=w0t,collisionDetection:d=Pgt,measuring:p,modifiers:g,...y}=t;const b=A.useReducer(D0t,void 0,A0t),[v,S]=b,[C,w]=Agt(),[E,k]=A.useState(Ld.Uninitialized),T=E===Ld.Initialized,{draggable:{active:_,nodes:O,translate:R},droppable:{containers:P}}=v,L=_!=null?O.get(_):null,M=A.useRef({initial:null,translated:null}),N=A.useMemo(()=>{var We;return _!=null?{id:_,data:(We=L?.data)!=null?We:C0t,rect:M}:null},[_,L]),$=A.useRef(null),[B,F]=A.useState(null),[V,W]=A.useState(null),q=D2(y,Object.values(y)),Z=Nv("DndDescribedBy",s),z=A.useMemo(()=>P.getEnabled(),[P]),U=O0t(p),{droppableRects:Y,measureDroppableContainers:H,measuringScheduled:K}=u0t(z,{dragging:T,dependencies:[R.x,R.y],config:U.droppable}),Q=l0t(O,_),ie=A.useMemo(()=>V?ZT(V):null,[V]),te=Ge(),ce=d0t(Q,U.draggable.measure);M0t({activeNode:_!=null?O.get(_):null,config:te.layoutShiftCompensation,initialRect:ce,measure:U.draggable.measure});const ee=iJ(Q,U.draggable.measure,ce),J=iJ(Q?Q.parentElement:null),X=A.useRef({activatorEvent:null,active:null,activeNode:Q,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:O,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=P.getNodeFor((n=X.current.over)==null?void 0:n.id),le=S0t({measure:U.dragOverlay.measure}),fe=(r=le.nodeRef.current)!=null?r:Q,ye=T?(i=le.rect)!=null?i:ee:null,Me=!!(le.nodeRef.current&&le.rect),ue=p0t(Me?null:ee),we=Aue(fe?Ps(fe):null),Oe=m0t(T?oe??Q:null),He=v0t(Oe),ze=T0t(g,{transform:{x:R.x-ue.x,y:R.y-ue.y,scaleX:1,scaleY:1},activatorEvent:V,active:N,activeNodeRect:ee,containerNodeRect:J,draggingNodeRect:ye,over:X.current.over,overlayNodeRect:le.rect,scrollableAncestors:Oe,scrollableAncestorRects:He,windowRect:we}),At=ie?Cg(ie,R):null,gt=g0t(Oe),$e=sJ(gt),je=sJ(gt,[ee]),Ve=Cg(ze,$e),Ke=ye?Lgt(ye,ze):null,at=N&&Ke?d({active:N,collisionRect:Ke,droppableRects:Y,droppableContainers:z,pointerCoordinates:At}):null,ut=gue(at,"id"),[Qe,Bt]=A.useState(null),Ht=Me?ze:Cg(ze,je),Pt=Ngt(Ht,(o=Qe?.rect)!=null?o:null,ee),Dn=A.useRef(null),tn=A.useCallback((We,Je)=>{let{sensor:St,options:In}=Je;if($.current==null)return;const dn=O.get($.current);if(!dn)return;const _t=We.nativeEvent,yn=new St({active:$.current,activeNode:dn,event:_t,options:In,context:X,onAbort(yt){if(!O.get(yt))return;const{onDragAbort:ae}=q.current,pe={id:yt};ae?.(pe),C({type:"onDragAbort",event:pe})},onPending(yt,Kt,ae,pe){if(!O.get(yt))return;const{onDragPending:Pe}=q.current,qe={id:yt,constraint:Kt,initialCoordinates:ae,offset:pe};Pe?.(qe),C({type:"onDragPending",event:qe})},onStart(yt){const Kt=$.current;if(Kt==null)return;const ae=O.get(Kt);if(!ae)return;const{onDragStart:pe}=q.current,xe={activatorEvent:_t,active:{id:Kt,data:ae.data,rect:M}};qd.unstable_batchedUpdates(()=>{pe?.(xe),k(Ld.Initializing),S({type:Wi.DragStart,initialCoordinates:yt,active:Kt}),C({type:"onDragStart",event:xe}),F(Dn.current),W(_t)})},onMove(yt){S({type:Wi.DragMove,coordinates:yt})},onEnd:dt(Wi.DragEnd),onCancel:dt(Wi.DragCancel)});Dn.current=yn;function dt(yt){return async function(){const{active:ae,collisions:pe,over:xe,scrollAdjustedTranslate:Pe}=X.current;let qe=null;if(ae&&Pe){const{cancelDrop:wt}=q.current;qe={activatorEvent:_t,active:ae,collisions:pe,delta:Pe,over:xe},yt===Wi.DragEnd&&typeof wt=="function"&&await Promise.resolve(wt(qe))&&(yt=Wi.DragCancel)}$.current=null,qd.unstable_batchedUpdates(()=>{S({type:yt}),k(Ld.Uninitialized),Bt(null),F(null),W(null),Dn.current=null;const wt=yt===Wi.DragEnd?"onDragEnd":"onDragCancel";if(qe){const lt=q.current[wt];lt?.(qe),C({type:wt,event:qe})}})}}},[O]),pt=A.useCallback((We,Je)=>(St,In)=>{const dn=St.nativeEvent,_t=O.get(In);if($.current!==null||!_t||dn.dndKit||dn.defaultPrevented)return;const yn={active:_t};We(St,Je.options,yn)===!0&&(dn.dndKit={capturedBy:Je.sensor},$.current=In,tn(St,Je))},[O,tn]),Yt=c0t(u,pt);y0t(u),Nc(()=>{ee&&E===Ld.Initializing&&k(Ld.Initialized)},[ee,E]),A.useEffect(()=>{const{onDragMove:We}=q.current,{active:Je,activatorEvent:St,collisions:In,over:dn}=X.current;if(!Je||!St)return;const _t={active:Je,activatorEvent:St,collisions:In,delta:{x:Ve.x,y:Ve.y},over:dn};qd.unstable_batchedUpdates(()=>{We?.(_t),C({type:"onDragMove",event:_t})})},[Ve.x,Ve.y]),A.useEffect(()=>{const{active:We,activatorEvent:Je,collisions:St,droppableContainers:In,scrollAdjustedTranslate:dn}=X.current;if(!We||$.current==null||!Je||!dn)return;const{onDragOver:_t}=q.current,yn=In.get(ut),dt=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,yt={active:We,activatorEvent:Je,collisions:St,delta:{x:dn.x,y:dn.y},over:dt};qd.unstable_batchedUpdates(()=>{Bt(dt),_t?.(yt),C({type:"onDragOver",event:yt})})},[ut]),Nc(()=>{X.current={activatorEvent:V,active:N,activeNode:Q,collisionRect:Ke,collisions:at,droppableRects:Y,draggableNodes:O,draggingNode:fe,draggingNodeRect:ye,droppableContainers:P,over:Qe,scrollableAncestors:Oe,scrollAdjustedTranslate:Ve},M.current={initial:ye,translated:Ke}},[N,Q,at,Ke,O,fe,ye,Y,P,Qe,Oe,Ve]),o0t({...te,delta:R,draggingRect:Ke,pointerCoordinates:At,scrollableAncestors:Oe,scrollableAncestorRects:He});const an=A.useMemo(()=>({active:N,activeNode:Q,activeNodeRect:ee,activatorEvent:V,collisions:at,containerNodeRect:J,dragOverlay:le,draggableNodes:O,droppableContainers:P,droppableRects:Y,over:Qe,measureDroppableContainers:H,scrollableAncestors:Oe,scrollableAncestorRects:He,measuringConfiguration:U,measuringScheduled:K,windowRect:we}),[N,Q,ee,V,at,J,le,O,P,Y,Qe,H,Oe,He,U,K,we]),wn=A.useMemo(()=>({activatorEvent:V,activators:Yt,active:N,activeNodeRect:ee,ariaDescribedById:{draggable:Z},dispatch:S,draggableNodes:O,over:Qe,measureDroppableContainers:H}),[V,Yt,N,ee,S,Z,O,Qe,H]);return on.createElement(hue.Provider,{value:w},on.createElement(P8.Provider,{value:wn},on.createElement(Due.Provider,{value:an},on.createElement(_ue.Provider,{value:Pt},c)),on.createElement(_0t,{disabled:a?.restoreFocus===!1})),on.createElement(Tgt,{...a,hiddenTextDescribedById:Z}));function Ge(){const We=B?.autoScrollEnabled===!1,Je=typeof l=="object"?l.enabled===!1:l===!1,St=T&&!We&&!Je;return typeof l=="object"?{...l,enabled:St}:{enabled:St}}}),R0t=A.createContext(null),lJ="button",I0t="Draggable";function P0t(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=Nv(I0t),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:p}=A.useContext(P8),{role:g=lJ,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=A.useContext(v?_ue:R0t),[C,w]=a6(),[E,k]=a6(),T=b0t(s,t),_=D2(n);Nc(()=>(d.set(t,{id:t,key:o,node:C,activatorNode:E,data:_}),()=>{const R=d.get(t);R&&R.key===o&&d.delete(t)}),[d,t]);const O=A.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===lJ?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:O,isDragging:v,listeners:r?void 0:T,node:C,over:p,setNodeRef:w,setActivatorNodeRef:k,transform:S}}function N0t(){return A.useContext(Due)}const $0t="Droppable",L0t={timeout:25};function F0t(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=Nv($0t),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=A.useContext(P8),u=A.useRef({disabled:n}),d=A.useRef(!1),p=A.useRef(null),g=A.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...L0t,...i},S=D2(b??r),C=A.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=I8({callback:C,disabled:y||!s}),E=A.useCallback((O,R)=>{w&&(R&&(w.unobserve(R),d.current=!1),O&&w.observe(O))},[w]),[k,T]=a6(E),_=D2(t);return A.useEffect(()=>{!w||!k.current||(w.disconnect(),d.current=!1,w.observe(k.current))},[k,w]),A.useEffect(()=>(a({type:Wi.RegisterDroppable,element:{id:r,key:o,disabled:n,node:k,rect:p,data:_}}),()=>a({type:Wi.UnregisterDroppable,key:o,id:r})),[r]),A.useEffect(()=>{n!==u.current.disabled&&(a({type:Wi.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:p,isOver:l?.id===r,node:k,over:l,setNodeRef:T}}function DI(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function z0t(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function rS(e){return e!==null&&e>=0}function B0t(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function H0t(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Tue=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=DI(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},iS={scaleX:1,scaleY:1},U0t=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...iS}:null}const l=V0t(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...iS}:i<n&&i>=s?{x:0,y:a.height+l,...iS}:{x:0,y:0,...iS}};function V0t(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Oue="Sortable",Mue=on.createContext({activeIndex:-1,containerId:Oue,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Tue,disabled:{draggable:!1,droppable:!1}});function W0t(e){let{children:t,id:n,items:r,strategy:i=Tue,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=N0t(),d=Nv(Oue,n),p=a.rect!==null,g=A.useMemo(()=>r.map(T=>typeof T=="object"&&"id"in T?T.id:T),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=A.useRef(g),C=!B0t(g,S.current),w=v!==-1&&b===-1||C,E=H0t(o);Nc(()=>{C&&y&&u(g)},[C,g,y,u]),A.useEffect(()=>{S.current=g},[g]);const k=A.useMemo(()=>({activeIndex:b,containerId:d,disabled:E,disableTransforms:w,items:g,overIndex:v,useDragOverlay:p,sortedRects:z0t(g,l),strategy:i}),[b,d,E.draggable,E.droppable,w,g,v,l,p,i]);return on.createElement(Mue.Provider,{value:k},t)}const q0t=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return DI(n,r,i).indexOf(t)},K0t=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},G0t={duration:200,easing:"ease"},jue="transform",Y0t=T2.Transition.toString({property:jue,duration:0,easing:"linear"}),J0t={roleDescription:"sortable"};function Z0t(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=A.useState(null),a=A.useRef(n);return Nc(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=N0(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),A.useEffect(()=>{o&&s(null)},[o]),o}function X0t(e){let{animateLayoutChanges:t=K0t,attributes:n,disabled:r,data:i,getNewIndex:o=q0t,id:s,strategy:a,resizeObserverConfig:l,transition:c=G0t}=e;const{items:u,containerId:d,activeIndex:p,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=A.useContext(Mue),w=Q0t(r,g),E=u.indexOf(s),k=A.useMemo(()=>({sortable:{containerId:d,index:E,items:u},...i}),[d,i,E,u]),T=A.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:_,node:O,isOver:R,setNodeRef:P}=F0t({id:s,data:k,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...l}}),{active:L,activatorEvent:M,activeNodeRect:N,attributes:$,setNodeRef:B,listeners:F,isDragging:V,over:W,setActivatorNodeRef:q,transform:Z}=P0t({id:s,data:k,attributes:{...J0t,...n},disabled:w.draggable}),z=ggt(P,B),U=!!L,Y=U&&!y&&rS(p)&&rS(v),H=!S&&V,K=H&&Y?Z:null,ie=Y?K??(a??C)({rects:b,activeNodeRect:N,activeIndex:p,overIndex:v,index:E}):null,te=rS(p)&&rS(v)?o({id:s,items:u,activeIndex:p,overIndex:v}):E,ce=L?.id,ee=A.useRef({activeId:ce,items:u,newIndex:te,containerId:d}),J=u!==ee.current.items,X=t({active:L,containerId:d,isDragging:V,isSorting:U,id:s,index:E,items:u,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:c,wasDragging:ee.current.activeId!=null}),oe=Z0t({disabled:!X,index:E,node:O,rect:_});return A.useEffect(()=>{U&&ee.current.newIndex!==te&&(ee.current.newIndex=te),d!==ee.current.containerId&&(ee.current.containerId=d),u!==ee.current.items&&(ee.current.items=u)},[U,te,d,u]),A.useEffect(()=>{if(ce===ee.current.activeId)return;if(ce!=null&&ee.current.activeId==null){ee.current.activeId=ce;return}const fe=setTimeout(()=>{ee.current.activeId=ce},50);return()=>clearTimeout(fe)},[ce]),{active:L,activeIndex:p,attributes:$,data:k,rect:_,index:E,newIndex:te,items:u,isOver:R,isSorting:U,isDragging:V,listeners:F,node:O,overIndex:v,over:W,setNodeRef:z,setActivatorNodeRef:q,setDroppableNodeRef:P,setDraggableNodeRef:B,transform:oe??ie,transition:le()};function le(){if(oe||J&&ee.current.newIndex===E)return Y0t;if(!(H&&!wI(M)||!c)&&(U||X))return T2.Transition.toString({...c,property:jue})}}function Q0t(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function u6(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const e1t=[Jn.Down,Jn.Right,Jn.Up,Jn.Left],t1t=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(e1t.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=i.get(d.id);if(p)switch(e.code){case Jn.Down:r.top<p.top&&l.push(d);break;case Jn.Up:r.top>p.top&&l.push(d);break;case Jn.Left:r.left>p.left&&l.push(d);break;case Jn.Right:r.left<p.left&&l.push(d);break}});const c=Rgt({collisionRect:r,droppableRects:i,droppableContainers:l});let u=gue(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const d=o.get(n.id),p=o.get(u),g=p?i.get(p.id):null,y=p?.node.current;if(y&&g&&d&&p){const v=R8(y).some((T,_)=>a[_]!==T),S=Rue(d,p),C=n1t(d,p),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},E={x:g.left,y:g.top};return w.x&&w.y?E:_2(E,w)}}}};function Rue(e,t){return!u6(e)||!u6(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function n1t(e,t){return!u6(e)||!u6(t)||!Rue(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const r1t=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=X0t({id:e.id}),[l,c]=A.useState(!1);A.useEffect(()=>{hC(e.id).then(c)},[e.id]);const u={transform:T2.Transform.toString(o),transition:s,opacity:a?.5:1};return h.jsx(Mn,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:h.jsxs(Qn,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[h.jsx(se,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:h.jsx(q_e,{})}),h.jsx(ot,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?h.jsx(se,{component:"img",src:Db(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):h.jsx(wl,{sx:{bgcolor:jM(e),width:40,height:40,boxShadow:2},children:(()=>{const d=MM(e);return h.jsx(d,{sx:{fontSize:24}})})()}),h.jsxs(se,{sx:{flex:1},children:[h.jsx(re,{variant:"subtitle1",fontWeight:500,children:e.name}),h.jsxs(re,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},i1t=()=>{const{t:e}=en(),t=Fc(),{content:n,isLoading:r}=h0(),i=h_e(),[o,s]=A.useState([]),[a,l]=A.useState(!1);A.useEffect(()=>{if(n){const g=[...n].sort((y,b)=>{const v=y.priority??100,S=b.priority??100;return v-S});s(g),l(!1)}},[n]);const c=Ogt(JY(AI),JY(kI,{coordinateGetter:t1t})),u=A.useCallback(g=>{const{active:y,over:b}=g;b&&y.id!==b.id&&(s(v=>{const S=v.findIndex(w=>w.id===y.id),C=v.findIndex(w=>w.id===b.id);return DI(v,S,C)}),l(!0))},[]),d=A.useCallback(async()=>{const g=o.map((y,b)=>({id:y.id,priority:(b+1)*10}));try{await i(g),t.show({message:e("startup.saveSuccess"),severity:"success"}),l(!1)}catch(y){t.show({message:y instanceof Error?y.message:e("startup.saveFailed"),severity:"error"})}},[o,i,t,e]),p=A.useMemo(()=>o.map(g=>g.id),[o]);return r?h.jsxs(re,{children:[e("common.loading"),"..."]}):h.jsxs(Wt,{spacing:3,children:[h.jsx(W2,{items:[{name:e("nav.bridges"),to:Ot.bridges},{name:e("startup.title"),to:Ot.startup}]}),h.jsxs(se,{display:"flex",alignItems:"center",gap:2,children:[h.jsx(c0,{color:"primary",fontSize:"large"}),h.jsxs(se,{children:[h.jsx(re,{variant:"h5",fontWeight:600,children:e("startup.title")}),h.jsx(re,{variant:"body2",color:"text.secondary",children:e("startup.description")})]})]}),a&&h.jsx(zt,{severity:"info",action:h.jsx(Ue,{color:"inherit",size:"small",startIcon:h.jsx(F4,{}),onClick:d,children:e("startup.saveChanges")}),children:e("startup.unsavedChanges")}),h.jsx(j0t,{sensors:c,collisionDetection:jgt,onDragEnd:u,children:h.jsx(W0t,{items:p,strategy:U0t,children:h.jsx(Wt,{spacing:1,children:o.map((g,y)=>h.jsx(r1t,{bridge:g,index:y},g.id))})})}),o.length===0&&h.jsx(re,{color:"text.secondary",textAlign:"center",py:4,children:e("startup.noBridges")}),a&&o.length>0&&h.jsx(se,{display:"flex",justifyContent:"flex-end",children:h.jsx(Ue,{variant:"contained",startIcon:h.jsx(F4,{}),onClick:d,children:e("startup.saveOrder")})})]})},oS="https://riddix.github.io/home-assistant-matter-hub",Ot={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",areaSetup:"/bridges/area-setup",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",plugins:"/plugins",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:oS,support:`${oS}/support`,faq:{multiFabric:`${oS}/connect-multiple-fabrics`,bridgeConfig:`${oS}/bridge-configuration`}},o1t=[{path:"",element:h.jsx(fwe,{}),children:[{path:"",element:h.jsx(uOe,{})},{path:Ot.bridges,element:h.jsx(iOe,{})},{path:Ot.createBridge,element:h.jsx(elt,{})},{path:Ot.areaSetup,element:h.jsx(H6e,{})},{path:Ot.bridge(":bridgeId"),element:h.jsx(T_e,{})},{path:Ot.editBridge(":bridgeId"),element:h.jsx(tlt,{})},{path:Ot.devices,element:h.jsx(_Oe,{})},{path:Ot.networkMap,element:h.jsx(Bmt,{})},{path:Ot.health,element:h.jsx(xlt,{})},{path:Ot.labels,element:h.jsx(klt,{})},{path:Ot.lockCredentials,element:h.jsx(Olt,{})},{path:Ot.plugins,element:h.jsx(ugt,{})},{path:Ot.settings,element:h.jsx(mgt,{})},{path:Ot.startup,element:h.jsx(i1t,{})},{path:"*",element:h.jsx(Mlt,{})}]}],s1t={items:{isInitialized:!1,isLoading:!1}},a1t=FO(s1t,e=>{e.addCase(Lo.pending,t=>{t.items.isLoading=!0}).addCase(Lo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Lo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(AX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(_X.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(TX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(DX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(OX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(MX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),l1t={byBridge:{}},c1t=FO(l1t,e=>{e.addCase(Ru.pending,(t,n)=>{t.byBridge[n.meta.arg]=YA(t.byBridge[n.meta.arg],n)}).addCase(Ru.rejected,(t,n)=>{t.byBridge[n.meta.arg]=YA(t.byBridge[n.meta.arg],n)}).addCase(Ru.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=YA(t.byBridge[n.meta.arg],n)})}),u1t={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},YA=FO(u1t,e=>{e.addCase(Ru.pending,t=>{t.isLoading=!0}).addCase(Ru.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(Ru.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),d1t=K4e({reducer:{bridges:a1t,devices:c1t}}),_I=M3e({createStyledComponent:ge("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ve(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>ct({props:e,name:"MuiContainer"})});function f1t(e){return tt("MuiToolbar",e)}st("MuiToolbar",["root","gutters","regular","dense"]);const h1t=e=>{const{classes:t,disableGutters:n,variant:r}=e;return nt({root:["root",!n&&"gutters",r]},f1t,t)},p1t=ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ye(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Iue=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=h1t(c);return h.jsx(p1t,{as:o,className:_e(u.root,i),ref:n,ownerState:c,...l})});class m1t extends A.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?h.jsxs(se,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[h.jsx(QO,{color:"error",sx:{fontSize:64}}),h.jsx(re,{variant:"h5",fontWeight:600,children:pi.t("errorBoundary.title")}),h.jsx(re,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??pi.t("errorBoundary.fallbackMessage")}),h.jsx(Ue,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:pi.t("errorBoundary.reload")})]}):this.props.children}}function g1t(e){return tt("MuiFab",e)}const cJ=st("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),y1t=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${ve(i)}`,t==="inherit"?"colorInherit":t]},s=nt(o,g1t,r);return{...r,...s}},b1t=ge(ss,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>Li(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${ve(n.size)}`],n.color==="inherit"&&t.colorInherit,t[ve(n.size)],t[n.color]]}})(Ye(({theme:e})=>({...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${cJ.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]})),Ye(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Gn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Ye(({theme:e})=>({[`&.${cJ.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),v1t=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:p="circular",...g}=r,y={...r,color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:p},b=y1t(y);return h.jsx(b1t,{className:_e(b.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:_e(b.focusVisible,u),ownerState:y,ref:n,...g,classes:b,children:i})}),x1t=[{code:"en",flag:"🇬🇧",name:"English"},{code:"de",flag:"🇩🇪",name:"Deutsch"},{code:"fr",flag:"🇫🇷",name:"Français"},{code:"es",flag:"🇪🇸",name:"Español"},{code:"it",flag:"🇮🇹",name:"Italiano"},{code:"zh",flag:"🇨🇳",name:"中文"},{code:"zh-TW",flag:"🇹🇼",name:"繁體中文"},{code:"th",flag:"🇹🇭",name:"ไทย"},{code:"sv",flag:"🇸🇪",name:"Svenska"},{code:"tr",flag:"🇹🇷",name:"Türkçe"},{code:"ru",flag:"🇷🇺",name:"Русский"}],S1t="hamh-custom-languages";function w1t(){try{const e=localStorage.getItem(S1t);return e?JSON.parse(e).map(n=>({code:n.code,flag:"🌐",name:n.name})):[]}catch{return[]}}const C1t="https://github.com/RiDDiX/home-assistant-matter-hub/issues/new?labels=translation&title=Translation+improvement";function k1t(){const{t:e,i18n:t}=en(),[n,r]=A.useState(!1),i=A.useRef(null),o=A.useMemo(()=>[...x1t,...w1t()],[]),s=t.language??"en",a=o.some(d=>d.code===s)?s:s.split("-")[0]??"en",l=A.useCallback(()=>{r(d=>!d)},[]),c=A.useCallback(d=>{t.changeLanguage(d),r(!1)},[t]),u=A.useCallback(()=>{r(!1)},[]);return h.jsx(rX,{onClickAway:u,children:h.jsxs(se,{children:[h.jsx(v1t,{ref:i,size:"small",color:"primary",onClick:l,"aria-label":"Change language",sx:{position:"fixed",bottom:24,right:24,zIndex:1300},children:h.jsx(Q_e,{})}),h.jsx(G2,{open:n,anchorEl:i.current,placement:"top-end",transition:!0,sx:{zIndex:1300},children:({TransitionProps:d})=>h.jsx(M4,{...d,timeout:200,children:h.jsxs(zr,{elevation:8,sx:{mb:1,py:.5,minWidth:160,borderRadius:2,overflow:"hidden"},children:[o.map(p=>h.jsxs(se,{onClick:()=>c(p.code),sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,cursor:"pointer",bgcolor:a===p.code?"action.selected":"transparent","&:hover":{bgcolor:"action.hover"},transition:"background-color 0.15s"},children:[h.jsx(re,{sx:{fontSize:"1.4rem",lineHeight:1,userSelect:"none"},children:p.flag}),h.jsx(re,{variant:"body2",fontWeight:a===p.code?600:400,children:p.name})]},p.code)),h.jsx(Dr,{}),h.jsxs(se,{sx:{display:"flex",alignItems:"flex-start",gap:.75,px:2,py:1},children:[h.jsx(VO,{sx:{fontSize:14,mt:.25,color:"text.secondary"}}),h.jsxs(re,{variant:"caption",color:"text.secondary",sx:{lineHeight:1.4},children:[e("languageSwitcher.disclaimer")," ",h.jsx(V2,{href:C1t,target:"_blank",rel:"noopener",sx:{fontSize:"inherit"},children:e("languageSwitcher.contribute")})]})]})]})})})]})})}const E1t="home-assistant-matter-hub",A1t={name:E1t};function Pue(){const e="2.1.0-alpha.606",[t,n]=A.useState(null);A.useEffect(()=>{fetch("api/health").then(i=>i.ok?i.json():null).then(i=>{i?.version&&n(i.version)}).catch(()=>{})},[]);const r=A.useMemo(()=>!t||e==="0.0.0-dev"?!1:e!==t,[t]);return A.useMemo(()=>({name:A1t.name,version:t??e,frontendVersion:e,backendVersion:t,versionMismatch:r}),[t,r])}const D1t=()=>{const{t:e}=en(),t=[{name:e("footer.github"),url:Ot.githubRepository},{name:e("footer.documentation"),url:Ot.documentation},{name:e("footer.support"),url:Ot.support}];return h.jsxs(_I,{sx:{mt:16,mb:4},children:[h.jsx(Dr,{sx:{mt:4,mb:4}}),h.jsx(ht,{container:!0,spacing:2,justifyContent:"center",children:t.map((n,r)=>h.jsx(ht,{size:{xs:12,sm:"auto"},children:h.jsx(Ue,{fullWidth:!0,size:"small",variant:"outlined",component:V2,href:n.url,target:"_blank",children:n.name})},r.toString()))})]})};function _1t(e){return tt("MuiAppBar",e)}st("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const T1t=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ve(t)}`,`position${ve(n)}`]};return nt(i,_1t,r)},uJ=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,O1t=ge(zr,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ve(n.position)}`],t[`color${ve(n.color)}`]]}})(Ye(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Gn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?uJ(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?uJ(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),M1t=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=T1t(c);return h.jsx(O1t,{square:!0,component:"header",ownerState:c,elevation:4,className:_e(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function j1t(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=oa(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function R1t(e){return typeof e=="function"?e():e}function sS(e,t,n){const r=R1t(n),i=j1t(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const I1t=A.forwardRef(function(t,n){const r=Ki(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=i,in:p,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:E=o,TransitionComponent:k=Ja,...T}=t,_=A.useRef(null),O=Br(Rf(l),_,n),R=W=>q=>{W&&(q===void 0?W(_.current):W(_.current,q))},P=R((W,q)=>{sS(u,W,c),IO(W),g&&g(W,q)}),L=R((W,q)=>{const Z=gf({timeout:E,style:w,easing:d},{mode:"enter"});W.style.webkitTransition=r.transitions.create("-webkit-transform",{...Z}),W.style.transition=r.transitions.create("transform",{...Z}),W.style.webkitTransform="none",W.style.transform="none",b&&b(W,q)}),M=R(y),N=R(C),$=R(W=>{const q=gf({timeout:E,style:w,easing:d},{mode:"exit"});W.style.webkitTransition=r.transitions.create("-webkit-transform",q),W.style.transition=r.transitions.create("transform",q),sS(u,W,c),v&&v(W)}),B=R(W=>{W.style.webkitTransition="",W.style.transition="",S&&S(W)}),F=W=>{s&&s(_.current,W)},V=A.useCallback(()=>{_.current&&sS(u,_.current,c)},[u,c]);return A.useEffect(()=>{if(p||u==="down"||u==="right")return;const W=H2(()=>{_.current&&sS(u,_.current,c)}),q=oa(_.current);return q.addEventListener("resize",W),()=>{W.clear(),q.removeEventListener("resize",W)}},[u,p,c]),A.useEffect(()=>{p||V()},[p,V]),h.jsx(k,{nodeRef:_,onEnter:P,onEntered:M,onEntering:L,onExit:$,onExited:B,onExiting:N,addEndListener:F,appear:a,in:p,timeout:E,...T,children:(W,{ownerState:q,...Z})=>A.cloneElement(l,{ref:O,style:{visibility:W==="exited"&&!p?"hidden":void 0,...w,...l.props.style},...Z})})});function P1t(e){return tt("MuiDrawer",e)}st("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Nue=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},N1t=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ve(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ve(n)}`,r!=="temporary"&&`paperAnchorDocked${ve(n)}`]};return nt(i,P1t,t)},$1t=ge(nM,{name:"MuiDrawer",slot:"Root",overridesResolver:Nue})(Ye(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),L1t=ge("div",{shouldForwardProp:Li,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Nue})({flex:"0 0 auto"}),F1t=ge(zr,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ve(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ve(n.anchor)}`]]}})(Ye(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),$ue={left:"right",right:"left",top:"down",bottom:"up"};function z1t(e){return["left","right"].includes(e)}function B1t({direction:e},t){return e==="rtl"&&z1t(t)?$ue[t]:t}const H1t=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiDrawer"}),i=Ki(),o=Lc(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:E=s,variant:k="temporary",slots:T={},slotProps:_={},...O}=r,R=A.useRef(!1);A.useEffect(()=>{R.current=!0},[]);const P=B1t({direction:o?"rtl":"ltr"},a),M={...r,anchor:a,elevation:d,open:v,variant:k,...O},N=N1t(M),$={slots:{transition:w,...T},slotProps:{paper:S,transition:C,..._,backdrop:MO(_.backdrop||{...l,...g},{transitionDuration:E})}},[B,F]=ft("root",{ref:n,elementType:$1t,className:_e(N.root,N.modal,u),shouldForwardComponentProp:!0,ownerState:M,externalForwardedProps:{...$,...O,...y},additionalProps:{open:v,onClose:b,hideBackdrop:p,slots:{backdrop:$.slots.backdrop},slotProps:{backdrop:$.slotProps.backdrop}}}),[V,W]=ft("paper",{elementType:F1t,shouldForwardComponentProp:!0,className:_e(N.paper,S.className),ownerState:M,externalForwardedProps:$,additionalProps:{elevation:k==="temporary"?d:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[q,Z]=ft("docked",{elementType:L1t,ref:n,className:_e(N.root,N.docked,u),ownerState:M,externalForwardedProps:$,additionalProps:O}),[z,U]=ft("transition",{elementType:I1t,ownerState:M,externalForwardedProps:$,additionalProps:{in:v,direction:$ue[P],timeout:E,appear:R.current}}),Y=h.jsx(V,{...W,children:c});if(k==="permanent")return h.jsx(q,{...Z,children:Y});const H=h.jsx(z,{...U,children:Y});return k==="persistent"?h.jsx(q,{...Z,children:H}):h.jsx(B,{...F,children:H})}),U1t=PZ({themeId:ja}),V1t={error:Nf,warn:u0,info:eM,debug:dC},W1t=({open:e,onClose:t})=>{const{t:n}=en(),r=Ki(),i=A.useMemo(()=>({error:r.palette.error.main,warn:r.palette.warning.main,info:r.palette.info.main,debug:r.palette.secondary.main}),[r]),[o,s]=A.useState([]),[a,l]=A.useState(!0),[c,u]=A.useState("error,warn,info".split(",")),[d,p]=A.useState(""),[g,y]=A.useState(!0),b=A.useCallback(async()=>{try{const E=new URLSearchParams({level:c.join(","),limit:"500",...d&&{search:d}}),k=await fetch(`api/logs?${E}`);if(k.ok){const T=await k.json();s(T.entries)}}catch(E){console.error("Failed to fetch logs:",E)}finally{l(!1)}},[c,d]);A.useEffect(()=>{e&&b()},[e,b]),A.useEffect(()=>{if(!g||!e)return;const E=setInterval(b,5e3);return()=>clearInterval(E)},[g,e,b]);const v=E=>{u(Array.isArray(E.target.value)?E.target.value:[E.target.value])},S=E=>{p(E.target.value)},C=async()=>{try{await fetch("api/logs",{method:"DELETE"}),s([])}catch(E){console.error("Failed to clear logs:",E)}},w=E=>{const k=V1t[E]||eM;return h.jsx(k,{sx:{fontSize:16,color:i[E]}})};return h.jsxs(Po,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[h.jsxs($o,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(dC,{}),n("logs.title"),h.jsx(se,{sx:{flexGrow:1}}),h.jsx(Lt,{title:n("logs.autoRefresh"),children:h.jsx(ot,{label:g?"Auto":"Manual",color:g?"success":"default",size:"small",onClick:()=>y(!g),sx:{cursor:"pointer"}})}),h.jsx(qt,{onClick:t,children:h.jsx(L4,{})})]}),h.jsxs(No,{children:[h.jsx(Wt,{spacing:2,sx:{mb:2},children:h.jsxs(Wt,{direction:"row",spacing:2,alignItems:"center",children:[h.jsxs(rs,{size:"small",sx:{minWidth:200},children:[h.jsx(Ia,{children:n("logs.logLevel")}),h.jsxs(ts,{value:c,label:n("logs.logLevel"),onChange:v,multiple:!0,renderValue:E=>h.jsx(se,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(E)?E:[E]).map(k=>h.jsx(ot,{label:k.toUpperCase(),size:"small",sx:{backgroundColor:i[k],color:"white"}},k))}),children:[h.jsx(Bn,{value:"error",children:n("logs.error")}),h.jsx(Bn,{value:"warn",children:n("logs.warning")}),h.jsx(Bn,{value:"info",children:n("logs.info")}),h.jsx(Bn,{value:"debug",children:n("logs.debug")})]})]}),h.jsx(zn,{size:"small",placeholder:n("logs.searchPlaceholder"),value:d,onChange:S,sx:{flexGrow:1}}),h.jsx(Ue,{variant:"outlined",onClick:b,children:n("common.refresh")}),h.jsx(Ue,{variant:"outlined",color:"error",onClick:C,children:n("common.delete")})]})}),h.jsx(se,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:a?h.jsx(se,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsxs(re,{children:[n("common.loading"),"..."]})}):o.length===0?h.jsx(se,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsx(re,{color:"text.secondary",children:n("logs.noResults")})}):h.jsx(Wt,{spacing:1,children:o.map((E,k)=>h.jsxs(se,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[h.jsxs(se,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[w(E.level),h.jsx(re,{variant:"caption",color:"text.secondary",children:new Date(E.timestamp).toLocaleString()}),h.jsx(ot,{label:E.level.toUpperCase(),size:"small",sx:{backgroundColor:i[E.level],color:r.palette.getContrastText(i[E.level]??r.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),h.jsx(re,{sx:{ml:3},children:E.message}),E.context&&h.jsx(re,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(E.context,null,2)})]},`${E.timestamp}-${E.level}-${k}`))})})]}),h.jsx(es,{children:h.jsx(Ue,{onClick:t,children:n("common.close")})})]})};function dJ(){const{t:e}=en(),{isConnected:t}=RX(),[n,r]=A.useState(null),[i,o]=A.useState(!1);A.useEffect(()=>{const b=async()=>{try{const S=await fetch("api/health");if(S.ok){const C=await S.json();r(C),o(!1)}else o(!0)}catch{o(!0)}};b();const v=setInterval(b,3e4);return()=>clearInterval(v)},[]);const s=b=>{const v=Math.floor(b/3600),S=Math.floor(b%3600/60);return v>0?`${v}h ${S}m`:`${S}m`},a=n?.status==="healthy"&&!i,l=n?.services?.bridges,c=l&&l.total>0&&l.running===l.total,u=l&&l.total===0,d=n?h.jsxs(se,{sx:{p:.5},children:[h.jsxs("div",{children:[h.jsxs("strong",{children:[e("health.version"),":"]})," ",n.version??e("status.unknown")]}),h.jsxs("div",{children:[h.jsxs("strong",{children:[e("health.uptime"),":"]})," ",s(n.uptime??0)]}),n.services?.bridges&&h.jsxs("div",{children:[h.jsxs("strong",{children:[e("nav.bridges"),":"]})," ",n.services.bridges.running??0,"/",n.services.bridges.total??0," ",e("common.running").toLowerCase(),(n.services.bridges.stopped??0)>0&&` (${n.services.bridges.stopped} ${e("common.stopped").toLowerCase()})`]}),n.services?.homeAssistant&&h.jsxs("div",{children:[h.jsxs("strong",{children:[e("health.homeAssistant"),":"]})," ",n.services.homeAssistant.connected?e("health.connected"):e("health.disconnected")]}),h.jsxs("div",{children:[h.jsx("strong",{children:"WebSocket:"})," ",e(t?"health.connected":"health.disconnected")]})]}):e("status.loadingHealth"),p=()=>i||!a?h.jsx(Nf,{fontSize:"small"}):c?h.jsx(Za,{fontSize:"small"}):h.jsx(Y6,{fontSize:"small"}),g=()=>i||!a?"error":!c||!t?"warning":"success",y=()=>e(i?"status.error":a?t?u?"status.noBridges":c?"common.online":"common.starting":"common.offline":"status.unhealthy");return h.jsx(Lt,{title:d,arrow:!0,children:h.jsx(ot,{icon:p(),label:y(),color:g(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const q1t=e=>A.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{style:{display:"inline"}},A.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),A.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),K1t=e=>{const t=Pue();return h.jsxs(se,{component:Oc,to:Ot.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[h.jsx(q1t,{style:{height:"40px"}}),h.jsx(re,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ve).join("-")}),e.large&&h.jsx(re,{variant:"caption",component:"span",children:t.version})]})},G1t=()=>{const e=U1t("(min-width:600px)"),{mode:t,setMode:n}=I6(),[r,i]=A.useState(!1),[o,s]=A.useState(!1),a=$c(),l=Yu(),c=y=>y?y==="/"?l.pathname==="/":l.pathname.startsWith(y):!1,u=()=>{n(t==="dark"?"light":"dark")},{t:d}=en(),p=[{label:d("dashboard.title"),icon:h.jsx(kM,{}),to:Ot.dashboard},{label:d("nav.bridges"),icon:h.jsx(Ly,{}),to:Ot.bridges},{label:d("nav.devices"),icon:h.jsx(aa,{}),to:Ot.devices},{label:d("nav.networkMap"),icon:h.jsx(SM,{}),to:Ot.networkMap},{label:d("nav.startupOrder"),icon:h.jsx(c0,{}),to:Ot.startup},{label:d("nav.lockCredentials"),icon:h.jsx(ju,{}),to:Ot.lockCredentials},{label:d("nav.filterReference"),icon:h.jsx(EM,{}),to:Ot.labels},{label:"Plugins",icon:h.jsx($y,{}),to:Ot.plugins},{label:d("nav.settings"),icon:h.jsx(f0,{}),to:Ot.settings},{label:d(t==="dark"?"nav.lightMode":"nav.darkMode"),icon:t==="dark"?h.jsx(tTe,{}):h.jsx(U_e,{}),onClick:u},{label:d("nav.systemLogs"),icon:h.jsx(dC,{}),onClick:()=>i(!0)},{label:d("nav.health"),icon:h.jsx(iM,{}),to:Ot.health}],g=y=>{s(!1),y.onClick?y.onClick():y.to&&a(y.to)};return h.jsxs(se,{children:[h.jsx(M1t,{sx:{height:"72px"},children:h.jsx(Iue,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:h.jsxs(_I,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(K1t,{large:e}),e?h.jsxs(se,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.map(y=>y.to?h.jsx(Lt,{title:y.label,children:h.jsx(qt,{component:Oc,to:y.to,sx:{color:"inherit",bgcolor:c(y.to)?"rgba(255,255,255,0.15)":"transparent",borderRadius:1},children:y.icon})},y.label):h.jsx(Lt,{title:y.label,children:h.jsx(qt,{onClick:y.onClick,sx:{color:"inherit"},children:y.icon})},y.label)),h.jsx(dJ,{})]}):h.jsxs(se,{sx:{display:"flex",alignItems:"center",gap:.5},children:[h.jsx(dJ,{}),h.jsx(qt,{onClick:()=>s(!0),sx:{color:"inherit"},children:h.jsx(nTe,{})})]})]})})}),h.jsx(H1t,{anchor:"right",open:o,onClose:()=>s(!1),children:h.jsx(Fo,{sx:{width:250},children:p.map(y=>h.jsxs(oCe,{selected:c(y.to),onClick:()=>g(y),children:[h.jsx(Io,{children:y.icon}),h.jsx(ao,{primary:y.label})]},y.label))})}),h.jsx(W1t,{open:r,onClose:()=>i(!1)})]})},Y1t=()=>{const{versionMismatch:e,frontendVersion:t,backendVersion:n}=Pue(),{isConnected:r}=RX();return h.jsxs(se,{children:[h.jsx(G1t,{}),h.jsx(Iue,{}),e&&h.jsxs(zt,{severity:"warning",variant:"filled",sx:{borderRadius:0},action:h.jsx(Ue,{color:"inherit",size:"small",onClick:()=>window.location.reload(),children:"Reload"}),children:["Version mismatch: frontend ",t,", backend ",n,". Please reload to get the latest UI."]}),!r&&h.jsx(zt,{severity:"error",variant:"filled",sx:{borderRadius:0},children:"Connection lost — data may be outdated. Reconnecting…"}),h.jsx(_I,{sx:{p:2},children:h.jsx(m1t,{children:h.jsx(HJ,{})})}),h.jsx(D1t,{}),h.jsx(k1t,{})]})},J1t=M6({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let a4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");a4?.startsWith("http")&&(a4=new URL(a4).pathname);const Z1t=Pme([{path:"/",element:h.jsx(Y1t,{}),children:o1t}],{basename:a4});Xfe.createRoot(document.getElementById("root")).render(h.jsx(A.StrictMode,{children:h.jsx(mhe,{store:d1t,children:h.jsxs(H5e,{theme:J1t,children:[h.jsx($5e,{}),h.jsx(JZ,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),h.jsx(dwe,{children:h.jsx(n4e,{children:h.jsx(Gme,{router:Z1t})})})]})})}));
|
|
499
|
+
`},_gt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Tgt(e){let{announcements:t=_gt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Dgt}=e;const{announce:o,announcement:s}=kgt(),a=Nv("DndLiveRegion"),[l,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),Egt(A.useMemo(()=>({onDragStart(d){let{active:p}=d;o(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:g}=d;t.onDragMove&&o(t.onDragMove({active:p,over:g}))},onDragOver(d){let{active:p,over:g}=d;o(t.onDragOver({active:p,over:g}))},onDragEnd(d){let{active:p,over:g}=d;o(t.onDragEnd({active:p,over:g}))},onDragCancel(d){let{active:p,over:g}=d;o(t.onDragCancel({active:p,over:g}))}}),[o,t])),!l)return null;const u=on.createElement(on.Fragment,null,on.createElement(wgt,{id:r,value:i.draggable}),on.createElement(Cgt,{id:a,announcement:s}));return n?qd.createPortal(u,n):u}var Wi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Wi||(Wi={}));function l6(){}function JY(e,t){return A.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ogt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const El=Object.freeze({x:0,y:0});function pue(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function mue(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Mgt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function ZY(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function gue(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function XY(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const jgt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=XY(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=pue(XY(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(mue)},Rgt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=ZY(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=ZY(l),u=i.reduce((p,g,y)=>p+pue(c[y],g),0),d=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:d}})}}return o.sort(mue)};function Igt(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const Pgt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Igt(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Mgt)};function Ngt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function yue(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:El}function $gt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const Lgt=$gt(1);function Fgt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function zgt(e,t,n){const r=Fgt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const Bgt={ignoreTransform:!1};function N0(e,t){t===void 0&&(t=Bgt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=Ps(e).getComputedStyle(e);c&&(n=zgt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function QY(e){return N0(e,{ignoreTransform:!0})}function Hgt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Ugt(e,t){return t===void 0&&(t=Ps(e).getComputedStyle(e)),t.position==="fixed"}function Vgt(e,t){t===void 0&&(t=Ps(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function R8(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(xI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Iv(i)||due(i)||n.includes(i))return n;const o=Ps(e).getComputedStyle(i);return i!==e&&Vgt(i,o)&&n.push(i),Ugt(i,o)?n:r(i.parentNode)}return e?r(e):n}function bue(e){const[t]=R8(e,1);return t??null}function qA(e){return!j8||!e?null:I0(e)?e:vI(e)?xI(e)||e===P0(e).scrollingElement?window:Iv(e)?e:null:null}function vue(e){return I0(e)?e.scrollX:e.scrollLeft}function xue(e){return I0(e)?e.scrollY:e.scrollTop}function XT(e){return{x:vue(e),y:xue(e)}}var io;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(io||(io={}));function Sue(e){return!j8||!e?!1:e===document.scrollingElement}function wue(e){const t={x:0,y:0},n=Sue(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const Wgt={x:.2,y:.2};function qgt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=Wgt);const{isTop:c,isBottom:u,isLeft:d,isRight:p}=wue(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=io.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=io.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!p&&a>=t.right-b.width?(g.x=io.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!d&&s<=t.left+b.width&&(g.x=io.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function Kgt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Cue(e){return e.reduce((t,n)=>Cg(t,XT(n)),El)}function Ggt(e){return e.reduce((t,n)=>t+vue(n),0)}function Ygt(e){return e.reduce((t,n)=>t+xue(n),0)}function Jgt(e,t){if(t===void 0&&(t=N0),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);bue(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Zgt=[["x",["left","right"],Ggt],["y",["top","bottom"],Ygt]];class CI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=R8(n),i=Cue(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of Zgt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class sb{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Xgt(e){const{EventTarget:t}=Ps(e);return e instanceof t?e:P0(e)}function KA(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var ka;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ka||(ka={}));function eJ(e){e.preventDefault()}function Qgt(e){e.stopPropagation()}var Jn;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Jn||(Jn={}));const kue={start:[Jn.Space,Jn.Enter],cancel:[Jn.Esc],end:[Jn.Space,Jn.Enter,Jn.Tab]},e0t=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Jn.Right:return{...n,x:n.x+25};case Jn.Left:return{...n,x:n.x-25};case Jn.Down:return{...n,y:n.y+25};case Jn.Up:return{...n,y:n.y-25}}};class kI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new sb(P0(n)),this.windowListeners=new sb(Ps(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ka.Resize,this.handleCancel),this.windowListeners.add(ka.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ka.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Jgt(r),n(El)}handleKeyDown(t){if(wI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=kue,coordinateGetter:s=e0t,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:El;this.referenceCoordinates||(this.referenceCoordinates=u);const d=s(t,{active:n,context:r.current,currentCoordinates:u});if(d){const p=_2(d,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:E,maxScroll:k,minScroll:T}=wue(b),_=Kgt(b),O={x:Math.min(v===Jn.Right?_.right-_.width/2:_.right,Math.max(v===Jn.Right?_.left:_.left+_.width/2,d.x)),y:Math.min(v===Jn.Down?_.bottom-_.height/2:_.bottom,Math.max(v===Jn.Down?_.top:_.top+_.height/2,d.y))},R=v===Jn.Right&&!C||v===Jn.Left&&!w,P=v===Jn.Down&&!E||v===Jn.Up&&!S;if(R&&O.x!==d.x){const L=b.scrollLeft+p.x,M=v===Jn.Right&&L<=k.x||v===Jn.Left&&L>=T.x;if(M&&!p.y){b.scrollTo({left:L,behavior:a});return}M?g.x=b.scrollLeft-L:g.x=v===Jn.Right?b.scrollLeft-k.x:b.scrollLeft-T.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(P&&O.y!==d.y){const L=b.scrollTop+p.y,M=v===Jn.Down&&L<=k.y||v===Jn.Up&&L>=T.y;if(M&&!p.x){b.scrollTo({top:L,behavior:a});return}M?g.y=b.scrollTop-L:g.y=v===Jn.Down?b.scrollTop-k.y:b.scrollTop-T.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,Cg(_2(d,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}kI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=kue,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function tJ(e){return!!(e&&"distance"in e)}function nJ(e){return!!(e&&"delay"in e)}class EI{constructor(t,n,r){var i;r===void 0&&(r=Xgt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=P0(s),this.documentListeners=new sb(this.document),this.listeners=new sb(r),this.windowListeners=new sb(Ps(s)),this.initialCoordinates=(i=ZT(o))!=null?i:El,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ka.Resize,this.handleCancel),this.windowListeners.add(ka.DragStart,eJ),this.windowListeners.add(ka.VisibilityChange,this.handleCancel),this.windowListeners.add(ka.ContextMenu,eJ),this.documentListeners.add(ka.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(nJ(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(tJ(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(ka.Click,Qgt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ka.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=ZT(t))!=null?n:El,c=_2(i,l);if(!r&&a){if(tJ(a)){if(a.tolerance!=null&&KA(c,a.tolerance))return this.handleCancel();if(KA(c,a.distance))return this.handleStart()}if(nJ(a)&&KA(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Jn.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const t0t={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class AI extends EI{constructor(t){const{event:n}=t,r=P0(n.target);super(t,t0t,r)}}AI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const n0t={move:{name:"mousemove"},end:{name:"mouseup"}};var QT;(function(e){e[e.RightClick=2]="RightClick"})(QT||(QT={}));class r0t extends EI{constructor(t){super(t,n0t,P0(t.event.target))}}r0t.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===QT.RightClick?!1:(r?.({event:n}),!0)}}];const GA={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class i0t extends EI{constructor(t){super(t,GA)}static setup(){return window.addEventListener(GA.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(GA.move.name,t)};function t(){}}}i0t.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var ab;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ab||(ab={}));var c6;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(c6||(c6={}));function o0t(e){let{acceleration:t,activator:n=ab.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=c6.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:p}=e;const g=a0t({delta:d,disabled:!o}),[y,b]=ygt(),v=A.useRef({x:0,y:0}),S=A.useRef({x:0,y:0}),C=A.useMemo(()=>{switch(n){case ab.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ab.DraggableRect:return i}},[n,i,l]),w=A.useRef(null),E=A.useCallback(()=>{const T=w.current;if(!T)return;const _=v.current.x*S.current.x,O=v.current.y*S.current.y;T.scrollBy(_,O)},[]),k=A.useMemo(()=>a===c6.TreeOrder?[...c].reverse():c,[a,c]);A.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const T of k){if(r?.(T)===!1)continue;const _=c.indexOf(T),O=u[_];if(!O)continue;const{direction:R,speed:P}=qgt(T,O,C,t,p);for(const L of["x","y"])g[L][R[L]]||(P[L]=0,R[L]=0);if(P.x>0||P.y>0){b(),w.current=T,y(E,s),v.current=P,S.current=R;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,E,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,k,u,JSON.stringify(p)])}const s0t={x:{[io.Backward]:!1,[io.Forward]:!1},y:{[io.Backward]:!1,[io.Forward]:!1}};function a0t(e){let{delta:t,disabled:n}=e;const r=JT(t);return Pv(i=>{if(n||!r||!i)return s0t;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[io.Backward]:i.x[io.Backward]||o.x===-1,[io.Forward]:i.x[io.Forward]||o.x===1},y:{[io.Backward]:i.y[io.Backward]||o.y===-1,[io.Forward]:i.y[io.Forward]||o.y===1}}},[n,t,r])}function l0t(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Pv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function c0t(e,t){return A.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var O2;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(O2||(O2={}));var eO;(function(e){e.Optimized="optimized"})(eO||(eO={}));const rJ=new Map;function u0t(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=A.useState(null),{frequency:a,measure:l,strategy:c}=i,u=A.useRef(e),d=v(),p=D2(d),g=A.useCallback(function(S){S===void 0&&(S=[]),!p.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[p]),y=A.useRef(null),b=Pv(S=>{if(d&&!n)return rJ;if(!S||S===rJ||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const E=w.node.current,k=E?new CI(l(E),E):null;w.rect.current=k,k&&C.set(w.id,k)}return C}return S},[e,o,n,d,l]);return A.useEffect(()=>{u.current=e},[e]),A.useEffect(()=>{d||g()},[n,d]),A.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),A.useEffect(()=>{d||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,d,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case O2.Always:return!1;case O2.BeforeDragging:return n;default:return!n}}}function Eue(e,t){return Pv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function d0t(e,t){return Eue(e,t)}function f0t(e){let{callback:t,disabled:n}=e;const r=SI(t),i=A.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return A.useEffect(()=>()=>i?.disconnect(),[i]),i}function I8(e){let{callback:t,disabled:n}=e;const r=SI(t),i=A.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return A.useEffect(()=>()=>i?.disconnect(),[i]),i}function h0t(e){return new CI(N0(e),e)}function iJ(e,t,n){t===void 0&&(t=h0t);const[r,i]=A.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=f0t({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),a=I8({callback:o});return Nc(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function p0t(e){const t=Eue(e);return yue(e,t)}const oJ=[];function m0t(e){const t=A.useRef(e),n=Pv(r=>e?r&&r!==oJ&&e&&t.current&&e.parentNode===t.current.parentNode?r:R8(e):oJ,[e]);return A.useEffect(()=>{t.current=e},[e]),n}function g0t(e){const[t,n]=A.useState(null),r=A.useRef(e),i=A.useCallback(o=>{const s=qA(o.target);s&&n(a=>a?(a.set(s,XT(s)),new Map(a)):null)},[]);return A.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=qA(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,XT(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=qA(l);c?.removeEventListener("scroll",i)})}},[i,e]),A.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>Cg(o,s),El):Cue(e):El,[e,t])}function sJ(e,t){t===void 0&&(t=[]);const n=A.useRef(null);return A.useEffect(()=>{n.current=null},t),A.useEffect(()=>{const r=e!==El;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_2(e,n.current):El}function y0t(e){A.useEffect(()=>{if(!j8)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function b0t(e,t){return A.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function Aue(e){return A.useMemo(()=>e?Hgt(e):null,[e])}const aJ=[];function v0t(e,t){t===void 0&&(t=N0);const[n]=e,r=Aue(n?Ps(n):null),[i,o]=A.useState(aJ);function s(){o(()=>e.length?e.map(l=>Sue(l)?r:new CI(t(l),l)):aJ)}const a=I8({callback:s});return Nc(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function x0t(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Iv(t)?t:e}function S0t(e){let{measure:t}=e;const[n,r]=A.useState(null),i=A.useCallback(c=>{for(const{target:u}of c)if(Iv(u)){r(d=>{const p=t(u);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),o=I8({callback:i}),s=A.useCallback(c=>{const u=x0t(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=a6(s);return A.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const w0t=[{sensor:AI,options:{}},{sensor:kI,options:{}}],C0t={current:{}},s4={draggable:{measure:QY},droppable:{measure:QY,strategy:O2.WhileDragging,frequency:eO.Optimized},dragOverlay:{measure:N0}};class lb extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const k0t={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new lb,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:l6},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:s4,measureDroppableContainers:l6,windowRect:null,measuringScheduled:!1},E0t={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:l6,draggableNodes:new Map,over:null,measureDroppableContainers:l6},P8=A.createContext(E0t),Due=A.createContext(k0t);function A0t(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new lb}}}function D0t(e,t){switch(t.type){case Wi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Wi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Wi.DragEnd:case Wi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Wi.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new lb(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Wi.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new lb(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Wi.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new lb(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function _0t(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=A.useContext(P8),o=JT(r),s=JT(n?.id);return A.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!wI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=xgt(u);if(d){d.focus();break}}})}},[r,t,i,s,o]),null}function T0t(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function O0t(e){return A.useMemo(()=>({draggable:{...s4.draggable,...e?.draggable},droppable:{...s4.droppable,...e?.droppable},dragOverlay:{...s4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function M0t(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=A.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;Nc(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=yue(u,r);if(s||(d.x=0),a||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=bue(c);p&&p.scrollBy({top:d.y,left:d.x})}},[t,s,a,r,n])}const _ue=A.createContext({...El,scaleX:1,scaleY:1});var Ld;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ld||(Ld={}));const j0t=A.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=w0t,collisionDetection:d=Pgt,measuring:p,modifiers:g,...y}=t;const b=A.useReducer(D0t,void 0,A0t),[v,S]=b,[C,w]=Agt(),[E,k]=A.useState(Ld.Uninitialized),T=E===Ld.Initialized,{draggable:{active:_,nodes:O,translate:R},droppable:{containers:P}}=v,L=_!=null?O.get(_):null,M=A.useRef({initial:null,translated:null}),N=A.useMemo(()=>{var We;return _!=null?{id:_,data:(We=L?.data)!=null?We:C0t,rect:M}:null},[_,L]),$=A.useRef(null),[B,F]=A.useState(null),[V,W]=A.useState(null),q=D2(y,Object.values(y)),Z=Nv("DndDescribedBy",s),z=A.useMemo(()=>P.getEnabled(),[P]),U=O0t(p),{droppableRects:Y,measureDroppableContainers:H,measuringScheduled:K}=u0t(z,{dragging:T,dependencies:[R.x,R.y],config:U.droppable}),Q=l0t(O,_),ie=A.useMemo(()=>V?ZT(V):null,[V]),te=Ge(),ce=d0t(Q,U.draggable.measure);M0t({activeNode:_!=null?O.get(_):null,config:te.layoutShiftCompensation,initialRect:ce,measure:U.draggable.measure});const ee=iJ(Q,U.draggable.measure,ce),J=iJ(Q?Q.parentElement:null),X=A.useRef({activatorEvent:null,active:null,activeNode:Q,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:O,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),oe=P.getNodeFor((n=X.current.over)==null?void 0:n.id),le=S0t({measure:U.dragOverlay.measure}),fe=(r=le.nodeRef.current)!=null?r:Q,ye=T?(i=le.rect)!=null?i:ee:null,Me=!!(le.nodeRef.current&&le.rect),ue=p0t(Me?null:ee),we=Aue(fe?Ps(fe):null),Oe=m0t(T?oe??Q:null),He=v0t(Oe),ze=T0t(g,{transform:{x:R.x-ue.x,y:R.y-ue.y,scaleX:1,scaleY:1},activatorEvent:V,active:N,activeNodeRect:ee,containerNodeRect:J,draggingNodeRect:ye,over:X.current.over,overlayNodeRect:le.rect,scrollableAncestors:Oe,scrollableAncestorRects:He,windowRect:we}),At=ie?Cg(ie,R):null,gt=g0t(Oe),$e=sJ(gt),je=sJ(gt,[ee]),Ve=Cg(ze,$e),Ke=ye?Lgt(ye,ze):null,at=N&&Ke?d({active:N,collisionRect:Ke,droppableRects:Y,droppableContainers:z,pointerCoordinates:At}):null,ut=gue(at,"id"),[Qe,Bt]=A.useState(null),Ht=Me?ze:Cg(ze,je),Pt=Ngt(Ht,(o=Qe?.rect)!=null?o:null,ee),Dn=A.useRef(null),tn=A.useCallback((We,Je)=>{let{sensor:St,options:In}=Je;if($.current==null)return;const dn=O.get($.current);if(!dn)return;const _t=We.nativeEvent,yn=new St({active:$.current,activeNode:dn,event:_t,options:In,context:X,onAbort(yt){if(!O.get(yt))return;const{onDragAbort:ae}=q.current,pe={id:yt};ae?.(pe),C({type:"onDragAbort",event:pe})},onPending(yt,Kt,ae,pe){if(!O.get(yt))return;const{onDragPending:Pe}=q.current,qe={id:yt,constraint:Kt,initialCoordinates:ae,offset:pe};Pe?.(qe),C({type:"onDragPending",event:qe})},onStart(yt){const Kt=$.current;if(Kt==null)return;const ae=O.get(Kt);if(!ae)return;const{onDragStart:pe}=q.current,xe={activatorEvent:_t,active:{id:Kt,data:ae.data,rect:M}};qd.unstable_batchedUpdates(()=>{pe?.(xe),k(Ld.Initializing),S({type:Wi.DragStart,initialCoordinates:yt,active:Kt}),C({type:"onDragStart",event:xe}),F(Dn.current),W(_t)})},onMove(yt){S({type:Wi.DragMove,coordinates:yt})},onEnd:dt(Wi.DragEnd),onCancel:dt(Wi.DragCancel)});Dn.current=yn;function dt(yt){return async function(){const{active:ae,collisions:pe,over:xe,scrollAdjustedTranslate:Pe}=X.current;let qe=null;if(ae&&Pe){const{cancelDrop:wt}=q.current;qe={activatorEvent:_t,active:ae,collisions:pe,delta:Pe,over:xe},yt===Wi.DragEnd&&typeof wt=="function"&&await Promise.resolve(wt(qe))&&(yt=Wi.DragCancel)}$.current=null,qd.unstable_batchedUpdates(()=>{S({type:yt}),k(Ld.Uninitialized),Bt(null),F(null),W(null),Dn.current=null;const wt=yt===Wi.DragEnd?"onDragEnd":"onDragCancel";if(qe){const lt=q.current[wt];lt?.(qe),C({type:wt,event:qe})}})}}},[O]),pt=A.useCallback((We,Je)=>(St,In)=>{const dn=St.nativeEvent,_t=O.get(In);if($.current!==null||!_t||dn.dndKit||dn.defaultPrevented)return;const yn={active:_t};We(St,Je.options,yn)===!0&&(dn.dndKit={capturedBy:Je.sensor},$.current=In,tn(St,Je))},[O,tn]),Yt=c0t(u,pt);y0t(u),Nc(()=>{ee&&E===Ld.Initializing&&k(Ld.Initialized)},[ee,E]),A.useEffect(()=>{const{onDragMove:We}=q.current,{active:Je,activatorEvent:St,collisions:In,over:dn}=X.current;if(!Je||!St)return;const _t={active:Je,activatorEvent:St,collisions:In,delta:{x:Ve.x,y:Ve.y},over:dn};qd.unstable_batchedUpdates(()=>{We?.(_t),C({type:"onDragMove",event:_t})})},[Ve.x,Ve.y]),A.useEffect(()=>{const{active:We,activatorEvent:Je,collisions:St,droppableContainers:In,scrollAdjustedTranslate:dn}=X.current;if(!We||$.current==null||!Je||!dn)return;const{onDragOver:_t}=q.current,yn=In.get(ut),dt=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,yt={active:We,activatorEvent:Je,collisions:St,delta:{x:dn.x,y:dn.y},over:dt};qd.unstable_batchedUpdates(()=>{Bt(dt),_t?.(yt),C({type:"onDragOver",event:yt})})},[ut]),Nc(()=>{X.current={activatorEvent:V,active:N,activeNode:Q,collisionRect:Ke,collisions:at,droppableRects:Y,draggableNodes:O,draggingNode:fe,draggingNodeRect:ye,droppableContainers:P,over:Qe,scrollableAncestors:Oe,scrollAdjustedTranslate:Ve},M.current={initial:ye,translated:Ke}},[N,Q,at,Ke,O,fe,ye,Y,P,Qe,Oe,Ve]),o0t({...te,delta:R,draggingRect:Ke,pointerCoordinates:At,scrollableAncestors:Oe,scrollableAncestorRects:He});const an=A.useMemo(()=>({active:N,activeNode:Q,activeNodeRect:ee,activatorEvent:V,collisions:at,containerNodeRect:J,dragOverlay:le,draggableNodes:O,droppableContainers:P,droppableRects:Y,over:Qe,measureDroppableContainers:H,scrollableAncestors:Oe,scrollableAncestorRects:He,measuringConfiguration:U,measuringScheduled:K,windowRect:we}),[N,Q,ee,V,at,J,le,O,P,Y,Qe,H,Oe,He,U,K,we]),wn=A.useMemo(()=>({activatorEvent:V,activators:Yt,active:N,activeNodeRect:ee,ariaDescribedById:{draggable:Z},dispatch:S,draggableNodes:O,over:Qe,measureDroppableContainers:H}),[V,Yt,N,ee,S,Z,O,Qe,H]);return on.createElement(hue.Provider,{value:w},on.createElement(P8.Provider,{value:wn},on.createElement(Due.Provider,{value:an},on.createElement(_ue.Provider,{value:Pt},c)),on.createElement(_0t,{disabled:a?.restoreFocus===!1})),on.createElement(Tgt,{...a,hiddenTextDescribedById:Z}));function Ge(){const We=B?.autoScrollEnabled===!1,Je=typeof l=="object"?l.enabled===!1:l===!1,St=T&&!We&&!Je;return typeof l=="object"?{...l,enabled:St}:{enabled:St}}}),R0t=A.createContext(null),lJ="button",I0t="Draggable";function P0t(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=Nv(I0t),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:p}=A.useContext(P8),{role:g=lJ,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=A.useContext(v?_ue:R0t),[C,w]=a6(),[E,k]=a6(),T=b0t(s,t),_=D2(n);Nc(()=>(d.set(t,{id:t,key:o,node:C,activatorNode:E,data:_}),()=>{const R=d.get(t);R&&R.key===o&&d.delete(t)}),[d,t]);const O=A.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===lJ?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:O,isDragging:v,listeners:r?void 0:T,node:C,over:p,setNodeRef:w,setActivatorNodeRef:k,transform:S}}function N0t(){return A.useContext(Due)}const $0t="Droppable",L0t={timeout:25};function F0t(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=Nv($0t),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=A.useContext(P8),u=A.useRef({disabled:n}),d=A.useRef(!1),p=A.useRef(null),g=A.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...L0t,...i},S=D2(b??r),C=A.useCallback(()=>{if(!d.current){d.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=I8({callback:C,disabled:y||!s}),E=A.useCallback((O,R)=>{w&&(R&&(w.unobserve(R),d.current=!1),O&&w.observe(O))},[w]),[k,T]=a6(E),_=D2(t);return A.useEffect(()=>{!w||!k.current||(w.disconnect(),d.current=!1,w.observe(k.current))},[k,w]),A.useEffect(()=>(a({type:Wi.RegisterDroppable,element:{id:r,key:o,disabled:n,node:k,rect:p,data:_}}),()=>a({type:Wi.UnregisterDroppable,key:o,id:r})),[r]),A.useEffect(()=>{n!==u.current.disabled&&(a({type:Wi.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:p,isOver:l?.id===r,node:k,over:l,setNodeRef:T}}function DI(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function z0t(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function rS(e){return e!==null&&e>=0}function B0t(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function H0t(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Tue=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=DI(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},iS={scaleX:1,scaleY:1},U0t=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...iS}:null}const l=V0t(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...iS}:i<n&&i>=s?{x:0,y:a.height+l,...iS}:{x:0,y:0,...iS}};function V0t(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Oue="Sortable",Mue=on.createContext({activeIndex:-1,containerId:Oue,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Tue,disabled:{draggable:!1,droppable:!1}});function W0t(e){let{children:t,id:n,items:r,strategy:i=Tue,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=N0t(),d=Nv(Oue,n),p=a.rect!==null,g=A.useMemo(()=>r.map(T=>typeof T=="object"&&"id"in T?T.id:T),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=A.useRef(g),C=!B0t(g,S.current),w=v!==-1&&b===-1||C,E=H0t(o);Nc(()=>{C&&y&&u(g)},[C,g,y,u]),A.useEffect(()=>{S.current=g},[g]);const k=A.useMemo(()=>({activeIndex:b,containerId:d,disabled:E,disableTransforms:w,items:g,overIndex:v,useDragOverlay:p,sortedRects:z0t(g,l),strategy:i}),[b,d,E.draggable,E.droppable,w,g,v,l,p,i]);return on.createElement(Mue.Provider,{value:k},t)}const q0t=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return DI(n,r,i).indexOf(t)},K0t=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},G0t={duration:200,easing:"ease"},jue="transform",Y0t=T2.Transition.toString({property:jue,duration:0,easing:"linear"}),J0t={roleDescription:"sortable"};function Z0t(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=A.useState(null),a=A.useRef(n);return Nc(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=N0(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),A.useEffect(()=>{o&&s(null)},[o]),o}function X0t(e){let{animateLayoutChanges:t=K0t,attributes:n,disabled:r,data:i,getNewIndex:o=q0t,id:s,strategy:a,resizeObserverConfig:l,transition:c=G0t}=e;const{items:u,containerId:d,activeIndex:p,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=A.useContext(Mue),w=Q0t(r,g),E=u.indexOf(s),k=A.useMemo(()=>({sortable:{containerId:d,index:E,items:u},...i}),[d,i,E,u]),T=A.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:_,node:O,isOver:R,setNodeRef:P}=F0t({id:s,data:k,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...l}}),{active:L,activatorEvent:M,activeNodeRect:N,attributes:$,setNodeRef:B,listeners:F,isDragging:V,over:W,setActivatorNodeRef:q,transform:Z}=P0t({id:s,data:k,attributes:{...J0t,...n},disabled:w.draggable}),z=ggt(P,B),U=!!L,Y=U&&!y&&rS(p)&&rS(v),H=!S&&V,K=H&&Y?Z:null,ie=Y?K??(a??C)({rects:b,activeNodeRect:N,activeIndex:p,overIndex:v,index:E}):null,te=rS(p)&&rS(v)?o({id:s,items:u,activeIndex:p,overIndex:v}):E,ce=L?.id,ee=A.useRef({activeId:ce,items:u,newIndex:te,containerId:d}),J=u!==ee.current.items,X=t({active:L,containerId:d,isDragging:V,isSorting:U,id:s,index:E,items:u,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:c,wasDragging:ee.current.activeId!=null}),oe=Z0t({disabled:!X,index:E,node:O,rect:_});return A.useEffect(()=>{U&&ee.current.newIndex!==te&&(ee.current.newIndex=te),d!==ee.current.containerId&&(ee.current.containerId=d),u!==ee.current.items&&(ee.current.items=u)},[U,te,d,u]),A.useEffect(()=>{if(ce===ee.current.activeId)return;if(ce!=null&&ee.current.activeId==null){ee.current.activeId=ce;return}const fe=setTimeout(()=>{ee.current.activeId=ce},50);return()=>clearTimeout(fe)},[ce]),{active:L,activeIndex:p,attributes:$,data:k,rect:_,index:E,newIndex:te,items:u,isOver:R,isSorting:U,isDragging:V,listeners:F,node:O,overIndex:v,over:W,setNodeRef:z,setActivatorNodeRef:q,setDroppableNodeRef:P,setDraggableNodeRef:B,transform:oe??ie,transition:le()};function le(){if(oe||J&&ee.current.newIndex===E)return Y0t;if(!(H&&!wI(M)||!c)&&(U||X))return T2.Transition.toString({...c,property:jue})}}function Q0t(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function u6(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const e1t=[Jn.Down,Jn.Right,Jn.Up,Jn.Left],t1t=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(e1t.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=i.get(d.id);if(p)switch(e.code){case Jn.Down:r.top<p.top&&l.push(d);break;case Jn.Up:r.top>p.top&&l.push(d);break;case Jn.Left:r.left>p.left&&l.push(d);break;case Jn.Right:r.left<p.left&&l.push(d);break}});const c=Rgt({collisionRect:r,droppableRects:i,droppableContainers:l});let u=gue(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const d=o.get(n.id),p=o.get(u),g=p?i.get(p.id):null,y=p?.node.current;if(y&&g&&d&&p){const v=R8(y).some((T,_)=>a[_]!==T),S=Rue(d,p),C=n1t(d,p),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},E={x:g.left,y:g.top};return w.x&&w.y?E:_2(E,w)}}}};function Rue(e,t){return!u6(e)||!u6(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function n1t(e,t){return!u6(e)||!u6(t)||!Rue(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const r1t=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=X0t({id:e.id}),[l,c]=A.useState(!1);A.useEffect(()=>{hC(e.id).then(c)},[e.id]);const u={transform:T2.Transform.toString(o),transition:s,opacity:a?.5:1};return h.jsx(Mn,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:h.jsxs(Qn,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[h.jsx(se,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:h.jsx(q_e,{})}),h.jsx(ot,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?h.jsx(se,{component:"img",src:Db(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):h.jsx(wl,{sx:{bgcolor:jM(e),width:40,height:40,boxShadow:2},children:(()=>{const d=MM(e);return h.jsx(d,{sx:{fontSize:24}})})()}),h.jsxs(se,{sx:{flex:1},children:[h.jsx(re,{variant:"subtitle1",fontWeight:500,children:e.name}),h.jsxs(re,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},i1t=()=>{const{t:e}=en(),t=Fc(),{content:n,isLoading:r}=h0(),i=h_e(),[o,s]=A.useState([]),[a,l]=A.useState(!1);A.useEffect(()=>{if(n){const g=[...n].sort((y,b)=>{const v=y.priority??100,S=b.priority??100;return v-S});s(g),l(!1)}},[n]);const c=Ogt(JY(AI),JY(kI,{coordinateGetter:t1t})),u=A.useCallback(g=>{const{active:y,over:b}=g;b&&y.id!==b.id&&(s(v=>{const S=v.findIndex(w=>w.id===y.id),C=v.findIndex(w=>w.id===b.id);return DI(v,S,C)}),l(!0))},[]),d=A.useCallback(async()=>{const g=o.map((y,b)=>({id:y.id,priority:(b+1)*10}));try{await i(g),t.show({message:e("startup.saveSuccess"),severity:"success"}),l(!1)}catch(y){t.show({message:y instanceof Error?y.message:e("startup.saveFailed"),severity:"error"})}},[o,i,t,e]),p=A.useMemo(()=>o.map(g=>g.id),[o]);return r?h.jsxs(re,{children:[e("common.loading"),"..."]}):h.jsxs(Wt,{spacing:3,children:[h.jsx(W2,{items:[{name:e("nav.bridges"),to:Ot.bridges},{name:e("startup.title"),to:Ot.startup}]}),h.jsxs(se,{display:"flex",alignItems:"center",gap:2,children:[h.jsx(c0,{color:"primary",fontSize:"large"}),h.jsxs(se,{children:[h.jsx(re,{variant:"h5",fontWeight:600,children:e("startup.title")}),h.jsx(re,{variant:"body2",color:"text.secondary",children:e("startup.description")})]})]}),a&&h.jsx(zt,{severity:"info",action:h.jsx(Ue,{color:"inherit",size:"small",startIcon:h.jsx(F4,{}),onClick:d,children:e("startup.saveChanges")}),children:e("startup.unsavedChanges")}),h.jsx(j0t,{sensors:c,collisionDetection:jgt,onDragEnd:u,children:h.jsx(W0t,{items:p,strategy:U0t,children:h.jsx(Wt,{spacing:1,children:o.map((g,y)=>h.jsx(r1t,{bridge:g,index:y},g.id))})})}),o.length===0&&h.jsx(re,{color:"text.secondary",textAlign:"center",py:4,children:e("startup.noBridges")}),a&&o.length>0&&h.jsx(se,{display:"flex",justifyContent:"flex-end",children:h.jsx(Ue,{variant:"contained",startIcon:h.jsx(F4,{}),onClick:d,children:e("startup.saveOrder")})})]})},oS="https://riddix.github.io/home-assistant-matter-hub",Ot={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",areaSetup:"/bridges/area-setup",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",plugins:"/plugins",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:oS,support:`${oS}/support`,faq:{multiFabric:`${oS}/connect-multiple-fabrics`,bridgeConfig:`${oS}/bridge-configuration`}},o1t=[{path:"",element:h.jsx(fwe,{}),children:[{path:"",element:h.jsx(uOe,{})},{path:Ot.bridges,element:h.jsx(iOe,{})},{path:Ot.createBridge,element:h.jsx(elt,{})},{path:Ot.areaSetup,element:h.jsx(H6e,{})},{path:Ot.bridge(":bridgeId"),element:h.jsx(T_e,{})},{path:Ot.editBridge(":bridgeId"),element:h.jsx(tlt,{})},{path:Ot.devices,element:h.jsx(_Oe,{})},{path:Ot.networkMap,element:h.jsx(Bmt,{})},{path:Ot.health,element:h.jsx(xlt,{})},{path:Ot.labels,element:h.jsx(klt,{})},{path:Ot.lockCredentials,element:h.jsx(Olt,{})},{path:Ot.plugins,element:h.jsx(ugt,{})},{path:Ot.settings,element:h.jsx(mgt,{})},{path:Ot.startup,element:h.jsx(i1t,{})},{path:"*",element:h.jsx(Mlt,{})}]}],s1t={items:{isInitialized:!1,isLoading:!1}},a1t=FO(s1t,e=>{e.addCase(Lo.pending,t=>{t.items.isLoading=!0}).addCase(Lo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Lo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(AX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(_X.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(TX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(DX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(OX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(MX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),l1t={byBridge:{}},c1t=FO(l1t,e=>{e.addCase(Ru.pending,(t,n)=>{t.byBridge[n.meta.arg]=YA(t.byBridge[n.meta.arg],n)}).addCase(Ru.rejected,(t,n)=>{t.byBridge[n.meta.arg]=YA(t.byBridge[n.meta.arg],n)}).addCase(Ru.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=YA(t.byBridge[n.meta.arg],n)})}),u1t={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},YA=FO(u1t,e=>{e.addCase(Ru.pending,t=>{t.isLoading=!0}).addCase(Ru.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(Ru.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),d1t=K4e({reducer:{bridges:a1t,devices:c1t}}),_I=M3e({createStyledComponent:ge("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ve(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>ct({props:e,name:"MuiContainer"})});function f1t(e){return tt("MuiToolbar",e)}st("MuiToolbar",["root","gutters","regular","dense"]);const h1t=e=>{const{classes:t,disableGutters:n,variant:r}=e;return nt({root:["root",!n&&"gutters",r]},f1t,t)},p1t=ge("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ye(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Iue=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=h1t(c);return h.jsx(p1t,{as:o,className:_e(u.root,i),ref:n,ownerState:c,...l})});class m1t extends A.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?h.jsxs(se,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[h.jsx(QO,{color:"error",sx:{fontSize:64}}),h.jsx(re,{variant:"h5",fontWeight:600,children:pi.t("errorBoundary.title")}),h.jsx(re,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??pi.t("errorBoundary.fallbackMessage")}),h.jsx(Ue,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:pi.t("errorBoundary.reload")})]}):this.props.children}}function g1t(e){return tt("MuiFab",e)}const cJ=st("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),y1t=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${ve(i)}`,t==="inherit"?"colorInherit":t]},s=nt(o,g1t,r);return{...r,...s}},b1t=ge(ss,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>Li(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${ve(n.size)}`],n.color==="inherit"&&t.colorInherit,t[ve(n.size)],t[n.color]]}})(Ye(({theme:e})=>({...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${cJ.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]})),Ye(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Gn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Ye(({theme:e})=>({[`&.${cJ.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),v1t=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:p="circular",...g}=r,y={...r,color:s,component:a,disabled:l,disableFocusRipple:c,size:d,variant:p},b=y1t(y);return h.jsx(b1t,{className:_e(b.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:_e(b.focusVisible,u),ownerState:y,ref:n,...g,classes:b,children:i})}),x1t=[{code:"en",flag:"🇬🇧",name:"English"},{code:"de",flag:"🇩🇪",name:"Deutsch"},{code:"fr",flag:"🇫🇷",name:"Français"},{code:"es",flag:"🇪🇸",name:"Español"},{code:"it",flag:"🇮🇹",name:"Italiano"},{code:"zh",flag:"🇨🇳",name:"中文"},{code:"zh-TW",flag:"🇹🇼",name:"繁體中文"},{code:"th",flag:"🇹🇭",name:"ไทย"},{code:"sv",flag:"🇸🇪",name:"Svenska"},{code:"tr",flag:"🇹🇷",name:"Türkçe"},{code:"ru",flag:"🇷🇺",name:"Русский"}],S1t="hamh-custom-languages";function w1t(){try{const e=localStorage.getItem(S1t);return e?JSON.parse(e).map(n=>({code:n.code,flag:"🌐",name:n.name})):[]}catch{return[]}}const C1t="https://github.com/RiDDiX/home-assistant-matter-hub/issues/new?labels=translation&title=Translation+improvement";function k1t(){const{t:e,i18n:t}=en(),[n,r]=A.useState(!1),i=A.useRef(null),o=A.useMemo(()=>[...x1t,...w1t()],[]),s=t.language??"en",a=o.some(d=>d.code===s)?s:s.split("-")[0]??"en",l=A.useCallback(()=>{r(d=>!d)},[]),c=A.useCallback(d=>{t.changeLanguage(d),r(!1)},[t]),u=A.useCallback(()=>{r(!1)},[]);return h.jsx(rX,{onClickAway:u,children:h.jsxs(se,{children:[h.jsx(v1t,{ref:i,size:"small",color:"primary",onClick:l,"aria-label":"Change language",sx:{position:"fixed",bottom:24,right:24,zIndex:1300},children:h.jsx(Q_e,{})}),h.jsx(G2,{open:n,anchorEl:i.current,placement:"top-end",transition:!0,sx:{zIndex:1300},children:({TransitionProps:d})=>h.jsx(M4,{...d,timeout:200,children:h.jsxs(zr,{elevation:8,sx:{mb:1,py:.5,minWidth:160,borderRadius:2,overflow:"hidden"},children:[o.map(p=>h.jsxs(se,{onClick:()=>c(p.code),sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,cursor:"pointer",bgcolor:a===p.code?"action.selected":"transparent","&:hover":{bgcolor:"action.hover"},transition:"background-color 0.15s"},children:[h.jsx(re,{sx:{fontSize:"1.4rem",lineHeight:1,userSelect:"none"},children:p.flag}),h.jsx(re,{variant:"body2",fontWeight:a===p.code?600:400,children:p.name})]},p.code)),h.jsx(Dr,{}),h.jsxs(se,{sx:{display:"flex",alignItems:"flex-start",gap:.75,px:2,py:1},children:[h.jsx(VO,{sx:{fontSize:14,mt:.25,color:"text.secondary"}}),h.jsxs(re,{variant:"caption",color:"text.secondary",sx:{lineHeight:1.4},children:[e("languageSwitcher.disclaimer")," ",h.jsx(V2,{href:C1t,target:"_blank",rel:"noopener",sx:{fontSize:"inherit"},children:e("languageSwitcher.contribute")})]})]})]})})})]})})}const E1t="home-assistant-matter-hub",A1t={name:E1t};function Pue(){const e="2.1.0-alpha.607",[t,n]=A.useState(null);A.useEffect(()=>{fetch("api/health").then(i=>i.ok?i.json():null).then(i=>{i?.version&&n(i.version)}).catch(()=>{})},[]);const r=A.useMemo(()=>!t||e==="0.0.0-dev"?!1:e!==t,[t]);return A.useMemo(()=>({name:A1t.name,version:t??e,frontendVersion:e,backendVersion:t,versionMismatch:r}),[t,r])}const D1t=()=>{const{t:e}=en(),t=[{name:e("footer.github"),url:Ot.githubRepository},{name:e("footer.documentation"),url:Ot.documentation},{name:e("footer.support"),url:Ot.support}];return h.jsxs(_I,{sx:{mt:16,mb:4},children:[h.jsx(Dr,{sx:{mt:4,mb:4}}),h.jsx(ht,{container:!0,spacing:2,justifyContent:"center",children:t.map((n,r)=>h.jsx(ht,{size:{xs:12,sm:"auto"},children:h.jsx(Ue,{fullWidth:!0,size:"small",variant:"outlined",component:V2,href:n.url,target:"_blank",children:n.name})},r.toString()))})]})};function _1t(e){return tt("MuiAppBar",e)}st("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const T1t=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ve(t)}`,`position${ve(n)}`]};return nt(i,_1t,r)},uJ=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,O1t=ge(zr,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ve(n.position)}`],t[`color${ve(n.color)}`]]}})(Ye(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Gn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?uJ(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?uJ(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),M1t=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=T1t(c);return h.jsx(O1t,{square:!0,component:"header",ownerState:c,elevation:4,className:_e(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function j1t(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=oa(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function R1t(e){return typeof e=="function"?e():e}function sS(e,t,n){const r=R1t(n),i=j1t(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const I1t=A.forwardRef(function(t,n){const r=Ki(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:d=i,in:p,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:E=o,TransitionComponent:k=Ja,...T}=t,_=A.useRef(null),O=Br(Rf(l),_,n),R=W=>q=>{W&&(q===void 0?W(_.current):W(_.current,q))},P=R((W,q)=>{sS(u,W,c),IO(W),g&&g(W,q)}),L=R((W,q)=>{const Z=gf({timeout:E,style:w,easing:d},{mode:"enter"});W.style.webkitTransition=r.transitions.create("-webkit-transform",{...Z}),W.style.transition=r.transitions.create("transform",{...Z}),W.style.webkitTransform="none",W.style.transform="none",b&&b(W,q)}),M=R(y),N=R(C),$=R(W=>{const q=gf({timeout:E,style:w,easing:d},{mode:"exit"});W.style.webkitTransition=r.transitions.create("-webkit-transform",q),W.style.transition=r.transitions.create("transform",q),sS(u,W,c),v&&v(W)}),B=R(W=>{W.style.webkitTransition="",W.style.transition="",S&&S(W)}),F=W=>{s&&s(_.current,W)},V=A.useCallback(()=>{_.current&&sS(u,_.current,c)},[u,c]);return A.useEffect(()=>{if(p||u==="down"||u==="right")return;const W=H2(()=>{_.current&&sS(u,_.current,c)}),q=oa(_.current);return q.addEventListener("resize",W),()=>{W.clear(),q.removeEventListener("resize",W)}},[u,p,c]),A.useEffect(()=>{p||V()},[p,V]),h.jsx(k,{nodeRef:_,onEnter:P,onEntered:M,onEntering:L,onExit:$,onExited:B,onExiting:N,addEndListener:F,appear:a,in:p,timeout:E,...T,children:(W,{ownerState:q,...Z})=>A.cloneElement(l,{ref:O,style:{visibility:W==="exited"&&!p?"hidden":void 0,...w,...l.props.style},...Z})})});function P1t(e){return tt("MuiDrawer",e)}st("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Nue=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},N1t=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ve(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ve(n)}`,r!=="temporary"&&`paperAnchorDocked${ve(n)}`]};return nt(i,P1t,t)},$1t=ge(nM,{name:"MuiDrawer",slot:"Root",overridesResolver:Nue})(Ye(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),L1t=ge("div",{shouldForwardProp:Li,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Nue})({flex:"0 0 auto"}),F1t=ge(zr,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ve(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ve(n.anchor)}`]]}})(Ye(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),$ue={left:"right",right:"left",top:"down",bottom:"up"};function z1t(e){return["left","right"].includes(e)}function B1t({direction:e},t){return e==="rtl"&&z1t(t)?$ue[t]:t}const H1t=A.forwardRef(function(t,n){const r=ct({props:t,name:"MuiDrawer"}),i=Ki(),o=Lc(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:p=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:E=s,variant:k="temporary",slots:T={},slotProps:_={},...O}=r,R=A.useRef(!1);A.useEffect(()=>{R.current=!0},[]);const P=B1t({direction:o?"rtl":"ltr"},a),M={...r,anchor:a,elevation:d,open:v,variant:k,...O},N=N1t(M),$={slots:{transition:w,...T},slotProps:{paper:S,transition:C,..._,backdrop:MO(_.backdrop||{...l,...g},{transitionDuration:E})}},[B,F]=ft("root",{ref:n,elementType:$1t,className:_e(N.root,N.modal,u),shouldForwardComponentProp:!0,ownerState:M,externalForwardedProps:{...$,...O,...y},additionalProps:{open:v,onClose:b,hideBackdrop:p,slots:{backdrop:$.slots.backdrop},slotProps:{backdrop:$.slotProps.backdrop}}}),[V,W]=ft("paper",{elementType:F1t,shouldForwardComponentProp:!0,className:_e(N.paper,S.className),ownerState:M,externalForwardedProps:$,additionalProps:{elevation:k==="temporary"?d:0,square:!0,...k==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[q,Z]=ft("docked",{elementType:L1t,ref:n,className:_e(N.root,N.docked,u),ownerState:M,externalForwardedProps:$,additionalProps:O}),[z,U]=ft("transition",{elementType:I1t,ownerState:M,externalForwardedProps:$,additionalProps:{in:v,direction:$ue[P],timeout:E,appear:R.current}}),Y=h.jsx(V,{...W,children:c});if(k==="permanent")return h.jsx(q,{...Z,children:Y});const H=h.jsx(z,{...U,children:Y});return k==="persistent"?h.jsx(q,{...Z,children:H}):h.jsx(B,{...F,children:H})}),U1t=PZ({themeId:ja}),V1t={error:Nf,warn:u0,info:eM,debug:dC},W1t=({open:e,onClose:t})=>{const{t:n}=en(),r=Ki(),i=A.useMemo(()=>({error:r.palette.error.main,warn:r.palette.warning.main,info:r.palette.info.main,debug:r.palette.secondary.main}),[r]),[o,s]=A.useState([]),[a,l]=A.useState(!0),[c,u]=A.useState("error,warn,info".split(",")),[d,p]=A.useState(""),[g,y]=A.useState(!0),b=A.useCallback(async()=>{try{const E=new URLSearchParams({level:c.join(","),limit:"500",...d&&{search:d}}),k=await fetch(`api/logs?${E}`);if(k.ok){const T=await k.json();s(T.entries)}}catch(E){console.error("Failed to fetch logs:",E)}finally{l(!1)}},[c,d]);A.useEffect(()=>{e&&b()},[e,b]),A.useEffect(()=>{if(!g||!e)return;const E=setInterval(b,5e3);return()=>clearInterval(E)},[g,e,b]);const v=E=>{u(Array.isArray(E.target.value)?E.target.value:[E.target.value])},S=E=>{p(E.target.value)},C=async()=>{try{await fetch("api/logs",{method:"DELETE"}),s([])}catch(E){console.error("Failed to clear logs:",E)}},w=E=>{const k=V1t[E]||eM;return h.jsx(k,{sx:{fontSize:16,color:i[E]}})};return h.jsxs(Po,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[h.jsxs($o,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(dC,{}),n("logs.title"),h.jsx(se,{sx:{flexGrow:1}}),h.jsx(Lt,{title:n("logs.autoRefresh"),children:h.jsx(ot,{label:g?"Auto":"Manual",color:g?"success":"default",size:"small",onClick:()=>y(!g),sx:{cursor:"pointer"}})}),h.jsx(qt,{onClick:t,children:h.jsx(L4,{})})]}),h.jsxs(No,{children:[h.jsx(Wt,{spacing:2,sx:{mb:2},children:h.jsxs(Wt,{direction:"row",spacing:2,alignItems:"center",children:[h.jsxs(rs,{size:"small",sx:{minWidth:200},children:[h.jsx(Ia,{children:n("logs.logLevel")}),h.jsxs(ts,{value:c,label:n("logs.logLevel"),onChange:v,multiple:!0,renderValue:E=>h.jsx(se,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(E)?E:[E]).map(k=>h.jsx(ot,{label:k.toUpperCase(),size:"small",sx:{backgroundColor:i[k],color:"white"}},k))}),children:[h.jsx(Bn,{value:"error",children:n("logs.error")}),h.jsx(Bn,{value:"warn",children:n("logs.warning")}),h.jsx(Bn,{value:"info",children:n("logs.info")}),h.jsx(Bn,{value:"debug",children:n("logs.debug")})]})]}),h.jsx(zn,{size:"small",placeholder:n("logs.searchPlaceholder"),value:d,onChange:S,sx:{flexGrow:1}}),h.jsx(Ue,{variant:"outlined",onClick:b,children:n("common.refresh")}),h.jsx(Ue,{variant:"outlined",color:"error",onClick:C,children:n("common.delete")})]})}),h.jsx(se,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:a?h.jsx(se,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsxs(re,{children:[n("common.loading"),"..."]})}):o.length===0?h.jsx(se,{sx:{display:"flex",justifyContent:"center",p:4},children:h.jsx(re,{color:"text.secondary",children:n("logs.noResults")})}):h.jsx(Wt,{spacing:1,children:o.map((E,k)=>h.jsxs(se,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[h.jsxs(se,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[w(E.level),h.jsx(re,{variant:"caption",color:"text.secondary",children:new Date(E.timestamp).toLocaleString()}),h.jsx(ot,{label:E.level.toUpperCase(),size:"small",sx:{backgroundColor:i[E.level],color:r.palette.getContrastText(i[E.level]??r.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),h.jsx(re,{sx:{ml:3},children:E.message}),E.context&&h.jsx(re,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(E.context,null,2)})]},`${E.timestamp}-${E.level}-${k}`))})})]}),h.jsx(es,{children:h.jsx(Ue,{onClick:t,children:n("common.close")})})]})};function dJ(){const{t:e}=en(),{isConnected:t}=RX(),[n,r]=A.useState(null),[i,o]=A.useState(!1);A.useEffect(()=>{const b=async()=>{try{const S=await fetch("api/health");if(S.ok){const C=await S.json();r(C),o(!1)}else o(!0)}catch{o(!0)}};b();const v=setInterval(b,3e4);return()=>clearInterval(v)},[]);const s=b=>{const v=Math.floor(b/3600),S=Math.floor(b%3600/60);return v>0?`${v}h ${S}m`:`${S}m`},a=n?.status==="healthy"&&!i,l=n?.services?.bridges,c=l&&l.total>0&&l.running===l.total,u=l&&l.total===0,d=n?h.jsxs(se,{sx:{p:.5},children:[h.jsxs("div",{children:[h.jsxs("strong",{children:[e("health.version"),":"]})," ",n.version??e("status.unknown")]}),h.jsxs("div",{children:[h.jsxs("strong",{children:[e("health.uptime"),":"]})," ",s(n.uptime??0)]}),n.services?.bridges&&h.jsxs("div",{children:[h.jsxs("strong",{children:[e("nav.bridges"),":"]})," ",n.services.bridges.running??0,"/",n.services.bridges.total??0," ",e("common.running").toLowerCase(),(n.services.bridges.stopped??0)>0&&` (${n.services.bridges.stopped} ${e("common.stopped").toLowerCase()})`]}),n.services?.homeAssistant&&h.jsxs("div",{children:[h.jsxs("strong",{children:[e("health.homeAssistant"),":"]})," ",n.services.homeAssistant.connected?e("health.connected"):e("health.disconnected")]}),h.jsxs("div",{children:[h.jsx("strong",{children:"WebSocket:"})," ",e(t?"health.connected":"health.disconnected")]})]}):e("status.loadingHealth"),p=()=>i||!a?h.jsx(Nf,{fontSize:"small"}):c?h.jsx(Za,{fontSize:"small"}):h.jsx(Y6,{fontSize:"small"}),g=()=>i||!a?"error":!c||!t?"warning":"success",y=()=>e(i?"status.error":a?t?u?"status.noBridges":c?"common.online":"common.starting":"common.offline":"status.unhealthy");return h.jsx(Lt,{title:d,arrow:!0,children:h.jsx(ot,{icon:p(),label:y(),color:g(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const q1t=e=>A.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{style:{display:"inline"}},A.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),A.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),K1t=e=>{const t=Pue();return h.jsxs(se,{component:Oc,to:Ot.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[h.jsx(q1t,{style:{height:"40px"}}),h.jsx(re,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ve).join("-")}),e.large&&h.jsx(re,{variant:"caption",component:"span",children:t.version})]})},G1t=()=>{const e=U1t("(min-width:600px)"),{mode:t,setMode:n}=I6(),[r,i]=A.useState(!1),[o,s]=A.useState(!1),a=$c(),l=Yu(),c=y=>y?y==="/"?l.pathname==="/":l.pathname.startsWith(y):!1,u=()=>{n(t==="dark"?"light":"dark")},{t:d}=en(),p=[{label:d("dashboard.title"),icon:h.jsx(kM,{}),to:Ot.dashboard},{label:d("nav.bridges"),icon:h.jsx(Ly,{}),to:Ot.bridges},{label:d("nav.devices"),icon:h.jsx(aa,{}),to:Ot.devices},{label:d("nav.networkMap"),icon:h.jsx(SM,{}),to:Ot.networkMap},{label:d("nav.startupOrder"),icon:h.jsx(c0,{}),to:Ot.startup},{label:d("nav.lockCredentials"),icon:h.jsx(ju,{}),to:Ot.lockCredentials},{label:d("nav.filterReference"),icon:h.jsx(EM,{}),to:Ot.labels},{label:"Plugins",icon:h.jsx($y,{}),to:Ot.plugins},{label:d("nav.settings"),icon:h.jsx(f0,{}),to:Ot.settings},{label:d(t==="dark"?"nav.lightMode":"nav.darkMode"),icon:t==="dark"?h.jsx(tTe,{}):h.jsx(U_e,{}),onClick:u},{label:d("nav.systemLogs"),icon:h.jsx(dC,{}),onClick:()=>i(!0)},{label:d("nav.health"),icon:h.jsx(iM,{}),to:Ot.health}],g=y=>{s(!1),y.onClick?y.onClick():y.to&&a(y.to)};return h.jsxs(se,{children:[h.jsx(M1t,{sx:{height:"72px"},children:h.jsx(Iue,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:h.jsxs(_I,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsx(K1t,{large:e}),e?h.jsxs(se,{sx:{display:"flex",alignItems:"center",gap:1},children:[p.map(y=>y.to?h.jsx(Lt,{title:y.label,children:h.jsx(qt,{component:Oc,to:y.to,sx:{color:"inherit",bgcolor:c(y.to)?"rgba(255,255,255,0.15)":"transparent",borderRadius:1},children:y.icon})},y.label):h.jsx(Lt,{title:y.label,children:h.jsx(qt,{onClick:y.onClick,sx:{color:"inherit"},children:y.icon})},y.label)),h.jsx(dJ,{})]}):h.jsxs(se,{sx:{display:"flex",alignItems:"center",gap:.5},children:[h.jsx(dJ,{}),h.jsx(qt,{onClick:()=>s(!0),sx:{color:"inherit"},children:h.jsx(nTe,{})})]})]})})}),h.jsx(H1t,{anchor:"right",open:o,onClose:()=>s(!1),children:h.jsx(Fo,{sx:{width:250},children:p.map(y=>h.jsxs(oCe,{selected:c(y.to),onClick:()=>g(y),children:[h.jsx(Io,{children:y.icon}),h.jsx(ao,{primary:y.label})]},y.label))})}),h.jsx(W1t,{open:r,onClose:()=>i(!1)})]})},Y1t=()=>{const{versionMismatch:e,frontendVersion:t,backendVersion:n}=Pue(),{isConnected:r}=RX();return h.jsxs(se,{children:[h.jsx(G1t,{}),h.jsx(Iue,{}),e&&h.jsxs(zt,{severity:"warning",variant:"filled",sx:{borderRadius:0},action:h.jsx(Ue,{color:"inherit",size:"small",onClick:()=>window.location.reload(),children:"Reload"}),children:["Version mismatch: frontend ",t,", backend ",n,". Please reload to get the latest UI."]}),!r&&h.jsx(zt,{severity:"error",variant:"filled",sx:{borderRadius:0},children:"Connection lost — data may be outdated. Reconnecting…"}),h.jsx(_I,{sx:{p:2},children:h.jsx(m1t,{children:h.jsx(HJ,{})})}),h.jsx(D1t,{}),h.jsx(k1t,{})]})},J1t=M6({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let a4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");a4?.startsWith("http")&&(a4=new URL(a4).pathname);const Z1t=Pme([{path:"/",element:h.jsx(Y1t,{}),children:o1t}],{basename:a4});Xfe.createRoot(document.getElementById("root")).render(h.jsx(A.StrictMode,{children:h.jsx(mhe,{store:d1t,children:h.jsxs(H5e,{theme:J1t,children:[h.jsx($5e,{}),h.jsx(JZ,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),h.jsx(dwe,{children:h.jsx(n4e,{children:h.jsx(Gme,{router:Z1t})})})]})})}));
|